p2p_structs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
21 #ifndef NET_GNRC_RPL_P2P_STRUCTS_H
22 #define NET_GNRC_RPL_P2P_STRUCTS_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 #include "net/ipv6/addr.h"
29 #include "net/gnrc/rpl/structs.h"
30 
34 #define GNRC_RPL_P2P_ADDR_VEC_NUMOF (8)
35 
42 typedef struct __attribute__((packed)) {
43  uint8_t type;
44  uint8_t length;
45  uint8_t compr_flags;
46  uint8_t lmn;
49 
56 typedef struct __attribute__((packed)) {
57  uint8_t instance_id;
58  uint8_t version_number;
62 
69 typedef struct __attribute__((packed)) {
70  uint8_t instance_id;
71  uint8_t version_number;
75 
79 typedef struct {
80  bool state;
82  uint8_t compr;
83  uint8_t routes_numof;
84  bool hop_by_hop;
85  bool stop;
86  bool reply;
87  bool dro_ack;
88  uint8_t lifetime_enc;
89  int8_t lifetime_sec;
90  uint8_t maxrank;
91  uint8_t dro_seq;
93  bool for_me;
94  uint8_t addr_numof;
95  int8_t dro_delay;
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif /* NET_GNRC_RPL_P2P_STRUCTS_H */
104 
gnrc_rpl_p2p_ext_t::lifetime_enc
uint8_t lifetime_enc
encoded lifetime of the P2P-DODAG
Definition: p2p_structs.h:88
gnrc_rpl_p2p_ext_t::dodag
gnrc_rpl_dodag_t * dodag
DODAG, which owns this P2P extension.
Definition: p2p_structs.h:81
gnrc_rpl_p2p_opt_rdo_t::lmn
uint8_t lmn
lifetime, maxrank/nexthop
Definition: p2p_structs.h:46
gnrc_rpl_p2p_ext_t::maxrank
uint8_t maxrank
maximum rank the P2P-DODAG should span
Definition: p2p_structs.h:90
gnrc_rpl_p2p_opt_rdo_t::compr_flags
uint8_t compr_flags
flags and number of elided prefix octets
Definition: p2p_structs.h:45
be_uint16_t
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:77
ipv6_addr_t
Data type to represent an IPv6 address.
Definition: addr.h:74
gnrc_rpl_p2p_dro_ack_t::seq_rev
network_uint16_t seq_rev
sequence number and reserved
Definition: p2p_structs.h:72
addr.h
Definitions for IPv6 addresses.
gnrc_rpl_p2p_ext_t::hop_by_hop
bool hop_by_hop
request hop-by-hop routes or source routes
Definition: p2p_structs.h:84
gnrc_rpl_p2p_dro_ack_t::version_number
uint8_t version_number
version number of the DODAG
Definition: p2p_structs.h:71
gnrc_rpl_p2p_ext_t::dro_ack
bool dro_ack
request P2P-DRO-ACK
Definition: p2p_structs.h:87
gnrc_rpl_p2p_dro_t
P2P Discovery Reply Object (P2P-DRO)
Definition: p2p_structs.h:56
gnrc_rpl_p2p_dro_t::version_number
uint8_t version_number
version number of the DODAG
Definition: p2p_structs.h:58
gnrc_rpl_p2p_dro_t::flags_rev
network_uint16_t flags_rev
flags and reserved
Definition: p2p_structs.h:59
gnrc_rpl_p2p_dro_ack_t::dodag_id
ipv6_addr_t dodag_id
id of the dodag
Definition: p2p_structs.h:73
gnrc_rpl_p2p_ext_t
Extended DODAG information for P2P-RPL.
Definition: p2p_structs.h:79
gnrc_rpl_p2p_dro_t::dodag_id
ipv6_addr_t dodag_id
id of the dodag
Definition: p2p_structs.h:60
gnrc_rpl_p2p_ext_t::dro_delay
int8_t dro_delay
delay DRO after it was requested in seconds
Definition: p2p_structs.h:95
gnrc_rpl_p2p_ext_t::for_me
bool for_me
true if this node is the target
Definition: p2p_structs.h:93
gnrc_rpl_p2p_ext_t::reply
bool reply
request P2P-DRO
Definition: p2p_structs.h:86
structs.h
RPL data structs.
gnrc_rpl_p2p_dro_t::instance_id
uint8_t instance_id
id of the instance
Definition: p2p_structs.h:57
gnrc_rpl_p2p_ext_t::routes_numof
uint8_t routes_numof
number of requested routes
Definition: p2p_structs.h:83
gnrc_rpl_p2p_ext_t::state
bool state
state: used / unused
Definition: p2p_structs.h:80
gnrc_rpl_p2p_opt_rdo_t::length
uint8_t length
length of option, not including first two bytes
Definition: p2p_structs.h:44
gnrc_rpl_p2p_dro_ack_t
P2P Discovery Reply Object Acknowledgement (P2P-DRO-ACK)
Definition: p2p_structs.h:69
gnrc_rpl_p2p_ext_t::compr
uint8_t compr
number of elided prefix octets
Definition: p2p_structs.h:82
gnrc_rpl_p2p_ext_t::dro_seq
uint8_t dro_seq
sequence number of the P2P-DRO
Definition: p2p_structs.h:91
gnrc_rpl_p2p_opt_rdo_t::target
ipv6_addr_t target
target address
Definition: p2p_structs.h:47
gnrc_rpl_p2p_ext_t::addr_numof
uint8_t addr_numof
number of addresses in the address vector
Definition: p2p_structs.h:94
gnrc_rpl_p2p_ext_t::stop
bool stop
stop route discovery
Definition: p2p_structs.h:85
gnrc_rpl_p2p_opt_rdo_t::type
uint8_t type
Option Type: 0x0a.
Definition: p2p_structs.h:43
gnrc_rpl_p2p_opt_rdo_t
P2P Route Discovery Object (RDO) Option.
Definition: p2p_structs.h:42
GNRC_RPL_P2P_ADDR_VEC_NUMOF
#define GNRC_RPL_P2P_ADDR_VEC_NUMOF
Address vector length in RDO DIO options and maximal hop count for the P2P-DODAG.
Definition: p2p_structs.h:34
gnrc_rpl_p2p_ext_t::target
ipv6_addr_t target
target of the P2P route discovery
Definition: p2p_structs.h:92
gnrc_rpl_p2p_dro_ack_t::instance_id
uint8_t instance_id
id of the instance
Definition: p2p_structs.h:70
gnrc_rpl_dodag_t
struct gnrc_rpl_dodag gnrc_rpl_dodag_t
DODAG representation.
Definition: structs.h:225
gnrc_rpl_p2p_ext_t::lifetime_sec
int8_t lifetime_sec
lifetime of the P2P-DODAG in seconds
Definition: p2p_structs.h:89