accessing tcp/ip from a device driver
From: cuba five (cubafive_at_yahoo.com)
Date: 10/03/04
- Previous message: Benjamin Walkenhorst: "Re: Disk sizes and the 1.6.x series"
- Next in thread: phn_at_icke-reklam.ipsec.nu: "Re: accessing tcp/ip from a device driver"
- Reply: phn_at_icke-reklam.ipsec.nu: "Re: accessing tcp/ip from a device driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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?
- Previous message: Benjamin Walkenhorst: "Re: Disk sizes and the 1.6.x series"
- Next in thread: phn_at_icke-reklam.ipsec.nu: "Re: accessing tcp/ip from a device driver"
- Reply: phn_at_icke-reklam.ipsec.nu: "Re: accessing tcp/ip from a device driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|