RPL DIO Message Contents

The DIO message is the primary mechanism for RPL nodes to discover the DODAG, select their parents, and maintain the routing topology. Nodes periodically transmit DIO messages to advertise their presence and routing information, allowing other nodes to join the DODAG and maintain routing paths.

struct rpl_dio {
uip_ipaddr_t dag_id;
rpl_ocp_t ocp;
rpl_rank_t rank;
uint8_t grounded;
uint8_t mop;
uint8_t preference;
uint8_t version;
uint8_t instance_id;
uint8_t dtsn;
uint8_t dag_intdoubl;
uint8_t dag_intmin;
uint8_t dag_redund;
uint8_t default_lifetime;
uint16_t lifetime_unit;
rpl_rank_t dag_max_rankinc;
rpl_rank_t dag_min_hoprankinc;
rpl_prefix_t destination_prefix;
rpl_prefix_t prefix_info;
struct rpl_metric_container mc;
};
typedef struct rpl_dio rpl_dio_t;

The provided code defines a structure called rpl_dio that represents the RPL (Routing Protocol for Low-Power and Lossy Networks) DODAG Information Object (DIO) message. The DIO message is a crucial component of the RPL protocol and is used for network discovery, parent selection, and DODAG maintenance.

Here’s a breakdown of the fields within the rpl_dio structure:

  1. dag_id: The identifier of the DODAG (Destination-Oriented Directed Acyclic Graph) to which the node belongs.
  2. ocp: The Objective Code Point, which identifies the Objective Function used by the RPL instance.
  3. rank: The rank of the node within the DODAG, indicating its position in the routing hierarchy.
  4. grounded: A flag indicating whether the DODAG is grounded (i.e., has a border router connected to a larger infrastructure).
  5. mop: The Mode of Operation, which specifies the method used for forwarding data packets.
  6. preference: The preference value of the node, which can be used to influence the DODAG construction.
  7. version: The version number of the DODAG.
  8. instance_id: The identifier of the RPL instance.
  9. dtsn: The Destination Advertisement Trigger Sequence Number, used to trigger DODAG updates.
  10. dag_intdoubl: The DODAG Interval Doubling, which specifies the interval between successive DIO transmissions.
  11. dag_intmin: The minimum interval between successive DIO transmissions.
  12. dag_redund: The DODAG Redundancy Constant, which controls the redundancy of DIO transmissions.
  13. default_lifetime: The default lifetime of the DODAG, used for setting the lifetime of routing table entries.
  14. lifetime_unit: The unit of time for the default lifetime.
  15. dag_max_rankinc: The maximum rank increase allowed when calculating a new rank.
  16. dag_min_hoprankinc: The minimum increment in rank when going up one hop.
  17. destination_prefix: The destination prefix information.
  18. prefix_info: The prefix information option.
  19. mc: The Metric Container, which holds information about the path metrics.