Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Another difference between io-net and io-pkt drivers: (3 Items)
   
Another difference between io-net and io-pkt drivers  
Among other differences, io-pkt drivers call dev_attach(), whereas io-net drivers call the reg() function in io-net.  
And that difference brings up an interesting point: io-net drivers send an advertisement up the "stack" to notify other 
modules of their existence --- something similar must happen with io-pkt drivers, although I've thus far been unable to 
identify the mechanism by which that happens.

Murf
Re: Another difference between io-net and io-pkt drivers  
On Fri, Nov 16, 2007 at 10:04:56AM -0500, John Murphy wrote:
> Among other differences, io-pkt drivers call dev_attach(), whereas
> io-net drivers call the reg() function in io-net.  And that difference
> brings up an interesting point: io-net drivers send an advertisement up
> the "stack" to notify other modules of their existence --- something
> similar must happen with io-pkt drivers, although I've thus far been
> unable to identify the mechanism by which that happens.
> 
> Murf

You have to attach to the various layers.  dev_attach() will
allocate a device structure then call the second layer attach
func in the driver.  This in turn calls if_attach(), then
usually either ether_ifattach() or ieee80211_ifattach().

Take a look at sys/dev_qnx/sample.

-seanb
Re: Another difference between io-net and io-pkt drivers  
OK, I figured it was something like that, but I got lost somewhere around the second level of attaches:).

Thanks!

Murf