In RPL requires to maintain a parent set and a candidate neighbour set.It storing information about those nodes that contribute to the routing topology.This helps the node to determine the neighbors in to select the best upon to completion of Neighbor Discovery.
Open a file in a location
to modify.
Contiki/core/net/
ipv6/uip-ds6-nbr.c
Here the neighbour
related functions handling.
Code:
int uip_ds6_nbr_num(void)
{
uip_ds6_nbr_t *nbr;
int num;
num = 0;
for(nbr = nbr_table_head
(ds6_neighbors);
nbr != NULL;
nbr = nbr_table_next
(ds6_neighbors, nbr)) {
num++;
}
return num;
Open cooja network simulator.
In terminal, go to the
directory cd “contiki/
tools/cooja/”
Give Command : ant run
In simulation control panel
click start to run the simulation.