A. 3  Summary of NDIS Library Functions for Full-NIC Drivers

This summarizes, in alphabetical order, all NDIS and filter library functions that legacy full-NIC drivers can call and the macros they can use.

Part I of the Network Driver Reference contains references for all functions and macros mentioned here that are also called by NDIS miniport and protocol drivers. References for functions called only by full-NIC drivers follow this summary. However, this summary has jumps to the references for every EthXxx, FddiXxx, NdisXxx, and TrXxx function and all macros that existing full-NIC drivers might use, including those in Part I.

For more information about Windows NT kernel-mode support routines and macros that an existing full-NIC driver might use, see also the Kernel-Mode Driver Reference.

EthChangeFilterAddresses

Checks the current multicast address list for all currently bound protocols and, if changes are necessary, calls the driver’s MacChangeEthAddress function, which was set up with EthCreateFilter, given a pointer to the filter database, the handle to the open indicating the binding, the packet causing the change of addresses, whether the changes are caused by a set request (rather than a close), a variable-sized array of address specifications, and a count of elements in the array. This function restores the original multicast address list if the caller-supplied function returns anything except NDIS_STATUS_SUCCESS or NDIS_STATUS_PENDING.

ETH_COPY_NETWORK_ADDRESS

Copies a given Ethernet address to a given location.

EthCreateFilter

Creates and initializes an Ethernet filter database, given the address of the NIC, the number of multicast addresses it can support, three driver-supplied functions to be called when certain runtime changes occur, a caller-initialized spin lock used to synchronize access to the filter database, and a pointer to a variable that is set to the address of the filter database on return from this function.

EthDeleteFilter

Releases the resources used for an Ethernet filter database when there are no remaining active filters.

EthDeleteFilterOpenAdapter

Removes a binding that was set up with EthNoteFilterOpenAdapter from the filter database when the NIC is closed by the protocol, calling driver-supplied functions as necessary to modify the database, given the pointer to the Ethernet filter database, the binding and context handles set up when the NIC was opened by the protocol, and a pointer to the filter handle returned by EthNoteFilterOpenAdapter.

EthFilterAdjust

Calls the driver’s MacChangeFilter function, which was set up with EthCreateFilter, when a particular filter class changes from being used to not used or vice versa, given a pointer to the filter database, the handle to the open indicating the binding, the packet causing the change of class usage, whether the change is caused by a set request (rather than a close), and the classes to be added or deleted. This function restores the original classes if the caller-supplied function returns anything except NDIS_STATUS_SUCCESS or NDIS_STATUS_PENDING.

EthFilterIndicateReceive

Indicates the arrival of an Ethernet receive packet, passing in a pointer to the Ethernet filter database, a pointer to caller-supplied context that the protocol must pass back if it later requests a transfer of the packet data, the destination address in the received packet, the packet header and its size in bytes, a pointer to a lookahead buffer containing some packet data and its size in bytes, and the total size in bytes of the packet. This function forwards the receive information to the appropriate bound protocol(s).

EthFilterIndicateReceiveComplete

Indicates that a receive operation is done, that is, that EthFilterIndicateReceive has returned to the caller. EthFilterIndicateReceiveComplete, given a pointer to the Ethernet filter database, notifies the appropriate bound protocol(s).

EthNoteFilterOpenAdapter

Adds a new binding to the existing filter database, given the pointer to an Ethernet filter database already initialized with EthCreateFilter, the binding and context handles set up when the NIC was opened by the protocol, and a pointer to caller-supplied storage for the filter handle that this function returns if the call succeeds.

ETH_NUMBER_OF_GLOBAL_FILTER_ADDRESSES

Returns the number of multicast addresses in the Ethernet database multicast list for the NIC, given a pointer to the filter database returned by EthCreateFilter.

EthNumberOfOpenFilterAddresses

Returns how any multicast addresses a particular binding is using, given a pointer to the Ethernet filter database and the binding handle.

EthQueryGlobalFilterAddresses

Returns a variable-sized array of the multicast addresses currently in use by all bound protocols, given a pointer to the Ethernet filter database, the number of addresses obtained from ETH_NUMBER_OF_GLOBAL_FILTER_ADDRESSES, and pointers to caller-supplied variables for returned status, the array of addresses, and the number of addresses actually returned in the array.

ETH_QUERY_FILTER_CLASSES

Returns a value indicating the currently enabled filter classes, given a pointer to the filter database returned by EthCreateFilter.

EthQueryOpenFilterAddresses

Returns a variable-sized array of the multicast addresses a particular binding is using, given a pointer to the Ethernet filter database, the binding handle, the number of addresses obtained from EthNumberOfOpenFilterAddresses, and pointers to caller-supplied variables for returned status, the array of addresses, and the number of addresses actually returned in the array.

ETH_QUERY_PACKET_FILTER

Returns a value indicating the currently enabled filter classes for a particular binding, given a pointer to the filter database returned by EthCreateFilter and a handle to the binding.

EthShouldAddressLoopBack

Returns FALSE if a packet bound for a given Ethernet address cannot possibly loop back.

FDDI_COMPARE_NETWORK_ADDRESSES

Sets a caller-supplied variable to a value indicating whether a given FDDI address is greater than, less than, or equal to another given FDDI address.

FddiChangeFilterLongAddresses

Checks the current multicast long address list for all currently bound protocols and, if changes are necessary, calls the driver’s MacChangeFddiAddresses function, which was set up with FddiCreateFilter, given a pointer to the filter database, the binding handle, the packet causing the change of addresses, whether the changes are caused by a set request (rather than a close), a variable-sized array of long address specifications, and a count of elements in the array. This function restores the original multicast address list if the caller-supplied function returns anything except NDIS_STATUS_SUCCESS or NDIS_STATUS_PENDING.

FddiChangeFilterShortAddresses

Checks the current multicast short address list for all currently bound protocols and, if changes are necessary, calls the driver’s MacChangeFddiAddresses function, which was set up with FddiCreateFilter, given a pointer to the filter database, the binding handle, the packet causing the change of addresses, whether the changes are causesd by a set request (rather than a close), a variable-sized array of short address specifications, and a count of elements in the array. This function restores the original multicast address list if the caller-supplied function returns anything except NDIS_STATUS_SUCCESS or NDIS_STATUS_PENDING.

FddiCreateFilter

Creates and initializes an FDDI filter database, given the long and short address of the NIC, the number of multicast long and short addresses it can support, three driver-supplied functions to be called when certain runtime changes occur, a caller-initialized spin lock used to synchronize access to the filter database, and a pointer to a variable that is set to the address of the filter database on return from this function.

FddiDeleteFilter

Releases the resources used for an FDDI filter database when there are no remaining active filters.

FddiDeleteFilterOpenAdapter

Removes a binding that was set up with FddiNoteFilterOpenAdapter from the filter database when the NIC is closed by the protocol, calling driver-supplied functions as necessary to modify the database, given the pointer to the FDDI filter database, the binding and context handles set up when the NIC was opened by the protocol, and a pointer to the filter handle returned by FddiNoteFilterOpenAdapter.

FddiFilterAdjust

Calls the driver’s MacChangeFilter function, which was set up with FddiCreateFilter, when a particular filter class changes from being used to not used or vice versa, given a pointer to the filter database, the binding handle, the packet causing the change of class usage, whether the change is caused by a set request (rather than a close), and the classes to be added or deleted. This function restores the original classes if the caller-supplied function returns anything except NDIS_STATUS_SUCCESS or NDIS_STATUS_PENDING.

FddiFilterIndicateReceive

Indicates the arrival of an FDDI receive packet, passing in a pointer to the FDDI filter database, a pointer to caller-supplied context that the protocol must pass back if it later requests a transfer of the packet data, the destination address in the received packet and the address’s length, the packet header and its size in bytes, a pointer to a lookahead buffer containing some packet data and its size in bytes, and the total size in bytes of the packet. This function forwards the receive information to the appropriate bound protocol(s).

FddiFilterIndicateReceiveComplete

Indicates that a receive operation is done, that is, that FddiFilterIndicateReceive has returned to the caller. FddiFilterIndicateReceiveComplete, given a pointer to the FDDI filter database, notifies the appropriate bound protocol(s).

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.

FddiNoteFilterOpenAdapter

Adds a new binding to the existing filter database, given the pointer to an FDDI filter database already initialized with FddiCreateFilter, the binding and context handles set up when the NIC was opened by the protocol, and a pointer to caller-supplied storage for the filter handle that this function returns if the call succeeds.

FDDI_NUMBER_OF_GLOBAL_FILTER_LONG_ADDRESSES

Returns the number of addresses in the FDDI database long address list for the NIC, given a pointer to the filter database returned by FddiCreateFilter.

FDDI_NUMBER_OF_GLOBAL_FILTER_SHORT_ADDRESSES

Returns the number of addresses in the FDDI database short address list for the NIC, given a pointer to the filter database returned by FddiCreateFilter.

FddiNumberOfOpenFilterLongAddresses

Returns how many long addresses are in use by a particular binding, given the binding handle and a pointer to the FDDI filter database.

FddiNumberOfOpenFilterShortAddresses

Returns how many short addresses are in use by a particular binding, given the binding handle and a pointer to the FDDI filter database.

FDDI_QUERY_FILTER_CLASSES

Returns a value indicating the currently enabled filter classes, given a pointer to the filter database returned by FddiCreateFilter.

FddiQueryGlobalFilterLongAddresses

Returns a variable-sized array of the long addresses currently in use by all bound protocols, given a pointer to the FDDI filter database, the number of addresses obtained from FDDI_NUMBER_OF_GLOBAL_FILTER_LONG_ADDRESSES, and pointers to caller-supplied variables for returned status, the array of addresses, and the number of addresses actually returned in the array.

FddiQueryGlobalFilterShortAddresses

Returns a variable-sized array of the short addresses currently in use by all bound protocols, given a pointer to the FDDI filter database, the number of addresses obtained from FDDI_NUMBER_OF_GLOBAL_FILTER_SHORT_ADDRESSES, and pointers to caller-supplied variables for returned status, the array of addresses, and the number of addresses actually returned in the array.

FddiQueryOpenFilterLongAddresses

Returns a variable-sized array of the long addresses currently in use by a particular bound protocol, given a pointer to the FDDI filter database, the binding handle set up when the protocol opened the adapter, the number returned by FddiNumberOfOpenFilterLongAddresses, and pointers to caller-supplied variables for returned status, the array of addresses, and the number of addresses actually returned in the array.

FddiQueryOpenFilterShortAddresses

Returns a variable-sized array of the short addresses currently in use by a particular bound protocol, given a pointer to the FDDI filter database, the binding handle set up when the protocol opened the adapter, the number returned by FddiNumberOfOpenFilterShortAddresses, and pointers to caller-supplied variables for returned status, the array of addresses, and the number of addresses actually returned in the array.

FDDI_QUERY_PACKET_FILTER

Returns a value indicating the currently enabled filter classes for a particular binding, given a pointer to the filter database returned by FddiCreateFilter and a handle to the binding.

FddiShouldAddressLoopBack

Returns FALSE if a packet bound for a given FDDI address cannot possibly loop back.

NdisAcquireSpinLock

Acquires a spin lock so the caller can synchronize access to resources shared among nonISR 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 by calling NdisAllocateBuffer.

NdisAllocateDmaChannel

Reserves system resources during driver initialization for subsequent slave DMA operations and claims a DMA channel in the registry, returning a handle to be passed in subsequent calls to the NdisXxx DMA functions.

NdisAllocateMemory

Allocates resident (nonpaged) system-space memory, optionally within a specified address limit, as a physically contiguous allocation, and/or as a noncached allocation.

NdisAllocatePacket

Allocates a packet, 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 should contain.

NdisAllocateSharedMemory

Allocates and maps a memory range so it is simultaneously accessible from both the system and a busmaster DMA device, given a handle for the NIC returned by NdisRegisterAdapter, 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 driver and a mapped base logical address for use by the NIC.

NdisAllocateSpinLock

Initializes a variable of type NDIS_SPIN_LOCK, used to synchronize access to data shared among nonISR driver routines. An initialized spin lock, for which the caller supplies resident storage, is a required parameter to the Ndis..SpinLock and NdisInterlockedXxx functions.

NDIS_BUFFER_LINKAGE

Returns a pointer to a linked buffer, given a pointer to an NDIS buffer descriptor.

NdisCancelTimer

Cancels the immediately preceding call to NdisSetTimer, provided that the interval given to NdisSetTimer has not yet expired.

NdisChainBufferAtBack

Links a given buffer descriptor at the end of the chain of buffer descriptors for a given packet.

NdisChainBufferAtFront

Links a given buffer descriptor at the start of the chain of buffer descriptors for a given packet.

NdisCloseConfiguration

Releases the handle returned by NdisOpenConfiguration after the caller has retrieved hardware configuration information for a NIC 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.

NdisCompleteBufferPhysicalMapping

Flushes any data remaining in a busmaster NIC’s internal cache at the end of a transfer operation that was set up with NdisStartBufferPhysicalMapping.

NdisCompleteCloseAdapter

Notifies NDIS that the driver has completed a close-adapter request for which it previously returned NDIS_STATUS_PENDING, given the binding handle that identifies the protocol and the final status to be returned for the request. This function also releases resources that were allocated when the adapter was opened.

NdisCompleteDmaTransfer

Completes a slave DMA transfer operation begun with a preceding call to NdisSetupDmaTransfer, ensuring that the data is flushed to system memory or to the NIC, depending on the transfer direction.

NdisCompleteOpenAdapter

Notifies NDIS that the driver has completed an open-adapter request for which it previously returned NDIS_STATUS_PENDING, given the binding handle that identifies the protocol, the final status to be returned for the open request, and a second status with additional information if the driver set anything other than NDIS_STATUS_SUCCESS for the final status.

NdisCompleteQueryStatistics

Notifies NDIS that the driver has completed a non-protocol-specific open or query-information request for which it previously returned NDIS_STATUS_PENDING, given the handle to the NIC (returned by NdisRegisterAdapter), a pointer to the request, and the final status assigned by the caller.

NdisCompleteRequest

Returns the packet and final status of a completed query- or set-information request for which the driver previously returned NDIS_STATUS_PENDING, so that NDIS can return the completed packet to the appropriate bound protocol driver.

NdisCompleteReset

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.

NdisCompleteSend

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.

NdisCompleteTransferData

Returns the packet and final status of a completed transfer request for which the driver previously returned NDIS_STATUS_PENDING, so that NDIS can return the completed packet to the appropriate bound protocol driver.

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 memory 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.

NdisCreateLookaheadBufferFromSharedMemory

Returns the virtual address of a buffer within a block of memory shared with a busmaster DMA NIC so the caller can read(ahead) data in the buffer.

NdisDeregisterAdapter

Releases resources that were originally allocated with NdisRegisterAdapter, given the adapter handle. Drivers call NdisDeregisterAdapter when they are unloading.

NdisDeregisterAdapterShutdownHandler

Removes a driver function when the driver is unloading from the set of shutdown handlers that were registered with NdisRegisterAdapterShutdownHandler.

NdisDeregisterMac

Removes the caller from the set of drivers registered with NdisRegisterMac. Drivers call NdisDeregisterMac when they are unloading.

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 nonISR driver routines in a multiprocessor-safe way, provided that the caller is running at IRQL DISPATCH_LEVEL.

NdisDprReleaseSpinLock

Releases a spin lock that was acquired in a preceding call to NdisDprAcquireSpinLock.

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.

NdisFreeDmaChannel

Releases system resources, including claimed hardware resources in the registry, that were acquired with NdisAllocateDmaChannel. Drivers of slave DMA NICs call NdisFreeDmaChannel when they are unloading.

NdisFreeMemory

Releases a handle, usually when the driver is being unloaded, that was obtained in a preceding call to NdisAllocateMemory.

NdisFreePacket

Releases a packet 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.

NdisFreeSharedMemory

Releases system resources that were acquired with NdisAllocateSharedMemory. Drivers call NdisFreeSharedMemory when they are unloading.

NdisFreeSpinLock

Releases a spin lock initialized in a preceding call to NdisAllocateSpinLock, usually when a driver is unloading.

NdisFreeString

Frees the buffered string allocated with NdisInitializeString.

NdisGetBufferPhysicalArraySize

Returns the number of discontiguous physical blocks in a buffer, given a buffer descriptor.

NdisGetCacheFillSize

Returns the size of the cache boundary to drivers setting up DMA alignment requirements during initialization.

NdisGetNextBuffer

Returns the next buffer descriptor in a chain, given the current buffer descriptor.

NdisGetPhysicalAddressHigh

Returns the high-order part of a given physical address.

NdisGetPhysicalAddressLow

Returns the low-order part of a given physical address.

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.

NdisIndicateReceive

Notifies NDIS that a 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).

NdisIndicateReceiveComplete

Notifies NDIS that a receive packet, identified in a preceding call to NdisIndicateReceive, 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).

NdisIndicateStatus

Notifies NDIS of a change in the runtime status of the 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.

NdisIndicateStatusComplete

Notifies NDIS that the driver, which has previously called NdisIndicateStatus one or more times to indicate hardware anomalies or runtime state changes in the NIC, is ready to resume normal device I/O operations.

NDIS_INIT_FUNCTION

Marks a driver function as initialization-only driver code to be discarded after the function has executed.

NdisInitializeInterrupt

Sets up a mapping between the driver’s ISR and DPC functions, and the bus-relative vector (or level), mode, and sharing mode at which its NIC interrupts, given a pointer to caller-allocated storage for interrupt state (to be used by the NDIS library), a pointer to a variable in which status is returned, and a handle for the NIC. The interrupt handle initialized in this call is a required parameter to NdisSynchronizeWithInterrupt.

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.

NdisInitializeString

Allocates a buffer for and initializes a counted string in the system-default character set, given a source string and a NULL pointer.

NdisInitializeTimer

Sets up a caller-supplied time-out DPC function to be associated with a timer object during driver initialization; returns a handle at the caller-supplied resident storage for the timer object (to be used by the NDIS library). This handle is a required parameter to all other Ndis..Timer functions.

NdisInitializeWrapper

Notifies NDIS that a new NIC driver is initializing and returns an NdisWrapperHandle to be passed in subsequent calls to NdisXxx initialization and configuration functions.

NdisInterlockedAddUlong

Adds an unsigned long value to a given unsigned integer as an atomic operation, using a caller-supplied and initialized spin lock.

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 nonISR 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 nonISR driver functions.

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 nonISR driver functions.

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.

NdisMapIoSpace

Maps a given bus-relative physical range of device memory or a driver-allocated, long-term internal buffer onto system-space nonpaged pool and returns the mapped virtual base address.

NdisMoveFromMappedMemory

Copies data from device memory or a driver-allocated buffer that was mapped with NdisMapIoSpace to a system-space buffer.

NdisMoveMappedMemory

Copies data from one location to another in a memory block that was mapped with NdisMapIoSpace.

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 or a driver-allocated buffer that was mapped with NdisMapIoSpace.

NdisOpenConfiguration

Returns a handle for a driver’s HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
\
DriverName\Parameters registry key. This handle is a required parameter to all other NdisXxx configuration functions.

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_PAGABLE_FUNCTION

Marks a driver function as pageable driver code.

NdisPciAssignResources

Claims resources in the registry for the caller and returns the hardware configuration information, given a handle passed in to the driver’s DriverEntry function and the slot number of its NIC on the PCI bus.

NDIS_PHYSICAL_ADDRESS_CONST

Initializes a constant of type NDIS_PHYSICAL_ADDRESS.

NdisQueryBuffer

Retrieves the size of the range, and optionally its base virtual address, specified in a given buffer descriptor.

NdisQueryBufferOffset

Retrieves the base virtual address of the range specified in a given buffer descriptor.

NdisQueryPacket

Returns at least a count of buffers chained to a given packet and can also return the total number of bytes in all buffers chained to the packet, the total number of physically discontiguous pieces for all chained buffers, and a pointer to the initial buffer in the chain.

NdisQuerySendFlags

Retrieves the flags set by the protocol from a given send packet.

NdisRawReadPortBufferUchar

Reads a specified number of bytes into a caller-supplied buffer, given an I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawReadPortBufferUlong

Reads a specified number of ULONGs into a caller-supplied buffer, given an I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawReadPortBufferUshort

Reads a specified number of USHORTs into a caller-supplied buffer, given an I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawReadPortUchar

Reads a byte from a given I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawReadPortUlong

Reads a ULONG from a given I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawReadPortUshort

Reads a USHORT from a given I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawWritePortBufferUchar

Writes a specified number of bytes from a caller-supplied buffer to a given I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawWritePortBufferUlong

Writes a specified number of ULONGs from a caller-supplied buffer to a given I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawWritePortBufferUshort

Writes a specified number of USHORTs from a caller-supplied buffer to a given I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawWritePortUchar

Writes a byte to a given I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawWritePortUlong

Writes a ULONG to a given I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisRawWritePortUshort

Writes a USHORT to a given I/O port mapped in the initialization-time call to NdisRegisterAdapter.

NdisReadBindingInformation

Returns a pointer to the name of the NIC under a NIC driver’s Parameters key in the registry, given a handle obtained from NdisOpenConfiguration. Layered drivers can call this function, passing the returned string to NdisOpenAdapter.

NdisReadConfiguration

Reads the value of a named entry of the specified type, given the registry handle for the caller’s Parameters key returned by NdisOpenConfiguration.

NdisReadDmaCounter

Returns the number of bytes remaining to be transferred during a slave DMA operation if the NIC uses the host DMA controller’s autoinitialize mode, given a handle returned by NdisAllocateDmaChannel.

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 the number of functions, 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.

NdisReadMcaPosInformation

Returns POS configuration information to a caller-supplied buffer during initialization, given a handle to the wrapper configuration context and the channel 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 a handle to the adapter and the slot number for the NIC on the I/O bus.

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 given register address.

NdisReadRegisterUlong

Reads a ULONG from a given register address.

NdisReadRegisterUshort

Reads a USHORT from a given register address.

NdisRecalculatePacketCounts

Resets the valid count for a given packet.

NdisRegisterAdapter

Registers a NIC, recognized by the driver during initialization with calls to the NdisXxx configuration functions, with the NDIS library. This function also allocates system resources and claims hardware resources in the registry for the NIC, given the handle returned by NdisRegisterMac, a pointer to caller-allocated resident storage in which the driver maintains runtime context for the NIC, the handle returned by NdisInitializeWrapper, a pointer to a caller-supplied string naming the NIC, and a pointer to a caller-initialized NDIS_ADAPTER_INFORMATION structure specifying hardware configuration requirements of the NIC. NdisRegisterAdapter returns the status of the registration attempt and, if the call is successful, an adapter handle for the NIC, which can be used by protocols in open-adapter requests.

NdisRegisterAdapterShutdownHandler

Registers a driver-supplied MacShutdown 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 driver’s DriverEntry function. Such a MacShutdown function restores the NIC to a known state.

NdisRegisterMac

Registers a driver’s upper-edge entry points and name with the NDIS library, given a handle obtained from NdisInitializeWrapper and a pointer to the NDIS_MAC_CHARACTERISTICS structure set up by the caller. NdisRegisterMac returns the status of the registration attempt and, if the call is successful, a handle to the driver.

NdisReinitializePacket

Removes any chained buffers from a given packet and reinitializes it for reuse.

NdisReleaseAdapterResources

Releases claimed hardware resources for a NIC in the registry when the driver is unloading.

NdisReleaseSpinLock

Releases a spin lock that was acquired in a preceding call to NdisAcquireSpinLock.

NdisRemoveInterrupt

Releases the mapping created with an initialization-time call to NdisInitializeInterrupt. Drivers call NdisRemoveInterrupt when they are unloading.

NdisSetPhysicalAddressHigh

Changes the high-order part of a given physical address to a given value.

NdisSetPhysicalAddressLow

Changes the low-order part of a given physical address to a given value.

NdisSetTimer

Sets a caller-initialized timer object to a specified interval and queues the driver’s timer-DPC function to run when the given interval expires.

NdisSetupDmaTransfer

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 NdisAllocateDmaChannel and the transfer direction.

NdisStallExecution

Stalls the caller on the current processor for a given interval.

NdisStartBufferPhysicalMapping

Sets up a busmaster NIC for a DMA transfer operation, given a 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.

NdisSynchronizeWithInterrupt

Synchronizes the execution of a caller-supplied 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.

NdisTerminateWrapper

Releases system resources allocated when the driver called NdisInitializeWrapper. 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 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 and returns a pointer to the buffer descriptor.

NdisUnmapFile

Releases the file mapping set up by the preceding call to NdisMapFile.

NdisUnmapIoSpace

Releases a mapping obtained with NdisMapIoSpace, usually when a driver is unloading.

NdisUpdateSharedMemory

Ensures that data read from shared memory is current when the NIC has just written data to shared memory on platforms that require explicit coherency support from the system.

NdisWriteConfiguration

Writes a caller-supplied value entry in the registry, given the handle for the caller’s Parameters key returned by NdisOpenConfiguration

NdisWriteErrorLogEntry

Allocates an error-log record, fills it in, and writes it to the I/O error log, given a 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.

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.

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 given register address.

NdisWriteRegisterUlong

Writes a given ULONG to a given register address.

NdisWriteRegisterUshort

Writes a given USHORT to a given register address.

NdisZeroMappedMemory

Fills a block of memory that was mapped in a preceding call to NdisMapIoSpace 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.

TrChangeFunctionalAddress

Checks the current functional address array for all currently bound protocols and, if a change is necessary, calls the driver’s MacChangeTrAddress function, which was set up with TrCreateFilter, given a pointer to the filter database, the binding handle for the protocol that initiated the set/close request, the packet causing the change of functional addresses, whether the change is caused by a set request (rather than a close), and an address specification. This function restores the original functional address array if the caller-supplied function returns anything except NDIS_STATUS_SUCCESS or NDIS_STATUS_PENDING.

TrChangeGroupAddress

Checks the current group address array for all currently bound protocols and, if a change is necessary, calls the driver’s MacChangeGroup function, which was set up with TrCreateFilter, given a pointer to the filter database, the binding handle for the protocol that initiated the set/close request, the packet causing the change of group addresses, whether the change is caused by a set request (rather than a close), and an address specification. This function restores the original group address array if the caller-supplied function returns anything except NDIS_STATUS_SUCCESS or NDIS_STATUS_PENDING.

TR_COMPARE_NETWORK_ADDRESSES

Sets a caller-supplied variable to a value indicating whether a given Token Ring address is greater than, less than, or equal to another given Token Ring address.

TR_COPY_NETWORK_ADDRESS

Copies a given Token Ring address to a given location.

TrCreateFilter

Creates and initializes a Token Ring filter database, given the address of the NIC, the number of multicast addresses it can support, four driver-supplied functions to be called when certain runtime changes occur, a caller-initialized spin lock used to synchronize access to the filter database, and a pointer to a variable that is set to the address of the filter database on return from this function.

TrDeleteFilter

Releases the resources used for a Token Ring filter database when there are no remaining active filters.

TrDeleteFilterOpenAdapter

Removes a binding that was set up with TrNoteFilterOpenAdapter from the filter database when the NIC is closed by the protocol, calling driver-supplied functions as necessary to modify the database, given the pointer to the Token Ring filter database, the binding and context handles set up when the NIC was opened by the protocol, and a pointer to the filter handle returned by TrNoteFilterOpenAdapter.

TrFilterAdjust

Calls the driver’s MacChangeFilter function, which was set up with TrCreateFilter, when a particular filter class changes from being used to not used or vice versa, given a pointer to the filter database, the binding handle, the packet causing the change of class usage, whether the change is caused by a set request (rather than a close), and the classes to be added or deleted. This function restores the original classes if the caller-supplied function returns anything except NDIS_STATUS_SUCCESS or NDIS_STATUS_PENDING.

TrFilterIndicateReceive

Indicates the arrival of a Token Ring receive packet, passing in a pointer to the Token Ring filter database, a pointer to caller-supplied context that the protocol must pass back if it later requests a transfer of the packet data, the packet header and its size in bytes, a pointer to a lookahead buffer containing some packet data and its size in bytes, and the total size in bytes of the packet. This function forwards the receive information to the appropriate bound protocol(s).

TrFilterIndicateReceiveComplete

Indicates that a receive operation is done, that is, that TrFilterIndicateReceive has returned to the caller. TrFilterIndicateReceiveComplete, given a pointer to the TokenRing filter database, notifies the appropriate bound protocol(s).

TR_IS_BROADCAST

Sets a caller-supplied variable to a Boolean value indicating whether a given Token Ring address is a broadcast address.

TR_IS_FUNCTIONAL

Sets a caller-supplied variable to a Boolean value indicating whether a given Token Ring address is a functional address.

TR_IS_GROUP

Sets a caller-supplied variable to a Boolean value indicating whether a given Token Ring address is a group address.

TR_IS_NOT_DIRECTED

Sets a caller-supplied variable to a Boolean value indicating whether a given Token Ring address is neither a functional nor a group address.

TR_IS_SOURCE_ROUTING

Sets a caller-supplied variable to a Boolean value indicating whether a given Token Ring address is a source-routing address.

TrNoteFilterOpenAdapter

Adds a new binding to the existing filter database, given the pointer to a Token Ring filter database already initialized with TrCreateFilter, the binding and context handles set up when the NIC was opened by the protocol, and a pointer to caller-supplied storage for the filter handle that this function returns if the call succeeds.

TR_QUERY_FILTER_ADDRESSES

Returns a value indicating the currently enabled functional address, given a pointer to the filter database returned by TrCreateFilter.

TR_QUERY_FILTER_BINDING_ADDRESS

Returns a value indicating the functional address for a particular binding, given a pointer to the filter database returned by TrCreateFilter and the binding handle.

TR_QUERY_FILTER_BINDING_GROUP

Returns TRUE if a particular binding is using the currently enabled group address, given a pointer to the filter database returned by TrCreateFilter and the binding handle.

TR_QUERY_FILTER_CLASSES

Returns a value indicating the currently enabled filter classes, given a pointer to the filter database returned by TrCreateFilter.

TR_QUERY_FILTER_GROUP

Returns a value indicating the currently enabled group address, given a pointer to the filter database returned by TrCreateFilter.

TR_QUERY_PACKET_FILTER

Returns a value indicating the currently enabled filter classes for a particular binding, given a pointer to the filter database returned by TrCreateFilter and the binding handle.

TrShouldAddressLoopBack

Returns FALSE if a packet bound for a given Token Ring address cannot possibly loop back.