structs.h

RPL data structs.

Header file, which defines all structs used by RPL.

GNRC_RPL_OPT_DODAG_CONF_LEN
1
(14)
GNRC_RPL_OPT_PREFIX_INFO_LEN
1
(30)
GNRC_RPL_OPT_TARGET_LEN
1
(18)
GNRC_RPL_OPT_TRANSIT_INFO_LEN
1
(4)
GNRC_RPL_DAO_D_BIT
1
(1 << 6)
GNRC_RPL_DAO_K_BIT
1
(1 << 7)
GNRC_RPL_DAO_ACK_D_BIT
1
(1 << 7)
GNRC_RPL_REQ_DIO_OPT_DODAG_CONF_SHIFT
1
(0)
GNRC_RPL_REQ_DIO_OPT_DODAG_CONF
1
(1 << GNRC_RPL_REQ_DIO_OPT_DODAG_CONF_SHIFT)
GNRC_RPL_REQ_DIO_OPT_PREFIX_INFO_SHIFT
1
(1)
GNRC_RPL_REQ_DIO_OPT_PREFIX_INFO
1
(1 << GNRC_RPL_REQ_DIO_OPT_PREFIX_INFO_SHIFT)
struct gnrc_rpl_dodag gnrc_rpl_dodag_t

DODAG representation.

struct gnrc_rpl_parent gnrc_rpl_parent_t

Parent representation.

struct gnrc_rpl_instance gnrc_rpl_instance_t

Instance representation.

struct gnrc_rpl_opt_t

RPL-Option Generic Format.

uint8_t type

Option Type.

uint8_t length

Option Length, does not include the first two byte.

struct gnrc_rpl_dio_t

DIO Base Object.

uint8_t instance_id

id of the instance

uint8_t version_number

version number of the DODAG

byteorder.h::network_uint16_t rank

rank of the parent emitting the DIO

uint8_t g_mop_prf

grounded, MOP, preferred flags

uint8_t dtsn

Destination Advertisement Trigger Sequence Number.

uint8_t flags

unused

uint8_t reserved

reserved

ipv6_addr_t dodag_id

id of the dodag

struct gnrc_rpl_opt_dodag_conf_t

DODAG Configuration Option.

uint8_t type

Option Type: 0x04.

uint8_t length

length of option, not including first two bytes

uint8_t flags_a_pcs

flags

uint8_t dio_int_doubl

trickle Imax parameter

uint8_t dio_int_min

trickle Imin parameter

uint8_t dio_redun

trickle k parameter

byteorder.h::network_uint16_t max_rank_inc

allowable increase in rank

byteorder.h::network_uint16_t min_hop_rank_inc

DAGRank(rank) = floor(rank/MinHopRankIncrease)

byteorder.h::network_uint16_t ocp

Objective Code Point.

uint8_t reserved

reserved

uint8_t default_lifetime

lifetime of RPL routes (lifetime * lifetime_unit)

byteorder.h::network_uint16_t lifetime_unit

unit in seconds

struct gnrc_rpl_dis_t

DODAG Information Solicitation.

uint8_t flags

unused

uint8_t reserved

reserved

struct gnrc_rpl_opt_dis_solicited_t

DIS Solicited Information option.

uint8_t type

Option Type: 0x07.

uint8_t length

Option Length: 19 bytes.

uint8_t instance_id

id of the instance

uint8_t VID_flags

V|I|D predicate options followed by 5 bit unused flags.

ipv6_addr_t dodag_id

DODAG ID predicate.

uint8_t version_number

version number of the DODAG

struct gnrc_rpl_dao_t

Destination Advertisement Object.

uint8_t instance_id

id of the instance

uint8_t k_d_flags

K and D flags.

uint8_t reserved

reserved

uint8_t dao_sequence

sequence of the DAO, needs to be used for DAO-ACK

struct gnrc_rpl_dao_ack_t

Destination Advertisement Object Acknowledgement.

uint8_t instance_id

id of the instance

uint8_t d_reserved

if set, indicates that the DODAG id should be included

uint8_t dao_sequence

sequence must be equal to the sequence from the DAO object

uint8_t status

indicates completion

struct gnrc_rpl_opt_target_t

Target Option.

uint8_t type

option type

uint8_t length

option length without the first two bytes

uint8_t flags

unused

uint8_t prefix_length

number of valid leading bits in the IPv6 prefix

ipv6_addr_t target

IPv6 prefix, address or multicast group.

struct gnrc_rpl_opt_transit_t

Transit Option.

uint8_t type

option type

uint8_t length

option length without the first two bytes

uint8_t e_flags

external flag indicates external routes

uint8_t path_control

limits the number of DAO parents

uint8_t path_sequence

increased value for route updates

uint8_t path_lifetime

lifetime of routes

struct gnrc_rpl_opt_prefix_info_t

Prefix Information Option.

uint8_t type

option type

uint8_t length

option length without the first two bytes

uint8_t prefix_len

prefix length

uint8_t LAR_flags

flags and resereved

byteorder.h::network_uint32_t valid_lifetime

valid lifetime

byteorder.h::network_uint32_t pref_lifetime

preferred lifetime

uint32_t reserved

reserved

ipv6_addr_t prefix

prefix used for Stateless Address Autoconfiguration

struct gnrc_rpl_of_t

Objective function representation.

uint16_t ocp

objective code point

uint16_t(* calc_rank()

calculate the rank

structs.h::gnrc_rpl_parent_t *(* which_parent()

retrieve the better parent

int(* parent_cmp()

Compare two structs.h::gnrc_rpl_parent_t.

Compares two parents based on the rank calculated by the objective function. This function is used to determine the parent list order. The parents are ordered from the preferred parent to the least preferred parent.

Parameters

parent1:First parent to compare.
parent2:Second parent to compare.

Return values

  • Zero if the parents are of equal preference.
  • Positive, if the second parent is preferred.
  • Negative, if the first parent is preferred.
structs.h::gnrc_rpl_dodag_t *(* which_dodag()

compare for dodags

void(* reset()

resets the OF

void(* parent_state_callback()

retrieves the state of a parent

void(* init()

OF specific init function.

void(* process_dio()

DIO processing callback (acc.

to OF0 spec, chpt 5)

struct gnrc_rpl_internal_opt_t

internal unpacked struct type for option insertion

uint8_t type

Option Type.

uint8_t length

Option Length, does not include the first two byte.

struct gnrc_rpl_internal_opt_dis_solicited_t

internal unpacked struct type for DIS solicited option insertion

uint8_t type

Option Type: 0x07.

uint8_t length

Option Length: 19 bytes.

uint8_t instance_id

id of the instance

uint8_t VID_flags

V|I|D predicate options followed by 5 bit unused flags.

ipv6_addr_t dodag_id

DODAG ID predicate.

uint8_t version_number

version number of the DODAG