NDISwrapper

Last updated
NDISwrapper
Developer(s) Jan Kiszka, Giridhar Pemmasani, Pontus Fuchs
Stable release
1.63 / May 3, 2020;3 years ago (2020-05-03)
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 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.

Contents

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:

Graphical frontends

Ndisgtk graphical interface Ndisgtk.png
Ndisgtk graphical interface

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

How it works

Ndiswrapper uses Windows INF files. [1]

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

Limitations

While it is not a major problem for the x86 architecture because of the popularity of Windows XP x86-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 x86-32 NDIS5 because they are 64bits systems nor NDIS6 64bit drivers because they can't use NDIS6). It's still possible to use Windows XP 64 bit drivers which implement NDIS5, [9] however, there are fewer available drivers for xp64 (NDIS5/64 bit) than for XP32 (NDIS5/32 bit).

See also

Related Research Articles

<span class="mw-page-title-main">Device driver</span> Software interface to attached devices

In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer or automaton. A driver provides a software interface to hardware devices, enabling operating systems and other computer programs to access hardware functions without needing to know precise details about the hardware being used.

ext2, or second extended file system, is a file system for the Linux kernel. It was initially designed by French software developer Rémy Card as a replacement for the extended file system (ext). Having been designed according to the same principles as the Berkeley Fast File System from BSD, it was the first commercial-grade filesystem for Linux.

<span class="mw-page-title-main">System call</span> Way for programs to access kernel services

In computing, a system call is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services, creation and execution of new processes, and communication with integral kernel services such as process scheduling. System calls provide an essential interface between a process and the operating system.

In computing, the Windows Driver Model (WDM) – also known at one point as the Win32 Driver Model – is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows such as Windows 95 and Windows 3.1, as well as the Windows NT Driver Model.

In software engineering, a compatibility layer is an interface that allows binaries for a legacy or foreign system to run on a host system. This translates system calls for the foreign system into native system calls for the host system. With some libraries for the foreign system, this will often be sufficient to run foreign binaries on the host system. A hardware compatibility layer consists of tools that allow hardware emulation.

The Network Driver Interface Specification (NDIS) is an application programming interface (API) for network interface controllers (NICs).

sysfs is a pseudo file system provided by the Linux kernel that exports information about various kernel subsystems, hardware devices, and associated device drivers from the kernel's device model to user space through virtual files. In addition to providing information about various devices and kernel subsystems, exported virtual files are also used for their configuration.

Monitor mode, or RFMON mode, allows a computer with a wireless network interface controller (WNIC) to monitor all traffic received on a wireless channel. Unlike promiscuous mode, which is also used for packet sniffing, monitor mode allows packets to be captured without having to associate with an access point or ad hoc network first. Monitor mode only applies to wireless networks, while promiscuous mode can be used on both wired and wireless networks. Monitor mode is one of the eight modes that 802.11 wireless adapter can operate in: Master, Managed, Ad hoc, Repeater, Mesh, Wi-Fi Direct, TDLS and Monitor mode.

ntoskrnl.exe, also known as the kernel image, contains the kernel and executive layers of the Microsoft Windows NT kernel, and is responsible for hardware abstraction, process handling, and memory management. In addition to the kernel and executive layers, it contains the cache manager, security reference monitor, memory manager, scheduler (Dispatcher), and blue screen of death.

<span class="mw-page-title-main">Comparison of open-source wireless drivers</span>

Wireless network cards for computers require control software to make them function. This is a list of the status of some open-source drivers for 802.11 wireless network cards.

In the context of free and open-source software, proprietary software only available as a binary executable is referred to as a blob or binary blob. The term usually refers to a device driver module loaded into the kernel of an open-source operating system, and is sometimes also applied to code running outside the kernel, such as system firmware images, microcode updates, or userland programs. The term blob was first used in database management systems to describe a collection of binary data stored as a single entity.

<span class="mw-page-title-main">Minix 3</span> Unix-like operating system

Minix 3 is a small, Unix-like operating system. It is published under a BSD-3-Clause license and is a successor project to the earlier versions, Minix 1 and 2.

The Microsoft Windows operating system supports a form of shared libraries known as "dynamic-link libraries", which are code libraries that can be used by multiple processes while only one copy is loaded into memory. This article provides an overview of the core libraries that are included with every modern Windows installation, on top of which most Windows applications are built.

A Bluetooth stack is software that is an implementation of the Bluetooth protocol stack.

The Linux booting process involves multiple stages and is in many ways similar to the BSD and other Unix-style boot processes, from which it derives. Although the Linux booting process depends very much on the computer architecture, those architectures share similar stages and software components, including system startup, bootloader execution, loading and startup of a Linux kernel image, and execution of various startup scripts and daemons. Those are grouped into 4 steps: system startup, bootloader stage, kernel stage, and init process. When a Linux system is powered up or reset, its processor will execute a specific firmware/program for system initialization, such as Power-on self-test, invoking the reset vector to start a program at a known address in flash/ROM, then load the bootloader into RAM for later execution. In personal computer (PC), not only limited to Linux-distro PC, this firmware/program is called BIOS, which is stored in the mainboard. In embedded Linux system, this firmware/program is called boot ROM. After being loaded into RAM, bootloader will execute to load the second-stage bootloader. The second-stage bootloader will load the kernel image into memory, decompress and initialize it then pass control to this kernel image. Second-stage bootloader also performs several operation on the system such as system hardware check, mounting the root device, loading the necessary kernel modules, etc. Finally, the very first user-space process starts, and other high-level system initializations are performed.

Operating system Wi-Fi support is defined as the facilities an operating system may include for Wi-Fi networking. It usually consists of two pieces of software: device drivers and applications for configuration and management.

<span class="mw-page-title-main">Huawei E220</span> Modem developed by Huawei

The Huawei E220 is a Huawei HSDPA access device (modem) manufactured by Huawei and notable for using the USB interface.

<span class="mw-page-title-main">Skytone Alpha-400</span> Linux-based low-cost netbook introduced in 2008

The Skytone Alpha-400 is a Linux-based low-cost netbook with a 7 in 800×480 LCD screen, introduced in 2008. Its measurements (length×width×depth) are 210×140×32 mm and it weighs 0.65 kg.

The Remote Network Driver Interface Specification (RNDIS) is a Microsoft proprietary protocol used mostly on top of USB. It provides a virtual Ethernet link to most versions of the Windows, Linux, and FreeBSD operating systems. Multiple revisions of a partial RNDIS specification are available from Microsoft, but Windows implementations have been observed to issue requests not included in that specification, and to have undocumented constraints.

<span class="mw-page-title-main">Longene</span> Linux distribution

Longene is a Linux-based operating system kernel intended to be binary compatible with application software and device drivers made for Microsoft Windows and Linux. As of 1.0-rc2, it consists of a Linux kernel module implementing aspects of the Windows kernel and a modified Wine distribution designed to take advantage of the more native interface. Longene is written in the C programming language and is free and open source software. It is licensed under the terms of the GNU General Public License version 2 (GPLv2).

References

  1. "Which linux distro works OUT OF THE BOX with D-link usb wifi DWL-g122 rev.c1 (Rt73)??".
  2. Bill Paul (January 24, 2004). "Project Evil: The Evil Continues". freebsd-current (Mailing list). Archived from the original on July 2, 2017. Retrieved September 9, 2014.
  3. "sys/dev/netif/ndis/". Super User's BSD Cross Reference. DragonFly BSD. 2018-12-08. Retrieved 2019-03-04.
  4. NetBSD-SoC: Porting FreeBSD's NDIS Network Driver to NetBSD
  5. "Sourceforge.net: FAQ - ndiswrapper". ndiswrapper.sourceforge.net. 2010-01-20. Retrieved 2011-08-05.
  6. "SourceForge.net: ndiswrapper FAQ". Ndiswrapper.sourceforge.net. 2009-07-12. Retrieved 2009-09-21.
  7. "SourceForge.net: ndisv6 code branch". Ndiswrapper.sourceforge.net. 2013-11-01. Retrieved 2013-11-01.
  8. "SourceForge.net: ndiswrapper feature request". Ndiswrapper.sourceforge.net. 2009-04-12. Retrieved 2013-07-28.
  9. "Ndiswrapper / Discussion / Help: Couldn't load driver netr7364".