Rediger

Del via


Multicast Socket Option Behavior

This page describes the behavior of multicast socket options based on various socket option settings states.

For example, this page describes the behavior when the IP_ADD_SOURCE_MEMBERSHIP socket option is set on a socket for which the IP_ADD_SOURCE_MEMBERSHIP option has already been set with the specified group/source pair on the same network interface. It is permitted to call IP_ADD_SOURCE_MEMBERSHIP on the same group on a different network interface.

This page assists in properly designing and troubleshooting Windows Sockets multicast applications.

Initial socket option Conflicting subsequent socket option Error returned Remarks
IP_ADD_MEMBERSHIP
IP_ADD_MEMBERSHIP WSAEADDRNOTAVAIL Do not call IP_ADD_MEMBERSHIP with the same group more than once on the same network interface.
IP_ADD_SOURCE_MEMBERSHIP WSAEADDRNOTAVAIL Do not call IP_ADD_SOURCE_MEMBERSHIP with the same group previously called with IP_ADD_MEMBERSHIP on the same network interface.
IP_DROP_SOURCE_MEMBERSHIP WSAEINVAL Use IP_BLOCK_SOURCE instead.
IP_UNBLOCK_SOURCE WSAEINVAL Returns an error when attempting to unblock a group/source pair that has not previously been blocked on the same network interface.
IP_DROP_MEMBERSHIP Any subsequent call on the same group or group/source pair WSAEINVAL Making socket option calls on a group or group/source pair not currently in the inclusion list (due to dropping membership, or otherwise) results in an error.
IP_ADD_SOURCE_MEMBERSHIP
IP_ADD_MEMBERSHIP WSAEADDRNOTAVAIL Do not call IP_ADD_MEMBERSHIP with the same group previously called with IP_ADD_SOURCE_MEMBERSHIP on the same network interface.
IP_ADD_SOURCE_MEMBERSHIP WSAEADDRNOTAVAIL Do not call IP_ADD_SOURCE_MEMBERSHIP with the same group/source pair previously called with IP_ADD_SOURCE_MEMBERSHIP on the same network interface.
IP_UNBLOCK_SOURCE WSAEINVAL Returns an error when attempting to unblock a group/source pair that has not previously been blocked on the same network interface.
IP_DROP_SOURCE_MEMBERSHIP
IP_UNBLOCK_SOURCE WSAEINVAL Returns an error when attempting to unblock a group/source pair that has not previously been blocked on the same network interface.
IP_DROP_SOURCE_MEMBERSHIP WSAEADDRNOTAVAIL Returns an error when attempting to drop a group/source pair that is not in the inclusion list on the same network interface.
IP_BLOCK_SOURCE
IP_BLOCK_SOURCE WSAEADDRNOTAVAIL Returns an error when attempting to block a group/source pair that is already blocked on the same network interface.
IP_ADD_SOURCE_MEMBERSHIP WSAEINVAL Use IP_UNBLOCK_SOURCE instead.
IP_ADD_MEMBERSHIP WSAEINVAL Use IP_UNBLOCK_SOURCE instead.
IP_UNBLOCK_SOURCE IP_UNBLOCK_SOURCE WSAEADDRNOTAVAIL Returns an error when attempting to unblock a group/source pair that is not in the blocked list on the same network interface.