Retreat and Advance Operations

NDIS provides retreat and advance functions to manipulate NET_BUFFER structures. Retreat operations make more used data space available to the current driver. Advance operations release used data space.

Retreat operations are required during send operations or when a driver returns received data to an underlying driver. For example, during a send operation, a driver can call the NdisRetreatNetBufferDataStart function to make room for header data.

Advance operations are required when a send operation is complete or when a driver receives data from an underlying driver. For example, during a receive operation, a driver can call the NdisAdvanceNetBufferDataStart function to skip over the header data that was used by a lower level driver. In this case, the header data remains in the buffer in the unused data space.

The following figure shows the relationship between the network data and these operations.

Diagram illustrating data space allocation

The following topics provide more information about advance and retreat operations:

Retreat Operations

Advance Operations



Send comments about this topic to Microsoft

© 2015 Microsoft