10.7. Transport descriptors
This section defines the XML elements available for configuring the transport layer parameters in Fast DDS.
These elements are defined within the XML tag <transports_descriptors>
.
The <transport_descriptors>
can contain one or more <transport_descriptor>
XML elements.
Each <transport_descriptor>
element defines a configuration for a specific type of transport protocol.
Each of these <transport_descriptor>
elements are uniquely identified by a transport ID with the <transport_id>
XML tag.
Once the user defines a valid <transports_descriptor>
, i.e. defines the transport layer parameters, these
can be loaded
into the XML profile of the DomainParticipant using the <transport_id>
XML tag.
An example of how to load the <transport_descriptor>
into the XML profile of the DomainParticipant is found in
DomainParticipant profiles.
The following table lists all the available XML elements that can be defined within the <transport_descriptor>
element for the configuration of the transport layer.
A more detailed explanation of each of these elements can be found in Transport Layer.
Name |
Description |
Values |
Default |
---|---|---|---|
|
Unique name to identify each transport descriptor. |
|
|
|
Type of the transport descriptor. |
UDPv4 |
UDPv4 |
UDPv6 |
|||
TCPv4 |
|||
TCPv6 |
|||
SHM |
|||
|
Size in bytes of the send socket buffer. |
|
0 |
|
Size in bytes of the reception socket |
|
0 |
|
The maximum size in bytes of the transport’s |
|
65500 |
|
Number of channels opened with each initial |
|
4 |
|
Transport’s Netmask filtering |
OFF |
AUTO |
AUTO |
|||
ON |
|||
|
Allows defining an Interfaces configuration. |
||
|
Allows defining an interfaces Whitelist. |
||
|
Time To Live (UDP only). See |
|
1 |
|
Whether to set the non-blocking send mode on |
|
|
|
Port used for output bound. |
|
0 |
|
Public WAN address when using TCPv4 |
IPv4 formatted |
|
|
Frequency in milliseconds for sending
RTCP |
|
50000 |
|
Time in milliseconds since the last |
|
10000 |
|
The maximum number of logical ports to try |
|
100 |
|
The maximum number of logical ports per |
|
20 |
|
Increment between logical ports to try during |
|
2 |
|
Local port to work as TCP acceptor for input |
|
|
|
Allows to define TLS related parameters and |
||
|
Calculates the Cyclic Redundancy Code (CRC) |
|
|
|
Check the CRC for error control (TCP |
|
|
|
Socket option for disabling the Nagle |
|
|
|
Time to wait for logical port negotiation (in ms)
|
|
|
|
Size (in bytes) of the shared-memory segment. |
|
262144 |
|
Capacity (in number of messages) available to |
|
512 |
|
Maximum time-out (in milliseconds) used when |
|
1000 |
|
Complete path (including file) where RTPS |
|
Empty |
The following XML code shows an example of transport protocol configuration using all configurable parameters. More examples of transports descriptors can be found in the Transport Layer section.
<?xml version="1.0" encoding="UTF-8" ?>
<dds xmlns="http://www.eprosima.com">
<profiles>
<transport_descriptors>
<transport_descriptor>
<transport_id>my_udpv4_transport</transport_id>
<type>UDPv4</type>
<sendBufferSize>8192</sendBufferSize>
<receiveBufferSize>8192</receiveBufferSize>
<maxMessageSize>16384</maxMessageSize>
<maxInitialPeersRange>100</maxInitialPeersRange>
<netmask_filter>AUTO</netmask_filter>
<interfaces>
<allowlist>
<interface name="wlp59s0" netmask_filter="ON"/>
</allowlist>
<blocklist>
<interface name="127.0.0.1"/>
<interface name="docker0"/>
</blocklist>
</interfaces>
<interfaceWhiteList>
<address>192.168.1.41</address>
<interface>lo</interface>
</interfaceWhiteList>
<TTL>250</TTL>
<non_blocking_send>false</non_blocking_send>
<output_port>5101</output_port>
<wan_addr>80.80.55.44</wan_addr>
<keep_alive_frequency_ms>5000</keep_alive_frequency_ms>
<keep_alive_timeout_ms>25000</keep_alive_timeout_ms>
<max_logical_port>9000</max_logical_port>
<logical_port_range>100</logical_port_range>
<logical_port_increment>2</logical_port_increment>
<listening_ports>
<port>5100</port>
<port>5200</port>
</listening_ports>
<tls><!-- TLS Section --></tls>
<calculate_crc>false</calculate_crc>
<check_crc>false</check_crc>
<enable_tcp_nodelay>false</enable_tcp_nodelay>
<segment_size>262144</segment_size>
<port_queue_capacity>512</port_queue_capacity>
<healthy_check_timeout_ms>1000</healthy_check_timeout_ms>
<rtps_dump_file>rtsp_messages.log</rtps_dump_file>
</transport_descriptor>
</transport_descriptors>
</profiles>
</dds>
Note
The Real-time Transport Control Protocol (RTCP) is the control protocol for communications with RTPS over TCP/IP connections.
10.7.1. TLS Configuration
Fast DDS provides mechanisms to configure the Transport Layer Security (TLS) protocol parameters
through the <tls>
XML element of its <transport_descriptor>
.
Please, refer to TLS over TCP for a detailed explanation of the entire TLS configuration in Fast DDS.
More information on how to set up secure communication in Fast DDS can be found in the Security section.
Warning
For the full understanding of this section, a basic knowledge of network security in terms of SSL/TLS, Certificate Authority (CA), Public Key Infrastructure (PKI), and Diffie-Hellman is required; encryption protocols are not explained in detail.
The full list of available XML elements that can be defined within the <tls>
element to configure the TLS
protocol are listed in the following table:
Name |
Description |
Values |
Default |
---|---|---|---|
|
Password of the
|
|
|
|
Path to the private key certificate file. |
|
|
|
Path to the private key RSA certificate file. |
|
|
|
Path to the public certificate chain file. |
|
|
|
Path to the Diffie-Hellman parameters file |
|
|
|
Path to the Certification Authority (CA) file. |
|
|
|
Establishes the verification
mode mask. Several |
|
|
|
|||
|
|||
|
|||
|
Establishes the SSL Context
options mask. Several |
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Paths where the system will
look for verification |
|
|
|
Maximum allowed depth to
verify intermediate |
|
|
|
Specifies whether the system
will look on the |
|
|
|
Role that the transport will
take on handshaking. |
|
|
|
|||
|
|||
|
server name or host name required in case Server Name Indication (SNI) is used. |
|
An example of TLS protocol parameter configuration is shown below.
<?xml version="1.0" encoding="UTF-8" ?>
<dds xmlns="http://www.eprosima.com">
<profiles>
<transport_descriptors>
<transport_descriptor>
<transport_id>Test</transport_id>
<type>TCPv4</type>
<tls>
<password>Password</password>
<private_key_file>Key_file.pem</private_key_file>
<rsa_private_key_file>RSA_file.pem</rsa_private_key_file>
<cert_chain_file>Chain.pem</cert_chain_file>
<tmp_dh_file>DH.pem</tmp_dh_file>
<verify_file>verify.pem</verify_file>
<verify_mode>
<verify>VERIFY_PEER</verify>
</verify_mode>
<options>
<option>NO_TLSV1</option>
<option>NO_TLSV1_1</option>
</options>
<verify_paths>
<verify_path>Path1</verify_path>
<verify_path>Path2</verify_path>
<verify_path>Path3</verify_path>
</verify_paths>
<verify_depth>55</verify_depth>
<default_verify_path>true</default_verify_path>
<handshake_role>SERVER</handshake_role>
<server_name>my_server.com</server_name>
</tls>
</transport_descriptor>
<!-->
</profiles>