RtfwtcpipGetAllInterfaces
RtfwtcpipGetAllInterfaces enumerates all Network Link Layer (NL2) interfaces that have TCP/IP settings.
Syntax
bool RtfwtcpipGetAllInterfaces(
[in, out] RTFW_INTERFACE_INFO * pTCPIPInterfaces,
[in, out] size_t * pCountInterfaces
);
Parameters
[in, out] pTCPIPInterfaces
A pointer to an array of an RTFW_INTERFACE_INFO structures to be filled in with configuration data for network interfaces. If this parameter is NULL, the required number of array elements 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 pTCPIPInterfaces. If the array is not large enough or if pTCPIPInterfaces 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 pCountInterfaces 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 |
RtfwtcpipApi.h |
RtfwtcpipApi.lib |
See Also: