RTFW_TCPIP_CONFIGURATION

RTFW_TCPIP_CONFIGURATION represents the configuration of the RT-TCP/IP Stack. See structure RTFW_NETWORK_INTERFACE for configuration parameters specific to a network interface.

Syntax

typedef struct _RTFW_TCPIP_CONFIGURATION(
    size_t Size;
    bool AutoStart;
    unsigned int Memory;
    unsinged int IdealProcessor;
    unsigned int MaxSockets;
    unsigned int MaxARPEntries;
    unsigned int IPReassemblyTimeout;
    unsigned int TickInterval;
    DWORD TimerIdealProcessor;
    unsigned int TimerPriority;
    unsigned int MaxConcurrency;
    unsigned int TimerExecutePriority;
} RTFW_TCPIP_CONFIGURATION, * PRTFW_TCPIP_CONFIGURATION;

Members

Size

The size of this structure (in bytes). Client code must set this member to sizeof(RTFW_TCPIP_CONFIGURATION) before passing this structure to any function.

AutoStart

If true, the Stack automatically starts when the NAL starts. If false, the Stack does not automatically start with the NAL.

Memory

The amount of memory, in kilobytes, to be allocated for the RT-TCP/IP Stack’s internal resources. This value must be within the range 2048 KB to 4,194,304 KB (4 GB).

IdealProcessor

The RT-TCP/IP Stack's ideal processor. This must specify the processor number of an RTSS processor, otherwise RtfwSetTCPIPConfiguration fails and sets the last error value to ERROR_INVALID_PARAMETER. If this value is RTFW_FIRST_RTSS_PROCESSOR, it refers to the first RTSS processor, regardless of the actual number of the first RTSS processor.

MaxSockets

The maximum number of sockets supported by the Stack. Valid values are in the range 1 to 1024 (inclusive). The default value is 64.

MaxARPEntries

The maximum number of ARP entries supported by the RT-TCP/IP Stack. Valid values are in the range 1 to 65,535 (inclusive). The default value is 256.

IPReassemblyTimeout

The period (in seconds) for the RT-TCP/IP Stack to wait before timing out on reassembly of a fragmented IP packet. Valid values are in the range 1 to 127 (inclusive). The default value is 60.

TickInterval

The RT-TCP/IP Stack’s tick interval, in milliseconds. This is the fundamental granularity of all time-related operations within the RT-TCP/IP Stack. This value must be within the range 1 MS to 1000 MS, and must be a positive multiple of the HAL timer period (see structure RTFW_SUBSYSTEM_CONFIGURATION). If the HAL timer period is changed using RtfwSetSubsystemConfiguration, and the RT-TCP/IP Stack tick interval is not an integer multiple of the new HAL timer period, the RT-TCP/IP Stack tick interval is changed to be the next higher integer multiple of the HAL timer period.

NOTE: This parameter's units are milliseconds, but the HAL timer period's units are microseconds, so unit conversion must be performed when computing a valid value for this parameter.

TimerIdealProcessor

The ideal processor of the RT-TCP/IP Stack's timer thread. This must specify the processor number of an RTSS processor, otherwise RtfwSetTCPIPConfiguration fails and sets the last error value to ERROR_INVALID_PARAMETER. If this value is zero or RTFW_FIRST_RTSS_PROCESSOR, it refers to the same RTSS processor that is configured by member IdealProcessor, which is not necessarily the first RTSS processor.

TimerPriority

The priority of the RT-TCP/IP Stack's first real-time timer thread, which updates timer variables. This value must be in the range of valid RTX64 real-time priorities: 0 to 127 (inclusive). The default value is 66. See Remarks for more information on the RT-TCP/IP Stack timer system.

MaxConcurrency

The number of threads that are allowed to run concurrently within the RT-TCP/IP stack.

The RT-TCP/IP Stack needs to initialize certain attributes when started to allow a certain number of threads to run and provide services for each client that requests services from the RT-TCP/IP stack.

For example, running a client and a server application will require 1 concurrency each. The RT-TCP/IP Stack running by itself requires 1 concurrency to run the Loopback interface. Loading and managing interfaces requires an average of 3 threads, thus a concurrency of 3 for each interface.

NOTE: We recommend that this value be calculated automatically (default).

NOTE: If the RT-TCP/IP Stack requires more threads than the initialization process prepared for, the Stack will become unstable.

Calculate automatically is the default. This setting prepares an expected surplus of resources based on the amount of interfaces the TCP/IP Stack will manage.

TimerExecutePriority

The priority of the RT-TCP/IP Stack's second real-time timer thread, which executes functions for expired timers. This value must be in the range of valid RTX64 real-time priorities: 0 to 127 (inclusive). This value must be less than or equal to the value set for TimerPriority. The default value is 60. See Remarks for more information on the RT-TCP/IP Stack timer system.

NOTE: This parameter was added in RTX64 4.4. Applications created using a Runtime version prior to RTX64 4.4 will not have access to this parameter. Similarly, applications using this parameter will return a Property Not Found error if run on a Runtime version prior to RTX64 4.4.

NOTE: Calls to RtfwSetTcpipConfiguration on Runtime versions prior to RTX64 4.4 will ignore this parameter. Similarly, calls to RtfwGetTcpipConfiguration on Runtime versions prior to RTX64 4.4 will not display this member in the returned structure.

Remarks

The RT-TCP/IP Stack timer system is one of the main components of RT-TCP/IP. It is responsible for notifying the Stack of the amount of time that has elapsed. This is very important for a protocol stack. The RT-TCP/IP stack must know how long a TCP packet takes to get to a remote system, as well as the amount of time an ARP entry has been in the ARP table. Additionally, the Stack's timer system uses a timer for its internal routing entries. The Stack uses a timer thread to handle all RT-TCP/IP timer-related functions.

Requirements

Minimum Required Version RTX64 4.0
Header RtfwAPI.h
Library RtfwAPI.lib

See Also:

RTFW_NETWORK_INTERFACE

RTFW_SUBSYSTEM_CONFIGURATION

RtfwSetTCPIPConfiguration

RtfwGetTCPIPConfiguration