I know the answer to this question theoretically, but I want to know where to access the info in code level. So let's say in the example rpl-udp, when the client sends a message to the server, theoretically as we are using rpl to route the message will go through the client's parent, up to the DODAG tree until it reaches the server. What I want to do it to trace this app level packet as it goes up the tree, all the nodes that relay this packet, I want to know when they receive the packet and when they route it up to the tree.
Where can I find this info in the contiki-ng code? I assume it's not in the RPL header files, but I'm not sure.
Any help would be great. Thank you.
RPL takes care of route management. The actual packet forwarding is separated from routing protocols, this is a common design pattern in all operating systems.
In Contiki-NG the forwarding code is located in
os/net/ipv6/
. The main file istcpip.c
. The route data structures and related functions are defined inuip-ds6-route.c
anduip-ds6-route.h
.There is also an option for source routing in Contiki-NG, in which case the list of nexthops is directly stored in the packet's IP headers, and the normal IPv6 routing table is absent. The source route table (only present on the root node of the network) is defined in
uip-sr.c
.