p2p_structs.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 Cenk Gündoğan <cenk.guendogan@haw-hamburg.de>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 #include "net/ipv6/addr.h"
25 #include "net/gnrc/rpl/structs.h"
26 
30 #define GNRC_RPL_P2P_ADDR_VEC_NUMOF (8)
31 
38 typedef struct __attribute__((packed)) {
39  uint8_t type;
40  uint8_t length;
41  uint8_t compr_flags;
42  uint8_t lmn;
45 
52 typedef struct __attribute__((packed)) {
53  uint8_t instance_id;
54  uint8_t version_number;
58 
65 typedef struct __attribute__((packed)) {
66  uint8_t instance_id;
67  uint8_t version_number;
71 
75 typedef struct {
76  bool state;
78  uint8_t compr;
79  uint8_t routes_numof;
80  bool hop_by_hop;
81  bool stop;
82  bool reply;
83  bool dro_ack;
84  uint8_t lifetime_enc;
85  int8_t lifetime_sec;
86  uint8_t maxrank;
87  uint8_t dro_seq;
89  bool for_me;
90  uint8_t addr_numof;
91  int8_t dro_delay;
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
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:30
P2P Discovery Reply Object Acknowledgement (P2P-DRO-ACK)
Definition: p2p_structs.h:65
ipv6_addr_t dodag_id
id of the dodag
Definition: p2p_structs.h:69
network_uint16_t seq_rev
sequence number and reserved
Definition: p2p_structs.h:68
uint8_t version_number
version number of the DODAG
Definition: p2p_structs.h:67
uint8_t instance_id
id of the instance
Definition: p2p_structs.h:66
P2P Discovery Reply Object (P2P-DRO)
Definition: p2p_structs.h:52
network_uint16_t flags_rev
flags and reserved
Definition: p2p_structs.h:55
uint8_t version_number
version number of the DODAG
Definition: p2p_structs.h:54
ipv6_addr_t dodag_id
id of the dodag
Definition: p2p_structs.h:56
uint8_t instance_id
id of the instance
Definition: p2p_structs.h:53
Extended DODAG information for P2P-RPL.
Definition: p2p_structs.h:75
uint8_t dro_seq
sequence number of the P2P-DRO
Definition: p2p_structs.h:87
bool dro_ack
request P2P-DRO-ACK
Definition: p2p_structs.h:83
int8_t lifetime_sec
lifetime of the P2P-DODAG in seconds
Definition: p2p_structs.h:85
bool reply
request P2P-DRO
Definition: p2p_structs.h:82
uint8_t addr_numof
number of addresses in the address vector
Definition: p2p_structs.h:90
uint8_t maxrank
maximum rank the P2P-DODAG should span
Definition: p2p_structs.h:86
bool state
state: used / unused
Definition: p2p_structs.h:76
bool hop_by_hop
request hop-by-hop routes or source routes
Definition: p2p_structs.h:80
uint8_t routes_numof
number of requested routes
Definition: p2p_structs.h:79
gnrc_rpl_dodag_t * dodag
DODAG, which owns this P2P extension.
Definition: p2p_structs.h:77
ipv6_addr_t target
target of the P2P route discovery
Definition: p2p_structs.h:88
uint8_t compr
number of elided prefix octets
Definition: p2p_structs.h:78
int8_t dro_delay
delay DRO after it was requested in seconds
Definition: p2p_structs.h:91
bool for_me
true if this node is the target
Definition: p2p_structs.h:89
uint8_t lifetime_enc
encoded lifetime of the P2P-DODAG
Definition: p2p_structs.h:84
bool stop
stop route discovery
Definition: p2p_structs.h:81
P2P Route Discovery Object (RDO) Option.
Definition: p2p_structs.h:38
uint8_t lmn
lifetime, maxrank/nexthop
Definition: p2p_structs.h:42
ipv6_addr_t target
target address
Definition: p2p_structs.h:43
uint8_t compr_flags
flags and number of elided prefix octets
Definition: p2p_structs.h:41
uint8_t type
Option Type: 0x0a.
Definition: p2p_structs.h:39
uint8_t length
length of option, not including first two bytes
Definition: p2p_structs.h:40
RPL data structs.
struct gnrc_rpl_dodag gnrc_rpl_dodag_t
DODAG representation.
Definition: structs.h:221
A 16 bit integer in big endian aka network byte order.
Definition: byteorder.h:70
Data type to represent an IPv6 address.
Definition: addr.h:64