lwIP 2.2.1 Lightweight IP stack

Macros | Functions
MLD6
APIs » "raw" APIs » IP » IPv6

## Macros
#define | netif_mld6_data(netif) ((struct mld_group *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6))

## Functions
err_t | mld6_joingroup (const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr)
err_t | mld6_joingroup_netif (struct netif *netif, const ip6_addr_t *groupaddr)
err_t | mld6_leavegroup (const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr)
err_t | mld6_leavegroup_netif (struct netif *netif, const ip6_addr_t *groupaddr)

## Detailed Description

Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. No support for MLDv2.
Note: The allnodes (ff01::1, ff02::1) group is assumed be received by your netif since it must always be received for correct IPv6 operation (e.g. SLAAC). Ensure the netif filters are configured accordingly!
The netif flags also need NETIF_FLAG_MLD6 flag set to enable MLD6 on a netif ("netif->flags |= NETIF_FLAG_MLD6;").
To be called from TCPIP thread.

## Macro Definition Documentation

## ◆ netif_mld6_data

#define netif_mld6_data | ( |  | netif | ) | ((struct mld_group *)netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_MLD6))

Get list head of MLD6 groups for netif. Note: The allnodes group IP is NOT in the list, since it must always be received for correct IPv6 operation.

See also
  netif_set_mld_mac_filter()

## Function Documentation

## ◆ mld6_joingroup()

err_t mld6_joingroup | ( | const ip6_addr_t * | srcaddr,
|  | const ip6_addr_t * | groupaddr
| ) |  |

Join a group on one or all network interfaces.

If the group is to be joined on all interfaces, the given group address must not have a zone set (i.e., it must have its zone index set to IP6_NO_ZONE). If the group is to be joined on one particular interface, the given group address may or may not have a zone set.

Parameters

  srcaddr | ipv6 address (zoned) of the network interface which should join a new group. If IP6_ADDR_ANY6, join on all netifs
  groupaddr | the ipv6 address of the group to join (possibly but not necessarily zoned)

Returns
  ERR_OK if group was joined on the netif(s), an err_t otherwise

## ◆ mld6_joingroup_netif()

err_t mld6_joingroup_netif | ( | struct netif * | netif,
|  | const ip6_addr_t * | groupaddr
| ) |  |

Join a group on a network interface.

Parameters

  netif | the network interface which should join a new group.
  groupaddr | the ipv6 address of the group to join (possibly but not necessarily zoned)

Returns
  ERR_OK if group was joined on the netif, an err_t otherwise

## ◆ mld6_leavegroup()

err_t mld6_leavegroup | ( | const ip6_addr_t * | srcaddr,
|  | const ip6_addr_t * | groupaddr
| ) |  |

Leave a group on a network interface.

Zoning of address follows the same rules as mld6_joingroup.

Parameters

  srcaddr | ipv6 address (zoned) of the network interface which should leave the group. If IP6_ADDR_ANY6, leave on all netifs
  groupaddr | the ipv6 address of the group to leave (possibly, but not necessarily zoned)

Returns
  ERR_OK if group was left on the netif(s), an err_t otherwise

## ◆ mld6_leavegroup_netif()

err_t mld6_leavegroup_netif | ( | struct netif * | netif,
|  | const ip6_addr_t * | groupaddr
| ) |  |

Leave a group on a network interface.

Parameters

  netif | the network interface which should leave the group.
  groupaddr | the ipv6 address of the group to leave (possibly, but not necessarily zoned)

Returns
  ERR_OK if group was left on the netif, an err_t otherwise