NET_BUFFER_DATA structure (ndis/nbl.h)

The NET_BUFFER_DATA structure contains information for managing the data buffers that are attached to a NET_BUFFER structure, and it identifies the next NET_BUFFER structure in a list of NET_BUFFER structures.

Syntax

typedef struct _NET_BUFFER_DATA {
  NET_BUFFER             *Next;
  MDL                    *CurrentMdl;
  ULONG                  CurrentMdlOffset;
  NET_BUFFER_DATA_LENGTH NbDataLength;
  MDL                    *MdlChain;
  ULONG                  DataOffset;
} NET_BUFFER_DATA, *PNET_BUFFER_DATA;

Members

Next

A pointer to the next NET_BUFFER structure in a linked list of NET_BUFFER structures. If this structure is the last NET_BUFFER structure in the list, this member is NULL.

CurrentMdl

A pointer to the first MDL that the current driver is using. This member provides an optimization that improves performance by skipping over any MDLs that the current driver is not using.

CurrentMdlOffset

The offset, in bytes, to the beginning of the used data space in the MDL that is specified by the CurrentMdl member.

NbDataLength

The length, in bytes, of the used data space in the MDL chain. The maximum length is 0xFFFFFFFF bytes.

MdlChain

A pointer to a linked list of MDLs that map a data buffer. The data buffer stores the network data.

DataOffset

The offset, in bytes, from the beginning of the MDL chain to the beginning of the network data in the MDL chain. This offset is also the size, in bytes, of the unused data space.

Remarks

The NET_BUFFER_HEADER structure contains a NET_BUFFER_DATA structure that defines data for the NET_BUFFER structure. To access the members of NET_BUFFER_DATA, use the NdisRetreatNetBufferDataStart and NdisAdvanceNetBufferDataStart functions, and the following macros:

NET_BUFFER_NEXT_NB

NET_BUFFER_FIRST_MDL

NET_BUFFER_DATA_OFFSET

NET_BUFFER_DATA_LENGTH

NET_BUFFER_CURRENT_MDL

NET_BUFFER_CURRENT_MDL_OFFSET
Note  The C and C++ compilers use different definitions for these macros. Failure to use the macros can cause problems when switching compilers.
 

Requirements

Requirement Value
Minimum supported client Supported in NDIS 6.0 and later.
Header ndis/nbl.h (include ndis.h)

See also

NET_BUFFER

NET_BUFFER_CURRENT_MDL

NET_BUFFER_CURRENT_MDL_OFFSET

NET_BUFFER_DATA_LENGTH

NET_BUFFER_DATA_OFFSET

NET_BUFFER_FIRST_MDL

NET_BUFFER_HEADER

NET_BUFFER_NEXT_NB

NdisAdvanceNetBufferDataStart NdisRetreatNetBufferDataStart