RttcpipGetInterfaceAddresses
RttcpipGetInterfaceAddresses retrieves a list of IPv4 and IPv6 addresses.
Syntax
INT RttcpipGetInterfaceAddresses(
[in] NET_IFINDEX InterfaceIndex,
[out, optional] RTTCPIPADAPTERADDRESS *pAddress,
[in] DWORD cb,
[out] LPDWORD lpcbNeeded
);
Parameters
[in] InterfaceIndex
The local index for a network interface.
[out, optional] pAddress
A pointer to a buffer to hold the array of RTTCPIPADAPTERADDRESS. This parameter can be NULL if the data is not required. If pAddress is NULL, the function stores the size of the buffer, in bytes, in the variable pointed to by lpcbNeeded. If pAddress is not NULL, the function returns in lpcbNeeded the number of bytes written in the buffer.
[in] cb
The size of the pAddress array, in bytes.
[out] lpcbNeeded
The number of bytes required to store all RTTCPIPADAPTERADDRESS entries in the pAddress array.
Return Value
If this function succeeds, it returns TRUE. If this function fails, it returns FALSE. To get more information, call the GetLastError function.
Possible error codes:
Error code |
Meaning |
---|---|
WSAEINVAL |
One of these conditions occurred:
|
WSANOBUFS |
Parameter pAddress was not NULL but the size specified in parameter cb was not large enough to hold all the IP address structures. Note that in this case, parameter lpcbNeeded is populated with the number of written bytes. |
WSASYSNOTREADY |
Remarks
MAX_IPS_PER_INTERFACE is the maximum number of IPv4 addresses allowed per physical interface.
Requirements
Minimum supported version | Header | Library |
---|---|---|
eRTOS 1.0 SDK |
RttcpipApi.h |
RtTcpipApi.lib |