one good ether interface and one bad one, DDS fails

2 posts / 0 new
Last post
Offline
Last seen: 6 years 2 days ago
Joined: 05/08/2015
Posts: 1
one good ether interface and one bad one, DDS fails

I appologise if this is all obvious, I am a complete DDS newbie.

I am running DDS under QNX on an ARM cpu.

I have multiple Ethernet interfaces, and sometimes not all of these are properly configured.
In this case DDS fails to start with the error:

Creating domain participant on domain 101
[D0101|ENABLE]NDDS_Transport_UDPv4_SocketFactory_create_receive_socket:setsockopt(ADD_MEMBERSHIP) error 0XF9
multicast_address_in: 0000:0000:0000:0000:0000:0000:EFFF:0001
interface: 0000:0000:0000:0000:0000:0000:0000:0000
[D0101|ENABLE]DDS_DomainParticipant_enableI:Automatic participant index failed to initialize.
PLEASE VERIFY CONSISTENT TRANSPORT / DISCOVERY CONFIGURATION.
DDSDomainParticipant_impl::createI:ERROR: Failed to auto-enable entity
DomainParticipantFactory_impl::create_participant():!create failure creating participant
Failed to create domain participant.

The sick interface in question is UP and RUNNING but has no cable plugged in,
DHCP has failed and it has the IP address of 0.0.0.0.

I don't want to exclude the interface via QOS settings, I want to use it somtimes (its a debug interface).

I can imagine several workarounds for this, one of which is to modify the code in
.../ndds510-src/osapi.1.0/srcc/process/host.c to use QNX specific checks to ensure the
NIC has a cable plugged in (under a QNX #ifdef), and ignore the interface otherwise.

Alternatively I could modify it to ignore interfaces which have invalid IP addresses.

Finally I could add a background thread which polls the interface and takes it DOWN if
no cable is attached so the existing DDS code will work (ugh).

Anyone any opinions on what is the "best" or "correct" way to aproach this?

Is it (should it be) DDS's responsibilty to validate the ethernet interfaces it uses?

Thanks for any help,

-Steve

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

Hi Steve,

I think the simplest solution may be to instruct DDS via QoS to ignore the interface with address 0.0.0.0

I will take an action item to make our core more robust to "invalid" interfaces. Unfortunately different platforms work quite differently with regards to disconnected interfaces so sometimes it becomes tricky but we shoud do a better job with the straightforward cases, such as the one you describe.

Gerardo

Gerardo