次の方法で共有


NDIS-Supplied Support Functions (NDIS 5.1)

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.

NdisXxx functions are divided into classes. The following topics describe these classes of functions and how they support miniport driver operations:

Memory Functions

Queuing Functions

System Information Functions

Logging Functions

String Functions

File Functions

Address Functions

Variable Functions

Register Functions

WorkItem Functions

Memory Functions (NDIS 5.1)

  • NdisAllocateMemoryWithTag
    Allocates resident (nonpaged) system-space memory. The caller supplies a tag that can be used to track the driver's memory allocation.
  • NdisEqualMemory
    Compares a specified number of characters in one block of memory with the same number of characters in a second block of memory.
  • NdisFillMemory
    Fills a caller-supplied buffer with the given character.
  • NdisFreeMemory
    Releases a block of memory previously allocated with NdisAllocateMemoryWithTag.
  • NdisMoveMemory
    Copies a specified number of bytes from one caller-supplied location to another.
  • NdisInitializeNPagedLookasideList
    Initializes a lookaside list. After a successful initialization, nonpaged fixed-size blocks can be allocated from, and freed to, the lookaside list.

Queuing Functions (NDIS 5.1)

  • NdisInterlockedInsertHeadList
    Inserts an entry, usually a packet, at the head of a doubly linked list so that access to the list is synchronized in a multiprocessor-safe way.
  • NdisInterlockedInsertTailList
    Inserts an entry, usually a packet, at the tail of a doubly linked list so that access to the list is synchronized in a multiprocessor-safe way.
  • NdisInterlockedRemoveHeadList
    Removes an entry, usually a packet, from the head of a doubly linked list so that access to the list is synchronized in a multiprocessor-safe way.
  • NdisQueryDepthSList
    Returns the current number of entries in a given sequenced, singly linked list.

System Information Functions (NDIS 5.1)

  • NdisSystemProcessorCount
    Determines whether its caller is running on a uniprocessor or multiprocessor machine. An NDIS driver might call this function during initialization before allocating resources.
  • NdisGetCurrentProcessorCounts
    Returns counts for the current processor that a driver can use to determine CPU utilization for a particular time interval.
  • NdisGetSystemUpTime
    Returns the number of milliseconds that have elapsed since the system was booted.

Logging Functions (NDIS 5.1)

  • NdisMCreateLog
    Allocates and opens a log file in which a miniport driver can write data to be displayed by a driver-dedicated Win32 application.
  • NdisMWriteLogData
    Transfers driver-supplied information into the log file for consumption and display by a driver-dedicated Win32 application.

String Functions (NDIS 5.1)

  • NdisEqualString
    Compares two strings, in the OS-default character set, to determine whether they are equal.
  • NdisFreeString
    Releases storage that was allocated for a buffered string.
  • NdisInitializeString
    Allocates storage for and initializes a counted string in the system-default character set.
  • NdisUpcaseUnicodeString
    Converts a copy of a given Unicode string to upper case and returns the converted string.

File Functions (NDIS 5.1)

  • NdisMapFile
    Maps an already open file into a caller-accessible buffer if the file is unmapped.
  • NdisUnmapFile
    Releases a virtual address mapping of a file that was set up with NdisMapFile.
  • NdisCloseFile
    Releases a handle returned by NdisOpenFile and frees the memory allocated to hold the file contents when it was opened.

Address Functions (NDIS 5.1)

Variable Functions (NDIS 5.1)

  • NdisRetrieveUlong
    Retrieves a ULONG value from the source address, avoiding alignment faults.
  • NdisStoreUlong
    Stores a ULONG value at a particular address, avoiding alignment faults.
  • NdisInterlockedAddUlong
    Adds an unsigned long value to a given unsigned integer as an atomic operation, using a caller-supplied spin lock to synchronize access to the integer variable.

Register Functions (NDIS 5.1)

WorkItem Functions (NDIS 5.1)

  • 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.
  • NdisScheduleWorkItem
    Inserts a given work item into a queue. A system worker thread removes the item and gives control to the callback function that the driver previously supplied to NdisInitializeWorkItem.

 

 

Send comments about this topic to Microsoft