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 
9 #pragma once
10 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include "net/ipv6/addr.h"
28 #include "net/gnrc/rpl/structs.h"
29 
33 #define GNRC_RPL_P2P_ADDR_VEC_NUMOF (8)
34 
41 typedef struct __attribute__((packed)) {
42  uint8_t type;
43  uint8_t length;
44  uint8_t compr_flags;
45  uint8_t lmn;
48 
55 typedef struct __attribute__((packed)) {
56  uint8_t instance_id;
57  uint8_t version_number;
61 
68 typedef struct __attribute__((packed)) {
69  uint8_t instance_id;
70  uint8_t version_number;
74 
78 typedef struct {
79  bool state;
81  uint8_t compr;
82  uint8_t routes_numof;
83  bool hop_by_hop;
84  bool stop;
85  bool reply;
86  bool dro_ack;
87  uint8_t lifetime_enc;
88  int8_t lifetime_sec;
89  uint8_t maxrank;
90  uint8_t dro_seq;
92  bool for_me;
93  uint8_t addr_numof;
94  int8_t dro_delay;
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
Definitions for IPv6 addresses.
#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:33
P2P Discovery Reply Object Acknowledgement (P2P-DRO-ACK)
Definition: p2p_structs.h:68
ipv6_addr_t dodag_id
id of the dodag
Definition: p2p_structs.h:72
network_uint16_t seq_rev
sequence number and reserved
Definition: p2p_structs.h:71
uint8_t version_number
version number of the DODAG
Definition: p2p_structs.h:70
uint8_t instance_id
id of the instance
Definition: p2p_structs.h:69
P2P Discovery Reply Object (P2P-DRO)
Definition: p2p_structs.h:55
network_uint16_t flags_rev
flags and reserved
Definition: p2p_structs.h:58
uint8_t version_number
version number of the DODAG
Definition: p2p_structs.h:57
ipv6_addr_t dodag_id
id of the dodag
Definition: p2p_structs.h:59
uint8_t instance_id
id of the instance
Definition: p2p_structs.h:56
Extended DODAG information for P2P-RPL.
Definition: p2p_structs.h:78
uint8_t dro_seq
sequence number of the P2P-DRO
Definition: p2p_structs.h:90
bool dro_ack
request P2P-DRO-ACK
Definition: p2p_structs.h:86
int8_t lifetime_sec
lifetime of the P2P-DODAG in seconds
Definition: p2p_structs.h:88
bool reply
request P2P-DRO
Definition: p2p_structs.h:85
uint8_t addr_numof
number of addresses in the address vector
Definition: p2p_structs.h:93
uint8_t maxrank
maximum rank the P2P-DODAG should span
Definition: p2p_structs.h:89
bool state
state: used / unused
Definition: p2p_structs.h:79
bool hop_by_hop
request hop-by-hop routes or source routes
Definition: p2p_structs.h:83
uint8_t routes_numof
number of requested routes
Definition: p2p_structs.h:82
gnrc_rpl_dodag_t * dodag
DODAG, which owns this P2P extension.
Definition: p2p_structs.h:80
ipv6_addr_t target
target of the P2P route discovery
Definition: p2p_structs.h:91
uint8_t compr
number of elided prefix octets
Definition: p2p_structs.h:81
int8_t dro_delay
delay DRO after it was requested in seconds
Definition: p2p_structs.h:94
bool for_me
true if this node is the target
Definition: p2p_structs.h:92
uint8_t lifetime_enc
encoded lifetime of the P2P-DODAG
Definition: p2p_structs.h:87
bool stop
stop route discovery
Definition: p2p_structs.h:84
P2P Route Discovery Object (RDO) Option.
Definition: p2p_structs.h:41
uint8_t lmn
lifetime, maxrank/nexthop
Definition: p2p_structs.h:45
ipv6_addr_t target
target address
Definition: p2p_structs.h:46
uint8_t compr_flags
flags and number of elided prefix octets
Definition: p2p_structs.h:44
uint8_t type
Option Type: 0x0a.
Definition: p2p_structs.h:42
uint8_t length
length of option, not including first two bytes
Definition: p2p_structs.h:43
RPL data structs.
struct gnrc_rpl_dodag gnrc_rpl_dodag_t
DODAG representation.
Definition: structs.h:224
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:73
Data type to represent an IPv6 address.
Definition: addr.h:67