dodag.h File Reference

DODAG-related functions for RPL. More...

Detailed Description

DODAG-related functions for RPL.

Header file, which defines all public known DODAG-related functions for RPL.

Author
Eric Engel eric..nosp@m.enge.nosp@m.l@fu-.nosp@m.berl.nosp@m.in.de
Cenk Gündoğan cnkgn.nosp@m.dgn@.nosp@m.gmail.nosp@m..com

Definition in file dodag.h.

#include "net/ipv6/addr.h"
#include "trickle.h"
#include "net/gnrc/rpl.h"
#include "net/gnrc/rpl/structs.h"
+ Include dependency graph for dodag.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define GNRC_RPL_INSTANCES_NUMOF   (1)
 Number of RPL instances.
 
#define GNRC_RPL_PARENTS_NUMOF   (3)
 Number of RPL parents.
 
gnrc_rpl_instance_t gnrc_rpl_instances [GNRC_RPL_INSTANCES_NUMOF]
 RPL instance table.
 
gnrc_rpl_parent_t gnrc_rpl_parents [GNRC_RPL_PARENTS_NUMOF]
 RPL parent table.
 
bool gnrc_rpl_instance_add (uint8_t instance_id, gnrc_rpl_instance_t **inst)
 Add a new RPL instance with the id instance_id. More...
 
bool gnrc_rpl_instance_remove_by_id (uint8_t instance_id)
 Remove a RPL instance with the id instance_id. More...
 
bool gnrc_rpl_instance_remove (gnrc_rpl_instance_t *inst)
 Remove a RPL instance with the pointer inst. More...
 
gnrc_rpl_instance_tgnrc_rpl_instance_get (uint8_t instance_id)
 Get the RPL instance with the id instance_id. More...
 
bool gnrc_rpl_dodag_init (gnrc_rpl_instance_t *instance, ipv6_addr_t *dodag_id, kernel_pid_t iface)
 Initialize a new RPL DODAG with the id dodag_id for the instance instance. More...
 
void gnrc_rpl_dodag_remove_all_parents (gnrc_rpl_dodag_t *dodag)
 Remove all parents from the dodag. More...
 
bool gnrc_rpl_parent_add_by_addr (gnrc_rpl_dodag_t *dodag, ipv6_addr_t *addr, gnrc_rpl_parent_t **parent)
 Add a new parent with the IPv6 address addr to the dodag. More...
 
bool gnrc_rpl_parent_remove (gnrc_rpl_parent_t *parent)
 Remove the parent from its DODAG. More...
 
void gnrc_rpl_parent_update (gnrc_rpl_dodag_t *dodag, gnrc_rpl_parent_t *parent)
 Update a parent of the dodag. More...
 
void gnrc_rpl_cleanup_start (gnrc_rpl_dodag_t *dodag)
 Removes the dodag state of dodag after CONFIG_GNRC_RPL_CLEANUP_TIME milliseconds. More...
 
void gnrc_rpl_local_repair (gnrc_rpl_dodag_t *dodag)
 Start a local repair. More...
 
void gnrc_rpl_leaf_operation (gnrc_rpl_dodag_t *dodag)
 Operate as leaf. More...
 
void gnrc_rpl_router_operation (gnrc_rpl_dodag_t *dodag)
 Operate as router. More...
 

Function Documentation

◆ gnrc_rpl_cleanup_start()

void gnrc_rpl_cleanup_start ( gnrc_rpl_dodag_t dodag)

Removes the dodag state of dodag after CONFIG_GNRC_RPL_CLEANUP_TIME milliseconds.

Parameters
[in]dodagPointer to the DODAG

◆ gnrc_rpl_dodag_init()

bool gnrc_rpl_dodag_init ( gnrc_rpl_instance_t instance,
ipv6_addr_t dodag_id,
kernel_pid_t  iface 
)

Initialize a new RPL DODAG with the id dodag_id for the instance instance.

Parameters
[in]instancePointer to the instance to add the DODAG to
[in]dodag_idThe DODAG-ID of the new DODAG
[in]ifaceInterface PID where the DODAG operates
Returns
true, if DODAG could be created.
false, if DODAG could not be created or exists already.

◆ gnrc_rpl_dodag_remove_all_parents()

void gnrc_rpl_dodag_remove_all_parents ( gnrc_rpl_dodag_t dodag)

Remove all parents from the dodag.

Parameters
[in]dodagPointer to the dodag.

◆ gnrc_rpl_instance_add()

bool gnrc_rpl_instance_add ( uint8_t  instance_id,
gnrc_rpl_instance_t **  inst 
)

Add a new RPL instance with the id instance_id.

Parameters
[in]instance_idThe instance id of the new RPL instance.
[out]instPointer to an existing or new instance. Otherwise NULL.
Returns
true, if instance could be created.
false, if instance could not be created or exists already.

◆ gnrc_rpl_instance_get()

gnrc_rpl_instance_t* gnrc_rpl_instance_get ( uint8_t  instance_id)

Get the RPL instance with the id instance_id.

Parameters
[in]instance_idThe instance id of the RPL instance to get.
Returns
Pointer to the RPL instance, on success.
NULL, otherwise.

◆ gnrc_rpl_instance_remove()

bool gnrc_rpl_instance_remove ( gnrc_rpl_instance_t inst)

Remove a RPL instance with the pointer inst.

Parameters
[in]instPointer to the the RPL instance to remove.
Returns
true, on success.
false, otherwise.

◆ gnrc_rpl_instance_remove_by_id()

bool gnrc_rpl_instance_remove_by_id ( uint8_t  instance_id)

Remove a RPL instance with the id instance_id.

Parameters
[in]instance_idThe instance id of the RPL instance to remove.
Returns
true, on success.
false, otherwise.

◆ gnrc_rpl_leaf_operation()

void gnrc_rpl_leaf_operation ( gnrc_rpl_dodag_t dodag)

Operate as leaf.

Parameters
[in]dodagPointer to the DODAG

◆ gnrc_rpl_local_repair()

void gnrc_rpl_local_repair ( gnrc_rpl_dodag_t dodag)

Start a local repair.

Parameters
[in]dodagPointer to the DODAG

◆ gnrc_rpl_parent_add_by_addr()

bool gnrc_rpl_parent_add_by_addr ( gnrc_rpl_dodag_t dodag,
ipv6_addr_t addr,
gnrc_rpl_parent_t **  parent 
)

Add a new parent with the IPv6 address addr to the dodag.

Parameters
[in]dodagPointer to the DODAG
[in]addrIPV6 address of the parent
[out]parentPointer to an existing or new parent. Otherwise NULL.
Returns
true. if parent could be created.
false, if parent could not be created or exists already.

◆ gnrc_rpl_parent_remove()

bool gnrc_rpl_parent_remove ( gnrc_rpl_parent_t parent)

Remove the parent from its DODAG.

Parameters
[in]parentPointer to the parent.
Returns
true, on success.
false, otherwise.

◆ gnrc_rpl_parent_update()

void gnrc_rpl_parent_update ( gnrc_rpl_dodag_t dodag,
gnrc_rpl_parent_t parent 
)

Update a parent of the dodag.

Parameters
[in]dodagPointer to the DODAG
[in]parentPointer to the parent

◆ gnrc_rpl_router_operation()

void gnrc_rpl_router_operation ( gnrc_rpl_dodag_t dodag)

Operate as router.

Parameters
[in]dodagPointer to the DODAG