ArticleslgStudy

science

NDISwrapper

NDISwrapper is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand NDISwrapper rather than just read about it. In short: NDISwrapper is a free software driver wrapper that enables the use of Windows XP network device drivers (for devices such as PCI cards, USB modems, and routers) on Linux operating systems. NDISwrapper works by implementing the Windows kernel and NDIS APIs and dynamically linking Windows network drivers to this implementation.

NDISwrapper — main illustration
NDISwrapper — illustration

Key takeaways

  • NDISwrapper belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect NDISwrapper to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of NDISwrapper from memory before moving on to harder problems.

Reference excerpt

NDISwrapper is a free software driver wrapper that enables the use of Windows XP network device drivers (for devices such as PCI cards, USB modems, and routers) on Linux operating systems. NDISwrapper works by implementing the Windows kernel and NDIS APIs and dynamically linking Windows network drivers to this implementation. As a result, it only works on systems based on the instruction set architectures supported by Windows, namely IA-32 and x86-64. Native drivers for some network adapters are not available on Linux as some manufacturers maintain proprietary interfaces and do not write cross-platform drivers. NDISwrapper allows the use of Windows drivers, which are available for virtually all modern PC network adapters.

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 subsystem. 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:

0000:0000.conf, which contains information extracted from the inf file mydriver.inf (the original inf file) mydriver.sys (the driver file)

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 when there were no Linux Wi-Fi drivers for common Wi-Fi cards. It is composed of:

An NDIS driver, which is a kind of overlay for Ethernet device drivers. A Wi-Fi manager, to control the radio and security part of the Wi-Fi card. It exposes a "wireless extension" interface. A USB manager and a PnP manager to make it possible to use Wi-Fi cards embedded in USB sticks. The USB manager is composed of two parts, first a tiny USBD implementation (USB stack) then a simple Windows Driver Model (WDM) USB driver that is itself composed of two parts: The front part will receive calls from the NDISwrapper USB stack (in fact from calls coming from the original Windows driver that were normally intended to go to the Windows USB stack) and the rear part is using the Linux USB stack. A minimal Ntoskrnl simulating the DDK for: managing calls from the Windows driver. managing IRP to the Windows driver (WDM only at the moment) managing filter drivers in a simplistic way loading/unloading Windows drivers A wrapper converting Linux calls to Windows and the other way round, also managing results and error codes

How it works Ndiswrapper uses Windows INF files. 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 Archived 2007-05-17 at the Wayback Machine is a commercial tool produced by Linuxant for Linux which seems to provide the same functionality as NDISwrapper. Independently from, 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 NDISwrapper relies on the elderly "wireless-extensions" to enable applications to access Wi-Fi. As NDISwrapper relies on Windows drivers; it only supports i386 and x86_64 architectures. NDISwrapper does not implement NDIS 6 (Windows Vista version) yet, limiting drivers to Windows XP. As of October 2013, a code branch at the project site has been under development since 2006, but a feature request from 2009 has been left unassigned. While it is not a major problem for the x86 architecture because of the popularity of Windows XP IA-32, many vendors choose to make 64-bit driver versions only for Windows Vista – which means that Linux systems using the x86-64 architecture are unable to use such networking devices (they can neither use XP IA-32 NDIS5 because they are 64-bit systems nor NDIS6 64-bit drivers because they can't use NDIS6). It's still possible to use Windows XP 64 bit drivers which implement NDIS5, however, there are fewer available drivers for xp64 (NDIS5/64 bit) than for XP32 (NDIS5/32 bit). Since 2006, most Windows drivers are compliant with Windows Driver Foundation (WDF) which NDISWrapper can't use. It renders NDISWrapper obsolete, as it only supports the previous WDM driver framework.

See also

List of router firmware projects cabextract DebWRT INF file LibreCMC Linux Unified Kernel ReactOS

References

… excerpt ends here. Continue reading the full article.

Illustrations

NDISwrapper illustration
NDISwrapper: Ndisgtk graphical interface
Ndisgtk graphical interface

Worked examples

Example 1 — a first encounter with NDISwrapper

Start with the simplest possible case. Write down what NDISwrapper claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to NDISwrapper before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about NDISwrapper ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of NDISwrapper

In research
NDISwrapper appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses NDISwrapper in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
NDISwrapper is common in secondary-school and first-year university syllabi. It links to neighbouring topics Compatibility layers, Device drivers, so understanding it makes those chapters shorter.
In everyday life
Look for NDISwrapper outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “NDISwrapper” →

How to study NDISwrapper in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what NDISwrapper means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain NDISwrapper out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is NDISwrapper in simple terms?

NDISwrapper is a free software driver wrapper that enables the use of Windows XP network device drivers (for devices such as PCI cards, USB modems, and routers) on Linux operating systems. NDISwrapper works by implementing the Windows kernel and NDIS APIs and dynamically linking Windows network dri…

Why does NDISwrapper matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study NDISwrapper?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on NDISwrapper.

Tags

  • Compatibility layers
  • Device drivers

Keep exploring