Upravit

Sdílet prostřednictvím


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 showing the relationship between network data and advance and retreat operations.

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

Retreat Operations

Advance Operations