Subject: SoC: NDIS
To: None <tech-kern@netbsd.org>
From: Alan Ritter <rittera@cc.wwu.edu>
List: tech-kern
Date: 06/28/2005 17:34:02
Hello All, 
 
I am very excited to announce my proposal to port NDIS from FreeBSD to NetBSD 
has been accepted by NetBSD and Google as one of the Summer of Code projects.  
I hope that by the end of the summer I won't have to plug my laptop in to get 
network access while I'm working on NetBSD :-) 
 
I have some experience writing device drivers for both Windows and NetBSD, 
although I don't have any experience with network drivers.  I think I've found 
a good resource for this however, the src/sys/lkm/net/ethfoo/ driver.  Although 
this driver doesn't talk to any hardware it does demonstrate some network and 
Loadable Kernel Module issues. 
 
The FreeBSD NDIS driver (my starting point) consists of 3 main areas: 
-compat/ndis/ compiles to a Loadable Kernel Module which implements Windows 
NDIS, and parts of some other Windows APIs 
-dev/if_ndis/ "links" with the Windows .sys and .inf files to make the Loadable 
Kernel Module which is a driver for the Network Card 
-usr.sbin/ndiscvt/ a userland program to convert the .inf and .sys files into a  
ndis_driver_data.h file, which can be compiled with the files in dev/if_ndis to 
produce the driver module. 
 
I've already gotten a little bit of a start on this project, though it's not 
much.  Right now I'm just trying to figure out how to handle matching and 
attaching the device.  I'm using pci_find_device() to get the match/probe 
function called, which matches a device with the proper vendor/product ID as 
identified in the Windows .inf file.  I haven't gotten the attach function 
called yet.  After reading through this post on tech-kern a bit, however I'm 
not sure pci_find_device() is the way to go: 
(http://comments.gmane.org/gmane.os.netbsd.devel.kernel/10989) in addition this 
obviously won't work for pccard which I'm completely ignoring as of now.  I 
don't even know if it's possible to write a Loadable Kernel Module driver for 
pccard. 
 
Anyway here's links to some pages dealing with my project: 
-A blog I set up for this project: http://ndis-netbsd.blogspot.com/ 
-The page on SourceForge: http://netbsd-soc.sourceforge.net/projects/ndis/ 
 
Thanks to everyone for accepting me, and helping get this going :-)