dodag.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 INRIA.
3  * Copyright (C) 2015 Cenk Gündoğan <cnkgndgn@gmail.com>
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
23 #ifndef NET_GNRC_RPL_DODAG_H
24 #define NET_GNRC_RPL_DODAG_H
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #include "net/ipv6/addr.h"
31 #include "trickle.h"
32 #include "net/gnrc/rpl.h"
33 #include "net/gnrc/rpl/structs.h"
34 
38 #ifndef GNRC_RPL_INSTANCES_NUMOF
39 #define GNRC_RPL_INSTANCES_NUMOF (1)
40 #endif
41 
45 #ifndef GNRC_RPL_PARENTS_NUMOF
46 #define GNRC_RPL_PARENTS_NUMOF (3)
47 #endif
48 
53 
58 
68 bool gnrc_rpl_instance_add(uint8_t instance_id, gnrc_rpl_instance_t **inst);
69 
78 bool gnrc_rpl_instance_remove_by_id(uint8_t instance_id);
79 
89 
98 gnrc_rpl_instance_t *gnrc_rpl_instance_get(uint8_t instance_id);
99 
110 bool gnrc_rpl_dodag_init(gnrc_rpl_instance_t *instance, ipv6_addr_t *dodag_id, kernel_pid_t iface);
111 
118 
130  gnrc_rpl_parent_t **parent);
131 
141 
149 
157 
164 
171 
178 #ifdef __cplusplus
179 }
180 #endif
181 
182 #endif /* NET_GNRC_RPL_DODAG_H */
183 
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.
kernel_pid_t
int16_t kernel_pid_t
Unique process identifier.
Definition: sched.h:125
gnrc_rpl_parents
gnrc_rpl_parent_t gnrc_rpl_parents[GNRC_RPL_PARENTS_NUMOF]
RPL parent table.
ipv6_addr_t
Data type to represent an IPv6 address.
Definition: addr.h:74
rpl.h
RPL header. Declaration of global variables and functions needed for core functionality of RPL.
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.
addr.h
Definitions for IPv6 addresses.
trickle.h
Trickle timer interface definition.
gnrc_rpl_instance_t
struct gnrc_rpl_instance gnrc_rpl_instance_t
Instance representation.
Definition: structs.h:235
gnrc_rpl_router_operation
void gnrc_rpl_router_operation(gnrc_rpl_dodag_t *dodag)
Operate as router.
structs.h
RPL data structs.
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.
gnrc_rpl_instances
gnrc_rpl_instance_t gnrc_rpl_instances[GNRC_RPL_INSTANCES_NUMOF]
RPL instance table.
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.
gnrc_rpl_parent_remove
bool gnrc_rpl_parent_remove(gnrc_rpl_parent_t *parent)
Remove the parent from its DODAG.
GNRC_RPL_PARENTS_NUMOF
#define GNRC_RPL_PARENTS_NUMOF
Number of RPL parents.
Definition: dodag.h:46
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.
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.
gnrc_rpl_leaf_operation
void gnrc_rpl_leaf_operation(gnrc_rpl_dodag_t *dodag)
Operate as leaf.
gnrc_rpl_local_repair
void gnrc_rpl_local_repair(gnrc_rpl_dodag_t *dodag)
Start a local repair.
gnrc_rpl_parent_t
struct gnrc_rpl_parent gnrc_rpl_parent_t
Parent representation.
Definition: structs.h:230
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.
GNRC_RPL_INSTANCES_NUMOF
#define GNRC_RPL_INSTANCES_NUMOF
Number of RPL instances.
Definition: dodag.h:39
gnrc_rpl_dodag_t
struct gnrc_rpl_dodag gnrc_rpl_dodag_t
DODAG representation.
Definition: structs.h:225
gnrc_rpl_instance_remove
bool gnrc_rpl_instance_remove(gnrc_rpl_instance_t *inst)
Remove a RPL instance with the pointer inst.
gnrc_rpl_dodag_remove_all_parents
void gnrc_rpl_dodag_remove_all_parents(gnrc_rpl_dodag_t *dodag)
Remove all parents from the dodag.