2.1 NDIS Library Functions Used by Miniport Drivers
-
ETH_COPY_NETWORK_ADDRESS
-
Copies a given Ethernet address to a given location.
-
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.
-
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).
-
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 with NdisAllocateBuffer.
-
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 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.
-
NdisAllocateSpinLock
-
Initializes a variable of type NDIS_SPIN_LOCK, used to synchronize access to
resources shared among nonISR driver functions. An initialized spin lock, for
which the caller supplies resident storage, is a required parameter to the Ndis..SpinLock
and NdisInterlockedXxx functions.
-
NdisAnsiStringToUnicodeString
-
Converts a given counted ANSI string into a counted Unicode string.
-
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.
-
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.
-
NdisCreateLookaheadBufferFromSharedMemory
-
Returns the virtual address of a buffer within a block of memory shared with a
busmaster DMA NIC so the caller can set up a read-only lookahead buffer for a
receive indication to higher-level drivers.
-
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 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.
-
NdisEqualString
-
Compares two strings to determine whether they are equal.
-
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 NdisAllocateMemory.
-
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.
-
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 busmaster DMA NICs.)
-
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.
-
NdisGetNextBuffer
-
Returns the next buffer descriptor in a chain, given the current buffer
descriptor.
-
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_STATUS
-
Returns the Status of an indicated receive packet on return from NdisMIndicateReceivePacket
so the driver can determine whether its miniport-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
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.
-
NdisIMDeInitializeDeviceInstance
-
Calls an NDIS intermediate driver's MiniportHalt function to tear down the
driver's virtual NIC.
-
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.
-
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.
-
NdisIMQueueMiniportCallback
-
Calls an intermediate driver’s callback function to when it can execute in a
MiniportXxx context, as, for example, to forward an indication to
higher-level protocols.
-
NdisIMRegisterLayeredMiniport
-
Registers an NDIS intermediate driver’s MiniportXxx entry points and
name with the NDIS library when the driver initializes.
-
NdisIMRevertBack
-
Returns the function of an intermediate driver to the context in which it was
executing before it called NdisIMSwitchToMiniport.
-
NdisIMSwitchToMiniport
-
Allows an intermediate driver function to call NdisMXxx normally
called only from MiniportXxx functions, as, for example, to make
indications up to higher-level protocols.
-
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.
-
NdisInitializeString
-
Allocates a buffer for and initializes a counted string in the system-default
character set, given a source string and a NULL pointer.
-
NdisInitUnicodeString
-
Initializes a counted Unicode string.
-
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.
-
NdisMAllocateMapRegisters
-
Reserves system resources during NIC driver initialization for subsequent
busmaster DMA operations.
-
NdisMAllocateSharedMemory
-
Allocates and maps a memory range so it is simultaneously accessible from both
the system and a busmaster 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 and a mapped base logical
address for use by the NIC.
-
NdisMAllocateSharedMemoryAsync
-
Allocates additional memory shared between a miniport and its busmaster DMA
NIC, usually when the miniport 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.
-
NdisMCompleteBufferPhysicalMapping
-
Flushes any data remaining in a busmaster 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.
-
NdisMCreateLog
-
Allocates and opens a log file in which a NIC miniport 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.
-
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 busmaster 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.
-
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 runtime 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 runtime state changes in
the NIC, is ready to resume normal device I/O operations.
-
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.
-
NdisMQueryAdapterResources
-
Either returns a list of PCMCIA 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.
-
NdisMRegisterDmaChannel
-
Reserves system resources during driver initialization for subsequent slave
DMA operations or ISA busmaster 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.
-
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 busmaster and the type of I/O bus on which the NIC can be
found, so the miniport can call other NdisXxx initialization and
configuration routines, particularly the NdisRegisterXxx. 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 busmaster and the type of I/O bus on which the NIC can be
found, so the miniport 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.
-
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 busmaster 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
-
Ensures that data read from shared memory is current when the busmaster NIC
has just written data to shared memory on platforms that require explicit
coherency support from the system.
-
NdisMWriteLogData
-
Transfers miniport-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 a miniport’s HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services
\DriverName\Parameters registry key. This handle is a
required parameter to 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 code.
-
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.
-
NdisQueryBufferOffset
-
Retrieves the base virtual address of the range specified in a given buffer
descriptor.
-
NdisQueryMapRegisterCount
-
Returns the maximum number of available map registers in the current platform
so the driver of a busmaster DMA NIC can call NdisMAllocateMapRegisters
with an appropriate value during initialization.
-
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.
-
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 for the caller’s Parameters key 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.
-
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 an adapter handle and the
slot number for the NIC on the I/O bus.
-
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.
-
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.
-
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_PACKET_HEADER_SIZE
-
Sets the HeaderSize in the NDIS_PACKET_OOB_DATA
block associated with a miniport-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-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.
-
NDIS_SET_PACKET_TIME_RECEIVED
-
Sets the TimeReceived in the NDIS_PACKET_OOB_DATA
block associated with a miniport-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-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 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 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.
-
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 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 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.
-
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 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.
-
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.
-
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.
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.
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 Windows NT kernel-mode components, such as the following:
CONTAINING_RECORD
InitializeListHead
InsertHeadList
InsertTailList
IsListEmpty
RemoveEntryList
RemoveHeadList
For more information about the preceding Windows NT macro and functions, see
the Kernel-Mode Driver Reference.