IPPROTO_UDP Socket Options
The following table describes IPPROTO_UDP socket options that apply to sockets created for the IPv4 and IPv6 address families (AF_INET and AF_INET6) with the protocol parameter to the socket function specified as UDP (IPPROTO_UDP). See the getsockopt and setsockopt function reference pages for more information on getting and setting socket options.
- **IPPROTO\_UDP Socket Options**
Option Get Set Optval type Description UDP_CHECKSUM_COVERAGE yes yes DWORD (boolean) When TRUE, UDP datagrams are sent with a checksum. UDP_NOCHECKSUM yes yes DWORD (boolean) When TRUE, UDP datagrams are sent with the checksum of zero. Required for service providers. If a service provider does not have a mechanism to disable UDP checksum calculation, it may simply store this option without taking any action. This option is not supported for IPv6.
- **Windows Support for IPPROTO\_UDP options**
Option Windows 7 Windows Server 2008 Windows Vista Windows Server 2003 Windows XP Windows 2000 Windows NT4 Windows 9x/Me UDP_CHECKSUM_COVERAGE x x x x x UDP_NOCHECKSUM x x x x x x x
On the Microsoft Windows Software Development Kit (SDK) released for Windows Vista and later, the organization of header files has changed and IPPROTO_UDP level is defined in the Ws2def.h header file which is automatically included in the Winsock2.h header file. The IPPROTO_UDP socket options are defined in the Ws2tcpip.h header file. The Ws2def.h header file should never be used directly.