NDISwrapper

NDISwrapper

ndiswrapper command line
Developer(s) Jan Kiszka, Giridhar Pemmasani, Pontus Fuchs
Stable release 1.57 / January 1, 2012; 45 days ago (2012-01-01)
Operating system Linux on IA-32 and x86-64 architectures only
Type driver wrapper
License GNU GPL
Website The NDISwrapper wiki, NDISwrapper Download Area

NDISwrapper, is a free software driver wrapper that enables the use of Windows XP drivers for network devices (PCI cards, USB modems, and routers), on Linux only operating systems. NDISwrapper works by implementing the Windows kernel and NDIS APIs, and dynamically linking the Windows drivers to this implementation. It therefore works only on systems based on the architectures supported by Windows, namely IA-32 or x86-64.

Native NDIS drivers for Linux are not available for some network adapters, as manufacturers supply neither drivers nor the information required to write them. NDISwrapper allows to use Windows drivers available for virtually all adapters under Linux.

Contents

Use

There are three steps: Creating a Linux driver, installing it and using it. NDISWrapper is composed of two main parts, a command line tool used at installation time and a Windows subsystem used when an application calls the Wi-Fi susbsystem.

As the outcome of an NDISWrapper installation should be some sort of Linux driver to be able to work with Linux applications, the first action the user does is to "compile" a couple or more of Windows files, and the NDISWrapper's version of Windows DDK into a Linux Kernel Module. This is done with a tool named "ndiswrapper". The resultant linux driver is then installed (often manually) in the OS. A Linux application can then send request to this Linux driver that automatically does the needed adaptations to call its --now-- internal Windows driver and DDK.

To achieve this "compilation" NDISwrapper requires at least the ".inf" and the ".sys" files invariably supplied as parts of the Windows driver. For example, if the driver is called "mydriver", with the files mydriver.inf and mydriver.sys and vendorid:productid 0000:0000, then NDISwrapper installs the driver to /etc/ndiswrapper/mydriver/. This directory contains three files:

Graphical frontends

There are graphical frontends to NDISwrapper, such as Ndisgtk and NdisConfig, which allow NDISwrapper to be installed using a graphical user interface rather than console commands.

Architecture

NDISwrapper enables a Unix-like system to use Windows drivers of type NDIS and WIFI. It was useful at a time where there were no Linux WIFI drivers for common WIFI cards. It works only on X86 computers because it uses Windows drivers which are only developed for X86 at the moment. It is composed of:

How it works

When a Linux application calls a device which is registered on Linux as an NDISwrapper device, the NDISwrapper determines which Windows driver is targeted. It then converts the Linux query into Windows parlance, it calls the Windows driver, waits for the result and translates it into Linux parlance then sends the result back to the Linux application. It's possible from a Linux driver (NDISwrapper is a Linux driver) to call a Windows driver because they both execute in the same address space (the same as the Linux kernel). If the Windows driver is composed of layered drivers (for example one for Ethernet above one for USB) it's the upper layer driver which is called, and this upper layer will create new calls (IRP in Windows parlance) by calling the "mini ntoskrnl". So the "mini ntoskrnl" must know there are other drivers, it must have registered them in its internal database a priori by reading the Windows ".inf" files.

Similar programs

DriverLoader is a commercial tool produced by Linuxant for Linux which seems to provide the same functionality as NDISwrapper.

Independently of but roughly simultaneously with the NDISwrapper project, Bill Paul of Wind River Systems developed a similar system, known as Project Evil or The NDISulator, for FreeBSD. It has since been ported to DragonFly BSD and NetBSD.

Limitations

See also

References

External links