WSK_BUF structure (wsk.h)

The WSK_BUF structure defines a data buffer that is used for sending and receiving data over a socket.

Syntax

typedef struct _WSK_BUF {
  PMDL   Mdl;
  ULONG  Offset;
  SIZE_T Length;
} WSK_BUF, *PWSK_BUF;

Members

Mdl

A pointer to a memory descriptor list (MDL). The MDL can be a single MDL or the first MDL in an MDL chain. If the Length member is zero, this pointer can be NULL.

Offset

An offset to where the data starts in the MDL. If the Mdl member points to the first MDL in an MDL chain, this offset must be within the memory buffer that is described by the first MDL in the chain. If the Mdl member is NULL, the Offset member is not used.

Length

When a WSK_BUF structure is used to describe a buffer of data to be sent over a socket, this member specifies the number of bytes of data in the MDL (or MDL chain) to be sent.

When a WSK_BUF structure is used to describe a buffer for receiving data from a socket, this member specifies the maximum number of bytes to be received into the MDL (or MDL chain).

When a WSK_BUF structure is contained within either a WSK_DATA_INDICATION structure or a WSK_DATAGRAM_INDICATION structure, this member specifies the number of bytes of received data in the MDL (or MDL chain).

Remarks

Each MDL in the MDL chain that is pointed to by the Mdl member describes memory that is either locked or from non-paged pool.

When a WSK application passes a pointer to a WSK_BUF structure to the WskReceive function, the application can specify zero for the Length member of the structure. In that situation, the Mdl member can be NULL because no data will be copied into the buffer.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Header wsk.h (include Wsk.h)

See also

WSK_DATAGRAM_INDICATION

WSK_DATA_INDICATION

WskDisconnect

WskReceive

WskReceiveFrom

WskSend

WskSendTo