Rtfwnl2GetAllInterfaces

Rtfwnl2GetAllInterfaces returns the configurations of all Network Link Layer (NL2) interfaces.

Syntax

Copy
bool Rtfwnl2GetAllInterfaces(
    [out]     RTFW_INTERFACE_INFO * pNL2Interfaces,
    [in, out] size_t * pCountInterfaces
);

Parameters

[out] pNL2Interfaces

A pointer to an array of RTFW_INTERFACE_INFO structures to be filled in with configuration data for network interfaces. If this parameter is NULL, the required number of array element is written to the value pointed to by pCountInterfaces. Every instance of structure RTFW_INTERFACE_INFO in this array must have member Size set to sizeof(RTFW_INTERFACE_INFO), otherwise this function fails and sets the last error value to RT_ERROR_STRUCTURE_TOO_SMALL.

[in, out] pCountInterfaces

A pointer to the number of elements in the array pointed to by pNL2Interfaces. If the array is not large enough or if pNL2Interfaces is NULL, this function fails, sets the last error value to ERROR_INSUFFICIENT_BUFFER, and this value is set to the required number of array elements at the time this function was called. This parameter cannot be NULL.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE, sets the last error value, and leaves the array referenced by pNL2Interfaces with invalid data. Call GetLastError to obtain an error code.

Possible error codes:

Error code Meaning

RT_ERROR_STRUCTURE_TOO_SMALL

The member Size of a structure is too small.

Remarks

After this function succeeds, the value pointed to by pCountInterfaces is set to the number of array elements that contain valid configuration information, which is also the number of configured network interfaces.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

Rtfwnl2Api.h

Rtfwnl2Api.lib

See Also: