Amazing technological breakthrough possible @S-Logix

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • +91- 81240 01111

Social List

How to calculate the number of forwarding and receiving packet counts in RPL using cooja simulator?

calculate the number of forwarding and receiving counts in RPL using cooja simulator

RPL Based packet count for the number of forwarding and receiving peackets using contiki cooja simulator


   It describes how RPL protocol selects the routes and optimizes them, which in ContikiRPL is based on hop count and ETX. The child nodes receiving this message calculate their rank accordingly and cost of reaching the parent node and forward this message until all the nodes present in the network join the DAG.

Source Code

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

Step 2
Run simulation, Open (contiki/examples/ ipv6/rpl-udp/) that ( files you simulated.
forwarding and receiving data in the network
collect the data in network