TCPIP_IGMP_Unsubscribe Function

C

TCPIP_IGMP_RESULT TCPIP_IGMP_Unsubscribe(
    UDP_SOCKET socket, 
    TCPIP_NET_HANDLE hNet, 
    IPV4_ADDR mcastAddress, 
    const IPV4_ADDR* sourceList, 
    size_t* listSize
);

Description

This function removes the subscription of a UDP socket to multicast traffic sources. Following this call, the IGMP module will inform network routers of the host updates regarding the multicast traffic.

Preconditions

The IGMP module must be initialized.

Parameters

ParametersDescription
socketThe UDP multicast socket.
hNetInterface handle. if hNet == 0, then the default interface will be used.
mcastAddressThe multicast group address to unsubscribe from. It has to be within the IANA specified multicast address range.
filterModeFilter type required for this subscription: include/exclude.
sourceListArray of destination sources from which the socket requires unsubscription.
listSizeThe number of sources in the sourceList array. On input, if listSize == 0 or *listSize == 0, then no sources will be considered and sourceList will be ignored. On output, if listSize != 0, it will contain the number of new sources removed.

Returns

  • TCPIP_IGMP_OK - if operation succeeded. An error code otherwise.

Remarks

The function supports both SSM and ASM functionality. The function removes the subscription to the sources no matter the filter mode. If sourceList is empty, then unsubscribe all sources for this (G, socket) pair will be performed. This call is equivalent to Subscribe(INCLUDE, {}).