NDIS(4)

๐Ÿ’– NDIS(4) ๐Ÿ’–

okay bestie so this is the manual page for ndis from the Kernel Interfaces Manual โ€” yes we're in the kernel section, we're fancy now ๐Ÿ’…. Strap in, this one's a whole vibe.


โœจ NAME โœจ

ndis โ€” the NDIS miniport driver wrapper ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

options NDISAPI
device ndis
device wlan

like. that's it. that's the whole setup. so simple, so clean, we love a minimal config ๐ŸŽ€


โœจ DESCRIPTION โœจ

okay so the ndis driver is a wrapper. its whole job? letting binary Windowsยฎ NDIS miniport network drivers run on FreeBSD. yes fr fr, Windowsยฎ drivers. on FreeBSD. iconic behavior honestly. ๐Ÿ‘‘

here's the tea: ndis ships in source code form, and you have to combine it with the Windowsยฎ driver that came with your network adapter. it uses the ndisapi kernel subsystem to relocate and link that Windowsยฎ binary so it can hang out with native code. the ndisapi subsystem is basically the translator โ€” it provides an interface between the NDIS API and the FreeBSD networking infrastructure. the Windowsยฎ driver is essentially fooled into thinking it's running on Windowsยฎ. ๐Ÿ™ˆ

but bestie โ€” this means the ndis driver is only useful on x86 machines. no cap. that's the limit.

so how do you build a functional driver? you need a copy of the driver distribution media for your card. from that distribution you gotta extract two files:

  1. the .SYS file โ€” that's the driver binary code
  2. its companion .INF file โ€” that's where the definitions live for driver-specific registry keys and other installation data like device identifiers

then you convert those two files into a kernel module file using the ndisgen(8) utility. that file contains a binary image of the driver plus registry key data. and when the ndis driver loads, it creates sysctl(3) nodes for each registry key it pulled out of the .INF file. slay. โœจ


๐Ÿซถ what it can actually talk to ๐Ÿซถ

the ndis driver is designed to support mainly Ethernet and wireless network devices with PCI, PCMCIA and USB bus attachments. (Cardbus devices are also supported as a subset of PCI.) it can handle many different media types and speeds, she's versatile ๐Ÿ’–

one limitation though โ€” and this is important, ngl โ€” there is no consistent way to learn if an Ethernet device is operating in full or half duplex mode. the NDIS API allows for a generic means for determining link state and speed, but not the duplex setting. ๐Ÿ˜ญ

there may be driver-specific registry keys to control the media setting, which you can configure via the sysctl(8) command. so like, poke around, iykyk.


๐Ÿšจ DEPRECATION NOTICE ๐Ÿšจ

the PC Card attachment of this driver is scheduled for removal prior to the release of FreeBSD 13.0.

bestie if you're riding with PC Card... plan accordingly. this ship is sailing. ๐Ÿ’€

๐Ÿ”ฅ DIAGNOSTICS ๐Ÿ”ฅ

  • ndis%d: watchdog timeout โ€” a packet was queued for transmission and a transmit command was issued, however the device failed to acknowledge the transmission before a timeout expired. basically the device ghosted you mid-send. rude. ๐Ÿ’€

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

NDIS 5.1 specification, http://www.microsoft.com.


๐ŸŒธ HISTORY ๐ŸŒธ

the ndis device driver first appeared in FreeBSD 5.3. a whole era. โญ


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

the ndis driver was written by Bill Paul <wpaul@windriver.com>. king behavior, we thank him for his service ๐Ÿซถ


and that's the whole page bestie, you ate this ๐Ÿ’…โœจ this cutie was brought to you from the Debian side of things, dated March 14, 2010 โ€” yeah she's vintage, and vintage is a vibe. mwah ๐Ÿ’–๐ŸŽ€๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from