NET_BUFFER_LIST_CONTEXT structure (ndis/nbl.h)
The NET_BUFFER_LIST_CONTEXT structure stores context information for a NET_BUFFER_LIST structure.
Syntax
typedef struct _NET_BUFFER_LIST_CONTEXT {
NET_BUFFER_LIST_CONTEXT *Next;
USHORT Size;
USHORT Offset;
UCHAR ContextData[];
} NET_BUFFER_LIST_CONTEXT, *PNET_BUFFER_LIST_CONTEXT;
Members
Next
A pointer to the next NET_BUFFER_LIST_CONTEXT structure in a linked list of NET_BUFFER_LIST_CONTEXT structures.
Size
The size, in bytes, of the entire context space in the NET_BUFFER_LIST_CONTEXT structure, including the used and unused context space.
Offset
The offset, in bytes, from the beginning of the context data buffer to the start of the context data in the NET_BUFFER_LIST_CONTEXT structure. The Offset member also specifies the size in bytes of the unused context space in the NET_BUFFER_LIST_CONTEXT structure.
ContextData
The context data buffer. The context data can include any information that a driver requires.
Remarks
Every NET_BUFFER_LIST structure can include a preallocated NET_BUFFER_LIST_CONTEXT structure. As a NET_BUFFER_LIST structure travels through the driver stack, the linked list of NET_BUFFER_LIST_CONTEXT structures can expand to accommodate additional data space for each driver.
Drivers should use the following NDIS macros and functions to access and manipulate members in a NET_BUFFER_LIST_CONTEXT structure:
- NdisAllocateNetBufferListContext
- NdisFreeNetBufferListContext
- NET_BUFFER_LIST_CONTEXT_DATA_START
- NET_BUFFER_LIST_CONTEXT_DATA_SIZE
NDIS drivers call the NdisAllocateNetBufferListContext function to allocate contiguous buffer space in the NET_BUFFER_LIST_CONTEXT structure. If necessary, NDIS allocates a new NET_BUFFER_LIST_CONTEXT structure with additional space to honor the request. NDIS drivers call the NdisFreeNetBufferListContext function to free the buffer space.
Use the NET_BUFFER_LIST_CONTEXT_DATA_SIZE macro to obtain the size of the used context space. Use the NET_BUFFER_LIST_CONTEXT_DATA_START macro to get the starting address of the used context space.
For more information on how to use net buffers, see NET_BUFFER Architecture.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported in NDIS 6.0 and later. |
Header | ndis/nbl.h (include ndis.h) |