4 .\" Bill Paul <wpaul@windriver.com>. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by Bill Paul.
17 .\" 4. Neither the name of the author nor the names of any co-contributors
18 .\" may be used to endorse or promote products derived from this software
19 .\" without specific prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
25 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 .\" THE POSSIBILITY OF SUCH DAMAGE.
33 .\" $FreeBSD: /repoman/r/ncvs/src/share/man/man4/man4.i386/ndis.4,v 1.7.2.1 2004/12/24 22:24:04 brueffer Exp $
40 .Nd NDIS miniport driver wrapper
42 .Cd "ndis* at pci? dev ? function ?"
46 wrapper is designed to allow binary
49 network drivers to be used with
53 driver is provided in source code form
54 .Pq Pa sys/dev/if_ndis
55 and must be combined with the
57 driver binary supplied with your network adapter.
63 kernel subsystem to relocate and link the
66 that it can be used in conjunction with native code.
70 subsystem provides an interface between the NDIS API and the
72 networking infrastructure.
76 fooled into thinking it is running on
81 driver is only useful on x86 machines.
83 To build a functional driver, the user must have a copy of the
84 driver distribution media for his or her card.
85 From this distribution,
86 the user must extract two files: the
88 file containing the driver
89 binary code, and its companion
91 file, which contains the
92 definitions for driver-specific registry keys and other installation
93 data such as device identifiers.
94 These two files are converted
96 .Pa ndis_driver_data.h
100 The resulting file contains a binary image of the driver plus
103 .Pa ndis_driver_data.h
104 is included in several files located in
106 so it is needed to compile an NDIS kernel.
109 driver is loaded, it will create
111 nodes for each registry key extracted from the
117 wrapper is designed to support mainly Ethernet and wireless
118 network devices/drivers with PCI bus attachments.
120 support many different media types and speeds.
123 however, is that there is no consistent way to learn if an
124 Ethernet device is operating in full or half duplex mode.
125 The NDIS API allows for a generic means for determining link
126 state and speed, but not the duplex setting.
128 driver-specific registry keys to control the media setting
129 which can be configured via the
133 Assuming you have obtained the appropriate
137 files for your device, the
138 .Pa ndis_driver_data.h
139 file can be built as follows:
140 .Bd -literal -offset indent
141 $ ndiscvt -i your_card.INF -s your_card.SYS -o ndis_driver_data.h
144 Next uncomment the following lines from
145 .Pa sys/arch/i386/conf/GENERIC
146 .Bd -literal -offset indent
147 $ cd /usr/src/sys/arch/i386/conf
153 options COMPAT_NDIS # NDIS network driver
157 ndis* at pci? dev ? function ? # Experimental - NDIS Network Driver
160 Configure your kernel, then copy the
161 .Pa ndis_driver_data.h
162 file into the kernel build directory before compiling the kernel:
163 .Bd -literal -offset indent
164 $ cd src/sys/arch/i386/conf
167 $ cp /path/to/ndis_driver_data.h .
168 $ make depend \*[Am]\*[Am] make
170 $ mv /netbsd /onetbsd
175 The ndis0 device should be detected at boot:
176 .Bd -literal -offset indent
177 Matching vendor: 14e4, product: 4324, name: Dell TrueMobile 1400 Dual Band WLAN Mini-PCI Card
178 ndis0 at pci2 dev 3 function 0
181 The device can then be configured with
184 .Bd -literal -offset indent
185 ndis0: flags=8843\*[Lt]UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST\*[Gt] mtu 1500
187 powersave on (100ms sleep)
189 address: 00:90:4b:69:94:f0
190 media: IEEE802.11 autoselect
192 inet 140.160.129.226 netmask 0xfffffc00 broadcast 140.160.131.255
193 inet6 fe80::290:4bff:fe69:94f0%ndis0 prefixlen 64 scopeid 0x3
198 driver creates any sysctl nodes, they can be viewed and altered with
200 .Bd -literal -offset indent
205 ndis0.ndis_10280001 = Dell TrueMobile 1300 WLAN Mini-PCI Card
206 ndis0.ndis_Environment = 1
207 ndis0.ndis_NdisVersion = 0x00050001
208 ndis0.ndis_BusType = 5
215 .It "ndis%d: watchdog timeout"
216 A packet was queued for transmission and a transmit command was
217 issued, however the device failed to acknowledge the transmission
218 before a timeout expired.
228 .%T "NDIS 5.1 specification"
229 .%O http://www.microsoft.com
234 driver wrapper first appeared in
241 driver was written by
242 .An Bill Paul Aq wpaul@windriver.com .
246 .An Alan Ritter Aq rittera@NetBSD.org
248 .An Phil Nelson Aq phil@NetBSD.org
249 as part of Google's Summer of Code 2005.