Commit graph

9 commits

Author SHA1 Message Date
Erik Boasson
d1ed8df9f3 Create a separate socket for transmitting data
This is a workaround for interoperability issues, ultimately driven by a
Windows quirk that makes multicast delivery within a machine utterly
unreliable if the transmitting socket is bound to 0.0.0.0 (despite all
sockets having multicast interfaces set correctly) when there are also
sockets transmitting to the same multicast group that have been bound to
non-0.0.0.0.  (Note: there may be other factors at play, but this is
what it looks like after experimentation.)

At least Fast-RTPS in some versions binds the socket it uses for
transmitting multicasts to non-0.0.0.0, so interoperability with
Fast-RTPS on Windows requires us to bind the socket we use for
transmitting multicasts (which was the same as the one we use for
receiving unicast data) also to non-0.0.0.0 or our multicasts get
dropped often.

This would work fine if other implementations honoured the set of
advertised addresses.  However, at least Fast-RTPS and Connext (in some
versions) fail to do this and happily substitute 127.0.0.1 for the
advertised IP address.  If we bind to, e.g., 192.168.1.1, then suddenly
those packets won't arrive anymore, breaking interoperability.

The only work around is to use a separate socket for sending.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-03-09 20:49:47 +01:00
Dennis Potman
754eb4090e Fixed issue that Cyclone does not receive multicast data on Windows when
the destination cache of the network stack is in a certain state. The issue
is resolved by binding unicast sockets (incoming unicast and all outgoing
traffic) to the address of the interface instead of inaddr_any (0.0.0.0).
Set the new configuration option internal/BindUnicastToInterfaceAddr to
false to get the old behavior.

Co-authored-by: Erik Boasson <eb@ilities.com>

Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
2020-02-20 16:47:06 +01:00
ChenYing Kuo
af3604dea7
Fix some typos. (#399)
* Fix some typos.

Signed-off-by: ChenYing Kuo <evshary@gmail.com>

* Also update q_config.c, cyclonedds.rnc, cyclonedds.xsd for correct
build.

Signed-off-by: ChenYing Kuo <evshary@gmail.com>

* Remove cdds.md.

Signed-off-by: ChenYing Kuo <evshary@gmail.com>
2020-02-19 12:33:39 +01:00
Erik Boasson
bb76798492 Default to a single receive thread on Windows
This works around a termination issue on Windows caused by the process
sometimes being unable to send a packet to itself to wake up a thread
stuck in a blocking read on a socket.

Signed-off-by: Erik Boasson <eb@ilities.com>
2020-01-23 10:20:47 +01:00
Erik Boasson
08d9c296f1 Add DOMAIN_ID, DOMAIN_TAG to config, discovery
This commits adds support for the DOMAIN_ID and DOMAIN_TAG parameters in
participant discovery, allowing multiple domains to share a port
number (a feature introduced in DDSI 2.3).  The tag can be configured
via Discovery/Tag.

This commit also introduces a setting Discovery/ExternalDomainId that
makes it possible to override the domain id on the network, both in what
is advertised in the DOMAIN_ID discovery parameter and in the
calculation of port numbers.  This way a single process can create two
independent domains that talk via the network, which is on occassion
useful in writing tests.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-11-20 12:47:22 +01:00
Erik Boasson
3da21315f2 Improve errors for invalid port numbers (#303)
Signed-off-by: Erik Boasson <eb@ilities.com>
2019-11-18 14:20:55 +01:00
Erik Boasson
c642f5676a Namespace generated XSD and add missing attributes
This adds two things to the XSD (and the RNC file and options.md):
* attributes previously missing because of a bug in the conversion
  script
* a name space (https://cdds.io/config)

Adding the name spacing requires a different set of attributes at the
top of a configuration file, which in turn need to be ignored by the
configuration parser, and which should be reflected in the configuration
example in the README.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-11-06 20:39:20 +01:00
Erik Boasson
a25b69be7d Exclude network channels from documentation
They are not supported yet.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-10-10 17:44:39 +02:00
Erik Boasson
d429045255 Add option documentation and add XSD
The ``docs/makernc.pl`` perl script can extract the options from the
source code for the configuration processing and turn these into a
GitHub MarkDown document and a RELAX NG Compact form (RNC) description
of the options.  Standard conversion tools can be used to turn the RNC
file into an XSD.

Although they are generated by a mechanical transformation, it is not
(yet) part of the build process, in no small part because there no
proper generation and publishing system has yet been set up for the
documentation.

Now that there is an XSD and a Markdown file for discovering the
options, there is no need to retain the configuration editing tool.  Any
decent editor will do a better job.

Signed-off-by: Erik Boasson <eb@ilities.com>
2019-10-10 17:44:39 +02:00