Contiki-NG
Modules | Files | Data Structures | Macros | Typedefs | Functions
IPv6 Multicast Forwarding

We currently support 2 engines: More...

Modules

 'Stateless Multicast RPL Forwarding' (SMRF)
 SMRF will only work in RPL networks in MOP 3 "Storing with Multicast".
 
 Multicast Protocol for Low Power and Lossy Networks
 IPv6 multicast according to the algorithm in RFC7731.
 
 ROLL Trickle Multicast
 IPv6 multicast according to the algorithm in the "MCAST Forwarding Using Trickle" internet draft.
 

Files

file  uip-mcast6-engines.h
 Header file with definition of multicast engine constants.
 
file  uip-mcast6-route.c
 Multicast routing table manipulation.
 
file  uip-mcast6-route.h
 Header file for multicast routing table manipulation.
 
file  uip-mcast6-stats.c
 IPv6 multicast forwarding stats maintenance.
 
file  uip-mcast6-stats.h
 
Header file for IPv6 multicast forwarding stats maintenance

 
file  uip-mcast6.h
 This header file contains configuration directives for uIPv6 multicast support.
 

Data Structures

struct  uip_mcast6_route
 An entry in the multicast routing table. More...
 
struct  uip_mcast6_stats
 A data structure used to maintain multicast stats. More...
 
struct  uip_mcast6_driver
 The data structure used to represent a multicast engine. More...
 

Macros

#define UIP_MCAST6_ENGINE_NONE   0
 Selecting this disables mcast.
 
#define UIP_MCAST6_ENGINE_SMRF   1
 The SMRF engine.
 
#define UIP_MCAST6_ENGINE_ROLL_TM   2
 The ROLL TM engine.
 
#define UIP_MCAST6_ENGINE_ESMRF   3
 The ESMRF engine.
 
#define UIP_MCAST6_ENGINE_MPL   4
 The MPL (RFC7731) engine.
 
#define uip_mcast6_get_address_scope(a)   ((a)->u8[1] & 0x0F)
 Get a multicast address' scope. More...
 

Typedefs

typedef struct uip_mcast6_route uip_mcast6_route_t
 An entry in the multicast routing table.
 
typedef struct uip_mcast6_stats uip_mcast6_stats_t
 A data structure used to maintain multicast stats. More...
 

Functions

void uip_mcast6_stats_init (void *stats)
 Initialise multicast stats. More...
 

Multicast Routing Table Manipulation

uip_mcast6_route_tuip_mcast6_route_lookup (uip_ipaddr_t *group)
 Lookup a multicast route. More...
 
uip_mcast6_route_tuip_mcast6_route_add (uip_ipaddr_t *group)
 Add a multicast route. More...
 
void uip_mcast6_route_rm (uip_mcast6_route_t *route)
 Remove a multicast route. More...
 
uip_mcast6_route_tuip_mcast6_route_list_head (void)
 Retrieve a pointer to the start of the multicast routes list. More...
 
int uip_mcast6_route_count (void)
 Retrieve the count of multicast routes. More...
 
void uip_mcast6_route_init (void)
 Multicast routing table init routine. More...
 

Detailed Description

We currently support 2 engines:

Macro Definition Documentation

◆ uip_mcast6_get_address_scope

#define uip_mcast6_get_address_scope (   a)    ((a)->u8[1] & 0x0F)

Get a multicast address' scope.

a is of type uip_ip6addr_t*

Definition at line 146 of file uip-mcast6.h.

Typedef Documentation

◆ uip_mcast6_stats_t

A data structure used to maintain multicast stats.

Each engine can extend this structure via the engine_stats field

Function Documentation

◆ uip_mcast6_route_add()

uip_mcast6_route_t * uip_mcast6_route_add ( uip_ipaddr_t *  group)

Add a multicast route.

Parameters
groupA pointer to the multicast group to be added
Returns
A pointer to the new route, or NULL if the route could not be added

Definition at line 81 of file uip-mcast6-route.c.

References uip_mcast6_route_lookup().

◆ uip_mcast6_route_count()

int uip_mcast6_route_count ( void  )

Retrieve the count of multicast routes.

Returns
The number of multicast routes

Definition at line 123 of file uip-mcast6-route.c.

References list_length().

◆ uip_mcast6_route_init()

void uip_mcast6_route_init ( void  )

Multicast routing table init routine.

Multicast routing tables are not necessarily required by all multicast engines. For instance, trickle multicast does not rely on the existence of a routing table. Therefore, this function here should be invoked by each engine's init routine only if the relevant functionality is required. This is also why this function should not get hooked into the uip-ds6 core.

Definition at line 129 of file uip-mcast6-route.c.

References list_init(), and memb_init().

◆ uip_mcast6_route_list_head()

uip_mcast6_route_t * uip_mcast6_route_list_head ( void  )

Retrieve a pointer to the start of the multicast routes list.

Returns
A pointer to the start of the multicast routes

If the multicast routes list is empty, this function will return NULL

Definition at line 117 of file uip-mcast6-route.c.

References list_head().

◆ uip_mcast6_route_lookup()

uip_mcast6_route_t * uip_mcast6_route_lookup ( uip_ipaddr_t *  group)

Lookup a multicast route.

Parameters
groupA pointer to the multicast group to be searched for
Returns
A pointer to the new routing entry, or NULL if the route could not be found

Definition at line 66 of file uip-mcast6-route.c.

Referenced by uip_mcast6_route_add().

◆ uip_mcast6_route_rm()

void uip_mcast6_route_rm ( uip_mcast6_route_t route)

Remove a multicast route.

Parameters
routeA pointer to the route to be removed

Definition at line 102 of file uip-mcast6-route.c.

References list_head().

◆ uip_mcast6_stats_init()

void uip_mcast6_stats_init ( void *  stats)

Initialise multicast stats.

Parameters
statsA pointer to a struct holding an engine's additional statistics

Definition at line 48 of file uip-mcast6-stats.c.

References uip_mcast6_stats::engine_stats.