p2p.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 Cenk Gündoğan <mail@cgundogan.de>
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
23 #include "net/ipv6/addr.h"
24 #include "net/gnrc.h"
25 #include "net/gnrc/rpl/structs.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
35 #define GNRC_RPL_P2P_MOP (0x04)
36 
43 #define GNRC_RPL_P2P_LIFETIME (0x02)
44 
51 #define GNRC_RPL_P2P_COMPR (0)
52 
59 #define GNRC_RPL_P2P_MAX_RANK (0)
60 
68 #define GNRC_RPL_P2P_DEFAULT_DIO_INTERVAL_MIN (6)
69 #define GNRC_RPL_P2P_DEFAULT_DIO_REDUNDANCY_CONSTANT (1)
77 #define GNRC_RPL_P2P_DEFAULT_LIFETIME (0xFF)
78 #define GNRC_RPL_P2P_LIFETIME_UNIT (0xFFFF)
87 #define GNRC_RPL_P2P_OPT_RDO (0x0A)
88 
95 #define GNRC_RPL_P2P_ICMPV6_CODE_DRO (0x04)
96 
103 #define GNRC_RPL_P2P_ICMPV6_CODE_DRO_ACK (0x05)
104 
108 #define GNRC_RPL_P2P_DRO_DELAY (4)
109 
113 #define GNRC_RPL_P2P_MSG_TYPE_DRO_HANDLE (0x09A0)
114 
118 extern const uint8_t gnrc_rpl_p2p_lifetime_lookup[4];
119 
133  ipv6_addr_t *target, bool gen_inst_id);
134 
142 
150 
158 
166 
171 
172 #ifdef __cplusplus
173 }
174 #endif
175 
Includes all essential GNRC network stack base modules.
void gnrc_rpl_p2p_recv_DRO(gnrc_pktsnip_t *pkt, ipv6_addr_t *src)
Receive and parse a DRO control message.
gnrc_pktsnip_t * gnrc_rpl_p2p_rdo_build(gnrc_pktsnip_t *pkt, gnrc_rpl_p2p_ext_t *p2p_ext)
Build an RDO.
const uint8_t gnrc_rpl_p2p_lifetime_lookup[4]
Lookup table used to decode/encode the lifetime values.
gnrc_rpl_instance_t * gnrc_rpl_p2p_root_init(uint8_t instance_id, ipv6_addr_t *dodag_id, ipv6_addr_t *target, bool gen_inst_id)
Initialization of a P2P-RPL Instance as root node.
void gnrc_rpl_p2p_rdo_parse(gnrc_rpl_p2p_opt_rdo_t *rdo, gnrc_rpl_p2p_ext_t *p2p_ext)
Parse an RDO.
void gnrc_rpl_p2p_send_DRO(gnrc_pktsnip_t *pkt, gnrc_rpl_p2p_ext_t *p2p_ext)
Send a DRO control message.
void gnrc_rpl_p2p_update(void)
Updates the lifetime of the P2P Dodag and the delay of the DRO.
Definitions for IPv6 addresses.
P2P-RPL data structs.
Type to represent parts (either headers or payload) of a packet, called snips.
Definition: pkt.h:105
Extended DODAG information for P2P-RPL.
Definition: p2p_structs.h:75
P2P Route Discovery Object (RDO) Option.
Definition: p2p_structs.h:38
RPL data structs.
struct gnrc_rpl_instance gnrc_rpl_instance_t
Instance representation.
Definition: structs.h:231
Data type to represent an IPv6 address.
Definition: addr.h:64