IP_ADAPTER_UNICAST_ADDRESS

The IP_ADAPTER_UNICAST_ADDRESS structure stores a single unicast IP address in a linked list of IP addresses for a particular adapter.

Syntax

typedef struct _IP_ADAPTER_UNICAST_ADDRESS {
    union {
     struct {
      ULONG Length;
      DWORD Flags; 						// Not supported
     };
    };
	struct _IP_ADAPTER_UNICAST_ADDRESS  *Next;
	SOCKET_ADDRESS Address;
	IP_PREFIX_ORIGIN PrefixOrigin;
	IP_SUFFIX_ORIGIN SuffixOrigin;
	IP_DAD_STATE DadState;
	ULONG ValidLifetime;
	ULONG PreferredLifetime;
	ULONG LeaseLifetime;
	UINT8 OnLinkPrefixLength;
} IP_ADAPTER_UNICAST_ADDRESS, *PIP_ADAPTER_UNICAST_ADDRESS;
	

Members

Length

The length, in bytes, of this structure.

Next

A pointer to the next IP adapter address structure in the list.

Address

The IP address for this unicast IP address entry. This member can be an IPv6 address or an IPv4 address.

PrefixOrigin

The prefix or network part of the IP address.

SuffixOrigin

The suffix or host part of the IP address.

DadState

The duplicate address detection (DAD) state. Does not check the actual state, but returns IpDadStatePreferred.

ValidLifetime

The maximum lifetime, in seconds, that the IP address is valid. A value of 0xffffffff is considered to be infinite.

PreferredLifetime

The preferred lifetime, in seconds, that the IP address is valid. A value of 0xffffffff is considered to be infinite.

LeaseLifetime

Returns the value of ValidLifetime.

OnLinkPrefixLength

The length, in bits, of the prefix or network part of the IP address. For a unicast IPv4 address, any value greater than 32 is an illegal value. For a unicast IPv6 address, any value greater than 128 is an illegal value. A value of 255 is commonly used to represent an illegal value.

Remarks

The IP_ADAPTER_ADDRESSES structure is retrieved by the GetAdaptersAddresses function. The FirstUnicastAddress member of the IP_ADAPTER_ADDRESSES structure is a pointer to a linked list of IP_ADAPTER_UNICAST_ADDRESS structures.

The Length member should be used to determine which version of the IP_ADAPTER_UNICAST_ADDRESS structure is being used.

Requirements

Minimum Supported Version RTX64 2014 with Service Pack 2
Header ws2tcpip.h, iphlpapi.h
Library Rtx_Rtss.lib

See Also:

GetAdaptersAddresses

IP_ADAPTER_ADDRESSES