lwIP  2.0.2
Lightweight IP stack
igmp.c File Reference
#include "lwip/opt.h"
#include "lwip/igmp.h"
#include "lwip/debug.h"
#include "lwip/def.h"
#include "lwip/mem.h"
#include "lwip/ip.h"
#include "lwip/inet_chksum.h"
#include "lwip/netif.h"
#include "lwip/stats.h"
#include "lwip/prot/igmp.h"
#include "string.h"

Functions

void igmp_init (void)
 
err_t igmp_start (struct netif *netif)
 
err_t igmp_stop (struct netif *netif)
 
void igmp_report_groups (struct netif *netif)
 
struct igmp_groupigmp_lookfor_group (struct netif *ifp, const ip4_addr_t *addr)
 
void igmp_input (struct pbuf *p, struct netif *inp, const ip4_addr_t *dest)
 
err_t igmp_joingroup (const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr)
 
err_t igmp_joingroup_netif (struct netif *netif, const ip4_addr_t *groupaddr)
 
err_t igmp_leavegroup (const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr)
 
err_t igmp_leavegroup_netif (struct netif *netif, const ip4_addr_t *groupaddr)
 
void igmp_tmr (void)
 

Detailed Description

IGMP - Internet Group Management Protocol

Function Documentation

◆ igmp_init()

void igmp_init ( void  )

Initialize the IGMP module

◆ igmp_input()

void igmp_input ( struct pbuf p,
struct netif inp,
const ip4_addr_t dest 
)

Called from ip_input() if a new IGMP packet is received.

Parameters
preceived igmp packet, p->payload pointing to the igmp header
inpnetwork interface on which the packet was received
destdestination ip address of the igmp packet

◆ igmp_lookfor_group()

struct igmp_group* igmp_lookfor_group ( struct netif ifp,
const ip4_addr_t addr 
)

Search for a group in the global igmp_group_list

Parameters
ifpthe network interface for which to look
addrthe group ip address to search for
Returns
a struct igmp_group* if the group has been found, NULL if the group wasn't found.

◆ igmp_report_groups()

void igmp_report_groups ( struct netif netif)

Report IGMP memberships for this interface

Parameters
netifnetwork interface on which report IGMP memberships

◆ igmp_start()

err_t igmp_start ( struct netif netif)

Start IGMP processing on interface

Parameters
netifnetwork interface on which start IGMP processing

◆ igmp_stop()

err_t igmp_stop ( struct netif netif)

Stop IGMP processing on interface

Parameters
netifnetwork interface on which stop IGMP processing

◆ igmp_tmr()

void igmp_tmr ( void  )

The igmp timer function (both for NO_SYS=1 and =0) Should be called every IGMP_TMR_INTERVAL milliseconds (100 ms is default).