To know about how to calculate the number of forwarding and receiving packets in RPL using contiki cooja.
Open the contiki/core/net/ip/tcpip.c File
id means current node id
recvcount[id] = recvcount[id] +1;
if (nexthop != 0) {
forwardcount[id] = forwardcount[id] + 1;
} else {
forwardcount[id] = forwardcount[id];
}
Now open the terminal in contiki
desktop and make the right
directories to run the cooja
simulator tools.
In terminal, go the this
directory --> cd “contiki/ tools/ cooja”
Give Command: ant run