2014-07-08 16:54:54 +02:00
|
|
|
/*
|
2014-08-21 23:52:42 +02:00
|
|
|
* Copyright (C) 2013, 2014 INRIA.
|
2013-06-22 05:11:53 +02:00
|
|
|
*
|
2014-08-21 23:52:42 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2013-06-22 05:11:53 +02:00
|
|
|
*
|
2013-08-08 13:39:00 +02:00
|
|
|
* @ingroup rpl
|
2013-06-22 05:11:53 +02:00
|
|
|
* @{
|
2014-07-08 16:54:54 +02:00
|
|
|
*
|
|
|
|
* @file rpl_dodag.h
|
|
|
|
* @brief RPL DODAG header
|
|
|
|
*
|
|
|
|
* Header file, which defines all public known DODAG-related functions for RPL.
|
|
|
|
*
|
|
|
|
* @author Eric Engel <eric.engel@fu-berlin.de>
|
2013-06-22 05:11:53 +02:00
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <string.h>
|
2013-08-09 03:13:37 +02:00
|
|
|
#include "ipv6.h"
|
2012-01-19 17:35:50 +01:00
|
|
|
#include "rpl_structs.h"
|
2014-03-25 14:36:53 +01:00
|
|
|
#include "rpl_config.h"
|
2012-01-19 17:35:50 +01:00
|
|
|
|
2014-10-10 11:51:11 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-10-14 08:14:45 +02:00
|
|
|
void rpl_dao_ack_received(rpl_dodag_t *dodag);
|
|
|
|
void rpl_delay_dao(rpl_dodag_t *dodag);
|
2012-01-19 17:35:50 +01:00
|
|
|
rpl_instance_t *rpl_new_instance(uint8_t instanceid);
|
|
|
|
rpl_instance_t *rpl_get_instance(uint8_t instanceid);
|
2013-06-10 17:36:56 +02:00
|
|
|
rpl_instance_t *rpl_get_my_instance(void);
|
2015-03-16 09:35:14 +01:00
|
|
|
rpl_dodag_t *rpl_new_dodag(rpl_instance_t *inst, ipv6_addr_t *id);
|
2015-03-16 13:15:05 +01:00
|
|
|
rpl_dodag_t *rpl_get_joined_dodag(uint8_t instanceid);
|
2013-06-10 17:36:56 +02:00
|
|
|
rpl_dodag_t *rpl_get_my_dodag(void);
|
2012-01-31 19:36:26 +01:00
|
|
|
void rpl_join_dodag(rpl_dodag_t *dodag, ipv6_addr_t *parent, uint16_t parent_rank);
|
2012-01-19 17:35:50 +01:00
|
|
|
void rpl_del_dodag(rpl_dodag_t *dodag);
|
2012-01-31 19:36:26 +01:00
|
|
|
rpl_parent_t *rpl_new_parent(rpl_dodag_t *dodag, ipv6_addr_t *address, uint16_t rank);
|
2015-03-19 13:06:36 +01:00
|
|
|
rpl_parent_t *rpl_find_parent(rpl_dodag_t *dodag, ipv6_addr_t *address);
|
2013-06-22 05:11:53 +02:00
|
|
|
void rpl_leave_dodag(rpl_dodag_t *dodag);
|
2012-01-31 19:36:26 +01:00
|
|
|
bool rpl_equal_id(ipv6_addr_t *id1, ipv6_addr_t *id2);
|
2013-06-10 17:36:56 +02:00
|
|
|
ipv6_addr_t *rpl_get_my_preferred_parent(void);
|
2012-02-22 00:50:40 +01:00
|
|
|
void rpl_delete_parent(rpl_parent_t *parent);
|
|
|
|
void rpl_delete_worst_parent(void);
|
|
|
|
void rpl_delete_all_parents(void);
|
2015-03-19 18:43:46 +01:00
|
|
|
rpl_parent_t *rpl_find_preferred_parent(rpl_dodag_t *dodag);
|
|
|
|
void rpl_parent_update(rpl_dodag_t *dodag, rpl_parent_t *parent);
|
2013-06-22 05:11:53 +02:00
|
|
|
void rpl_global_repair(rpl_dodag_t *dodag, ipv6_addr_t *p_addr, uint16_t rank);
|
2015-03-19 18:43:46 +01:00
|
|
|
void rpl_local_repair(rpl_dodag_t *dodag);
|
2012-02-26 19:30:48 +01:00
|
|
|
uint16_t rpl_calc_rank(uint16_t abs_rank, uint16_t minhoprankincrease);
|
2014-10-10 11:51:11 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|