A version of LWIP, provided for backwards compatibility.

Dependents:   AA_DemoBoard DemoBoard HelloServerDemo DemoBoard_RangeIndicator ... more

Embed: (wiki syntax)

« Back to documentation index

igmp.c File Reference

igmp.c File Reference

IGMP - Internet Group Management Protocol. More...

Go to the source code of this file.

Functions

void igmp_init (void)
 Initialize the IGMP module.
void igmp_dump_group_list ()
 Dump global IGMP groups list.
err_t igmp_start (struct netif *netif)
 Start IGMP processing on interface.
err_t igmp_stop (struct netif *netif)
 Stop IGMP processing on interface.
void igmp_report_groups (struct netif *netif)
 Report IGMP memberships for this interface.
struct igmp_group * igmp_lookfor_group (struct netif *ifp, struct ip_addr *addr)
 Search for a group in the global igmp_group_list.
struct igmp_group * igmp_lookup_group (struct netif *ifp, struct ip_addr *addr)
 Search for a specific igmp group and create a new one if not found-.
err_t igmp_remove_group (struct igmp_group *group)
 Remove a group in the global igmp_group_list.
void igmp_input (struct pbuf *p, struct netif *inp, struct ip_addr *dest)
 Called from ip_input() if a new IGMP packet is received.
err_t igmp_joingroup (struct ip_addr *ifaddr, struct ip_addr *groupaddr)
 Join a group on one network interface.
err_t igmp_leavegroup (struct ip_addr *ifaddr, struct ip_addr *groupaddr)
 Leave a group on one network interface.
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).
void igmp_timeout (struct igmp_group *group)
 Called if a timeout for one group is reached.
void igmp_start_timer (struct igmp_group *group, u8_t max_time)
 Start a timer for an igmp group.
void igmp_stop_timer (struct igmp_group *group)
 Stop a timer for an igmp_group.
void igmp_delaying_member (struct igmp_group *group, u8_t maxresp)
 Delaying membership report for a group if necessary.
err_t igmp_ip_output_if (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t ttl, u8_t proto, struct netif *netif)
 Sends an IP packet on a network interface.
void igmp_send (struct igmp_group *group, u8_t type)
 Send an igmp packet to a specific group.

Detailed Description

IGMP - Internet Group Management Protocol.

Definition in file tag/13/Core/lwIP/core/ipv4/igmp.c.


Function Documentation

void igmp_delaying_member ( struct igmp_group *  group,
u8_t  maxresp 
)

Delaying membership report for a group if necessary.

Parameters:
groupthe igmp_group for which "delaying" membership report
maxrespquery delay

Definition at line 668 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

void igmp_dump_group_list (  )

Dump global IGMP groups list.

Definition at line 124 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

void igmp_init ( void   )

Initialize the IGMP module.

Definition at line 111 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

void igmp_input ( struct pbuf *  p,
struct netif inp,
struct ip_addr *  dest 
)

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

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

Definition at line 344 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

err_t igmp_ip_output_if ( struct pbuf *  p,
struct ip_addr *  src,
struct ip_addr *  dest,
u8_t  ttl,
u8_t  proto,
struct netif netif 
)

Sends an IP packet on a network interface.

This function constructs the IP header and calculates the IP header checksum. If the source IP address is NULL, the IP address of the outgoing network interface is filled in as source address.

Parameters:
pthe packet to send (p->payload points to the data, e.g. next protocol header; if dest == IP_HDRINCL, p already includes an IP header and p->payload points to that IP header)
srcthe source IP address to send from (if src == IP_ADDR_ANY, the IP address of the netif used to send is used as source address)
destthe destination IP address to send the packet to
ttlthe TTL value to be set in the IP header
protothe PROTOCOL to be set in the IP header
netifthe netif on which to send this packet
Returns:
ERR_OK if the packet was sent OK ERR_BUF if p doesn't have enough space for IP/LINK headers returns errors returned by netif->output

Definition at line 696 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

err_t igmp_joingroup ( struct ip_addr *  ifaddr,
struct ip_addr *  groupaddr 
)

Join a group on one network interface.

Parameters:
ifaddrip address of the network interface which should join a new group
groupaddrthe ip address of the group which to join
Returns:
ERR_OK if group was joined on the netif(s), an err_t otherwise

Definition at line 460 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

err_t igmp_leavegroup ( struct ip_addr *  ifaddr,
struct ip_addr *  groupaddr 
)

Leave a group on one network interface.

Parameters:
ifaddrip address of the network interface which should leave a group
groupaddrthe ip address of the group which to leave
Returns:
ERR_OK if group was left on the netif(s), an err_t otherwise

Definition at line 530 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

struct igmp_group* igmp_lookfor_group ( struct netif ifp,
struct ip_addr *  addr 
) [read]

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.

Definition at line 245 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

struct igmp_group* igmp_lookup_group ( struct netif ifp,
struct ip_addr *  addr 
) [read]

Search for a specific igmp group and create a new one if not found-.

Parameters:
ifpthe network interface for which to look
addrthe group ip address to search
Returns:
a struct igmp_group*, NULL on memory error.

Definition at line 271 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

err_t igmp_remove_group ( struct igmp_group *  group )

Remove a group in the global igmp_group_list.

Parameters:
groupthe group to remove from the global igmp_group_list
Returns:
ERR_OK if group was removed from the list, an err_t otherwise

Definition at line 310 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

void igmp_report_groups ( struct netif netif )

Report IGMP memberships for this interface.

Parameters:
netifnetwork interface on which report IGMP memberships

Definition at line 222 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

void igmp_send ( struct igmp_group *  group,
u8_t  type 
)

Send an igmp packet to a specific group.

Parameters:
groupthe group to which to send the packet
typethe type of igmp packet to send

Definition at line 766 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

err_t igmp_start ( struct netif netif )

Start IGMP processing on interface.

Parameters:
netifnetwork interface on which start IGMP processing

Definition at line 146 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

void igmp_start_timer ( struct igmp_group *  group,
u8_t  max_time 
)

Start a timer for an igmp group.

Parameters:
groupthe igmp_group for which to start a timer
max_timethe time in multiples of IGMP_TMR_INTERVAL (decrease with every call to igmp_tmr())

Definition at line 642 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

err_t igmp_stop ( struct netif netif )

Stop IGMP processing on interface.

Parameters:
netifnetwork interface on which stop IGMP processing

Definition at line 178 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

void igmp_stop_timer ( struct igmp_group *  group )

Stop a timer for an igmp_group.

Parameters:
groupthe igmp_group for which to stop the timer

Definition at line 656 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

void igmp_timeout ( struct igmp_group *  group )

Called if a timeout for one group is reached.

Sends a report for this group.

Parameters:
groupan igmp_group for which a timeout is reached

Definition at line 622 of file tag/13/Core/lwIP/core/ipv4/igmp.c.

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).

Definition at line 600 of file tag/13/Core/lwIP/core/ipv4/igmp.c.