RTI Connext Traditional C++ API  Version 6.1.1
NDDS_Transport_UDPv4_Property_t Struct Reference

Configurable IPv4/UDP Transport-Plugin properties. More...

Public Attributes

struct NDDS_Transport_Property_t parent
 Generic properties of all transport plugins. More...
 
RTI_INT32 send_socket_buffer_size
 Size in bytes of the send buffer of a socket used for sending. More...
 
RTI_INT32 recv_socket_buffer_size
 Size in bytes of the receive buffer of a socket used for receiving. More...
 
RTI_INT32 unicast_enabled
 Allows the transport plugin to use unicast for sending and receiving. More...
 
RTI_INT32 multicast_enabled
 Allows the transport plugin to use multicast for sending and receiving. More...
 
RTI_INT32 multicast_ttl
 Value for the time-to-live parameter for all multicast sends using this plugin. More...
 
RTI_INT32 multicast_loopback_disabled
 Prevents the transport plugin from putting multicast packets onto the loopback interface. More...
 
RTI_INT32 ignore_loopback_interface
 Prevents the transport plugin from using the IP loopback interface. More...
 
RTI_INT32 ignore_nonup_interfaces
 [DEPRECATED] Prevents the transport plugin from using a network interface that is not reported as UP by the operating system. More...
 
RTI_INT32 ignore_nonrunning_interfaces
 Prevents the transport plugin from using a network interface that is not reported as RUNNING by the operating system. More...
 
RTI_INT32 no_zero_copy
 [DEPRECATED] Prevents the transport plugin from doing a zero copy. More...
 
RTI_INT32 send_blocking
 Control blocking behavior of send sockets. CHANGING THIS FROM THE DEFAULT CAN CAUSE SIGNIFICANT PERFORMANCE PROBLEMS. More...
 
RTI_INT32 use_checksum
 Configures whether to send UDP checksum. More...
 
RTI_UINT32 transport_priority_mask
 Set mask for use of transport priority field. More...
 
RTI_INT32 transport_priority_mapping_low
 Set low value of output range to IPv4 TOS. More...
 
RTI_INT32 transport_priority_mapping_high
 Set high value of output range to IPv4 TOS. More...
 
RTI_INT32 send_ping
 Configures whether to send PING messages. More...
 
RTI_INT32 force_interface_poll_detection
 Forces the interface tracker to use a polling mechanism to detect changes on the UDPv4 interfaces. More...
 
RTI_UINT32 interface_poll_period
 Specifies the period in milliseconds to query for changes in the state of all the interfaces. More...
 
RTI_INT32 reuse_multicast_receive_resource
 Controls whether or not to reuse multicast receive resources. More...
 
RTI_INT32 protocol_overhead_max
 Maximum size in bytes of protocol overhead, including headers. More...
 
RTI_INT32 disable_interface_tracking
 Disables detection of network interface changes. More...
 
RTI_UINT32 join_multicast_group_timeout
 [Windows only] Defines how much time (milliseconds) to wait to join a multicast group address when a new interface is detected. More...
 
char * public_address
 Public IP address associated with the transport instantiation. More...
 

Detailed Description

Configurable IPv4/UDP Transport-Plugin properties.

You can modify the properties in this structure to configure the plugin. However, you must set the properties before the plugin is instantiated.

See also
NDDSTransportSupport::set_builtin_transport_property()
NDDS_Transport_UDPv4_new

Member Data Documentation

◆ parent

struct NDDS_Transport_Property_t NDDS_Transport_UDPv4_Property_t::parent

Generic properties of all transport plugins.

◆ send_socket_buffer_size

RTI_INT32 NDDS_Transport_UDPv4_Property_t::send_socket_buffer_size

Size in bytes of the send buffer of a socket used for sending.

On most operating systems, setsockopt() will be called to set the SENDBUF to the value of this parameter.

This value must be greater than or equal to NDDS_Transport_Property_t::message_size_max. The maximum value is operating system-dependent.

By default, it will be set to NDDS_TRANSPORT_UDPV4_SEND_SOCKET_BUFFER_SIZE_DEFAULT.

If you configure this parameter to be NDDS_TRANSPORT_UDPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT, then setsockopt() (or equivalent) will not be called to size the send buffer of the socket. The transport will use the OS default.

◆ recv_socket_buffer_size

RTI_INT32 NDDS_Transport_UDPv4_Property_t::recv_socket_buffer_size

Size in bytes of the receive buffer of a socket used for receiving.

On most operating systems, setsockopt() will be called to set the RECVBUF to the value of this parameter.

This value must be greater than or equal to NDDS_Transport_Property_t::message_size_max. The maximum value is operating system-dependent.

By default, it will be set to NDDS_TRANSPORT_UDPV4_RECV_SOCKET_BUFFER_SIZE_DEFAULT.

If you configure this parameter to be NDDS_TRANSPORT_UDPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT, then setsockopt() (or equivalent) will not be called to size the receive buffer of the socket. The transport will use the OS default.

◆ unicast_enabled

RTI_INT32 NDDS_Transport_UDPv4_Property_t::unicast_enabled

Allows the transport plugin to use unicast for sending and receiving.

This value turns unicast UDP on (if set to 1) or off (if set to 0) for this plugin. By default, it will be turned on (1). Also by default, the plugin will use all the allowed network interfaces that it finds up and running when the plugin is instantiated.

◆ multicast_enabled

RTI_INT32 NDDS_Transport_UDPv4_Property_t::multicast_enabled

Allows the transport plugin to use multicast for sending and receiving.

This value turns multicast UDP on (if set to 1) or off (if set to 0) for this plugin. By default, it will be turned on (1) for those platforms that support multicast. Also by default, the plugin will use all the network interfaces allowed for multicast that it finds up and running when the plugin is instantiated.

◆ multicast_ttl

RTI_INT32 NDDS_Transport_UDPv4_Property_t::multicast_ttl

Value for the time-to-live parameter for all multicast sends using this plugin.

This value is used to set the TTL of multicast packets sent by this transport plugin.

[default] 1

See also
NDDS_TRANSPORT_UDPV4_MULTICAST_TTL_DEFAULT

◆ multicast_loopback_disabled

RTI_INT32 NDDS_Transport_UDPv4_Property_t::multicast_loopback_disabled

Prevents the transport plugin from putting multicast packets onto the loopback interface.

If multicast loopback is disabled (this value is set to 1), then when sending multicast packets, RTI Connext will not put a copy of the packets on the loopback interface. This prevents applications on the same node (including itself) from receiving those packets.

This value is set to 0 by default, meaning multicast loopback is enabled.

Disabling multicast loopback (setting this value to 1) may result in minor performance gains when using multicast.

[NOTE: Windows CE systems do not support multicast loopback. This field is ignored for Windows CE targets.]

◆ ignore_loopback_interface

RTI_INT32 NDDS_Transport_UDPv4_Property_t::ignore_loopback_interface

Prevents the transport plugin from using the IP loopback interface.

Currently three values are allowed:

  • 0: Forces local traffic to be sent over loopback, even if a more efficient transport (such as shared memory) is installed (in which case traffic will be sent over both transports).
  • 1: Disables local traffic via this plugin. The IP loopback interface is not used, even if no NICs are discovered. This is useful when you want applications running on the same node to use a more efficient plugin (such as shared memory) instead of the IP loopback.
  • -1: Automatic. Lets RTI Connext decide between the above two choices.

The current "automatic" (-1) RTI Connext policy is as follows:

  • If a shared memory transport plugin is available for local traffic and there is a locator on the initial peers list that can use shared memory, the effective value is 1 (i.e., disable UPV4 local traffic).
  • Otherwise, the effective value is 0 (i.e., use UDPv4 for local traffic also).

[default] -1 Automatic RTI Connext policy based on availability of the shared memory transport.

◆ ignore_nonup_interfaces

RTI_INT32 NDDS_Transport_UDPv4_Property_t::ignore_nonup_interfaces

[DEPRECATED] Prevents the transport plugin from using a network interface that is not reported as UP by the operating system.

DEPRECATED: this property has no effect. Non-UP interfaces are ignored until they change their status to UP, unless NDDS_Transport_UDPv4_Property_t::disable_interface_tracking is set to 1, in which case interfaces are ignored even if they change their status at a later point.

The transport checks the flags reported by the operating system for each network interface upon initialization. An interface that is not reported as UP will not be used. This property allows you to configure the transport to start using even the interfaces that were not reported as UP.

Two values are allowed:

  • 0: Allow the use of interfaces that were not reported as UP.
  • 1: Do not use interfaces that were not reported as UP.

[default] 1

◆ ignore_nonrunning_interfaces

RTI_INT32 NDDS_Transport_UDPv4_Property_t::ignore_nonrunning_interfaces

Prevents the transport plugin from using a network interface that is not reported as RUNNING by the operating system.

The transport checks the flags reported by the operating system for each network interface upon initialization. An interface that is not reported as UP will not be used. This property allows the same check to be extended to the IFF_RUNNING flag implemented by some operating systems. The RUNNING flag is defined to mean that "all resources are allocated," and may be off if there is no link detected, e.g., the network cable is unplugged.

Two values are allowed:

  • 0: Do not check the RUNNING flag when enumerating interfaces, just make sure the interface is UP.
  • 1: Check the flag when enumerating interfaces, and ignore those that are not reported as RUNNING. This can be used on some operating systems to cause the transport to ignore interfaces that are enabled but not connected to the network.

[default] 1 (i.e., check RUNNING flag)

◆ no_zero_copy

RTI_INT32 NDDS_Transport_UDPv4_Property_t::no_zero_copy

[DEPRECATED] Prevents the transport plugin from doing a zero copy.

DEPRECATED: This property has no effect. By default, this plugin will use the zero copy on OSes that offer it. While this is good for performance, it may sometimes tax the OS resources in a manner that cannot be overcome by the application.

The best example is if the hardware/device driver lends the buffer to the application itself. If the application does not return the loaned buffers soon enough, the node may err or malfunction. In case you cannot reconfigure the H/W, device driver, or the OS to allow the zero copy feature to work for your application, you may have no choice but to turn off zero copy use.

By default this is set to 0, so RTI Connext will use the zero-copy API if offered by the OS.

◆ send_blocking

RTI_INT32 NDDS_Transport_UDPv4_Property_t::send_blocking

Control blocking behavior of send sockets. CHANGING THIS FROM THE DEFAULT CAN CAUSE SIGNIFICANT PERFORMANCE PROBLEMS.

Currently two values are defined:

  • NDDS_TRANSPORT_UDPV4_BLOCKING_ALWAYS: Sockets are blocking (default socket options for the operating system).
  • NDDS_TRANSPORT_UDPV4_BLOCKING_NEVER: Sockets are modified to make them non-blocking. THIS MAY CAUSE SIGNIFICANT PERFORMANCE PROBLEMS.

[default] NDDS_TRANSPORT_UDPV4_BLOCKING_ALWAYS

◆ use_checksum

RTI_INT32 NDDS_Transport_UDPv4_Property_t::use_checksum

Configures whether to send UDP checksum.

This property specifies whether the UDP checksum will be computed. On Windows and Linux, the UDP protocol will not set the checksum when use_checksum is set to 0. This is useful when RTPS protocol statistics related to corrupted messages need to be collected through the API DDSDomainParticipant::get_participant_protocol_status.

[default] 1 (enabled)

◆ transport_priority_mask

RTI_UINT32 NDDS_Transport_UDPv4_Property_t::transport_priority_mask

Set mask for use of transport priority field.

This is used in conjunction with NDDS_Transport_UDPv4_Property_t::transport_priority_mapping_low and NDDS_Transport_UDPv4_Property_t::transport_priority_mapping_high to define the mapping from the DDS transport priority (see TRANSPORT_PRIORITY) to the IPv4 TOS field. Defines a contiguous region of bits in the 32-bit transport priority value that is used to generate values for the IPv4 TOS field on an outgoing socket.

For example, the value 0x0000ff00 causes bits 9-16 (8 bits) to be used in the mapping. The value will be scaled from the mask range (0x0000 - 0xff00 in this case) to the range specified by low and high.

If the mask is set to zero, then the transport will not set IPv4 TOS for send sockets.

[default] 0.

◆ transport_priority_mapping_low

RTI_INT32 NDDS_Transport_UDPv4_Property_t::transport_priority_mapping_low

Set low value of output range to IPv4 TOS.

This is used in conjunction with NDDS_Transport_UDPv4_Property_t::transport_priority_mask and NDDS_Transport_UDPv4_Property_t::transport_priority_mapping_high to define the mapping from the DDS transport priority to the IPv4 TOS field. Defines the low value of the output range for scaling.

Note that IPv4 TOS is generally an 8-bit value.

[default] 0.

◆ transport_priority_mapping_high

RTI_INT32 NDDS_Transport_UDPv4_Property_t::transport_priority_mapping_high

Set high value of output range to IPv4 TOS.

This is used in conjunction with NDDS_Transport_UDPv4_Property_t::transport_priority_mask and NDDS_Transport_UDPv4_Property_t::transport_priority_mapping_low to define the mapping from the DDS transport priority to the IPv4 TOS field. Defines the high value of the output range for scaling.

Note that IPv4 TOS is generally an 8-bit value.

[default] 0xff.

◆ send_ping

RTI_INT32 NDDS_Transport_UDPv4_Property_t::send_ping

Configures whether to send PING messages.

This property specifies whether to send a PING message before commencing the discovery process. On certain operating systems or with certain switches the initial UDP packet, while configuring the ARP table, can unfortunately be dropped. To avoid dropping the initial RTPS discovery sample, a PING message is sent to preconfigure the ARP table in those environments.

[default] 1 (enabled)

◆ force_interface_poll_detection

RTI_INT32 NDDS_Transport_UDPv4_Property_t::force_interface_poll_detection

Forces the interface tracker to use a polling mechanism to detect changes on the UDPv4 interfaces.

When possible, the detection of an IP address change is done asynchronously using the APIs offered by the underlying OS. By setting this property on those OSes, the use of a polling mechanism to detect changes can be forced.

[default] 0 (disabled).

◆ interface_poll_period

RTI_UINT32 NDDS_Transport_UDPv4_Property_t::interface_poll_period

Specifies the period in milliseconds to query for changes in the state of all the interfaces.

When possible, the detection of an IP address change is done asynchronously using the APIs offered by the underlying OS. If there is no mechanism to do that, the detection will use a polling strategy where the polling period can be configured by setting this property.

[default] 500 milliseconds.

◆ reuse_multicast_receive_resource

RTI_INT32 NDDS_Transport_UDPv4_Property_t::reuse_multicast_receive_resource

Controls whether or not to reuse multicast receive resources.

Setting this to 0 (FALSE) prevents multicast crosstalk by uniquely configuring a port and creating a receive thread for each multicast group address.

[default] 1.

◆ protocol_overhead_max

RTI_INT32 NDDS_Transport_UDPv4_Property_t::protocol_overhead_max

Maximum size in bytes of protocol overhead, including headers.

This value is the maximum size, in bytes, of protocol-related overhead. Normally, the overhead accounts for UDP and IP headers. The default value is set to accommodate the most common UDP/IP header size.

Note that when NDDS_Transport_Property_t::message_size_max plus this overhead is larger than the UDPv4 maximum message size (65535 bytes), the middleware will automatically reduce the effective message_size_max, to 65535 minus this overhead.

[default] 28.

See also
NDDS_Transport_Property_t::message_size_max

◆ disable_interface_tracking

RTI_INT32 NDDS_Transport_UDPv4_Property_t::disable_interface_tracking

Disables detection of network interface changes.

By default, network interface changes are propagated in the form of locators to other applications. This is done to support IP mobility scenarios.

For example, you could start a RTI Connext application with Wi-Fi and move to a wired connection. In order to continue communicating with other applications, this interface change has to be propagated.

In RTI Connext 5.2 (the initial release) and earlier versions of the product, IP mobility scenarios were not supported. 5.2 applications will report errors if they detect locator changes in a DataWriter or DataReader.

You can disable the notification and propagation of interface changes by setting this property to 1.

This way, an interface change in a newer application will not trigger errors in an application running 5.2 or earlier. Of course, this will prevent the new application from being able to detect network interface changes.

[default] 0

◆ join_multicast_group_timeout

RTI_UINT32 NDDS_Transport_UDPv4_Property_t::join_multicast_group_timeout

[Windows only] Defines how much time (milliseconds) to wait to join a multicast group address when a new interface is detected.

On Windows, a network interface may be detected before it is allowed to join a multicast group address. This property adjusts how much time (milliseconds) to wait for the ADD_MEMBERSHIP multicast operation to succeed before withdrawing.

[default] 5000

◆ public_address

char* NDDS_Transport_UDPv4_Property_t::public_address

Public IP address associated with the transport instantiation.

Setting the public IP address is only necessary to support communication over WAN that involves Network Address Translation (NAT).

Typically, the address is the public address of the IP NAT router that provides access to the WAN.

By default, the DDSDomainParticipant creating the transport will announce the IP addresses obtained from the NICs to other DomainParticipants in the system.

When this property is set, the DomainParticipant will announce the IP address corresponding to the property value instead of the LAN IP addresses associated with the NICs.

Note 1: Setting this property is necessary, but is not a sufficient condition for sending and receiving data over the WAN. You must also configure the IP NAT router to allow UDP traffic and to map the public IP address specified by this property to the DomainParticipant's private LAN IP address. This is typically done with one of the following mechanisms:

  • Port Forwarding: You must map the private ports used to receive discovery and user data traffic to the corresponding public ports (see DDS_RtpsWellKnownPorts_t). Public and private ports must be the same since the transport does not allow you to change the mapping.

  • 1:1 NAT: You must add a 1:1 NAT entry that maps the public IP address specified in this property to the private LAN IP address of the DomainParticipant.

Note 2: By setting this property, the DDSDomainParticipant only announces its public IP address to other DomainParticipants. Therefore, communication with DomainParticipants within the LAN that are running on different nodes will not work unless the NAT router is configured to enable NAT reflection (hairpin NAT).

There is another way to achieve simultaneous communication with DomainParticipants running in the LAN and WAN, that does not require hairpin NAT. This way uses a gateway application such as RTI Routing Service to provide access to the WAN.

NATRouter.png
WAN communication using RTI Routing Service

[default] NULL (the transport uses the IP addresses obtained from the NICs)