How to get the route information in RPL using cooja simulator?


In RPL follows DODAG routing techniques.The route information maintained and stored in a DODAG table by nodes in network.

   The definition is declared in
at location contiki/core/net/ip/

   Declared and maintains routing
information table.

   Route and Nesthop information Code


if(uip_ds6_is_addr_onlink(destination addr)){

nexthop = destination;

} else {

uip_ds6_route_t *route;

// Check if we have a route to the destination address.

route = uip_ds6_route_lookup(destination address);

// No route was found – we send to the default route instead.

if(route == NULL) {

///no route found, using default route

nexthop = uip_ds6_defrt_choose();



   Run the simulation.

Leave Comment

Your email address will not be published. Required fields are marked *

clear formSubmit