How to get participants IPs

2 posts / 0 new
Last post
Last seen: 9 years 2 months ago
Joined: 01/07/2013
Posts: 15
How to get participants IPs

I need to know IP addresses of hosts of participants subscribing a specific Topic. Is there a built-in topic that contains IP addresses of hosts? How to find this information from the middleware?


Gerardo Pardo's picture
Last seen: 1 month 1 week ago
Joined: 06/02/2010
Posts: 598


Yes, IP addresses of hosts of participants are propagated via the Discovery builtin-topics. There are builtin DDS Readers and Writers that allow you to access it. They are in the ParticipantBuiltinTopicData  in the fields metatraffic_unicast_locators and default_unicast_locators. Unfortunately the latest HTML documentation had a bug and is not showing some of the attributes but you can see then in the C/C++ header or Java interface files.

You see an example on how to access the information of the builtin topics in the HOWTO titled Detect the presence of DomainParticipants, DataWriters and DataReaders in the DDS Domain.