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, 2019 in IoT (Internet of Things) by Upasana
• 8,620 points
1,440 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, 2019 by Shubham
• 13,490 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,130 points
931 views
0 votes
1 answer

Setting the IP Address of a device using Windows Universal App

This can be achieved directly with Windows ...READ MORE

answered Feb 12, 2019 in IoT (Internet of Things) by Upasana
• 8,620 points
700 views
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,240 points
1,244 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 ...READ MORE

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

To Disable Neighbour Solicitation

Set the variable UIP_CONF_ND6_SEND_NA to 0. READ MORE

answered Mar 14, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
755 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, 2019 in IoT (Internet of Things) by Upasana
• 8,620 points
1,750 views
0 votes
1 answer

Accessing the IP address list in contiki

Try something like this. #include "uip-ds6-nbr.h" #include "nbr-table.h" uip_ds6_nbr_t *nbr ...READ MORE

answered Jul 26, 2019 in IoT (Internet of Things) by Upasana
• 8,620 points
1,168 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,490 points
3,372 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 22, 2018 in IoT (Internet of Things) by Shubham
• 13,490 points
783 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP