Some general information: UPDATE: 8/24/05: I've given up on the LKM version. It still compiles, but last I checked it crashes while loading. I'm completely focusing on the in-kernel version right now, as I can use gdb with it. Also I've switched to using an Intel EtherExpress Pro/100+ as my test card, as the Windows DDK comes with the source for it's driver. The version of ndis_driver_data.h in the CVS repository is generated from a Windows driver I compiled from this source, although I cranked up the verbosity level to MP_LOUD (it prints a lot of stuff), and added some DbgPrint's of my own. The driver for the Pro/100 works resonably well right now. There still seems to be one really annoying bug, however when viewing certian webpages (such as www.google.com, and www.slashdot.org) it crashes. I haven't found any other way to reproduce this problem. Other webpages don't cause any problems (www.freebsd.org, www.netbsd.org). Another problem is that large downloads cause the driver to "stall", and then no network interfaces on the system seem to work at all (I'm thinking the IPL might be stuck at IPL_NET). Some things that do work without any problems, however include ssh, DHCP, ftp (with no large transfers), and more. As of 7/16/05 compat/ndis and dev/if_ndis can both be compiled and loaded as kernel modules, or compiled directly into the kernel. The LKM version dosen't work on NetBSD 2.0.2 however, since it uses some newer features. I've been using 3.99.7, but I think it will work on any version with lkm/dev/pci/dummy_pci, as this is the model I follow for attaching the device. Also, I'm not sure if it can be compiled into the kernel in any other versions. In addition right now loading the module or booting a kernel with it compiled in causes a crash, so doing this is only usefull for debugging. To compile into the kernel: -cd /usr/src/sys/arch/i386/config -cp GENERIC NDIS_KERN -edit NDIS_KERN, and enter the following line in the "PCI network interfaces" section: ndis* at pci? dev ? function ? # NDIS Network Driver -if you want to run the kernel debugger, do the appropriate changes to NDIS_KERN (see http://www.netbsd.org/Documentation/kernel/kgdb.html) -now edit files.i386 and add the following lines in the apropriate section: device ndis: ndis, ether, ifnet, arp attach ndis at pci file dev/if_ndis/if_ndis.c file dev/if_ndis/if_ndis_pci.c -also add the following to files.i386 include "compat/ndis/files.ndis" -now do cd /usr/src/sys/dev ln -s /path/to/your/ndis/sys/dev/if_ndis cd /usr/src/sys/compat ln -s /path/to/your/ndis/sys/compat/ndis cd /usr/src/sys ln -s /path/to/your/ndis/sys/modules -now go back to /usr/src/sys/arch/i386/config and do: config NDIS_KERN cd ../compile/NDIS_KERN make depend make -don't forget to do this beforehand (same as for the LKM version): cd sys/modules/ndis ln -s ../../compat ln -s ../../dev cd sys/dev/if_ndis ln -s if_ndis.c if_ndis_lkm.c cd ../../modules/if_ndis/ ln -s ../../compat ln -s ../../dev To build the ndisapi module: cd sys/modules/ndis ln -s ../../compat ln -s ../../dev make To load the module as root (works but more work probrably needs to be done) modload ndis.o To build ndiscvt: cd usr.sbin/ndiscvt make You will need to generate an ndis_driver_data.h file from the Windows driver for your card. I provided one for my card, in case anyone dosen't want to bother with this and just wants to see it compile. To generate an ndis_driver_data.h file for your card: Get the appropriate Windows driver and find the .inf and .sys files ndiscvt -i path/to/.inf/file -s path/to/.sys/file -o ../../sys/modules/if_ndis_driver_data.h To build the ndis module: cd sys/dev/if_ndis ln -s if_ndis.c if_ndis_lkm.c cd ../../modules/if_ndis/ ln -s ../../compat ln -s ../../dev make To load the module as root: modload -s if_ndis.o To unload: modunload ndis -After loading you should see your card attached in the output of the "dmesg" command if everything is set up right. contact: rittera@cc.wwu.edu project webpage: http://netbsd-soc.sourceforge.net/projects/ndis/ project blog (check for latest status): http://ndis-netbsd.blogspot.com/