RTFW_TCPIP_INTERFACE
RTFW_TCPIP_INTERFACE represents the configuration parameters of a TCP/IP Stack interface.
Syntax
typedef struct _RTFW_TCPIP_INTERFACE(
size_t Size;
bool Enabled;
TCHAR InterfaceName[RTFW_MAX_INTERFACE_NAME_CHARS];
unsigned int CountIPv4Configurations;
RTFW_IPV4_CONFIGURATIONW IPv4Configurations[RTFW_MAX_IPS_PER_INTERFACE];
TCHAR IPv6Address[RTFW_MAX_INTERFACE_IPV6ADDRESS_CHARS];
unsigned int IPv6Prefix;
TCHAR Gateway[RTFW_IPV4ADDRESS_LENGTH];
unsigned int MTU;
unsigned int ReceivePriority;
DWORD ReceiveIdealProcessor;
bool LinkStatusEnabled;
DWORD LinkStatusIdealProcessor;
unsigned int LinkStatusPriority;
unsigned int RxQueueIndex;
unsigned int RxBufferCount;
unsigned int TxQueueIndex;
unsigned int TxBufferCount;
bool FilterEnabled;
TCHAR FilterDriver[MAX_PATH];
} RTFW_TCPIP_INTERFACE, * PRTFW_TCPIP_INTERFACE;
Members
Size
The size of this structure (in bytes). Client code must set this member to sizeof(RTFW_TCPIP_INTERFACE) before passing this structure to any function. This is used to identify the version of this structure if it is extended.
Enabled
If TRUE, the TCP/IP interface is enabled. If FALSE, the NL2 interface will remain enabled, but the TCP/IP protocol on the interface will be disabled.
InterfaceName
The friendly name of this interface. The maximum length of this string is 63 characters (not including the terminating null character). This member may contain only these characters: 'a' to 'z', 'A' to 'Z', '0' to '9', '_', and '-'.
CountIPv4Configurations
The number of valid RTFW_IPV4_CONFIGURATIONS in array member IPv4AddressNetmaskPairs. The minimum value for this member is 1. The maximum value for this member is RTFW_MAX_IPS_PER_INTERFACE.
IPv4Configurations
An array of RTFW_IPV4_CONFIGURATION structures representing IPv4 addresses and netmasks assigned to this interface. If the interface has no IPv4 addresses, set element 0 of this array to specify IPv4 address 0.0.0.0 and netmask 0.0.0.0, and set member CountIPv4Configurations to 1.
IPv4 addresses must adhere to the following rules to be considered valid and accepted:
- There must be exactly 4 groups of decimal digits (called “octets”) separated by a period (‘.’).
- Examples violating this rule: 10.0.8.5.9, 192.168.3
- No octet has a ‘0’ digit immediately to the left of another digit.
- Examples violating this rule: 10.1.02.5, 192.167.00.1
- Every octet must be between 0 and 255 (inclusive).
- Examples violating this rule: 10.300.2.3, 704.111.201.99
- The first octet is between 0 and 223.
- Examples violating this rule: 250.1.2.3, 224.111.201.99
IPv6Address
The IPv6 address of this interface. This value must either be a valid IPv6 address or the word "auto" (case sensitive), which means the interface will automatically configure the IPv6 address. This value cannot be a duplicate of an existing value on an enabled interface.
The following IPv6 addresses are valid and will be accepted:
- A unicast or anycast address
- A unique local address
The following IPv6 addresses are invalid and will not be accepted:
- A duplicate address on more than one enabled interface
- A multicast address
- The loopback address
- A link-local address
- Address ::0
IPv6Prefix
The network prefix length of the IPv6 address. This value must be between 4 and 128 (inclusive).
Gateway
The IPv4 gateway address for this interface in dotted-quad notation. This member cannot be the empty string. Use "0.0.0.0" to indicate the absence of a gateway.
MTU
The Maximum Transmission Unit (MTU) size, in bytes, of this interface. Valid values are in the range 1500 bytes to 9000 bytes (inclusive).
ReceivePriority
The real-time priority of the receive thread for this interface. This value must be between values 0 to 127 (inclusive).
ReceiveIdealProcessor
The ideal processor number for the real-time receive thread for this interface. Use #define RTFW_DEFAULT_RTSS_PROCESSOR UINT_MAX in RtfwApi.h to use the parent thread’s ideal processor or the system default value from wRTOS Settings.
Note: This property should not be modified if the interface belongs to the Virtual Network.
LinkStatusEnabled
If TRUE, link status is enabled. If FALSE, link status is not enabled.
LinkStatusIdealProcessor
The ideal processor number for link status. This value is ignored if parameter LinkStatusEnabled is FALSE. Use #define RTFW_DEFAULT_RTSS_PROCESSOR UINT_MAX in RtfwApi.h to use the parent thread’s ideal processor or the system default value from wRTOS Settings.
LinkStatusPriority
The priority of the link status thread. This value is ignored if parameter LinkStatusEnabled is FALSE.
RxQueueIndex
The receive queue index.
RxBufferCount
The number of receive buffers.
TxQueueIndex
The transmit queue index.
TxBufferCount
The number of transmit buffers.
FilterEnabled
If TRUE, the filter driver is enabled. If FALSE, the filter driver is not enabled.
FilterDriver[MAX_PATH]
The filter driver's path name. This can either be a simple file name or an absolute path name. This value is ignored when FilterEnabled is FALSE.
Remarks
See Device-Specific Interface Values for device-specific defaults and value ranges.
- Some devices may have more restrictive limits than what is documented or enforced by wRTOS Settings. To see the most accurate limits, consult the appropriate specification guide for your device.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
RtfwtcpipApi.h |
RtfwtcpipApi.lib |
See Also: