RtfwrlyGetAllInterfaces

RtfwrlyGetAllInterfaces returns a list of all Network Relay interfaces.

Syntax

Copy
bool RtfwrlyGetAllInterfaces(
    [out]     RTFW_INTERFACE_INFO * pInterfaceInfo,
    [in, out] size_t * pCountInterfaces
);

Parameters

[out] pInterfaceInfo

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 pInterfaceInfo. If the array is not large enough or if pInterfaceInfo 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 pInterfaceInfo 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.

The Enabled field of the filled RTFW_INTERFACE_INFO struct in pInterfaceInfo corresponds to the Enabled setting of the underlying network interface. Use the RtfwrlyGetInterfaceSettings function to see whether the Network Relay is enabled and see its configuration.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

RtfwrlyApi.h

RtfwrlyApi.lib

See Also: