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>
|
2012-01-19 17:35:50 +01:00
|
|
|
#include "sys/net/sixlowpan/sixlowip.h"
|
|
|
|
#include "rpl_dodag.h"
|
|
|
|
|
2012-01-26 20:26:55 +01:00
|
|
|
#define RPL_PKT_RECV_BUF_SIZE 20
|
2012-02-26 19:30:48 +01:00
|
|
|
#define RPL_PROCESS_STACKSIZE 4096
|
2012-01-26 20:26:55 +01:00
|
|
|
|
2012-03-27 17:56:47 +02:00
|
|
|
uint8_t rpl_init(transceiver_type_t trans, uint16_t rpl_address);
|
2012-01-19 17:35:50 +01:00
|
|
|
void rpl_init_root();
|
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-03-27 17:56:47 +02:00
|
|
|
void send_DAO(ipv6_addr_t *destination, uint8_t lifetime, bool default_lifetime);
|
|
|
|
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);
|
2012-02-14 22:22:01 +01:00
|
|
|
void rpl_send(ipv6_addr_t *destination, uint8_t *payload, uint16_t p_len, uint8_t next_header, void *tcp_socket);
|
|
|
|
ipv6_addr_t *rpl_get_next_hop(ipv6_addr_t * addr);
|
2012-02-26 19:30:48 +01:00
|
|
|
void rpl_add_routing_entry(ipv6_addr_t *addr, ipv6_addr_t *next_hop, uint8_t lifetime);
|
2012-02-14 22:22:01 +01:00
|
|
|
void rpl_del_routing_entry(ipv6_addr_t *addr);
|
2012-03-27 17:56:47 +02:00
|
|
|
rpl_routing_entry_t * rpl_find_routing_entry(ipv6_addr_t *addr);
|
2012-02-14 22:22:01 +01:00
|
|
|
void rpl_clear_routing_table();
|
2012-02-22 00:50:40 +01:00
|
|
|
rpl_routing_entry_t *rpl_get_routing_table(void);
|