Loading...
Searching...
No Matches
p2p.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
23#ifndef NET_GNRC_RPL_P2P_H
24#define NET_GNRC_RPL_P2P_H
25
26#include "net/ipv6/addr.h"
27#include "net/gnrc.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
38#define GNRC_RPL_P2P_MOP (0x04)
39
46#define GNRC_RPL_P2P_LIFETIME (0x02)
47
54#define GNRC_RPL_P2P_COMPR (0)
55
62#define GNRC_RPL_P2P_MAX_RANK (0)
63
71#define GNRC_RPL_P2P_DEFAULT_DIO_INTERVAL_MIN (6)
72#define GNRC_RPL_P2P_DEFAULT_DIO_REDUNDANCY_CONSTANT (1)
80#define GNRC_RPL_P2P_DEFAULT_LIFETIME (0xFF)
81#define GNRC_RPL_P2P_LIFETIME_UNIT (0xFFFF)
90#define GNRC_RPL_P2P_OPT_RDO (0x0A)
91
98#define GNRC_RPL_P2P_ICMPV6_CODE_DRO (0x04)
99
106#define GNRC_RPL_P2P_ICMPV6_CODE_DRO_ACK (0x05)
107
111#define GNRC_RPL_P2P_DRO_DELAY (4)
112
116#define GNRC_RPL_P2P_MSG_TYPE_DRO_HANDLE (0x09A0)
117
121extern const uint8_t gnrc_rpl_p2p_lifetime_lookup[4];
122
136 ipv6_addr_t *target, bool gen_inst_id);
137
145
153
161
169
174
175#ifdef __cplusplus
176}
177#endif
178
179#endif /* NET_GNRC_RPL_P2P_H */
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.
const uint8_t gnrc_rpl_p2p_lifetime_lookup[4]
Lookup table used to decode/encode the lifetime values.
gnrc_pktsnip_t * gnrc_rpl_p2p_rdo_build(gnrc_pktsnip_t *pkt, gnrc_rpl_p2p_ext_t *p2p_ext)
Build an RDO.
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.
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.
Definitions for IPv6 addresses.
P2P-RPL data structs.
Type to represent parts (either headers or payload) of a packet, called snips.
Definition pkt.h:108
Extended DODAG information for P2P-RPL.
Definition p2p_structs.h:79
P2P Route Discovery Object (RDO) Option.
Definition p2p_structs.h:42
RPL data structs.
struct gnrc_rpl_instance gnrc_rpl_instance_t
Instance representation.
Definition structs.h:235
Data type to represent an IPv6 address.
Definition addr.h:72