Rtfwnl2SetInterface
Rtfwnl2SetInterface sets the configuration of a Network Link Layer (NL2) interface.
Syntax
bool Rtfwnl2SetInterface(
[in] const RTFW_NL2_INTERFACE * pNL2Interface,
[in] bool ignoreProtocolValidationResult,
[out] bool * pProtocolsInvalid
);
Parameters
[in] pNL2Interface
A pointer to structure RTFW_NL2_INTERFACE that is filled with configuration information for the network interface. This value cannot be NULL, and member Size must be set to sizeof(RTFW_NL2_INTERFACE), otherwise this function fails and sets the last error value to RT_ERROR_STRUCTURE_TOO_SMALL.
[in] ignoreProtocolValidationResult
If TRUE, this API will not fail when these changes invalidate another protocol's configuration settings on this interface. Otherwise, it will fail.
[out] pProtocolsInvalid
Set to TRUE if the configuration settings of another protocol are invalidated by this API. Otherwise, it will be set to FALSE. The behavior of this parameter does not depend on the value of parameter ignoreProtocolValidationResult.
Return Value
If the function succeeds, it returns TRUE. If the function fails, it returns FALSE, sets the last error value, and leaves the structure referenced by pNL2Interface with invalid member values. Call GetLastError to obtain an error code.
Possible error codes:
| Error code | Meaning |
|---|---|
|
RT_ERROR_DEVICE_INSTANCE_ID_INVALID |
The network interface configuration instance ID is not valid. |
|
RT_ERROR_DRIVER_INVALID |
The network interface configuration driver name is not valid. |
|
RT_ERROR_DUPLICATE_DEVICE_INSTANCE_ID |
The specified instance ID of the wRTOS-owned NIC for this interface is a duplicate. |
|
RT_ERROR_DUPLICATE_MSIX_MESSAGE_ID |
The message ID for non-queue interrupts is a duplicate. |
|
RT_ERROR_DUPLICATE_NETWORK_DEVICE |
The specified network device is a duplicate. |
|
RT_ERROR_DUPLICATE_TX_QUEUE_INDEX |
The specified transmit queue index is a duplicate. |
|
RT_ERROR_INTERFACE_NAME_ALREADY_EXISTS |
The specified interface name already exists. |
|
RT_ERROR_INTERFACE_NAME_INVALID |
The specified interface name is not valid. This name may only contain these characters: 'a' to 'z', 'A' to 'Z', '0' to '9', '_', and '-'. |
|
RT_ERROR_INTERFACE_NAME_NOT_FOUND |
The specified interface name could not be found. |
|
RT_ERROR_INTERRUPT_TYPE_INVALID |
The type of interrupt used by the NIC for this interface is not valid. |
|
RT_ERROR_INVALID_IDEAL_PROCESSOR |
The specified ideal processor is not valid. |
|
RT_ERROR_INVALID_INGRESS_TIMESTAMPING_RULE |
The specified ingress timestamping rule is not valid. |
|
RT_ERROR_INVALID_INGRESS_TIMESTAMPING_UDP_PORT |
The specified ingress timestamping UDP port is not valid. |
|
RT_ERROR_INVALID_MSIX_MESSAGE_IST_IDEAL_PROCESSOR |
The specified ideal processor for the IST for MSI-X interrupt types is not valid. |
|
RT_ERROR_INVALID_MSIX_MESSAGE_IST_PRIORITY |
The specified priority of the IST for MSI-X interrupt types is not valid. |
|
RT_ERROR_INVALID_MSIX_NON_QUEUE_MESSAGE_ID |
The specified message ID for non-queue interrupts is not valid. |
|
RT_ERROR_INVALID_NONMSIX_IST_IDEAL_PROCESSOR |
The specified ideal processor for the IST for non-MSI-X interrupt types is not valid. |
|
RT_ERROR_INVALID_NONMSIX_IST_PRIORITY |
The specified priority of the IST for non-MSI-X interrupt types is not valid. |
|
RT_ERROR_INVALID_THREAD_PRIORITY |
The specified thread priority is not valid. |
|
RT_ERROR_INVALID_TX_QUEUE_IDEAL_PROCESSOR |
The specified transmit queue ideal processor is not valid. |
|
RT_ERROR_INVALID_TX_QUEUE_MSIX_MESSAGE_ID |
The specified transmit queue MSI message ID is not valid. |
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
wRTOS 1.0 SDK |
Rtfwnl2Api.h |
Rtfwnl2Api.lib |
See Also: