RTFW_NL2_INTERFACE Structure

RTFW_NL2_INTERFACE represents the configuration parameters of a Network Link Layer (NL2) interface.

Syntax

Copy
typedef struct RTFW_NL2_INTERFACE {
    size_t Size;
    TCHAR InterfaceName[RTFW_MAX_INTERFACE_NAME_CHARS];
    bool Enabled;
    TCHAR Driver[MAX_PATH];
    TCHAR PCIBusLocation[RTFW_MAX_INTERFACE_PCIBUSLOCATION_CHARS];
    TCHAR DeviceInstanceID[RTFW_MAX_INTERFACE_INSTANCEID_CHARS];
    bool JumboEnabled;
    unsigned int JumboMaxPacketSize;
    bool AutoNegotiationDisabled;
    bool ForcedFullDuplex;
    unsigned int ForcedSpeedMbps;
    bool RestrictAdvertisedDuplex;
    bool AdvertisedFullDuplex;
    bool RestrictAdvertisedSpeed;
    unsigned int AdvertisedSpeedMbps;
    bool FlowControlSetup;
    bool FlowControlFrameTransmissionDisabled;  
    bool FlowControlFrameReceptionDisabled;           
    bool FlowControlDownshiftEnabled;
    bool HardwareTimestampingEnabled;
    RTFW_INGRESS_TIMESTAMPING_RULE IngressTimestampingRule;
    unsigned int IngressTimestampingUDPPort;
    unsigned int IngressTimestampingEtherType;
    RTFW_INTERRUPT_TYPE InterruptType;
    unsigned int NonMSIXIstIdealProcessor;
    unsigned int NonMSIXIstPriority;
    unsigned int MSIXNonQueueMessageId;
    unsigned int TxQueueCount;
    RTFW_NL2_INTERFACE_TXQUEUE * pTxQueues;
    unsigned int RxQueueCount;
    RTFW_NL2_INTERFACE_RXQUEUE * pRxQueues;
    unsigned int MSIXMessageCount;
    RTFW_NL2_INTERFACE_MSIXMESSAGE * pMSIXMessages;
} RTFW_NL2_INTERFACE, * PRTFW_NL2_INTERFACE;

Members

Size

The size of this structure (in bytes). Client code must set this member to sizeof(RTFW_NL2_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 network interface is enabled. If FALSE, the network interface is not enabled.

InterfaceName[RTFW_MAX_INTERFACE_NAME_CHARS]

The name of the interface. The maximum length of this string is RTFW_MAX_INTERFACE_NAME_CHARS (64 characters). This member may contain only these characters: 'a' to 'z', 'A' to 'Z', '0' to '9', '_', and '-'.

Driver[MAX_PATH]

The absolute path name or the simple file name of the real-time device driver (RTDLL) for this interface. This must not be a relative path name containing '\' characters. If this is an absolute path name, the specified RTDLL file must exist. If this is a simple file name, the wRTOS Subsystem searches for the RTDLL file when this network interface is initialized. Use API RtfwSetSearchPath or wRTOS Settings to configure the Search Path used by the Subsystem.

PCIBusLocation[RTFW_MAX_INTERFACE_PCIBUSLOCATION_CHARS]

The PCI bus location of the wRTOS-owned NIC for this interface in the form "bus;device;function", where bus, device, and function are each a non-negative integer. This NIC must be converted to wRTOS, otherwise, APIs that take this structure as input will fail.

DeviceInstanceID[RTFW_MAX_DEVICE_INSTANCE_ID_CHARS]

The Instance ID of the wRTOS-owned NIC for this interface. This NIC must be owned by wRTOS, otherwise, APIs that take this structure as input will fail with error ERROR_INVALID_PARAMETER.

JumboEnabled

If TRUE, jumbo packets are enabled. If FALSE, jumbo packets are disabled.

JumboMaxPacketSize

The maximum jumbo packet size, in bytes. The allowed range depends on the NIC.

AutoNegotiationDisabled

If TRUE, auto-negotiation is disabled. If FALSE, auto-negotiation is enabled.

ForcedFullDuplex

If TRUE, full duplex is forced. If FALSE, half duplex is forced. This field is only valid if AutoNegotiationDisabled is TRUE.

ForcedSpeedMbps

The forced link speed (Mbps). This field is only valid if AutoNegotiationDisabled is TRUE.

RestrictAdvertisedDuplex

If TRUE, restrict advertised duplex. If FALSE, do not restrict advertised duplex.

AdvertisedFullDuplex

If TRUE, advertise full-duplex only. If FALSE, advertise half-duplex. This field is only valid if AutoNegotiationDisabled is FALSE and RestrictAdvertisedDuplex is TRUE.

RestrictAdvertisedSpeed

If TRUE, restrict advertised speed. If FALSE, do not restrict advertised speed.

AdvertisedSpeedMbps

If the member AutoNegotiationDisabled is 0, this value, in Mbps, is the only speed advertised. This field is only valid if AutoNegotiationDisabled is FALSE and RestrictAdvertisedSpeed is TRUE.

FlowControlSetup

If TRUE, other FlowControlxxx fields are defined. If FALSE, other FlowControlxxx fields are ignored.

FlowControlFrameTransmissionDisabled

If TRUE, Ethernet flow control frame transmission is disabled. If FALSE, Ethernet flow control frame transmission is enabled.

FlowControlFrameReceptionDisabled

If TRUE, Ethernet flow control frame reception is disabled. If FALSE, Ethernet flow control frame reception is enabled.

FlowControlFrameDownshiftEnabled

If TRUE, Ethernet flow control down-shifting is enabled. If FALSE, Ethernet flow control down-shifting is disabled.

When down-shifting is enabled, when the link partner advertises non-support for flow control frame transmission (resp. reception) through auto-negotiation, flow control frame reception is automatically disabled, no matter the value of the FlowControlFrameReceptionDisabled field.

HardwareTimestampingEnabled

If TRUE, hardware timestamping is globally enabled on this interface. If FALSE, it is not.

IngressTimestampingRule

Indicates the rules used for ingress timestamping. This field is valid only if HardwareTimestampingEnabled is true.

IngressTimestampingUDPPort

Indicates the UDP port used to overwrite the default UDP port 319. This field is valid only if HardwareTimestampingEnabled is TRUE.

IngressTimestampingEtherType

Indicates the EtherType used to overwrite the default EtherType 0x88F7. This field is valid only if HardwareTimestampingEnabled is TRUE.

InterruptType

The interrupt type used by the NIC for this interface. See RTFW_INTERRUPT_TYPE for more information. If MSI-X, at least one MSI-X message must be defined.

NonMsixIstIdealProcessor

The ideal processor for the IST for non-MSI-X interrupt types. 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.

NonMsixIstPriority

The IST priority for non-MSI-X interrupt types. The range is 0-127.

MsixNonQueueMessageId

The message ID for non-queue (frame transmission or frame reception) interrupts. This is only valid for InterruptType MSI-X and must be one of the message IDs in the MSIXMessages array.

TxQueueCount

The number of elements in array pTxQueues.

pTxQueues

A pointer to array of transmit queue configurations in structure RTFW_NL2_INTERFACE_TXQUEUE.

RxQueueCount

The number of elements in array pRxQueues.

pRxQueues

A pointer to array of receive queue configurations in structure RTFW_NL2_INTERFACE_RXQUEUE.

MSIXMessagesCount

The number of elements in array pMSIXMessages.

pMSIXMessages

A pointer to array of MSI-X message configurations in structure RTFW_NL2_INTERFACE_MSIXMESSAGE.

Remarks

See Device-Specific Interface Values for device-specific defaults and value ranges.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

Rtfwnl2Api.h

Rtfwnl2Api.lib

See Also: