2013-11-27 17:54:30 +01:00
|
|
|
/*
|
2013-06-22 05:11:53 +02:00
|
|
|
* Copyright (C) 2013 INRIA.
|
|
|
|
*
|
2013-11-22 20:47:05 +01:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
2013-06-22 05:11:53 +02:00
|
|
|
* Public License. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
2013-11-27 17:54:30 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup net_rpl RPL
|
|
|
|
* @ingroup net
|
|
|
|
* @brief Routing Protocol for Low power and Lossy Networks
|
2013-06-22 05:11:53 +02:00
|
|
|
* @{
|
2013-11-27 17:54:30 +01:00
|
|
|
*
|
|
|
|
* @file rpl.h
|
|
|
|
* @brief RPL header
|
|
|
|
*
|
|
|
|
* @author Eric Engel <eric.engel@fu-berlin.de>
|
2013-06-22 05:11:53 +02:00
|
|
|
*/
|
|
|
|
|
2013-11-27 17:54:30 +01:00
|
|
|
#ifndef __RPL_H
|
|
|
|
#define __RPL_H
|
|
|
|
|
2013-06-22 05:11:53 +02:00
|
|
|
#include <string.h>
|
2012-01-19 17:35:50 +01:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <vtimer.h>
|
|
|
|
#include <mutex.h>
|
2012-02-14 22:22:01 +01:00
|
|
|
#include <transceiver.h>
|
2013-08-05 16:10:54 +02:00
|
|
|
#include "ipv6.h"
|
2012-01-19 17:35:50 +01:00
|
|
|
#include "rpl_dodag.h"
|
|
|
|
|
2013-09-17 19:46:50 +02:00
|
|
|
#undef CC1100_RADIO_MODE
|
2013-03-15 17:48:13 +01:00
|
|
|
#define CC1100_RADIO_MODE CC1100_MODE_WOR
|
|
|
|
|
2014-01-09 18:19:57 +01:00
|
|
|
#define RPL_PKT_RECV_BUF_SIZE 16
|
2013-11-21 00:13:59 +01:00
|
|
|
#define RPL_PROCESS_STACKSIZE KERNEL_CONF_STACKSIZE_DEFAULT
|
2012-01-26 20:26:55 +01:00
|
|
|
|
2014-02-13 13:57:59 +01:00
|
|
|
uint8_t rpl_init(int if_id);
|
2013-06-10 17:36:56 +02:00
|
|
|
void rpl_init_root(void);
|
2012-01-26 20:26:55 +01:00
|
|
|
rpl_of_t *rpl_get_of_for_ocp(uint16_t ocp);
|
|
|
|
|
2012-02-14 22:22:01 +01:00
|
|
|
void send_DIO(ipv6_addr_t *destination);
|
|
|
|
void send_DIS(ipv6_addr_t *destination);
|
2012-04-07 20:30:13 +02:00
|
|
|
void send_DAO(ipv6_addr_t *destination, uint8_t lifetime, bool default_lifetime, uint8_t start_index);
|
2012-03-27 17:56:47 +02:00
|
|
|
void send_DAO_ACK(ipv6_addr_t *destination);
|
2012-01-26 20:26:55 +01:00
|
|
|
void rpl_process(void);
|
2012-01-19 17:35:50 +01:00
|
|
|
void recv_rpl_dio(void);
|
2012-02-14 22:22:01 +01:00
|
|
|
void recv_rpl_dis(void);
|
2012-01-19 17:35:50 +01:00
|
|
|
void recv_rpl_dao(void);
|
2012-03-27 17:56:47 +02:00
|
|
|
void recv_rpl_dao_ack(void);
|
2013-11-21 00:13:59 +01:00
|
|
|
void rpl_send(ipv6_addr_t *destination, uint8_t *payload, uint16_t p_len, uint8_t next_header);
|
2013-06-22 05:11:53 +02:00
|
|
|
ipv6_addr_t *rpl_get_next_hop(ipv6_addr_t *addr);
|
2012-04-07 20:30:13 +02:00
|
|
|
void rpl_add_routing_entry(ipv6_addr_t *addr, ipv6_addr_t *next_hop, uint16_t lifetime);
|
2012-02-14 22:22:01 +01:00
|
|
|
void rpl_del_routing_entry(ipv6_addr_t *addr);
|
2013-06-22 05:11:53 +02:00
|
|
|
rpl_routing_entry_t *rpl_find_routing_entry(ipv6_addr_t *addr);
|
2013-06-10 17:36:56 +02:00
|
|
|
void rpl_clear_routing_table(void);
|
2012-02-22 00:50:40 +01:00
|
|
|
rpl_routing_entry_t *rpl_get_routing_table(void);
|
2013-11-27 17:54:30 +01:00
|
|
|
|
|
|
|
/** @} */
|
|
|
|
#endif /* __RPL_H */
|