Re: accessing tcp/ip from a device driver
phn_at_icke-reklam.ipsec.nu
Date: 10/04/04
- Next message: Benjamin Walkenhorst: "Number of open files per process"
- Previous message: David Lord: "Re: DHCP and ordinary networking"
- In reply to: cuba five: "accessing tcp/ip from a device driver"
- Next in thread: cuba five: "Re: accessing tcp/ip from a device driver"
- Reply: cuba five: "Re: accessing tcp/ip from a device driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 4 Oct 2004 15:51:47 +0000 (UTC)
cuba five <cubafive@yahoo.com> wrote:
> 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?
What you should consider is a user-lever app that opens sockets. Kernel
modules is not supposed to use sockets.
--
Peter Håkanson
IPSec Sverige ( At Gothenburg Riverside )
Sorry about my e-mail address, but i'm trying to keep spam out,
remove "icke-reklam" if you feel for mailing me. Thanx.
- Next message: Benjamin Walkenhorst: "Number of open files per process"
- Previous message: David Lord: "Re: DHCP and ordinary networking"
- In reply to: cuba five: "accessing tcp/ip from a device driver"
- Next in thread: cuba five: "Re: accessing tcp/ip from a device driver"
- Reply: cuba five: "Re: accessing tcp/ip from a device driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|