IP_ADAPTER_ADDRESSES
The IP_ADAPTER_ADDRESSES structure is the header node for a linked list of addresses for a particular adapter.
Syntax
typedef struct _IP_ADAPTER_ADDRESSES {
union {
ULONGLONG Alignment;
struct {
ULONG Length;
DWORD IfIndex;
};
};
struct _IP_ADAPTER_ADDRESSES *Next;
PCHAR AdapterName;
PIP_ADAPTER_UNICAST_ADDRESS FirstUnicastAddress;
PIP_ADAPTER_ANYCAST_ADDRESS FirstAnycastAddress; // Not supported
PIP_ADAPTER_MULTICAST_ADDRESS FirstMulticastAddress; // Not supported
PIP_ADAPTER_DNS_SERVER_ADDRESS FirstDnsServerAddress; // Not supported
PWCHAR DnsSuffix; // Not supported
PWCHAR Description;
PWCHAR FriendlyName;
BYTE PhysicalAddress[MAX_ADAPTER_ADDRESS_LENGTH];
DWORD PhysicalAddressLength;
DWORD Flags;
DWORD Mtu;
DWORD IfType;
IF_OPER_STATUS OperStatus;
DWORD Ipv6IfIndex;
DWORD ZoneIndices[16];
PIP_ADAPTER_PREFIX FirstPrefix; // Not supported
ULONG64 TransmitLinkSpeed; // Not supported
ULONG64 ReceiveLinkSpeed; // Not supported
PIP_ADAPTER_WINS_SERVER_ADDRESS_LH FirstWinsServerAddress; // Not supported
PIP_ADAPTER_GATEWAY_ADDRESS_LH FirstGatewayAddress;
ULONG Ipv4Metric; // Not supported
ULONG Ipv6Metric; // Not supported
IF_LUID Luid; // Not supported
SOCKET_ADDRESS Dhcpv4Server; // Not supported
NET_IF_COMPARTMENT_ID CompartmentId; // Not supported
NET_IF_NETWORK_GUID NetworkGuid; // Not supported
NET_IF_CONNECTION_TYPE ConnectionType;
TUNNEL_TYPE TunnelType; // Not supported
SOCKET_ADDRESS Dhcpv6Server; // Not supported
BYTE Dhcpv6ClientDuid[MAX_DHCPV6_DUID_LENGTH]; // Not supported
ULONG Dhcpv6ClientDuidLength; // Not supported
ULONG Dhcpv6Iaid; // Not supported
PIP_ADAPTER_DNS_SUFFIX FirstDnsSuffix; // Not supported
} IP_ADAPTER_ADDRESSES, *PIP_ADAPTER_ADDRESSES;
Members
Alignment
Reserved. Used by the compiler to align the structure.
Length
The length, in bytes, of this structure.
IfIndex
The index of the IPv4 interface with which these addresses are associated.
Next
A pointer to the next adapter address structure in the list.
AdapterName
An array of characters that contains the interface name from list of interfaces.
FirstUnicastAddress
A pointer to the first IP_ADAPTER_UNICAST_ADDRESS structure in a linked list of IP unicast addresses for the adapter.
Description
The interface name from a list of interfaces.
FriendlyName
A user-friendly name of an interface.
PhysicalAddress
The Media Access Control (MAC) address for the adapter. For example, on an Ethernet network this member would specify the Ethernet hardware address.
PhysicalAddressLength
The length, in bytes, of the address specified in the PhysicalAddress member. For interfaces that do not have a data-link layer, this value is zero.
Flags
A set of flags specifying various settings for the adapter.
| Flag | Meaning |
|---|---|
|
IP_ADAPTER_IPV4_ENABLED 0x0080 |
The adapter is enabled for IPv4. |
|
IP_ADAPTER_IPV6_ENABLED 0x0100 |
The adapter is enabled for IPv6. |
Mtu
The maximum transmission unit (MTU) size, in bytes.
IfType
The interface type as defined by the Internet Assigned Names Authority (IANA).
The table below lists common values for the interface type although many other values are possible.
| Value | Meaning |
|---|---|
|
IF_TYPE_ETHERNET_CSMACD 6 |
An Ethernet network interface. |
OperStatus
The operational status for the interface as defined in RFC 2863. For more information, see http://www.ietf.org/rfc/rfc2863.txt.
| Value | Meaning |
|---|---|
|
IfOperStatusUp 1 |
The interface is up and able to pass packets. |
|
IfOperStatusDown 2 |
The interface is down and unable to pass packets. The IfOperStatusDown state has two meanings, depending on the value of AdminStatus member.
|
|
IfOperStatusTesting 3 |
The interface is in testing mode. |
|
IfOperStatusUnknown 4 |
The operational status of the interface is unknown. |
|
IfOperStatusDormant 5 |
The interface is unable to pass packets (it is not up), but is in a pending state, waiting for some external event. For on-demand interfaces, this new state identifies the situation where the interface is waiting for events to place it in the IfOperStatusUp state. |
|
IfOperStatusNotPresent 6 |
A refinement on the IfOperStatusDown state which indicates that the relevant interface is down specifically because some component (typically, a hardware component) is not present in the managed system. |
|
IfOperStatusLowerLayerDown 7 |
A refinement on the IfOperStatusDown state. This new state indicates that this interface runs on top of one or more other interfaces and that this interface is down specifically because one or more of these lower-layer interfaces are down. |
Ipv6IfIndex
The interface index for the IPv6 IP address. This member is zero if IPv6 is not available on the interface.
ZoneIndices
An array of scope IDs for each scope level used for composing sockaddr structures. The SCOPE_LEVEL enumeration is used to index the array. On IPv6, a single interface may be assigned multiple IPv6 multicast addresses based on a scope ID.
ReceiveLinkSpeed
The current speed in bits per second of the receive link for the adapter.
TransmitLinkSpeed
The current speed in bits per second of the transmit link for the adapter.
FirstGatewayAddress
A pointer to the first IP_ADAPTER_GATEWAY_ADDRESS structure in a linked list of gateways for the adapter.
ConnectionType
The interface connection type for the adapter address.
Remarks
The GetAdaptersAddresses function retrieves information for IPv4 and IPv6 addresses and returns this information as a linked list of IP_ADAPTER_ADDRESSES structures
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
eRTOS 1.0 SDK |
ws2tcpip.h, iphlpapi.h |
RtTcpipApi.lib |
See Also: