src/stack/igmp/igmp.c File Reference

IGMP Stack Implementation. More...


Functions

void IGMPLeaveHostGroup (IPN IpAddr, uint IfIdx)
int IGMPJoin (HANDLE hSock, struct ip_mreq *ptr_ipmreq)
int IGMPLeave (HANDLE hSock, struct ip_mreq *ptr_ipmreq)


Detailed Description

IGMP Stack Implementation.

NOTE: (C) Copyright 2008, Texas Instruments, Inc.

Function Documentation

int IGMPJoin ( HANDLE  hSock,
struct ip_mreq *  ptr_ipmreq 
)

Description
The function is called from the setsockopt to join a multicast group. This function was added to make the IGMP Join behavior similar to the standard 'socket' interface via the IP_ADD_MEMBERSHIP socket option.

Parameters:
[in] hSock Handle to the socket on which the multicast group is being joined.
[in] ptr_ipmreq Multicast Request structure populated by the application which contains the Multicast group address and the address of the interface on which the group is being joined.
Return values:
0 - Success
Non Zero - Error

int IGMPLeave ( HANDLE  hSock,
struct ip_mreq *  ptr_ipmreq 
)

Description
The function is called from the setsockopt to leave a multicast group. This function was added to make the IGMP Leave behavior similar to the standard 'socket' interface via the IP_DROP_MEMBERSHIP socket option.

Parameters:
[in] hSock Handle to the socket on which the multicast group is leaving.
[in] ptr_ipmreq Multicast Request structure populated by the application which contains the Multicast group address and the address of the interface on which the group will be left.
Return values:
0 - Success
Non Zero - Error

void IGMPLeaveHostGroup ( IPN  IpAddr,
uint  IfIdx 
)

Description
The function is called to LEAVE a multicast group on the specific interface. The function leaves the multicast group on the interface list and kicks the IGMP membership state machine to send out the LEAVE reports.

This is the OLD API which was used to LEAVE multicast groups but has now been obsoleted. Users are advised to use the well defined setsockopt with the IP_DROP_MEMBERSHIP to acheive the needful.

This function is now called only from *kernel* context

Parameters:
[in] IpAddr Multicast group IP address which is being joined.
[in] IfIdx Interface Index on which the group is being joined.
Return values:
Not Applicable.


Copyright 2009, Texas Instruments Incorporated