Contiki-NG
Loading...
Searching...
No Matches

Implementation of the MPL protocol. More...

#include "contiki.h"
#include "contiki-lib.h"
#include "contiki-net.h"
#include "net/ipv6/uip.h"
#include "net/ipv6/uip-ds6.h"
#include "net/ipv6/uip-icmp6.h"
#include "net/ipv6/multicast/uip-mcast6.h"
#include "net/ipv6/multicast/mpl.h"
#include "dev/watchdog.h"
#include "os/lib/trickle-timer.h"
#include "os/lib/list.h"
#include "sys/ctimer.h"
#include <string.h>
#include "sys/log.h"

Go to the source code of this file.

Macros

#define SEED_ID_S1(dst, src)
 Set the seed id to a 16 bit constant dst: seed_id_t to set to the constant src: 16 bit integer to set.
#define SEED_ID_S2(dst, src)
 Set the seed id to a 64 bit constant dst: seed_id_t to set to the constant src: 64 bit integer to set.
#define SEED_ID_S3(dst, l, h)
 Set the seed id to a 128 bit constant dst: seed_id_t to set to the constant l: Lower 64 bits of the seed id to set h: Upper 64 bits of the seed id to set.
#define seed_id_cmp(a, b)
 Compare two contiki seed ids represented as seed_id_t types a: First value to compare b: Second value to compare.
#define seed_id_cpy(a, b)
 Copy one seed_id_t into another.
#define seed_id_clr(a)
 Clear a seed id value to zero a: Value to clear.
#define MSG_SET_IS_USED(h)
 Get the state of the used flag in the buffered message set entry h: pointer to the message set entry.
#define MSG_SET_CLEAR_USED(h)
 Clear the state of the used flag in the buffered message set entry h: pointer to the message set entry.
#define SEQ_VAL_IS_EQ(i1, i2)
 s1 is said to be equal s2 if SEQ_VAL_IS_EQ(s1, s2) == 1
#define SEQ_VAL_IS_LT(i1, i2)
 s1 is said to be less than s2 if SEQ_VAL_IS_LT(s1, s2) == 1
#define SEQ_VAL_IS_GT(i1, i2)
 s1 is said to be greater than s2 iif SEQ_VAL_IS_LT(s1, s2) == 1
#define SEQ_VAL_ADD(s, n)
 Add n to s: (s + n) modulo (2 ^ SERIAL_BITS) => ((s + n) % 0x8000).
#define SEED_SET_IS_USED(h)
 Get the state of the used flag in the buffered message set entry h: pointer to the message set entry.
#define SEED_SET_CLEAR_USED(h)
 Clear the state of the used flag in the buffered message set entry h: pointer to the message set entry.
#define DOMAIN_SET_IS_USED(h)
 Get the state of the used flag in the buffered message set entry h: pointer to the message set entry.
#define DOMAIN_SET_CLEAR_USED(h)
 Clear the state of the used flag in the buffered message set entry h: pointer to the message set entry.
#define HBH_GET_S(h)
 Get the MPL Parametrization for a multicast HBHO header m: pointer to the HBHO header.
#define HBH_SET_S(h, s)
 Set the MPL Parametrization bit for a multicast HBHO header m: pointer to the HBHO header.
#define HBH_CLR_S(h)
 Clear the MPL Parametrization bit for a multicast HBHO header m: pointer to the HBHO header.
#define HBH_GET_M(h)
 Get the MPL Parametrization for a multicast HBHO header m: pointer to the HBHO header.
#define HBH_SET_M(h)
 Set the MPL Parametrization bit for a multicast HBHO header m: pointer to the HBHO header.
#define HBH_GET_V(h)
 Get the MPL Parametrization for a multicast HBHO header m: pointer to the HBHO header.
#define HBH_CLR_V(h)
 Set the MPL Parametrization bit for a multicast HBHO header m: pointer to the HBHO header.
#define SEED_INFO_GET_S(h)
 Get the S bits in the length/S field in the seed info header h: pointer to the seed info struct.
#define SEED_INFO_CLR_S(h)
 Clear the S bits within the length/S field in the seed info header h: pointer to the seed info struct.
#define SEED_INFO_SET_S(h, s)
 Set the S bits within the seed info struct.
#define SEED_INFO_GET_LEN(h)
 Get the length bits from the seed info struct.
#define SEED_INFO_CLR_LEN(h)
 Clear the length bits in the seed info struct.
#define SEED_INFO_SET_LEN(h, l)
 Set the length bits in the seed info struct.
#define mpl_control_trickle_timer_start(t)
 Start the trickle timer for a control message t: Pointer to set that should be reset.
#define mpl_data_trickle_timer_start(t)
 Start the trickle timer for a data message t: Pointer to set that should be reset.
#define mpl_trickle_timer_inconsistency(t)
 Call inconsistency on the provided timer t: Pointer to set that should be reset.
#define mpl_trickle_timer_reset(t)
 Reset the trickle timer and expiration count for the set t: Pointer to set that should be reset.
#define BIT_VECTOR_SET_BIT(v, b)
 Set a single bit within a bit vector that spans multiple bytes v: The bit vector b: The 0-indexed bit to set.
#define BIT_VECTOR_GET_BIT(v, b)
 Get the value of a bit in a bit vector v: The bit vector b: The 0-indexed bit to get.
#define UIP_ADDR_MAKE_LINK_LOCAL(a)
 Modify an ipv6 address to give it link local scope a: uip_ip6addr_t address to modify.

Functions

static void icmp_in (void)
static struct mpl_msg * buffer_reclaim (void)
static void seed_id_net_to_host (seed_id_t *dst, void *src, uint8_t s)
static void seed_id_host_to_net (void *dst, seed_id_t *src)
static uint8_t accept (uint8_t in)

Variables

const struct uip_mcast6_driver mpl_driver
 The MPL engine driver.

Detailed Description

Implementation of the MPL protocol.

Author
Ed Rose - er154.nosp@m.06@b.nosp@m.ris.a.nosp@m.c.uk

Definition in file mpl.c.