Skip to content

Latest commit

 

History

History
73 lines (57 loc) · 2.54 KB

nf-ws2tcpip-wsasetrecvipecn.md

File metadata and controls

73 lines (57 loc) · 2.54 KB
UID title description ms.date targetos req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs
NF:ws2tcpip.WSASetRecvIPEcn
WSASetRecvIPEcn
Specifies whether the IP stack should populate the control buffer with a message containing the explicit congestion notification (ECN) codepoint of the Type of Service IPv4 header field (or Traffic Class IPv6 header field) on a received datagram.
11/13/2020
Windows
function
ws2tcpip.h
Windows 10 Build 20348
Windows 10 Build 20348
apiref
HeaderDef
ws2tcpip.h
WSASetRecvIPEcn
WSASetRecvIPEcn
ws2tcpip/WSASetRecvIPEcn
c++

-description

Specifies whether the IP stack should populate the control buffer with a message containing the explicit congestion notification (ECN) codepoint of the Type of Service IPv4 header field (or Traffic Class IPv6 header field) on a received datagram.

When you enable the receipt of ECN codepoints, the LPFN_WSARECVMSG (WSARecvMsg) function returns optional control data containing the ECN codepoint of the received datagram. The returned control message type will be IP_ECN (or IPV6_ECN) with level IPPROTO_IP (or IPPROTO_IPV6). The control message data is returned as an INT. This option is valid only on datagram sockets (the socket type must be SOCK_DGRAM).

For more info, and code examples, see Winsock explicit congestion notification (ECN). Also see WSAGetRecvIPEcn.

-parameters

-param Socket

Type: _In_ SOCKET

A descriptor that identifies the socket.

-param Enabled

Type: _In_ DWORD

TRUE to enable the receipt of ECN codepoints; FALSE to disable.

-returns

If the function succeeds, then the return value is 0. Otherwise, a value of SOCKET_ERROR is returned, and you can retreive a specific error code by calling WSAGetLastError.

-remarks

-see-also