Jump to main content

##

# TCPIP_IGMP_IncludeSource Function

## C

    TCPIP_IGMP_RESULT TCPIP_IGMP_IncludeSource(
        UDP_SOCKET socket,
        TCPIP_NET_HANDLE hNet,
        IPV4_ADDR mcastAddress,
        IPV4_ADDR sourceAddress
    );

## Description

This function performs the subscription of a UDP socket to multicast traffic for one source.

## Preconditions

The IGMP module must be initialized.

## Parameters

Parameters | Description
--- | ---
socket | The UDP multicast socket.
hNet | Interface handle. if hNet == 0, then the default interface will be used.
mcastAddress | The multicast address to subscribe to. It has to be within the IANA specified multicast address range.
sourceAddress | Destination for source for which the socket wants to listen.

## Returns

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

## Remarks

The function supports both SSM and ASM functionality. It is a shortcut to TCPIP_IGMP_Subscribe(INCLUDE, 1 source).