// ndis.h
NDIS_STATUS NdisBuildScatterGatherList(
[in] IN NDIS_HANDLE NdisHandle,
[in] IN PNDIS_SCATTER_GATHER_LIST_PARAMETERS SGListParameters
);
View the official Windows Driver Kit DDI reference
No description available.
The NdisBuildScatterGatherList function builds a scatter/gather list by using the specified parameters.
NdisHandle
[in]An NDIS driver or instance handle that was obtained during caller initialization. For example, a miniport driver can use the NDIS handle that it obtained from the NdisMRegisterMiniportDriver or MiniportInitializeEx function. Other NDIS drivers can use the handles from the following functions:
SGListParameters
[in]A pointer to an NDIS_SCATTER_GATHER_LIST_PARAMETERS structure that specifies the parameters for allocating the scatter/gather list.
NdisBuildScatterGatherList can return the following status values:
Return code | Description |
---|---|
NDIS_STATUS_SUCCESS | The operation completed successfully. |
NDIS_STATUS_BUFFER_TOO_SHORT | The operation failed because the buffer length that is specified in the ScatterGatherListBufferSize member of the NDIS_SCATTER_GATHER_LIST_PARAMETERS structure was too short. In this case, NDIS provided the required buffer size in the ScatterGatherListBufferSizeNeeded member. |
NDIS drivers call the NdisBuildScatterGatherList function to build a scatter/gather list for a buffer. To call this function, a miniport driver specifies a miniport adapter handle or a protocol driver specifies an NDIS binding handle.
The underlying miniport adapter must have called NdisMRegisterScatterGatherDma before a driver can call NdisBuildScatterGatherList.
NDIS calls the NetProcessSGList function that is specified at the ProcessSGListHandler member of the NDIS_SCATTER_GATHER_LIST_PARAMETERS structure within the context of NdisBuildScatterGatherList.
The drivers must call the NdisFreeScatterGatherList function to free a scatter/gather list that was created with the NdisBuildScatterGatherList function.
NDIS_SCATTER_GATHER_LIST_PARAMETERS