Data Fields | |
struct NDDS_Transport_Property_t | parent |
Generic properties of all transport plugins. | |
RTI_INT32 | send_socket_buffer_size |
Size in bytes of the send buffer of a socket used for sending. | |
RTI_INT32 | recv_socket_buffer_size |
Size in bytes of the receive buffer of a socket used for receiving. | |
RTI_INT32 | ignore_loopback_interface |
Prevents the transport plugin from using the IP loopback interface. | |
RTI_INT32 | ignore_nonrunning_interfaces |
Prevents the transport plugin from using a network interface that is not reported as RUNNING by the operating system. | |
RTI_INT32 | transport_priority_mask |
Mask for the transport priority field. | |
RTI_INT32 | transport_priority_mapping_low |
Sets the low value of the output range to IPv4 TOS. | |
RTI_INT32 | transport_priority_mapping_high |
Sets the high value of the output range to IPv4 TOS. | |
RTI_INT32 | server_socket_backlog |
Determines what is the maximum length of the queue of pending connections. | |
NDDS_Transport_Address_t | public_address |
Public locator (IP address and port) of the transport instantiation. | |
char * | bind_interface_address |
Interface IP address for the transport sockets. | |
RTI_INT32 | server_bind_port |
Private IP port (inside the LAN) used by the transport to accept TCP connections. | |
struct TransportAllocationSettings_t | read_buffer_allocation |
Allocation settings applied to read buffers. | |
struct TransportAllocationSettings_t | write_buffer_allocation |
Allocation settings applied to buffers used for asynchronous (nonblocking) write. | |
struct TransportAllocationSettings_t | control_buffer_allocation |
Allocation settings applied to buffers used to serialize and send control messages. | |
struct TransportAllocationSettings_t | control_message_allocation |
Allocation settings applied to control messages. | |
struct TransportAllocationSettings_t | control_attribute_allocation |
Allocation settings applied to control messages attributes. | |
RTI_INT32 | force_asynchronous_send |
Controls whether the plugin will send data synchronously or asynchronously. | |
NDDS_Transport_TCPv4_OnConnectionEstablishedCallback | on_connection_established |
NDDS_Transport_TCPv4_OnConnectionLostCallback | on_connection_lost |
RTI_INT32 | max_packet_size |
The maximum size of a TCP segment. | |
RTI_INT32 | enable_keep_alive |
Configures the sending of KEEP_ALIVE messages in TCP. | |
RTI_INT32 | keep_alive_time |
Specifies the interval of inactivity in seconds that causes TCP to generate a KEEP_ALIVE message. | |
RTI_INT32 | keep_alive_interval |
Specifies the interval in seconds between KEEP_ALIVE retries. | |
RTI_INT32 | keep_alive_retry_count |
The maximum number of KEEP_ALIVE retries before dropping the connection. | |
RTI_INT32 | disable_nagle |
Disables the TCP nagle algorithm. | |
RTI_INT32 | logging_verbosity_bitmap |
Bitmap that specifies the verbosity of log messages from the transport. | |
RTI_INT32 | outstanding_connection_cookies |
Maximum number of outstanding connection cookies allowed by the transport when acting as server. | |
RTI_INT32 | outstanding_connection_cookies_life_span |
Maximum lifespan (in seconds) of the cookies associated with pending connections. | |
RTI_INT32 | send_max_wait_sec |
Maximum number of seconds a low-level TCP sendto() function is allowed to block. | |
struct RTITLS_OpenSSL_Configuration | tls |
OpenSSL TLS parameters. |
For communications within a LAN you should initialize the object as follows:
prop.parent.classid = NDDS_TRANSPORT_CLASSID_TCPV4_LAN;
If you want to use the transport in WAN configuration, you must also define the public_address and sever_bind_port:
prop.parent.classid = NDDS_TRANSPORT_CLASSID_TCPV4_WAN; NDDS_Transport_TCPv4_Plugin_stringToTransportAddress( &prop.public_address, "142.123.123.111:7890", 0); prop.server_bind_port = 7400;
Remember that the public_address is the public address that your network gateway is exposing to a remote peer. It is not the local network address where the application is running.
Generic properties of all transport plugins.
[default] Refer to the property default NDDS_Transport_TCPv4_Plugin::NDDS_TRANSPORT_TCPV4_PROPERTY_DEFAULT_LAN
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 or NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT.
The maximum value is operating system-dependent.
[default] NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT
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 parent.message_size_max or NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT.
The maximum value is operating-system dependent.
[default] NDDS_TRANSPORT_TCPV4_SOCKET_BUFFER_SIZE_OS_DEFAULT
Prevents the transport plugin from using the IP loopback interface.
This property is ignored when parent.classid is equal to NDDS_TRANSPORT_CLASSID_TCPV4_WAN.
Two values are allowed:
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 which 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 no link is detected (e.g., the network cable is unplugged).
Two values are allowed:
[default] 1
Mask for the transport priority field.
This is used in conjunction with transport_priority_mapping_low and transport_priority_mapping_high to define the mapping from 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
Sets the low value of the output range to IPv4 TOS.
This is used in conjunction with transport_priority_mask and transport_priority_mapping_high to define the mapping from 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.
Sets the high value of the output range to IPv4 TOS.
This is used in conjunction with transport_priority_mask and transport_priority_mapping_low to define the mapping from 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.
Determines what is the maximum length of the queue of pending connections.
[default] NDDS_TRANSPORT_TCPV4_SERVER_SOCKET_BACKLOG_DEFAULT
Public locator (IP address and port) of the transport instantiation.
Use the function NDDS_Transport_TCPv4_Plugin_stringToTransportAddress to compose the transport locator from a string form.
This field is used and required only when NDDS_Transport_Property_t::classid is set to NDDS_TRANSPORT_CLASSID_TCPV4_WAN.
The public IP address and port are necessary to support communication over WAN that involves Network Address Translators (NATs).
Typically, the address is the public address of the IP router that provides access to the WAN. The port is the IP router port that is used to reach the private server_bind_port inside the LAN from the outside.
[default] NDDS_TRANSPORT_ADDRESS_INVALID
Interface IP address for the transport sockets.
The TCP transport can be configured to bind all sockets to a specified interface.
If the value is NULL, the sockets will be bound to the special IP address INADDR_ANY. This address allows the sockets to receive packets destined to any of the interfaces.
This field should be set in multi-homed systems communicating across NAT routers.
[default] NULL
Private IP port (inside the LAN) used by the transport to accept TCP connections.
If this property is set to zero, the transport will disable the internal server socket, making it impossible for external peers to connect to this node. In this case, the node is considered unreachable and will only communicate using the asymmetric mode with other (reachable) peers.
For WAN communication, this port must be forwarded to a public port in the NAT-enabled router that connects to the outer network.
[default] NDDS_TRANSPORT_TCPV4_DEFAULT_PORT_NUMBER
Allocation settings applied to read buffers.
These settings configure the initial number of buffers, the maximum number of buffers and the buffers to be allocated when more buffers are needed.
[default] NDDS_TRANSPORT_TCPV4_READ_BUFFER_POOL_GROWTH_POLICY_DEFAULT
struct TransportAllocationSettings_t NDDS_Transport_TCPv4_Property_t::write_buffer_allocation [read] |
Allocation settings applied to buffers used for asynchronous (nonblocking) write.
These settings configure the initial number of buffers, the maximum number of buffers and the buffers to be allocated when more buffers are needed.
Note that for the write buffer pool, the default max_count is not set to unlimited. This is to avoid having a fast writer quickly exhaust all the available system memory, in case of a temporary network slowdown. When this write buffer pool reaches the maximum, the low-level send command of the transport will fail; at that point RTI Data Distribution Service will take the appropriate action (retry to send or drop it), according to the application’s QoS (if the transport is used for reliable communication, the data will still be sent eventually).
[default] NDDS_TRANSPORT_TCPV4_WRITE_BUFFER_POOL_GROWTH_POLICY_DEFAULT
struct TransportAllocationSettings_t NDDS_Transport_TCPv4_Property_t::control_buffer_allocation [read] |
Allocation settings applied to buffers used to serialize and send control messages.
These settings configure the initial number of buffers, the maximum number of buffers and the buffers to be allocated when more buffers are needed.
[default] NDDS_TRANSPORT_TCPV4_CONTROL_BUFFER_POOL_GROWTH_POLICY_DEFAULT
struct TransportAllocationSettings_t NDDS_Transport_TCPv4_Property_t::control_message_allocation [read] |
Allocation settings applied to control messages.
These settings configure the initial number of buffers, the maximum number of buffers and the buffers to be allocated when more buffers are needed.
[default] NDDS_TRANSPORT_TCPV4_CONTROL_MESSAGE_FACTORY_GROWTH_POLICY_DEFAULT
struct TransportAllocationSettings_t NDDS_Transport_TCPv4_Property_t::control_attribute_allocation [read] |
Allocation settings applied to control messages attributes.
These settings configure the initial number of attributes, the maximum number of attributes and the attributes to be allocated when more attributes are needed.
[default] NDDS_TRANSPORT_TCPV4_CONTROL_MESSAGE_ATTRIBUTE_FACTORY_GROWTH_POLICY_DEFAULT
Controls whether the plugin will send data synchronously or asynchronously.
When this parameter is set to 0, the TCP transport will attempt to send data as soon as the internal send() function is called. When it is set to 1, the transport will make a copy of the data to send and enqueue it in an internal send buffer. Data will be sent as soon as the low-level socket buffer has space.
Normally setting it to 1 delivers better throughput in a fast network, but will result in a longer time to recover from various TCP error conditions. Setting it to 0 may cause the low-level send() function to block until the data is physically delivered to the lower socket buffer. For an application writing data at a very fast rate, it may cause the caller thread to block if the send socket buffer is full. This could produce lower throughput in those conditions (the caller thread could prepare the next packet while waiting for the send socket buffer to become available).
[default] 0 (synchronous send)
NDDS_Transport_TCPv4_OnConnectionEstablishedCallback NDDS_Transport_TCPv4_Property_t::on_connection_established |
Pointer to a function that is called whenever the plugin establish a connection with a remote peer.
For plugins configured to behave as servers, this function is called every time a remote client successfully establish a data communication.
For plugins configured to behave as clients, this function is called for every successful connection to a remote server.
It can be set to NULL (no notification callbacks are performed)
IMPORTANT: This function is called from the receive thread (both client/server side). if you don't return the control fast enough, the control protocol may be affected causing disconnections and/or delays in establishing connections with remote peers.
[default] NULL
Pointer to a function that is called when a previously established connection with a remote peer gets closed.
It can be set to NULL (no notification callbacks are performed)
IMPORTANT: This function is called from the receive thread (both client/server side). if you don't return the control fast enough, the control protocol may be affected causing disconnections and/or delays in establishing connections with remote peers.
[default] NULL
The maximum size of a TCP segment.
This parameter is only supported on Linux architectures.
By default, the maximum size of a TCP segment is based on the network MTU for destinations on a local network, or on a default 576 for destinations on non-local networks. This behavior can be changed by setting this parameter to a value between 1 and 65535.
[default] -1 (use OS default)
Configures the sending of KEEP_ALIVE messages in TCP.
Setting this value to 1, causes a KEEP_ALIVE packet to be sent to the remote peer if a long time passes with no other data sent or received.
This feature is implemented only on architectures that provide a lowlevel implementation of the TCP keep-alive feature.
On Windows systems, the TCP keep-alive feature can be globally enabled through the system's registry: \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Tcpip\Parameters.
Refer to MSDN documentation for more details.
On Solaris systems, most of the TCP keep-alive parameters can be changed though the kernel properties.
[default] 0 (disabled)
Specifies the interval of inactivity in seconds that causes TCP to generate a KEEP_ALIVE message.
This parameter is only supported on Linux architectures.
[default] -1 (OS default value)
Specifies the interval in seconds between KEEP_ALIVE retries.
This parameter is only supported on Linux architectures.
[default] -1 (OS default value)
The maximum number of KEEP_ALIVE retries before dropping the connection.
This parameter is only supported on Linux architectures.
[default] -1 (use system's default).
Disables the TCP nagle algorithm.
When this property is set to 1, TCP segments are always sent as soon as possible, which may result in poor network utilization.
[default] 0 (disabled)
Bitmap that specifies the verbosity of log messages from the transport.
Logging values:
Note: the logging verbosity is a global property shared across multiple instances of the TCP transport. If you create a new TCP Transport instance with logging_verbosity_bitmap different than -1, the change will affect all the other instances as well.
The default TCP transport verbosity is errors and warnings.
Note: The option of 0x80 (other) is used only for tracing the internal control protocol. Since the output is very verbose, this feature is enabled only in the debug version of the TCP Transport library.
[default] -1 (do not change default verbosity).
Maximum number of outstanding connection cookies allowed by the transport when acting as server.
A connection cookie is a token provided by a server to a client; it is used to establish a data connection. Until the data connection is established, the cookie cannot be reused by the server.
To avoid wasting memory, it is good practice to set a cap to the maximum number of connection cookies (pending connections).
When the maximum value is reached, a client will not be able to connect to the server until new cookies become available.
[default] 100
Maximum lifespan (in seconds) of the cookies associated with pending connections.
If a client does not connect to the server before the lifespan of its cookie expires, it will have to request a new cookie.
Range: 1 second or higher, or -1.
[default] -1, which means an unlimited amount of time (effectively disabling the feature).
Maximum number of seconds a low-level TCP sendto() function is allowed to block.
This property controls the maximum time (in seconds) the low level sendto() is allowed to block the caller thread when the TCP send buffer becomes full.
If the bandwidth used by the transport is limited, and the sender thread try to push data faster than the OS can handle, the low level sendto() function will block the caller until there is some room available on the queue.
By limiting this delay we eliminate possibility of deadlock and increase the response time of the internal DDS thread.
This property affects both CONTROL and DATA stream, and affect only SYNCHRONOUS send operations. Asynchronous send never blocks a send operation.
For synchronous send() this property limit the time the DDS sender thread can block for a send buffer full. If is too large, DDS not only won't be able to send more data, but it won't be able to receive any more data because of an internal resource mutex.
Setting this property to 0 cause the low level function to report an immediate failure if the TCP send buffer is full.
Setting this property to -1 cause the low level function to block forever until space becomes available in the TCP buffer
[default] 3 seconds.
OpenSSL TLS parameters.
[default] RTITLS_OpenSSL::RTITLS_OPENSSL_CONFIGURATION_DEFAULT