#5, First Floor, 4th Street , Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 pro@slogix.in

Office Address

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

Social List

How to get RPL child lists in cooja simulator?
Description

RPL is working rank based transfer, that is node’s individual position relative to other nodes with respect to DODAG root.Nodes who transferring control data packets called parent and receiver is child.(parent & child is based shortest range transfer).In RPL, the immediate parent is selected by a child (Child node) determined by the quality of transmission channel and Rank.

Source Code

   Step 1: Open a source code file
in a following location.

   Contiki/core/net/ip/tcpip.c

   Function tcpip_ipv6_output
handling, add below code.

Code:
int i=0;
if (num1 != 0) {
for (i = 1; i <= num1; i++) { if (neid[i] == src_id->u8
[sizeof(src_id->u8) – 1]) {
if (mark1[src_id->u8
[sizeof(src_id->u8) – 1]] == 0) {
nch = nch + 1;
chn[nch] = neid[i];
mark1[src_id->u8
[sizeof(src_id->u8) – 1]] = 1;
printf(“ChildN %d ChildC %d Cid
%d\n”,neid[i],nch,node_id);
}
}
}
}

Step 2: Run in cooja

Output