accessing tcp/ip from a device driver

From: cuba five (cubafive_at_yahoo.com)
Date: 10/03/04

  • Next message: Mr K: "NetBsd/Cobalt Qube 2"
    Date: 3 Oct 2004 10:01:20 -0700
    
    

    I am interested in learning the proper way to "talk" over TCP/IP from
    inside a device driver, i.e. like open a socket.

    I have Netbsd 1.6.2 installed and have read all the docs relating to
    device driver writing on netbsg.org; I have created and successfully
    tested a skeleton device driver and my next step is to simply call
    socket() and see what happens....

    But perhaps those with more wisdom than I can shed some light on this
    for me?

    I see ether_ifattach() or if_attach() but perhps those are only for
    ethernet drivers? (man ethersubr and man 9 arp are a little vague)

    For example, say I wanted a sample device driver that would ping
    another computer: open() - setup socket, ioctl(IP) - set IP address,
    read() - get ping results (but not continuous of course). (Not that
    anyone would want to do this, or that this is lame, but just as an
    example.)

    My problem, in learning netbsd, is that I like to see an API, i.e.
    here is a list of system calls one can make from inside a device
    driver:

     printf
     alloc
     bus_dmamem_alloc
     strcpy
     bus_space_read

    etc. Wouldn't it be nice to have a list of them all, just like Appedix
    B: Standard Library of K&R 2nd ed?


  • Next message: Mr K: "NetBsd/Cobalt Qube 2"

    Relevant Pages

    • Re: [RFC][PATCH 0/3] TCP/IP Critical socket communication mechanism
      ... >> pool when the allocation happens in the device driver and we have no ... >> idea which socket the packet is destined for? ...
      (Linux-Kernel)
    • Re: accessing tcp/ip from a device driver
      ... > inside a device driver, i.e. like open a socket. ... > device driver writing on netbsg.org; ... What you should consider is a user-lever app that opens sockets. ...
      (comp.unix.bsd.netbsd.misc)
    • Re: Help: barcode scanner
      ... Suggest searching for bardcode options at socket... ... they have a number of ppc solutions such as ... These and others, come with a device driver that, once you trigger a scan, simply types the results of the scan into the current application.. ...
      (microsoft.public.pocketpc)
    • LTModem on NetBSD 2.0
      ... DO you have any experience in NetBSD, ... The reason I ask is that I have installed this on an IBM P3. ... How do I install the device driver? ...
      (freebsd-questions)
    • Best Xen Newsgroup or Forum?
      ... I'm very interested in learning not only how to use Xen, ... differences between the Xen and standard kernel distros. ... I'm now more interested in device driver and application ... development in this environment. ...
      (alt.os.linux.suse)