To attach the additional variable in RPL data packet using contiki cooja simulator.
Step 1: open a file at location: contiki/examples/ipv6/rpl-udp/
udp-client.c file sends the data packets in the function
static void send_packet(void *ptr) {
uip_udp_packet_sendto(client_conn,data_buf,strlen(data_buf),&server_ipaddr, UIP_HTONS(UDP_SERVER_PORT));
}
strcat(data_buf,buf);
strcat(data_buf,bb);
strcat(data_buf,privalue);
strcat(data_buf,bb);
Step 2: Run the simulation
Step 3: Client side: Attach the variable in data packet