Rtos API example

Embed: (wiki syntax)

« Back to documentation index

lwip_mld6.c File Reference

lwip_mld6.c File Reference

Multicast listener discovery. More...

Go to the source code of this file.

Functions

static struct mld_groupmld6_new_group (struct netif *ifp, const ip6_addr_t *addr)
 create a new group
static err_t mld6_remove_group (struct netif *netif, struct mld_group *group)
 Remove a group from the mld_group_list, but do not free it yet.
static void mld6_delayed_report (struct mld_group *group, u16_t maxresp)
 Schedule a delayed membership report for a group.
static void mld6_send (struct netif *netif, struct mld_group *group, u8_t type)
 Send a MLD message (report or done).
err_t mld6_stop (struct netif *netif)
 Stop MLD processing on interface.
void mld6_report_groups (struct netif *netif)
 Report MLD memberships for this interface.
struct mld_groupmld6_lookfor_group (struct netif *ifp, const ip6_addr_t *addr)
 Search for a group that is joined on a netif.
void mld6_input (struct pbuf *p, struct netif *inp)
 Process an input MLD message.
err_t mld6_joingroup (const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr)
 Join a group on a network interface.
err_t mld6_joingroup_netif (struct netif *netif, const ip6_addr_t *groupaddr)
 Join a group on a network interface.
err_t mld6_leavegroup (const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr)
 Leave a group on a network interface.
err_t mld6_leavegroup_netif (struct netif *netif, const ip6_addr_t *groupaddr)
 Leave a group on a network interface.
void mld6_tmr (void)
 Periodic timer for mld processing.

Detailed Description

Multicast listener discovery.

Definition in file lwip_mld6.c.


Function Documentation

static void mld6_delayed_report ( struct mld_group group,
u16_t  maxresp 
) [static]

Schedule a delayed membership report for a group.

Parameters:
groupthe mld_group for which "delaying" membership report should be sent
maxrespthe max resp delay provided in the query

Definition at line 490 of file lwip_mld6.c.

void mld6_input ( struct pbuf p,
struct netif inp 
)

Process an input MLD message.

Called by icmp6_input.

Parameters:
pthe mld packet, p->payload pointing to the icmpv6 header
inpthe netif on which this packet was received

Definition at line 222 of file lwip_mld6.c.

struct mld_group* mld6_lookfor_group ( struct netif ifp,
const ip6_addr_t addr 
) [read]

Search for a group that is joined on a netif.

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

Definition at line 139 of file lwip_mld6.c.

static struct mld_group * mld6_new_group ( struct netif ifp,
const ip6_addr_t addr 
) [static, read]

create a new group

Parameters:
ifpthe network interface for which to create
addrthe new group ipv6
Returns:
a struct mld_group*, NULL on memory error.

Definition at line 163 of file lwip_mld6.c.

static err_t mld6_remove_group ( struct netif netif,
struct mld_group group 
) [static]

Remove a group from the mld_group_list, but do not free it yet.

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

Definition at line 189 of file lwip_mld6.c.

void mld6_report_groups ( struct netif netif )

Report MLD memberships for this interface.

Parameters:
netifnetwork interface on which report MLD memberships

Definition at line 120 of file lwip_mld6.c.

static void mld6_send ( struct netif netif,
struct mld_group group,
u8_t  type 
) [static]

Send a MLD message (report or done).

An IPv6 hop-by-hop options header with a router alert option is prepended.

Parameters:
groupthe group to report or quit
typeICMP6_TYPE_MLR (report) or ICMP6_TYPE_MLD (done)

Definition at line 525 of file lwip_mld6.c.

err_t mld6_stop ( struct netif netif )

Stop MLD processing on interface.

Parameters:
netifnetwork interface on which stop MLD processing

Definition at line 91 of file lwip_mld6.c.

void mld6_tmr ( void   )

Periodic timer for mld processing.

Must be called every MLD6_TMR_INTERVAL milliseconds (100).

When a delaying member expires, a membership report is sent.

Definition at line 457 of file lwip_mld6.c.