Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

NET_BUFFER_DATA structure

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 {
  PNET_BUFFER            Next;
  PMDL                   CurrentMdl;
  ULONG                  CurrentMdlOffset;
  NET_BUFFER_DATA_LENGTH NbDataLength;
  PMDL                   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

Version

Supported in NDIS 6.0 and later.

Header

Ndis.h (include Ndis.h)

See also

NdisAdvanceNetBufferDataStart
NdisRetreatNetBufferDataStart
NET_BUFFER
NET_BUFFER_CURRENT_MDL
NET_BUFFER_CURRENT_MDL_OFFSET
NET_BUFFER_DATA_OFFSET
NET_BUFFER_DATA_LENGTH
NET_BUFFER_FIRST_MDL
NET_BUFFER_HEADER
NET_BUFFER_NEXT_NB

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft