NDIS Library Functions Used by Miniport Drivers
Note NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.
ETH_COPY_NETWORK_ADDRESS
Copies a given Ethernet address to a given location.FDDI_IS_BROADCAST
Sets a caller-supplied variable to a Boolean value indicating whether a given FDDI address is a broadcast address.FDDI_IS_MULTICAST
Sets a caller-supplied variable to a Boolean value indicating whether a given FDDI address is a multicast address.FDDI_IS_SMT
Sets a caller-supplied variable to a Boolean value indicating whether a given FDDI frame is SMT (systems management utility).NdisAcquireReadWriteLock
Acquires a lock that the caller uses for either write or read access to the resources that are shared among driver threads.NdisAcquireSpinLock
Acquires a spin lock so the caller can synchronize access to resources shared among non-ISR driver routines in a multiprocessor-safe way.NdisAdjustBufferLength
Modifies the length specified in a given buffer descriptor that was allocated or copied by the caller.NdisAllocateBuffer
Creates a buffer descriptor describing a specified virtual (sub)range within an already allocated, nonpaged memory block, given a handle returned by NdisAllocateBufferPool.NdisAllocateBufferPool
Returns a handle with which the caller can allocate buffer descriptors with NdisAllocateBuffer.NdisAllocateFromBlockPool
Allocates memory from a block of memory pool.NdisAllocateFromNPagedLookasideList
Removes the first entry from the given lookaside list head. If the lookaside list currently is empty, an entry is allocated from nonpaged pool.NdisAllocateMemory
This function is obsolete. Use NdisAllocateMemoryWithTag.NdisAllocateMemoryWithTag
Allocates resident (nonpaged) system-space memory.NdisAllocatePacket
Allocates a packet descriptor, given a handle returned by a preceding call to NdisAllocatePacketPool.NdisAllocatePacketPool
Allocates and initializes a block of nonpaged packet pool, given the number of packet descriptors and how many bytes each fixed-size packet descriptor should contain.NdisAllocatePacketPoolEx
Allocates and initializes a block of storage for a pool of packet descriptors.NdisAllocateSpinLock
Initializes a variable of type NDIS_SPIN_LOCK, used to synchronize access to resources shared among non-ISR driver functions. An initialized spin lock, for which the caller supplies resident storage, is a required parameter to the NdisXxxSpinLock and NdisInterlockedXxx functions.NdisAnsiStringToUnicodeString
Converts a given counted ANSI string into a counted Unicode string.NdisBufferLength
Returns the length in bytes of a given mapped buffer.NDIS_BUFFER_LINKAGE
Returns a pointer to a linked buffer, given a pointer to an NDIS buffer descriptor.NDIS_BUFFER_TO_SPAN_PAGES
Determines how many pages of host memory are being used to back a given buffer.NdisBufferVirtualAddress
Returns the base virtual address for the buffer mapped by a given buffer descriptor. It maps the physical pages described by the given buffer descriptor onto system space, if they are not already mapped to system space. Drivers should call NdisBufferVirtualAddressSafe instead of NdisBufferVirtualAddress. NDIS 5.1 miniport drivers must call NdisBufferVirtualAddressSafe instead of NdisBufferVirtualAddress.NdisBufferVirtualAddressSafe
NdisBufferVirtualAddressSafe is the safe version of NdisBufferVirtualAddress. Unlike NdisBufferVirtualAddress, NdisBufferVirtualAddressSafe will not cause a bug check if system resources are low or exhausted. Drivers should call NdisBufferVirtualAddressSafe instead of NdisBufferVirtualAddress. NDIS 5.1 miniport drivers must call NdisBufferVirtualAddressSafe instead of NdisBufferVirtualAddress.NdisChainBufferAtBack
Links a given buffer descriptor at the end of the chain of buffer descriptors for a given packet descriptor.NdisChainBufferAtFront
Links a given buffer descriptor at the start of the chain of buffer descriptors for a given packet descriptor.NdisCloseConfiguration
Releases the handle returned by NdisOpenConfiguration after the caller has retrieved configuration information for a NIC or itself and/or, possibly, stored additional information about its NIC in the registry.NdisCloseFile
Releases a handle returned by NdisOpenFile and frees the memory allocated to hold the file contents when it was opened.NdisCopyBuffer
Creates a buffer descriptor for a specified virtual (sub)range, given a handle for a block of already allocated memory and a pointer to the buffer descriptor for the block.NdisCopyFromPacketToPacket
Copies a specified number of bytes of data from one packet to another, starting at a specified offset in a given source packet's data and copying the data to a specified offset in the target packet. Returns the number of bytes actually copied, which can be less than the requested number, depending on the source packet and specified starting offset for the copy operation.NdisCreateBlockPool
Returns the handle to a block of memory pool.NdisCreateLookaheadBufferFromSharedMemory
Returns the virtual address of a buffer within a block of memory shared with a bus-master DMA NIC so the caller can set up a read-only lookahead buffer for a receive indication to higher-level drivers.NdisDeleteNPagedLookasideList
Removes a nonpaged lookaside list from the system.NdisDestroyBlockPool
Releases resources for a block of memory pool.NdisDestroyLookaheadBufferFromSharedMemory
Releases access to the buffer obtained in the preceding call to NdisCreateLookaheadBufferFromSharedMemory.NdisDprAcquireSpinLock
Acquires a spin lock so the caller can synchronize access to resources shared among non-ISR driver functions in a multiprocessor-safe way, provided that the caller is running at IRQL = DISPATCH_LEVEL.NdisDprAllocatePacket
Allocates and initializes a packet descriptor when the caller is running at IRQL = DISPATCH_LEVEL, given a handle returned by a preceding call to NdisAllocatePacketPool.NdisDprFreePacket
Releases a driver-allocated packet descriptor and returns it to the free list when the caller is running at IRQL = DISPATCH_LEVEL.NdisDprReleaseSpinLock
Releases a spin lock that was acquired in a preceding call to NdisDprAcquireSpinLock.NdisEqualMemory
Compares a specified number of characters in one block of memory with the same number of characters in a second block of memory.NdisEqualString
Compares two strings to determine whether they are equal.NdisEqualUnicodeString
Compares two Unicode strings and returns whether they are equal.NdisFillMemory
Fills a caller-supplied buffer with the given character.NdisFlushBuffer
Flushes the memory region described by a given buffer descriptor from all processor caches.NdisFreeBuffer
Releases a buffer descriptor obtained in a preceding call to NdisAllocateBuffer or NdisCopyBuffer.NdisFreeBufferPool
Releases a handle obtained in a preceding call to NdisAllocateBufferPool.NdisFreeMemory
Releases a handle, usually when the driver is being unloaded, that was obtained in a preceding call to NdisAllocateMemoryWithTag.NdisFreePacket
Releases a packet descriptor that was allocated from packet pool with NdisAllocatePacket and returns it to the free list.NdisFreePacketPool
Releases a handle to a block of packet pool that was allocated with NdisAllocatePacketPool.NdisFreeSpinLock
Releases a spin lock initialized in a preceding call to NdisAllocateSpinLock, usually when a driver is unloading.NdisFreeString
Frees the storage for a buffered string.NdisFreeToBlockPool
Releases memory back to a block of memory pool.NdisFreeToNPagedLookasideList
Returns an entry to the given lookaside list.NdisGetBufferPhysicalArraySize
Returns the number of discontiguous physical blocks in a buffer, given a buffer descriptor.NdisGetCacheFillSize
Returns the size of the microprocessor cache boundary in bytes. (This information is useful primarily to drivers of bus-master DMA NICs.)NdisGetCurrentProcessorCounts
Returns counts for the current processor that the driver can use to determine CPU utilization for a particular time interval.NdisGetCurrentProcessorCpuUsage
Returns how busy the current processor is as a percentage.NdisGetCurrentSystemTime
Returns the current system time, suitable for use as a timestamp.NdisGetFirstBufferFromPacket
Returns pointers to the buffer descriptor and base virtual address for the initial buffer chained to a given packet, along with the sizes of the initial buffer and full buffer, in case the buffer is fragmented. Drivers should call NdisGetFirstBufferFromPacketSafe instead of NdisGetFirstBufferFromPacket. NDIS 5.1 miniport drivers must call NdisGetFirstBufferFromPacketSafe instead of NdisGetFirstBufferFromPacket.NdisGetFirstBufferFromPacketSafe
NdisGetFirstBufferFromPacketSafe is the safe version of NdisGetFirstBufferFromPacket. Unlike NdisGetFirstBufferFromPacket, NdisGetFirstBufferFromPacketSafe does not cause a bug check if system resources are low or exhausted. Drivers should call NdisGetFirstBufferFromPacketSafe instead of NdisGetFirstBufferFromPacket. NDIS5.1 miniport drivers must use NdisGetFirstBufferFromPacketSafe instead of NdisGetFirstBufferFromPacket.NdisGetNextBuffer
Returns the next buffer descriptor in a chain, given the current buffer descriptor.NDIS_GET_ORIGINAL_PACKET
Returns a pointer to a packet descriptor that the lowest-level driver in a layered stack of NDIS drivers indicated. The calling driver should access the out-of-band (OOB) data block from this original packet rather than the packet that the driver below the calling driver indicated. If the calling driver is not part of a layered stack, the returned packet descriptor will be identical to the packet that the driver below the calling driver indicated.NdisGetPacketCancelId
Returns the cancellation identifier assigned to a packet.NdisGetPacketFlags
Returns the flags, if any, set by a protocol driver in a given packet descriptor.NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO
Returns the address ( MediaSpecificInformation) and length ( SizeMediaSpecificInfo) from the NDIS_PACKET_OOB_DATA block associated with the packet descriptor of a buffer containing out-of-band information, such as packet priority, about a given send packet set up by a protocol.NDIS_GET_PACKET_PROTOCOL_TYPE
Returns the protocol ID associated with a given packet descriptor.NDIS_GET_PACKET_STATUS
Returns the Status of an indicated receive packet on return from NdisMIndicateReceivePacket so the driver can determine whether its miniport driver-allocated packet descriptor (and chained buffer descriptors) can be prepared for reuse immediately.NDIS_GET_PACKET_TIME_TO_SEND
Returns the protocol-set TimeToSend timestamp, directing the miniport driver when to send the given packet, from the NDIS_PACKET_OOB_DATA block associated with the incoming packet descriptor.NdisGetPhysicalAddressHigh
Returns the high-order part of a given physical address.NdisGetPhysicalAddressLow
Returns the low-order part of a given physical address.NdisGetReceivedPacket
Retrieves a packet that was received from the underlying driver.NdisGetRoutineAddress
Returns the address of a routine given the routine's name.NdisGetSystemUpTime
Returns the number of milliseconds that have elapsed since the system was booted.NdisGetVersion
Returns the version number of NDIS.NdisIMAssociateMiniport
Informs the NDIS library that the given lower and upper interfaces for the miniport driver and protocol respectively belong to the same intermediate driver.NdisIMCancelInitializeDeviceInstance
Cancels the immediately preceding call to NdisIMInitializeDeviceInstance.NdisIMCopySendCompletePerPacketInfo
Copies per-packet information from a packet returned by a lower miniport driver into a new packet that is to be returned to an upper-level driver.NdisIMCopySendPerPacketInfo
Copies per-packet information from a packet sent down by an upper-level driver into a new packet to be sent down to a lower miniport driver.NdisIMDeInitializeDeviceInstance
Calls an NDIS intermediate driver's MiniportHalt function to tear down the driver's virtual NIC.NdisIMDeregisterLayeredMiniport
Releases a previously registered intermediate driver.NdisIMGetDeviceContext
Allows an NDIS intermediate driver's MiniportInitialize function to access the device context area allocated by its ProtocolBindAdapter function.NdisIMInitializeDeviceInstance
Calls an NDIS intermediate driver's MiniportInitialize function to set up the driver's virtual NIC for I/O operations bound for an underlying NIC driver to which the intermediate driver is bound.NdisIMInitializeDeviceInstanceEx
Calls an NDIS intermediate driver's MiniportInitialize function to initialize the driver's virtual NIC and optionally to set up state information about the driver's virtual NIC for subsequently bound protocols.NdisImmediateReadPciSlotInformation
Returns a specified range of PCI configuration information to a caller-supplied buffer, given a handle to the wrapper configuration context and the slot number for the NIC on the I/O bus.NdisImmediateReadPortUchar
Reads a byte from a specified port on an I/O bus during driver initialization, given the handle to the wrapper configuration context. If necessary, this function maps the specified bus-relative port address in order to read the data.NdisImmediateReadPortUlong
Reads a ULONG from a specified port on an I/O bus during driver initialization, given a handle to the wrapper configuration context. If necessary, this function maps the specified bus-relative port address in order to read the data.NdisImmediateReadPortUshort
Reads a USHORT from a specified port on an I/O bus during driver initialization, given a handle to the wrapper configuration context. If necessary, this function maps the specified bus-relative port address in order to read the data.NdisImmediateReadSharedMemory
Reads a specified number of bytes into a caller-supplied buffer from shared device RAM, given the base physical address for the shared memory and a handle to the wrapper configuration context. If necessary, this function maps the specified bus-relative memory range in order to read the data.NdisImmediateWritePciSlotInformation
Writes data from a caller-supplied buffer to a specified range of the PCI configuration space, given a handle to the wrapper configuration context and the slot number for the NIC on the I/O bus.NdisImmediateWritePortUchar
Writes a byte to a specified port on an I/O bus during driver initialization, given the handle to the wrapper configuration context. If necessary, this function maps the specified bus-relative port address in order to write the data.NdisImmediateWritePortUlong
Writes a ULONG to a specified port on an I/O bus during driver initialization, given the handle to the wrapper configuration context. If necessary, this function maps the specified bus-relative port address in order to write the data.NdisImmediateWritePortUshort
Writes a USHORT to a specified port on an I/O bus during driver initialization, given the handle to the wrapper configuration context. If necessary, this function maps the specified bus-relative port address in order to write the data.NdisImmediateWriteSharedMemory
Writes a specified number of bytes from a caller-supplied buffer to shared device RAM, given the base physical address for the shared memory and a handle to the wrapper configuration context. If necessary, this function maps the specified bus-relative memory range in order to write the data.NdisIMRegisterLayeredMiniport
Registers an NDIS intermediate driver's MiniportXxx entry points and name with the NDIS library when the driver initializes.NdisInitAnsiString
Initializes a counted ANSI string.NDIS_INIT_FUNCTION
Marks a given driver function as initialization-only code to be discarded after the function has run once.NdisInitializeEvent
Sets up an event object during driver initialization to be used subsequently as a synchronization mechanism.NdisInitializeListHead
Sets up a queue header for a driver's internal queue, given a pointer to driver-supplied resident storage for the queue header and queue. Then, entries (usually packets) can be added to and removed from the doubly-linked queue with the NdisInterlocked..List functions.NdisInitializeNPagedLookasideList
Initializes a lookaside list. After a successful initialization, nonpaged fixed-size blocks can be allocated from and freed to the lookaside list.NdisInitializeReadWriteLock
Initializes a variable of type NDIS_RW_LOCK. An NDIS_RW_LOCK variable is used to limit write access to shared resources to one non-ISR driver thread at a time. This NDIS_RW_LOCK can allow multiple non-ISR driver threads concurrent read access to those resources. Such read access is not permitted during a write access.NdisInitializeSListHead
Initializes the head of a sequenced, interlocked, singly linked list.NdisInitializeString
Allocates a buffer for and initializes a counted string in the system-default character set, given a source string and a NULL pointer.NdisInitializeWorkItem
Initializes a work-queue item with a caller-supplied context and callback routine to be queued for execution when a system worker thread is given control.NdisInitUnicodeString
Initializes a counted Unicode string.NdisInterlockedAddLargeStatistic
Adds a ULONG increment value to a LARGE_INTEGER addend value.NdisInterlockedAddUlong
Adds an unsigned long value to a given unsigned integer as an atomic operation, using a caller-supplied and initialized spin lock.NdisInterlockedDecrement
Decrements a caller supplied variable of type LONG as an atomic operation.NdisInterlockedIncrement
Increments a caller supplied variable as an atomic operation.NdisInterlockedInsertHeadList
Inserts an entry, usually a packet, at the head of a doubly linked list using a caller-supplied and initialized spin lock so that access to queued entries is synchronized in a multiprocessor-safe way among non-ISR driver functions.NdisInterlockedInsertTailList
Inserts an entry, usually a packet, at the end of a doubly linked list using a caller-supplied and initialized spin lock so that access to queued entries is synchronized in a multiprocessor-safe way among non-ISR driver functions.NdisInterlockedPopEntrySList
removes the first entry from a sequenced, singly linked list.NdisInterlockedPushEntrySList
Inserts an entry at the head of a sequenced, singly linked list.NdisInterlockedRemoveHeadList
Removes an entry, usually a packet, from the head of a doubly linked list using a caller-supplied and initialized spin lock so that access to queued entries is synchronized in a multiprocessor-safe way among non-ISR driver functions.NdisMAllocateMapRegisters
Reserves system resources during NIC driver initialization for subsequent bus-master DMA operations.NdisMAllocateSharedMemory
Allocates and maps a memory range so it is simultaneously accessible from both the system and a bus-master DMA device, given the MiniportAdapterHandle for the NIC input to MiniportInitialize, the number of bytes to be allocated, and whether the memory should be cached. Returns the base (system) virtual address of the allocation for use by the miniport driver and a mapped base logical address for use by the NIC.NdisMAllocateSharedMemoryAsync
Allocates additional memory shared between a miniport driver and its bus-master DMA NIC, usually when the miniport driver is running low on available receive buffers.NdisMapFile
Maps the contents of an already open file to a caller-accessible buffer if the file currently is unmapped, given a handle returned by NdisOpenFile.NdisMArcIndicateReceive
Notifies NDIS that an ARCNET packet is being received on a particular NIC, identified by the adapter handle, and that the packet or some initial lookahead portion of the packet, along with the packet header, is available to be forwarded to the appropriate bound protocol driver(s).NdisMArcIndicateReceiveComplete
Notifies NDIS that an ARCNET receive packet, identified in a preceding call to NdisMArcIndicateReceive, has been fully transferred through a particular NIC, identified by the given adapter handle, so that NDIS can notify the appropriate bound protocol driver(s).NdisMCancelTimer
Cancels a preceding call to NdisMSetPeriodicTimer or cancels the immediately preceding call to NdisMSetTimer if the interval given to NdisMSetTimer has not yet expired.NdisMCloseLog
Releases resources allocated when the driver called NdisMCreateLog.NdisMCmActivateVc
Notifies NDIS that a connection-oriented miniport driver with integrated call-management support (also called an MCM driver) is ready to make transfers on a particular VC (virtual circuit).NdisMCmAddPartyComplete
Returns the final status of a connection-oriented client's request, for which the MCM driver previously returned NDIS_STATUS_PENDING, to add a party on an active multipoint VC.NdisMCmCloseAddressFamilyComplete
Returns the final status of a connection-oriented client's request, for which the MCM driver previously returned NDIS_STATUS_PENDING, to close the address family.NdisMCmCloseCallComplete
Returns the final status of a connection-oriented client's request, for which the MCM driver previously returned NDIS_STATUS_PENDING, to tear down a call.NdisMCmCreateVc
Sets up a connection-oriented endpoint (virtual circuit) on which an MCM driver can dispatch incoming calls.NdisMCmDeactivateVc
Notifies NDIS to expect no further transfers on a particular VC.NdisMCmDeleteVc
Destroys an MCM driver-created VC.NdisMCmDeregisterSapComplete
Returns the final status of a connection-oriented client's request, for which the MCM driver previously returned NDIS_STATUS_PENDING, to release a previously registered SAP on which the client could receive incoming call notifications.NdisMCmDispatchCallConnected
Notifies NDIS and the connection-oriented client that data transfers can begin on a VC that the MCM driver created for an incoming call initiated on a remote node.NdisMCmDispatchIncomingCall
Notifies the connection-oriented client of an incoming call offer on a SAP previously registered by that client with the MCM driver.NdisMCmDispatchIncomingCallQoSChange
Notifies the connection-oriented client that a request to change the quality of service on that client's active connection has been received over the network by the MCM driver.NdisMCmDispatchIncomingCloseCall
Tells a connection-oriented client to tear down an active or offered call, usually because the MCM driver has received a request from the network to close the connection.NdisMCmDispatchIncomingDropParty
Notifies a connection-oriented client that it should remove a particular party on the given multipoint VC, usually because the MCM driver has received a close-call request that was initiated at the remote node.NdisMCmDropPartyComplete
Returns the final status of a connection-oriented client's request, for which the MCM driver previously returned NDIS_STATUS_PENDING, to remove a party from an active multipoint VC.NdisMCmMakeCallComplete
Returns the final status of a connection-oriented client's request, for which the MCM driver previously returned NDIS_STATUS_PENDING, to make an outgoing call.NdisMCmModifyCallQoSComplete
Returns the final status of a connection-oriented client's request, for which the MCM driver previously returned NDIS_STATUS_PENDING, to change the quality of service on an active VC.NdisMCmOpenAddressFamilyComplete
Returns the final status of a connection-oriented client's request, for which the MCM driver previously returned NDIS_STATUS_PENDING, to open the MCM driver's address family.NdisMCmRegisterAddressFamily
Registers a set of MCM driver-supplied call-management functions for connection-oriented communications using the specified address family.NdisMCmRegisterSapComplete
Returns the final status of a connection-oriented client's request, for which the MCM driver previously returned NDIS_STATUS_PENDING, to register a SAP on which to receive offers of incoming calls from the network.NdisMCmRequest
Issues an OID_GEN_CO_XXX request from the MCM driver to a client.NdisMCmRequestComplete
Returns the final status of a client's OID_GEN_CO_XXX request, for which the MCM driver previously returned NDIS_STATUS_PENDING.NdisMCoActivateVcComplete
Returns the final status of a call manager's request, for which the connection-oriented miniport driver previously returned NDIS_STATUS_PENDING, to activate a VC. In effect, this call notifies NDIS and the call manager that the miniport driver either has set up the NIC for per-VC transfers or is failing the activation.NdisMCoDeactivateVcComplete
Returns the final status of a call manager's request, for which the connection-oriented miniport driver previously returned NDIS_STATUS_PENDING, to deactivate a VC.NdisMCoIndicateReceivePacket
Notifies NDIS that a multipacket receive on a VC is available to be forwarded to the appropriate connection-oriented client or call manager.NdisMCoIndicateStatus
Indicates a change in the status of a connection-oriented NIC to bound protocols or a change in the status of a particular VC active on the NIC.NdisMCompleteBufferPhysicalMapping
Flushes any data remaining in a bus-master NIC's internal cache at the end of a transfer operation that was set up with NdisMStartBufferPhysicalMapping.NdisMCompleteDmaTransfer
Completes a system DMA transfer operation begun with a preceding call to NdisMSetupDmaTransfer, ensuring that the data is flushed to system memory or to the NIC, depending on the transfer direction.NdisMCoReceiveComplete
Notifies NDIS that the processing of one or more preceding receive indications have been fully transferred so that NDIS can notify the appropriate connection-oriented client or call manager.NdisMCoRequestComplete
Returns the final status of a client's or call manager's OID_GEN_CO_XXX or medium-specific OID_XXX request, for which the connection-oriented miniport driver previously returned NDIS_STATUS_PENDING.NdisMCoSendComplete
Returns a packet descriptor and its associated resources to the connection-oriented client or call manager that request the send.NdisMCreateLog
Allocates and opens a log file in which a miniport driver can write data to be displayed by a driver-dedicated Win32 application.NdisMDeregisterAdapterShutdownHandler
Removes a driver-supplied MiniportShutdown function when the driver is unloading from the set of shutdown handlers that were registered with NdisMRegisterAdapterShutdownHandler.NdisMDeregisterDevice
Removes from the system a device object that was created with NdisMRegisterDevice and removes the symbolic link that is associated with this device object.NdisMDeregisterDmaChannel
Releases DMA system resources, including claimed hardware resources in the registry, that were acquired with NdisMRegisterDmaChannel. Drivers call NdisMDeregisterDmaChannel when they are unloading.NdisMDeregisterInterrupt
Releases the mapping created with an initialization-time call to NdisMRegisterInterrupt. Drivers call NdisMDeregisterInterrupt when they are unloading.NdisMDeregisterIoPortRange
Releases a mapping that was set up with NdisMRegisterIoPortRange during driver initialization.NdisMEthIndicateReceive
Notifies NDIS that an Ethernet packet is being received on a particular NIC, identified by the adapter handle, and that the packet or some initial lookahead portion of the packet, along with the packet header, is available to be forwarded to the appropriate bound protocol driver(s).NdisMEthIndicateReceiveComplete
Notifies NDIS that an Ethernet receive packet, identified in a preceding call to NdisMEthIndicateReceive, has been fully transferred through a particular NIC, identified by the given adapter handle, so that NDIS can notify the appropriate bound protocol driver(s).NdisMFddiIndicateReceive
Notifies NDIS that an FDDI packet is being received on a particular NIC, identified by the adapter handle, and that the packet or some initial lookahead portion of the packet, along with the packet header, is available to be forwarded to the appropriate bound protocol driver(s).NdisMFddiIndicateReceiveComplete
Notifies NDIS that an FDDI receive packet, identified in a preceding call to NdisMFddiIndicateReceive, has been fully transferred through a particular NIC, identified by the given adapter handle, so that NDIS can notify the appropriate bound protocol driver(s).NdisMFlushLog
Clears a miniport's log file that was allocated with NdisMCreateLog.NdisMFreeMapRegisters
Releases system resources for bus-master DMA that were reserved with NdisMAllocateMapRegisters. Drivers call NdisMFreeMapRegisters when they are unloading or during initialization if they fail to successfully initialize a NIC.NdisMFreeSharedMemory
Releases a block of memory that was allocated with NdisMAllocateSharedMemory. Drivers call NdisMFreeSharedMemory when they are unloading or during initialization if they fail to successfully initialize a NIC.NdisMGetDeviceProperty
Retrieves device objects required to set up communication with a NIC through a bus driver.NdisMGetDmaAlignment
Returns the alignment requirements of the DMA system for a NIC.NdisMIndicateReceivePacket
Notifies NDIS that an array of received packets is available to be forwarded to the appropriate bound protocol driver(s).NdisMIndicateStatus
Notifies NDIS of a change in the run-time status of a NIC that might be corrected with a reset operation or possibly even require the NIC to be taken out of service, depending on the given NDIS_STATUS_XXX and additional driver-supplied information.NdisMIndicateStatusComplete
Notifies NDIS that the driver, which has previously called NdisMIndicateStatus one or more times to indicate hardware anomalies or run-time state changes in the NIC, is ready to resume normal device I/O operations.NdisMInitializeScatterGatherDma
Initializes system resources during miniport driver initialization for use in subsequent DMA operations. Called only by deserialized or connection-oriented miniports that manage bus-master DMA NICs.NdisMInitializeTimer
Sets up a caller-supplied MiniportTimer function to be associated with a timer object during driver initialization; returns a handle at the caller-supplied resident storage for the timer object. This handle is a required parameter to all other NdisM..Timer functions.NdisMInitializeWrapper
Notifies NDIS that a new NIC driver is initializing and returns a WrapperConfigurationContext handle to be passed in subsequent calls to NdisXxx initialization and configuration functions.NdisMMapIoSpace
Maps a given bus-relative "physical" range of device memory, such as on-board device RAM or a set of NIC registers, onto system-space nonpaged pool and returns the mapped virtual base address for subsequent use in PIO operations.NdisMoveFromMappedMemory
Copies data from device memory that was mapped with NdisMMapIoSpace to a system-space buffer.NdisMoveMappedMemory
Copies data from one location to another in a memory block that was mapped with NdisMMapIoSpace.NdisMoveMemory
Copies a specified number of bytes from one caller-supplied location to another.NdisMoveToMappedMemory
Copies data from a system-space buffer to device memory that was mapped with NdisMMapIoSpace.NdisMPciAssignResources
Claims resources in the registry for the caller and returns the hardware configuration information for a PCI NIC, given a handle passed in to the MiniportInitialize function and the slot number of its NIC on the PCI bus.NdisMPromoteMiniport
Promotes a secondary miniport driver adapter to the primary role after the primary miniport driver adapter is stopped. This function is intended to be used in NDIS 5.1 and earlier drivers and should not be used with later drivers.NdisMQueryAdapterInstanceName
Retrieves the friendly name of a physical NIC or a virtual adapter.NdisMQueryAdapterResources
Either returns a list of resources used by a NIC or returns NDIS_STATUS_NOT_SUPPORTED.NdisMQueryInformationComplete
Returns the final status of a query-information request for which the driver previously returned NDIS_STATUS_PENDING.NdisMReadDmaCounter
Returns the number of bytes remaining to be transferred during a DMA operation if the NIC uses the host DMA controller's autoinitialize mode, given a handle returned by NdisMRegisterDmaChannel.NdisMRegisterAdapterShutdownHandler
Registers a driver-supplied MiniportShutdown function to be called with a pointer to a caller-supplied context buffer when the system is about to be shut down, given a handle passed in to the MiniportInitialize function. Such a MiniportShutdown function restores the NIC to its initial state.NdisMRegisterDevice
Creates a named device object and a symbolic link between the device object and a user-visible name for that device.NdisMRegisterDmaChannel
Reserves system resources during driver initialization for subsequent subordinate DMA operations or ISA bus-master DMA operations and claims a DMA channel in the registry, returning a handle to be passed in subsequent calls to the NdisMXxx DMA functions.NdisMRegisterInterrupt
Sets up a mapping between the miniport's ISRHandler and HandleInterruptHandler (DPC) functions, already registered with NdisMRegisterMiniport, and the bus-relative vector (or level) on which its NIC interrupts, given a pointer to caller-allocated storage for opaque interrupt state and the adapter handle for the NIC. The interrupt handle initialized in this call is a required parameter to NdisMSynchronizeWithInterrupt.NdisMRegisterIoPortRange
Claims a range of device memory in the registry and maps a given bus-relative range of I/O ports to a range of system logical addresses during initialization, which the driver can pass in subsequent calls to the NdisRawXxx to communicate with its NIC.NdisMRegisterMiniport
Registers a miniport's entry points and name with the NDIS library, given a handle obtained from NdisMInitializeWrapper and a pointer to the NDIS_MINIPORT_CHARACTERISTICS structure set up by the caller.NdisMRegisterUnloadHandler
Registers an unload handler for a driver.NdisMRemoveMiniport
Removes the specified miniport driver adapter that the miniport driver has determined is unrecoverable from the system.NdisMResetComplete
Returns the final status of a reset request for which the driver previously returned NDIS_STATUS_PENDING and indicates whether the reset operation on the NIC affected its network address information.NdisMSendComplete
Returns the packet and final status of a completed send request for which the driver previously returned NDIS_STATUS_PENDING, so that NDIS can return the completed packet to the appropriate bound protocol driver(s).NdisMSendResourcesAvailable
Notifies NDIS that the driver has internal resources available to process another send request when the driver has an outstanding send request for which it returned NDIS_STATUS_PENDING but has not yet called NdisMSendComplete.NdisMSetAttributes
Informs the NDIS library about significant features of the caller's NIC, such as whether it is a bus master and the type of I/O bus on which the NIC can be found, so the miniport driver can call other NdisXxx initialization and configuration routines, particularly the NdisRegisterXxx functions. NIC drivers can call this function or NdisMSetAttributesEx. Intermediate drivers must call NdisMSetAttributesEx.NdisMSetAttributesEx
Informs the NDIS library about significant features of the caller's NIC, such as whether it is a bus master and the type of I/O bus on which the NIC can be found, so the miniport driver can call other NdisXxx initialization and configuration routines, particularly the NdisRegisterXxx. In addition, this function prevents NDIS from timing out sends and requests in an intermediate driver or optionally resets the interval at which a NIC driver's MiniportCheckForHang function is called.NdisMSetInformationComplete
Returns the final status of a set-information request for which the driver previously returned NDIS_STATUS_PENDING.NdisMSetMiniportSecondary
Sets the specified miniport driver adapter to the secondary role in relation to the primary miniport driver adapter. The primary miniport driver adapter handles all packet transfers and requests for information that are made by protocol drivers. However, NDIS can send specific requests to the secondary miniport driver adapter. This function is intended to be used in NDIS 5.1 and earlier drivers and should not be used with later drivers.NdisMSetPeriodicTimer
Sets a timer to fire periodically, thereby running an associated MiniportTimer function repeatedly at a specified fixed interval.NdisMSetTimer
Sets a caller-initialized timer object to a specified interval, thereby running an associated MiniportTimer function once when the given interval expires.NdisMSetupDmaTransfer
Sets up the host DMA controller to transfer a specified range of data from a given buffer, given the handle returned by a preceding call to NdisMRegisterDmaChannel and the transfer direction.NdisMSleep
Delays execution of the caller for a given interval in microseconds.NdisMStartBufferPhysicalMapping
Sets up a bus-master NIC for a DMA transfer operation, given the adapter handle for the NIC, the direction of the transfer, a pointer to the buffer descriptor, an index to the initial map register, a pointer to caller-allocated memory for a variable-size array of NDIS_PHYSICAL_UNIT structures, and the number of elements in the array.NdisMSynchronizeWithInterrupt
Synchronizes the execution of a caller-supplied MiniportSynchronizeISR function with that of the ISR associated with the given initialized interrupt handle. When it runs, the supplied function can access data shared with the ISR in a multiprocessor-safe way.NdisMTrIndicateReceive
Notifies NDIS that a Token Ring packet is being received on a particular NIC, identified by the adapter handle, and that the packet or some initial lookahead portion of the packet, along with the packet header, is available to be forwarded to the appropriate bound protocol driver(s).NdisMTrIndicateReceiveComplete
Notifies NDIS that a Token Ring packet, identified in a preceding call to NdisMTrIndicateReceive, has been fully transferred through a particular NIC, identified by the given adapter handle, so that NDIS can notify the appropriate bound protocol driver(s).NdisMTransferDataComplete
Returns the packet and final status of a completed transfer-data request for which the driver previously returned NDIS_STATUS_PENDING and returns the number of bytes actually transferred.NdisMUnmapIoSpace
Releases a mapping obtained with NdisMMapIoSpace, usually when a driver is unloading.NdisMUpdateSharedMemory
This function is obsolete for Windows Vista and later.Ensures that data read from shared memory is current when the bus-master NIC has just written data to shared memory on platforms that require explicit coherency support from the system.
NdisMWriteLogData
Transfers miniport driver-supplied information into its log file for consumption and display by a driver-dedicated Win32 application.NDIS_OOB_DATA_FROM_PACKET
Returns a pointer to the NDIS_PACKET_OOB_DATA block associated with a given packet descriptor.NdisOpenConfiguration
Returns a handle for the registry key in which an NDIS NIC driver's configuration parameters are stored. This handle is a required parameter to other NdisXxx configuration functions.NdisOpenConfigurationKeyByIndex
Opens a subkey of a given open registry key designated by a caller-supplied handle.NdisOpenConfigurationKeyByName
Opens a named subkey of a given open registry key designated by a caller-supplied handle.NdisOpenFile
Returns a handle for an opened file, given its name and the highest acceptable address at which to allocate memory for the file data. The returned handle is a required parameter to NdisMapFile, which gives the caller exclusive access to the file data until it calls NdisUnmapFile.NDIS_PACKET_EXTENSION_FROM_PACKET
Returns a pointer to the NDIS_PACKET_EXTENSION structure associated with a packet descriptor.NdisPacketPoolUsage
Returns the number of packet descriptors currently allocated from a packet pool.NdisPacketSize
Returns the size, in bytes, of packet descriptors that are allocated with the given size that is reserved for protocols.NDIS_PAGEABLE_FUNCTION
Marks a driver function as pageable code.NDIS_PER_PACKET_INFO_FROM_PACKET
Returns a pointer to a specific type of per-packet information associated with a packet descriptor.NDIS_PHYSICAL_ADDRESS_CONST
Initializes a constant of type NDIS_PHYSICAL_ADDRESS.NdisPrintString
Displays a given string in the debugging window.NdisQueryBuffer
Retrieves the size of the range, and optionally its base virtual address, specified in a given buffer descriptor. Drivers should call NdisQueryBufferSafe instead of NdisQueryBuffer. NDIS 5.1 miniports must call NdisQueryBufferSafe instead of NdisQueryBuffer.NdisQueryBufferOffset
Retrieves the base virtual address of the range specified in a given buffer descriptor.NdisQueryBufferSafe
NdisQueryBufferSafe is the safe version of NdisQueryBuffer. Unlike NdisQueryBuffer, NdisQueryBufferSafe does not cause a bug check if system resources are low or exhausted. Drivers should call NdisQueryBufferSafe instead of NdisQueryBuffer. NDIS 5.1 miniports must call NdisQueryBufferSafe instead of NdisQueryBuffer.NdisQueryDepthSList
Returns the current number of entries in a given sequenced, singly linked list.NdisQueryPacket
Returns any or all of the following information about a given packet descriptor: a count of buffer descriptors chained to the packet descriptor, the total number of bytes in all buffers mapped by the buffer descriptor chained to the packet descriptor, the total number of physically discontiguous blocks for all such buffers, and a pointer to the initial buffer descriptors in the chain.NdisQueryPacketLength
Returns the number of bytes of data that are specified by the buffer descriptors that are chained to a given packet.NdisQuerySendFlags
See NdisGetPacketFlags.NdisRawReadPortBufferUchar
Reads a specified number of bytes into a caller-supplied buffer, given an I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawReadPortBufferUlong
Reads a specified number of ULONGs into a caller-supplied buffer, given an I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawReadPortBufferUshort
Reads a specified number of USHORTs into a caller-supplied buffer, given an I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawReadPortUchar
Reads a byte from a given I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawReadPortUlong
Reads a ULONG from a given I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawReadPortUshort
Reads a USHORT from a given I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawWritePortBufferUchar
Writes a specified number of bytes from a caller-supplied buffer to a given I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawWritePortBufferUlong
Writes a specified number of ULONGs from a caller-supplied buffer to a given I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawWritePortBufferUshort
Writes a specified number of USHORTs from a caller-supplied buffer to a given I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawWritePortUchar
Writes a given byte to a given I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawWritePortUlong
Writes a given ULONG to a given I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisRawWritePortUshort
Writes a given USHORT to a given I/O port mapped during initialization with NdisMRegisterIoPortRange.NdisReadConfiguration
Reads the value of a named entry of the specified type, given the registry handle returned by NdisOpenConfiguration.NdisReadEisaSlotInformation
Returns EISA configuration information to a caller-supplied buffer during initialization, given a handle to the wrapper configuration context and the slot number for the NIC on the I/O bus.NdisReadEisaSlotInformationEx
Returns EISA configuration information, including all available EISA function information, to a caller-supplied buffer during initialization, given a handle to the wrapper configuration context and the slot number for the NIC on the I/O bus.NdisReadNetworkAddress
Returns the size and value, in binary, of the NetworkAddress entry, specifying the setup-configured network address of the NIC, from the caller's Parameters key in the registry, given the handle obtained from NdisOpenConfiguration.NdisReadPciSlotInformation
Returns a specified range of PCI configuration information to a caller-supplied buffer during initialization, given an adapter handle and the slot number for the NIC on the I/O bus.NdisReadPcmciaAttributeMemory
Reads bus-relative configuration parameters for a PC Card NIC from attribute memory.NdisReadPortBufferUchar
Reads a specified number of bytes from a given I/O port into a caller-supplied buffer, after mapping the port address if necessary.NdisReadPortBufferUlong
Reads a specified number of ULONGs from a given I/O port into a caller-supplied buffer, after mapping the port address if necessary.NdisReadPortBufferUshort
Reads a specified number of USHORTs from a given I/O port into a caller-supplied buffer, after mapping the port address if necessary.NdisReadPortUchar
Reads a byte from a given I/O port, after mapping the port address if necessary.NdisReadPortUlong
Reads a ULONG from a given I/O port, after mapping the port address if necessary.NdisReadPortUshort
Reads a USHORT from a given I/O port, after mapping the port address if necessary.NdisReadRegisterUchar
Reads a byte from a device register, given its mapped memory-space address.NdisReadRegisterUlong
Reads a ULONG from a device register, given its mapped memory-space address.NdisReadRegisterUshort
Reads a USHORT from a device register, given its mapped memory-space address.NdisRecalculatePacketCounts
Resets the valid counts of chained buffer descriptors for a given packet descriptor.NdisReinitializePacket
Sets to NULL the queue head for any chained buffers in a given packet descriptor and reinitializes it for reuse.NdisReleaseReadWriteLock
Releases a lock that was acquired in a preceding call to NdisAcquireReadWriteLock.NdisReleaseSpinLock
Releases a spin lock that was acquired in a preceding call to NdisAcquireSpinLock.NdisResetEvent
Clears the Signaled state of a given event.NdisRetrieveUlong
Retrieves a ULONG value from the source address, avoiding alignment faults.NdisScheduleWorkItem
Inserts a given work item into a queue from which a system worker thread removes the item and gives control to the callback function that the driver previously supplied to NdisInitializeWorkItem.NdisSetEvent
Sets a given event to the Signaled state if it was not already Signaled, thereby causing waits on the event to be satisfied.NDIS_SET_ORIGINAL_PACKET
Sets the information in a given packet descriptor to the information from a packet descriptor that was originally indicated up by a lower-level driver.NdisSetPacketCancelId
Marks a packet with a cancellation identifier that a driver can later use to cancel the pending transmission of the packet.NDIS_SET_PACKET_HEADER_SIZE
Sets the HeaderSize in the NDIS_PACKET_OOB_DATA block associated with a miniport driver-allocated packet descriptor for received net packet(s) to be indicated.NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO
Sets the MediaSpecificInformation and SizeMediaSpecificInfo in the NDIS_PACKET_OOB_DATA block associated with a miniport driver-allocated packet descriptor for a received net packet about to be indicated.NDIS_SET_PACKET_STATUS
Sets the Status in the NDIS_PACKET_OOB_DATA block associated with packet descriptor for a received net packet about to be indicated or for a given send packet completed in the MiniportSend(Packets) function.NdisSetPacketStatus
Sets status for a packet.NDIS_SET_PACKET_TIME_RECEIVED
Sets the TimeReceived in the NDIS_PACKET_OOB_DATA block associated with a miniport driver-allocated packet descriptor for a received net packet about to be indicated with NdisMIndicateReceivePacket.NDIS_SET_PACKET_TIME_SENT
Sets the TimeSent in the NDIS_PACKET_OOB_DATA associated with a miniport driver-allocated packet descriptor for a received net packet about to be indicated with NdisMIndicateReceivePacket.NdisSetPhysicalAddressHigh
Sets the high-order part of a given physical address to a given value.NdisSetPhysicalAddressLow
Sets the low-order part of a given physical address to a given value.NdisStallExecution
Stalls the caller on the current processor for a given interval in microseconds.NdisStoreUlong
Stores a ULONG value at a particular address, avoiding alignment faults.NdisSystemProcessorCount
Determines whether its caller is running on a uniprocessor or multiprocessor machine, which is useful information for allocating resources during driver initialization.NdisTerminateWrapper
Releases system resources allocated when the driver called NdisMInitializeWrapper. Drivers call NdisTerminateWrapper during initialization if they cannot find and successfully initialize at least one NIC or when they are unloading.NdisUnchainBufferAtBack
Removes a given buffer descriptor at the end of the chain of buffer descriptors for a given packet descriptor and returns a pointer to the buffer descriptor.NdisUnchainBufferAtFront
Removes a given buffer descriptor at the start of the chain of buffer descriptors for a given packet descriptor and returns a pointer to the buffer descriptor.NdisUnicodeStringToAnsiString
Converts a given counted Unicode string into a counted ANSI string.NdisUnmapFile
Releases the file mapping set up by the preceding call to NdisMapFile.NdisUpcaseUnicodeString
Converts a copy of a given Unicode string to upper case and returns the converted string.NdisWaitEvent
Puts the caller into a wait state until the given event is set to the Signaled state or the wait times out.NdisWriteConfiguration
Writes a caller-supplied value entry in the registry, given the handle returned by NdisOpenConfigurationNdisWriteErrorLogEntry
Allocates an error-log record, fills it in, and writes it to the I/O error log, given the adapter handle for the NIC, an NDIS_XXX error code, a count of caller-supplied error values, and a corresponding number of ULONGs specifying additional information about the I/O error or configuration error.NdisWritePciSlotInformation
Writes data from a caller-supplied buffer to a specified range of the PCI configuration space, given a handle to the adapter and the slot number for the NIC on the I/O bus.NdisWritePcmciaAttributeMemory
Writes bus-relative configuration parameters for a PC Card NIC to attribute memory.NdisWritePortBufferUchar
Writes a specified number of bytes from a caller-supplied buffer to a given I/O port, after mapping the port address if necessary.NdisWritePortBufferUlong
Writes a specified number of ULONGs from a caller-supplied buffer to a given I/O port, after mapping the port address if necessary.NdisWritePortBufferUshort
Writes a specified number of USHORTs from a caller-supplied buffer to a given I/O port, after mapping the port address if necessary.NdisWritePortUchar
Writes a given byte to a given I/O port, mapping the port address if necessary.NdisWritePortUlong
Writes a given ULONG to a given I/O port, after mapping the port address if necessary.NdisWritePortUshort
Writes a given USHORT to a given I/O port, after mapping the port address if necessary.NdisWriteRegisterUchar
Writes a given byte to a device register, given its mapped memory-space address.NdisWriteRegisterUlong
Writes a given ULONG to a device register, given its mapped memory-space address.NdisWriteRegisterUshort
Writes a given USHORT to a device register, given its mapped memory-space address.NdisZeroMappedMemory
Fills a block of memory that was mapped in a preceding call to NdisMMapIoSpace with zeros, given a pointer to the block and the length in bytes to be filled.NdisZeroMemory
Fills a block of memory with zeros, given a pointer to the block and the length in bytes to be filled.
To ensure their portability across Microsoft operating systems that support Win32, most NDIS miniport drivers call only functions exported by the NDIS library and use only macros explicitly declared in the master header file, ndis.h, or in the appropriate efilter.h, ffilter.h, tfilter.h, or afilter.h, if the NDIS uses the system-supplied Ethernet, FDDI, Token Ring, or ARCNET filter-library support to manage bindings for the miniport driver.
However, in addition to the NDIS library functions listed here, a miniport driver might use some of the macros and support routines exported by other kernel-mode components, such as the following:
CONTAINING_RECORD
InitializeListHead
InsertHeadList
InsertTailList
IsListEmpty
RemoveEntryList
RemoveHeadList
For more information about the preceding macro and functions, see Run-time Library Routines.