How to get participants IPs

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

Hi,
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?

Thanks!

Gerardo Pardo's picture
Offline
Last seen: 3 weeks 1 day ago
Joined: 06/02/2010
Posts: 592

Hi,

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.

Gerardo