p2p_structs.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Cenk Gündoğan <mail@cgundogan.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 
#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
ipv6_addr_t target
target address
Definition: p2p_structs.h:47
RPL data structs.
uint8_t lifetime_enc
encoded lifetime of the P2P-DODAG
Definition: p2p_structs.h:88
Definitions for IPv6 addresses.
gnrc_rpl_dodag_t * dodag
DODAG, which owns this P2P extension.
Definition: p2p_structs.h:81
uint8_t type
Option Type: 0x0a.
Definition: p2p_structs.h:43
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:76
bool reply
request P2P-DRO
Definition: p2p_structs.h:86
uint8_t instance_id
id of the instance
Definition: p2p_structs.h:57
bool hop_by_hop
request hop-by-hop routes or source routes
Definition: p2p_structs.h:84
network_uint16_t flags_rev
flags and reserved
Definition: p2p_structs.h:59
uint8_t version_number
version number of the DODAG
Definition: p2p_structs.h:58
uint8_t length
length of option, not including first two bytes
Definition: p2p_structs.h:44
int8_t dro_delay
delay DRO after it was requested in seconds
Definition: p2p_structs.h:95
bool dro_ack
request P2P-DRO-ACK
Definition: p2p_structs.h:87
uint8_t instance_id
id of the instance
Definition: p2p_structs.h:70
bool for_me
true if this node is the target
Definition: p2p_structs.h:93
Extended DODAG information for P2P-RPL.
Definition: p2p_structs.h:79
bool state
state: used / unused
Definition: p2p_structs.h:80
uint8_t lmn
lifetime, maxrank/nexthop
Definition: p2p_structs.h:46
uint8_t version_number
version number of the DODAG
Definition: p2p_structs.h:71
bool stop
stop route discovery
Definition: p2p_structs.h:85
ipv6_addr_t dodag_id
id of the dodag
Definition: p2p_structs.h:60
uint8_t compr_flags
flags and number of elided prefix octets
Definition: p2p_structs.h:45
P2P Route Discovery Object (RDO) Option.
Definition: p2p_structs.h:42
uint8_t routes_numof
number of requested routes
Definition: p2p_structs.h:83
uint8_t dro_seq
sequence number of the P2P-DRO
Definition: p2p_structs.h:91
ipv6_addr_t target
target of the P2P route discovery
Definition: p2p_structs.h:92
ipv6_addr_t dodag_id
id of the dodag
Definition: p2p_structs.h:73
P2P Discovery Reply Object (P2P-DRO)
Definition: p2p_structs.h:56
Data type to represent an IPv6 address.
Definition: ipv6/addr.h:74
int8_t lifetime_sec
lifetime of the P2P-DODAG in seconds
Definition: p2p_structs.h:89
uint8_t compr
number of elided prefix octets
Definition: p2p_structs.h:82
network_uint16_t seq_rev
sequence number and reserved
Definition: p2p_structs.h:72
uint8_t addr_numof
number of addresses in the address vector
Definition: p2p_structs.h:94
uint8_t maxrank
maximum rank the P2P-DODAG should span
Definition: p2p_structs.h:90
P2P Discovery Reply Object Acknowledgement (P2P-DRO-ACK)
Definition: p2p_structs.h:69
struct gnrc_rpl_dodag gnrc_rpl_dodag_t
DODAG representation.
Definition: structs.h:208