NET_BUFFER_DATA (Compact 2013)

3/26/2014

This 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  MdlChain;
  ULONG  DataLength;
  ULONG  DataOffset;
  PMDL  CurrentMdl;
  ULONG  CurrentMdlOffset;
} 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.
  • MdlChain
    A pointer to a linked list of MDLs that map a data buffer. The data buffer stores the network data.
  • DataLength
    The length, in bytes, of the used dataspace in the MDL chain. The maximum length is 0xFFFFFFFF bytes.
  • 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 dataspace.
  • 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 dataspace in the MDL that is specified by the CurrentMdl member.

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

Header

ndis.h

See Also

Reference

NDIS NET_BUFFER Structures
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