NET_FRAGMENT structure (fragment.h)

Represents one contiguous buffer in memory.

Syntax

typedef struct _NET_FRAGMENT {
  UINT64 ValidLength : 26;
  UINT64 Capacity : 26;
  UINT64 Offset : 10;
  UINT64 Scratch : 1;
  UINT64 OsReserved_Bounced : 1;
} NET_FRAGMENT;

Members

ValidLength

Contains the length of packet payload. This value is less than or equal to the value of Capacity.

For transmit queues, this value is read-only.

Capacity

Contains the total length of the packet buffer.

For transmit queues, this value is read-only.

Offset

Contains the offset from the start of the VirtualAddress and DmaLogicalAddress to the start of the valid packet payload. This value is less than or equal to the value of Capacity.

To obtain the virtual address for this fragment, call NetExtensionGetFragmentVirtualAddress.

To obtain the DMA logical address for this fragment, call NetExtensionGetFragmentLogicalAddress.

For transmit queues, this value is read-only.

Scratch

A bit field value that the client may use for any purpose. When the NET_PACKET to which this fragment belongs is reused, this value is reset to zero.

OsReserved_Bounced

Reserved. Client drivers must not read or write to this value.

Remarks

A single NET_PACKET structure contains references to one or more NET_FRAGMENT structures.

While each fragment is a virtually contiguous buffer of memory, a packet that contains more than one fragment is virtually discontiguous.

Requirements

Requirement Value
Minimum KMDF version 1.29
Header fragment.h