Accessing the IP address list in contiki

0 votes

So, I have this UDP server and client connection. The stack is 802.15.4, TSCH, 6lowpan, IPv6. I think there's a function in contiki that lists the IP addresses of clients when associated with the server. 

What I would like to know is, which function should I use to access this list, save to this list and get stored IP's from this list.

Mar 4 in IoT (Internet of Things) by Upasana
• 8,430 points
32 views

1 answer to this question.

0 votes

You can access the list of clients by looking in the Neighbor Cache. 

Try something like this.

#include "uip-ds6-nbr.h"
#include "nbr-table.h"

uip_ds6_nbr_t *nbr = nbr_table_head(ds6_neighbors);
while(nbr != NULL) {
    // do something with the neighbor here
    // its IP address is nbr->ipaddr
    // ...
    nbr = nbr_table_next(ds6_neighbors, nbr);
}
answered Mar 4 by Shubham
• 13,190 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Finding the Unicast, DNS and Gateway Address in UWP

Try the PInvoke api methods from Iphlpapi.dll. ...READ MORE

answered Aug 20, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
44 views
0 votes
1 answer
0 votes
1 answer

How to get Unicast, Dns and Gateway Address in UWP?

Try this code Snippet I found here: https://social.msdn.microsoft.com/Forums/en-US/27a8b7a8-8071-4bc1-bbd4-e7c1fc2bd8d7/windows-10-iot-core-how-do-you-create-a-tcp-server-and-client?forum=WindowsIoT ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by anonymous2
• 4,260 points
114 views
0 votes
1 answer
0 votes
1 answer

Contiki-OS : CoAP protocol and CoRE link implementation

I don't think there's a standard way to ...READ MORE

answered Jan 21 in IoT (Internet of Things) by Upasana
• 8,430 points
86 views
0 votes
1 answer

To Disable Neighbour Solicitation

Set the variable UIP_CONF_ND6_SEND_NA to 0. READ MORE

answered Mar 14 in IoT (Internet of Things) by Shubham
• 13,190 points
29 views
0 votes
1 answer

Cooja: Can't add multiple motes in simulation script

I can't really find an immediate problem ...READ MORE

answered Apr 29 in IoT (Internet of Things) by Upasana
• 8,430 points
24 views
0 votes
1 answer

How to detect presence of a device in a WiFi network?

Finding the mac-address would probably work. Basically, ...READ MORE

answered Nov 16, 2018 in IoT (Internet of Things) by Shubham
• 13,190 points
55 views
0 votes
1 answer

Detecting when a sensor is not sending data to Orion CB in FiWARE

Orion in itself has no such mechanism ...READ MORE

answered Nov 21, 2018 in IoT (Internet of Things) by Shubham
• 13,190 points
25 views