Reactive Discovery of P2P Routes in LLNs

Implementation of P2P-RPL. More...

Detailed Description

See also
RFC 6997


file  p2p.h
 Definititions for P2P-RPL.
file  p2p_dodag.h
 DODAG-related functions for P2P-RPL.
file  p2p_structs.h
 P2P-RPL data structs.


#define GNRC_RPL_P2P_MOP   (0x04)
 P2P-RPL Mode of Operation.
#define GNRC_RPL_P2P_LIFETIME   (0x02)
 Default lifetime of the P2P-RPL DODAG, encoded. More...
#define GNRC_RPL_P2P_COMPR   (0)
 Number of elided prefix octets from the target field and address vector. More...
#define GNRC_RPL_P2P_MAX_RANK   (0)
 Maximum rank in the DODAG during the route discovery. More...
#define GNRC_RPL_P2P_OPT_RDO   (0x0A)
 P2P-RPL RDO DIO option type. More...
#define GNRC_RPL_P2P_ICMPV6_CODE_DRO   (0x04)
 DRO ICMPv6 code. More...
#define GNRC_RPL_P2P_ICMPV6_CODE_DRO_ACK   (0x05)
 DRO-ACK ICMPv6 code. More...
#define GNRC_RPL_P2P_DRO_DELAY   (4)
 Time in seconds to wait before sending a DRO.
 Message type for handling DRO sending.


gnrc_rpl_instance_tgnrc_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. More...
gnrc_pktsnip_tgnrc_rpl_p2p_rdo_build (gnrc_pktsnip_t *pkt, gnrc_rpl_p2p_ext_t *p2p_ext)
 Build an RDO. More...
void gnrc_rpl_p2p_rdo_parse (gnrc_rpl_p2p_opt_rdo_t *rdo, gnrc_rpl_p2p_ext_t *p2p_ext)
 Parse an RDO. More...
void gnrc_rpl_p2p_send_DRO (gnrc_pktsnip_t *pkt, gnrc_rpl_p2p_ext_t *p2p_ext)
 Send a DRO control message. More...
void gnrc_rpl_p2p_recv_DRO (gnrc_pktsnip_t *pkt, ipv6_addr_t *src)
 Receive and parse a DRO control message. More...
void gnrc_rpl_p2p_update (void)
 Updates the lifetime of the P2P Dodag and the delay of the DRO.


const uint8_t gnrc_rpl_p2p_lifetime_lookup [4]
 Lookup table used to decode/encode the lifetime values.

Trickle parameters

See also
RFC 6997, section 6.1, Setting a P2P Mode DIO

Default parent and route entry lifetime

default lifetime will be multiplied by the lifetime unit to obtain the resulting lifetime


Macro Definition Documentation


#define GNRC_RPL_P2P_COMPR   (0)


#define GNRC_RPL_P2P_ICMPV6_CODE_DRO   (0x04)


#define GNRC_RPL_P2P_ICMPV6_CODE_DRO_ACK   (0x05)


#define GNRC_RPL_P2P_LIFETIME   (0x02)


#define GNRC_RPL_P2P_MAX_RANK   (0)


#define GNRC_RPL_P2P_OPT_RDO   (0x0A)

Function Documentation

◆ gnrc_rpl_p2p_rdo_build()

gnrc_pktsnip_t* gnrc_rpl_p2p_rdo_build ( gnrc_pktsnip_t pkt,
gnrc_rpl_p2p_ext_t p2p_ext 
[in,out]pktThe RDO will be added to the pkt
[in]p2p_extPointer to the P2P-RPL DODAG extension

◆ gnrc_rpl_p2p_rdo_parse()

void gnrc_rpl_p2p_rdo_parse ( gnrc_rpl_p2p_opt_rdo_t rdo,
gnrc_rpl_p2p_ext_t p2p_ext 
[in]rdoThe RDO to parse from.
[in]p2p_extPointer to the P2P-RPL DODAG extension

◆ gnrc_rpl_p2p_recv_DRO()

void gnrc_rpl_p2p_recv_DRO ( gnrc_pktsnip_t pkt,
ipv6_addr_t src 
[in]pktThe ICMPv6 packet to parse.
[in]srcThe source address of the IPv6 packet.

◆ gnrc_rpl_p2p_root_init()

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 
[in]instance_idId of the instance
[in]dodag_idId of the DODAG
[in]targetTarget of the P2P-RPL routes discovery
[in]gen_inst_idFlag indicating whether to generate a local isntance id. If true, instance_id will be ignored
Pointer to the new Instance, on success.
NULL, otherwise.

◆ gnrc_rpl_p2p_send_DRO()

void gnrc_rpl_p2p_send_DRO ( gnrc_pktsnip_t pkt,
gnrc_rpl_p2p_ext_t p2p_ext 
[in]pktThe ICMPv6 packet to send. Can be NULL.
[in]p2p_extPointer to the P2P-RPL DODAG extension