mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
12cd62c689
This implementation is based on RFC 6550 with addition of RFC 6554 (Source Routing Header for RPL). Both can be found under the following links: - http://tools.ietf.org/html/rfc6550 - http://tools.ietf.org/html/rfc6554 The PR provides basic functionality for handling and forwarding packages in non-storing mode. In addition the structure of the previous implemented RPL storing mode is now revised, so that readability and modularity is increased. The following features are implemented: - building function for a SRH and integration in common packets - source-route build algorithm based on the structure of the DODAG - an RPL-based interpretation of the SRH and removal at destination - new structure for RPl-module with extracted beaconing-functionality - leaf nodes are now supported There are some missed goals and should be included in future updates: - building a common routing table structure for different types of routing protocols - routing tables are statically assigned via source code, future update should have an optional variable at build-time, which sets the size of the routing table depending on the desired functionality of a node in the network (root, node, leaf)
55 lines
1.7 KiB
C
55 lines
1.7 KiB
C
/*
|
|
* Copyright (C) 2013, 2014 INRIA.
|
|
*
|
|
* 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.
|
|
*
|
|
* @ingroup rpl
|
|
* @{
|
|
*
|
|
* @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>
|
|
* @}
|
|
*/
|
|
|
|
#include <string.h>
|
|
#include "ipv6.h"
|
|
#include "rpl_structs.h"
|
|
#include "rpl_config.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void rpl_instances_init(void);
|
|
rpl_instance_t *rpl_new_instance(uint8_t instanceid);
|
|
rpl_instance_t *rpl_get_instance(uint8_t instanceid);
|
|
rpl_instance_t *rpl_get_my_instance(void);
|
|
rpl_dodag_t *rpl_new_dodag(uint8_t instanceid, ipv6_addr_t *id);
|
|
rpl_dodag_t *rpl_get_dodag(ipv6_addr_t *id);
|
|
rpl_dodag_t *rpl_get_my_dodag(void);
|
|
void rpl_join_dodag(rpl_dodag_t *dodag, ipv6_addr_t *parent, uint16_t parent_rank);
|
|
void rpl_del_dodag(rpl_dodag_t *dodag);
|
|
rpl_parent_t *rpl_new_parent(rpl_dodag_t *dodag, ipv6_addr_t *address, uint16_t rank);
|
|
rpl_parent_t *rpl_find_parent(ipv6_addr_t *address);
|
|
void rpl_leave_dodag(rpl_dodag_t *dodag);
|
|
bool rpl_equal_id(ipv6_addr_t *id1, ipv6_addr_t *id2);
|
|
ipv6_addr_t *rpl_get_my_preferred_parent(void);
|
|
void rpl_delete_parent(rpl_parent_t *parent);
|
|
void rpl_delete_worst_parent(void);
|
|
void rpl_delete_all_parents(void);
|
|
rpl_parent_t *rpl_find_preferred_parent(void);
|
|
void rpl_parent_update(rpl_parent_t *parent);
|
|
void rpl_global_repair(rpl_dodag_t *dodag, ipv6_addr_t *p_addr, uint16_t rank);
|
|
void rpl_local_repair(void);
|
|
uint16_t rpl_calc_rank(uint16_t abs_rank, uint16_t minhoprankincrease);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|