A.2.3.5  Memory and I/O Functions

The NDIS interface library provides a set of memory functions that translate general operating system requests into OS-specific calls. This allows a standard portable interface that supports the various operating environments for NDIS 3.0 drivers. Memory functions of the NDIS interface library are defined in Table A.2.8.

Table A.2.8    Memory and I/O Functions

Function Definition
NdisAllocateMemory Allocates memory for use by a driver.
NdisAllocateSharedMemory Allocates memory the NIC driver shares with its network interface card.
NdisFlushBuffer Flushes a buffer allocated as shared memory.
NdisFreeMemory Frees memory that NdisAllocateMemory allocates.
NdisFreeSharedMemory Frees memory that NdisAllocateSharedMemory allocates.
NdisGetCacheFillSize Retrieves the host cache fill size.
NdisMapIoSpace Maps a physical I/O address into a virtual address for a network card that has memory with a physical address in the host I/O space.
NdisMoveFromMappedMemory Copies to host memory from memory mapped using NdisMapIoSpace.
NdisMoveMappedMemory Copies memory data to/from a network card physical I/O address that NdisMapIoSpace has mapped to a virtual address.
NdisMoveMemory Copies memory data from one location to another.
Ndis MoveToMappedMemory Copies data from host memory to memory mapped using NdisMapIoSpace.
NdisRawReadPort Functions Read a single piece of data from an I/O port. Specific functions include:

  NdisRawReadPortUchar
NdisRawReadPortUlong
NdisRawReadPortUshort

NdisRawReadPortBuffer Functions Read a buffer of data from an I/O port. Specific functions include:

  NdisRawReadPortBufferUchar
NdisRawReadPortBufferUlong
NdisRawReadPortBufferUshort

NdisRawWritePort Functions Writes a single piece of data to an I/O port. Specific functions include:

  NdisRawWritePortUchar
NdisRawWritePortUlong
NdisRawWritePortUshort

NdisRawWritePortBuffer Functions Writes a buffer of data to I/O port. Specific functions include:

  NdisRawWritePortBufferUchar
NdisRawWritePortBufferUlong
NdisRawWritePortBufferUshort

NdisReadPort Functions Read a single piece of data from an I/O port. Specific functions include:

  NdisReadPortUchar
NdisReadPortUlong
NdisReadPortUshort

NdisReadPortBuffer Functions Read a buffer of data from an I/O port. Specific functions include:

  NdisReadPortBufferUchar
NdisReadPortBufferUlong
NdisReadPortBufferUshort

NdisReadRegister Functions Read data from non-cached memory. Specific functions are:

  NdisReadRegisterUchar
NdisReadRegisterUlong
NdisReadRegisterUshort

NdisUnmapIoSpace Disassociates a physical I/O address from a virtual address that NdisMapIoSpace has mapped to it.
NdisUpdateSharedMemory Ensures that data that the NIC driver reads from a shared memory region is fully up to date.
NdisWritePort Functions Write a single piece of data to an I/O port. Specific functions include:

  NdisWritePortUchar
NdisWritePortUlong
NdisWritePortUshort

NdisWritePortBuffer Functions Write a buffer of data to an I/O port. Specific functions include:

  NdisWritePortBufferUchar
NdisWritePortBufferUlong
NdisWritePortBufferUshort

NdisWriteRegister Functions Write a single piece of data to non-cached memory. Specific functions are:

  NdisWriteRegisterUchar
NdisWriteRegisterUlong
NdisWriteRegisterUshort
.

NdisZeroMappedMemory Zeroes out memory that NdisMapIoSpace maps.
NdisZeroMemory Zeroes out a block of memory.