|
Answers to NDIS Frequently Asked QuestionsThe information on this page is intended primarily for network software developers who are working on lower-level network-related NDIS device drivers for Windows 95 and Windows NT. This FAQ, like most others, is always under construction... If you have useful information or corrected/improved links that you think should be added to the NDIS FAQ, please let us know at ndisfaq@pcausa.com.
Table of ContentsGeneral Questions
NDIS Function Notes
Windows 2000 Questions
Windows NT Questions
NDIS Intermediate Driver Questions The information on NDIS Intermediate (IM) drivers has been moved to its own FAQ.
Windows 95 Questions
MS-DOS And Windows 3.X Questions
General Questions What is "NDIS"?NDIS is short for the "Network Driver Interface Specification". The primary purpose of NDIS is to define a standard API for "Network Interface Cards" (NIC's). The details of a NIC's hardware implementation is wrapped by a "Media Access Controller" (MAC) device driver in such a way that all NIC's for the same media (e.g., Ethernet) can be accessed using a common programming interface. NDIS also provides a library of functions (sometimes called a "wrapper") that can be used by MAC drivers as well as higher level protocol drivers (such as TCP/IP). The wrapper functions serve to make development of both MAC and protocol drivers easier as well as to hide (to some extent) platform dependencies. Early versions of NDIS were jointly developed by Microsoft and the 3Com Corporation. Current NDIS versions used by Windows For Workgroups (WFW), Windows 9X and Windows NT are Microsoft proprietary specifications.
Where can I find NDIS programming information?
Back to Top
What is the difference between a "Legacy" and a "Miniport" NDIS driver?The fundamental difference between "Legacy" and "Miniport" driver is:
The writer of a "legacy" driver is free to use whatever functionality is available to develop a device driver. The penalty for this freedom is that the resulting driver is limited in that it can only be used on the operating system that provides the selected features. A writer of a "miniport" driver is required to use a specific set of functions and other rules, dependent on the type of driver being developed. If the miniport driver is built "by the rules", then Microsoft provides the mechanism to allow the resulting driver to run on both Windows 9X and Windows NT. Miniport drivers are usually built and debugged on the Windows NT platform. Back to Top
How can I find the hardware address of a NDIS MAC adapter?There are a variety of methods available to determine the hardware address of installed NDIS MAC adapters. Here are the methods that PCA is aware of:
Back to Top
How do I put a NDIS MAC adapter into promiscuous mode to receive all packets?Only a NDIS Protocol driver has the capability to command a NDIS MAC adapter to enter "promiscuous" mode and receive all packets on the wire. You will need to develop your own NDIS protocol driver for this purpose - or license a NDIS protocol driver designed for this purpose. In addition, you will need to develop a Win32 application to control your protocol driver and collect the received packets. Here are some places to start this development effort:
Back to Top
NDIS Function NotesWhat is the FunctionContext parameter to NdisInitializeTimer used for?
In some (actually, many or most...) NDIS MAC drivers it is desirable to use common driver code to support multiple installed adapters. The driver functions to be performed for each adapter are identical; it is only the adapter "context", including it's hardware resources and instance-specific data, that is different. The Microsoft Windows NT DDK NE32000 MAC driver sample illustrates a good use of the FunctionContext parameter when calling NdisMInitializeTimer. For the NE3200, a structure called a NE3200_ADAPTER contains most of the data specific to each installed NE3200 adapter. In the call to NdisMInitializeTimer a pointer to the NE3200_ADAPTER structure is passed as FunctionContext. Later, when the NE3200ResetHandler MiniportTimer function is called, it can use the FunctionContext parameter to recover the correct NE3200_ADAPTER structure pointer. Since the timer function then knows the correct "context", it can perform functions appropriate to the correct adapter. Back to Top
Windows 2000 QuestionsWhy does NdisAllocatePacket fail unexpectedly on Windows 2000?This change in the behavior of the NDIS library may (should) effect lots of developers
who have working NDIS protocol drivers built using NT 4.0 DDK. The ProblemBasically, prior to Windows 2000 Beta 3 RC1 the NdisFreePacket MACRO defined in the NT
4.0 NDIS.H file was functionally identical to the NdisFreePacket function exported by the
NDIS library. So, NdisAllocatePacket/NdisFreePacket worked correctly for NDIS protocol
drivers, which use the MACRO. Calling the NdisFreePacket MACRO does not actually return the NDIS_PACKET to the free
pool on Windows 2000. As a result, calls to NdisAllocatePacket will eventually fail
prematurely. Workarounds1.) You can use NT4.0 DDK if you add this fragment after #include NDIS.H but before any
reference to NdisFreePacket:
Windows NT QuestionsWhere can I find a NDIS Protocol Driver Sample For Windows NT?The Microsoft NT DDK includes two NDIS protocol driver samples:
Back to Top
What are some of the bugs in the Microsoft Windows NT Packet Driver sample?Lewis Perin has <perin@acm.org>has put together a list of bugs in the NT DDK Packet Driver sample. Lew's list is available at http://www.panix.com/~perin/packetbugs.html
Back to TopNDIS Intermediate Driver QuestionsWhere can I find a NDIS 4 intermediate driver sample?The Microsoft Windows NT DDK team has a sample NDIS Intermediate (IM) Driver named "ImSamp" on their website at:
The Microsoft NT 5.0 Beta 2 DDK includes a different NDIS IM Driver sample "PassThru" under the directory:
Back to Top
Implementing An Intermediate Driver that works with RAS under NTJanuary 6, 1999 - Andrew Zabolotny <bit@eltech.ru> has contributed a paper that includes his instructions on how to adapt a intermediate driver that works with network cards to make it work with RAS. Click the link below to view Mr. Zabolotny's paper. Implementing An IM Driver That Works With RAS Under NT Back to TopHow Can I Test My NDIS Intermediate DriverFebruary 1, 1999 - At it's upper edge an NDIS Intermediate Driver should function like an ordinary NDIS Miniport driver. This means that the Hardware Compatibility Test (HCT) tools used to test ordinary NDIS Miniport drivers can be used to test NDIS Intermediate Drivers. NDIS Miniport drivers can be tested with the NDIS Tester, which is available from the Microsoft WHQL (Windows Hardware Quality Labs). The general WHQL web site (for all kinds of devices) is: Go to the TEST KITS & FAQs link and check the "LAN Network Self-Test" entry in the table. There you'll find a link to the Hardware Compatibility Test (HCT) CD-ROM, which you must order for a small fee. There are also links for download of the latest test documents. The NDIS Tester tests all of the Miniport driver's capabilities, depending if it is a
NDIS3, NDIS4, or NDIS5 Miniport. In addition, some HCT Test Tools are included with the MSDN Universal Subscription CDs.
Windows 95 QuestionsWhere can I find FREE Windows 95 NDIS protocol driver samples?PCAUSA's SNTRANS Protocol VxD SourcesThe PCAUSA SNTRANS project is an example NDIS 3.1 PROTOCOL virtual device driver for Windows 95. SNTRANS is written in the 'C' programming language specifically for VtoolsD for VxD framework, and provides a basic empty shell for developing your own protocol driver. SNTRANS is functional only to the extent that it registers the SNTRANS protocol and automatically binds to one MAC adapter, and unbinds when the driver is unloaded. No other functionality is provided in the sample. To compile SNTRANS specifically as an NDIS 3.1 protocol driver for Windows 95 requires the the VtoolsD for Windows 95 VxD framework V2.03 from Vireo Software, Inc. and the Microsoft C/C++ V4.2 development environment.
Back to Top
Microsoft PACKET Driver Sample For Windows 95The Microsoft PACKET sample for Windows 95 can be downloaded from: Follow the link Windows DDK to find the sample. Back to Top
Lew Perin's billgPC Sources For Windows 95 And NTLewis Perin has <perin@acm.org>has developed billgPC: a free bootp client for Windows 95 and NT. Lew provides sources to the billgPC protocol drivers and associated applications. The billgPC bootp client and it's sources can be downloaded from www.panix.com/~perin/ Back to Top
MS-DOS And Windows 3.X QuestionsWhere can I find the NDIS 2 Specification?The Network Driver Interface Specification (NDIS) Version 2.0.1 was jointly developed by the 3Com Corporation and the Microsoft Corporation. It was used as the specification for development of NDIS adapter drivers for the DOS and Windows 3.10 platforms.
This document, and other information of interest, may be available from the 3Com FTP site at ftp.3com.com . Where can I find the "Clarkson" packet driver collection for DOS?Go to the URL http://www.crynwr.com for the "Clarkson" (now Crynwr) packet driver collection. The site is a little confusing; click the larger-size "Crynwr Software" link to navigate to packet-related information. Contact is Russ Nelson <nelson@crynwr.com> at Crynwr Software. February 1, 1999 - Russ says that the current DOS packet driver specification that's in wide use is 1.09. The only significant thing in 1.11 is PPP, and only FTP ever implemented it. DOS is alive and well in the embedded systems market. January 31, 1999, Pavel Aronsky <pavela@my-dejanews.com> reports that the latest known packet driver specification is v 1.11, by former FTP Software, 1994. It can be found at http://www.devinfo.com/archives/simtel/msdos/pktdrvr/ in the file netzhack.zip. Other information of interest concerning this driver collection may be available from the 3Com FTP site at ftp.3com.com .
Where can I find the API Specification for TCP/IP Applications to run over DOS packet drivers?January 31, 1999, Pavel Aronsky <pavela@my-dejanews.com> reports that the API spec for TCP/IP applications to run over DOS packet drivers can be found on www.trumpet.com . Just in case somebody still interested... |
WinDis 32 is a trademark of Printing Communications Assoc., Inc.
|