Contiki-Inga 3.x
Data Structures | Macros | Enumerations | Functions
RPL implementation ContikiRPL (RFC 6550).

Data Structures

struct  rpl_metric_container
 Logical representation of a DAG Metric Container. More...
 
struct  rpl_prefix
 RPL DIO prefix suboption. More...
 
struct  rpl_dag
 Directed Acyclic Graph. More...
 
struct  rpl_of
 API for RPL objective functions (OF) More...
 
struct  rpl_instance
 RPL Instance. More...
 

Macros

#define RPL_DAG_MC_ENERGY_INCLUDED   3
 The bit index within the flags field of the rpl_metric_object_energy structure. More...
 

Enumerations

enum  rpl_mode
 RPL modes. More...
 

Functions

enum rpl_mode rpl_set_mode (enum rpl_mode mode)
 Set the RPL mode. More...
 
enum rpl_mode rpl_get_mode (void)
 Get the RPL mode. More...
 

DAG Metric Container Object Types, to be confirmed by IANA.

#define RPL_DAG_MC_NONE   0 /* Local identifier for empty MC */
 
#define RPL_DAG_MC_NSA   1 /* Node State and Attributes */
 
#define RPL_DAG_MC_ENERGY   2 /* Node Energy */
 
#define RPL_DAG_MC_HOPCOUNT   3 /* Hop Count */
 
#define RPL_DAG_MC_THROUGHPUT   4 /* Throughput */
 
#define RPL_DAG_MC_LATENCY   5 /* Latency */
 
#define RPL_DAG_MC_LQL   6 /* Link Quality Level */
 
#define RPL_DAG_MC_ETX   7 /* Expected Transmission Count */
 
#define RPL_DAG_MC_LC   8 /* Link Color */
 

DAG Metric Container flags.

#define RPL_DAG_MC_FLAG_P   0x8
 
#define RPL_DAG_MC_FLAG_C   0x4
 
#define RPL_DAG_MC_FLAG_O   0x2
 
#define RPL_DAG_MC_FLAG_R   0x1
 

DAG Metric Container aggregation mode.

#define RPL_DAG_MC_AGGR_ADDITIVE   0
 
#define RPL_DAG_MC_AGGR_MAXIMUM   1
 
#define RPL_DAG_MC_AGGR_MINIMUM   2
 
#define RPL_DAG_MC_AGGR_MULTIPLICATIVE   3
 

Public RPL functions.

void rpl_init (void)
 
void uip_rpl_input (void)
 
rpl_dag_trpl_set_root (uint8_t instance_id, uip_ipaddr_t *dag_id)
 
int rpl_set_prefix (rpl_dag_t *dag, uip_ipaddr_t *prefix, unsigned len)
 
int rpl_repair_root (uint8_t instance_id)
 
int rpl_set_default_route (rpl_instance_t *instance, uip_ipaddr_t *from)
 
rpl_dag_trpl_get_any_dag (void)
 
rpl_instance_trpl_get_instance (uint8_t instance_id)
 
void rpl_update_header_empty (void)
 
int rpl_update_header_final (uip_ipaddr_t *addr)
 
int rpl_verify_header (int)
 
void rpl_insert_header (void)
 
void rpl_remove_header (void)
 
uint8_t rpl_invert_header (void)
 
uip_ipaddr_t * rpl_get_parent_ipaddr (rpl_parent_t *nbr)
 
rpl_rank_t rpl_get_parent_rank (uip_lladdr_t *addr)
 
uint16_t rpl_get_parent_link_metric (const uip_lladdr_t *addr)
 
void rpl_dag_init (void)
 

Detailed Description

Macro Definition Documentation

#define RPL_DAG_MC_ENERGY_INCLUDED   3

The bit index within the flags field of the rpl_metric_object_energy structure.

Definition at line 93 of file rpl.h.

Enumeration Type Documentation

enum rpl_mode

RPL modes.

The RPL module can be in either of three modes:

  • mesh mode (RPL_MODE_MESH): nodes forward data for other nodes, and are reachable by others
  • feater mode (RPL_MODE_FEATHER): nodes can forward data for other nodes, but are not reachable themselves
  • and leaf mode (RPL_MODE_LEAF): nodes do not forward data for others, but are reachable by others

Definition at line 293 of file rpl.h.

Function Documentation

enum rpl_mode rpl_get_mode ( void  )

Get the RPL mode.

Return values
TheRPL mode

Definition at line 66 of file rpl.c.

enum rpl_mode rpl_set_mode ( enum rpl_mode  mode)

Set the RPL mode.

Parameters
modeThe new RPL mode
Return values
Theprevious RPL mode

Definition at line 72 of file rpl.c.

References NULL.