NotifyStableUnicastIpAddressTable - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// netioapi.h

NETIOAPI_API NotifyStableUnicastIpAddressTable(
  _In_    ADDRESS_FAMILY                           Family,
  _Out_   PMIB_UNICASTIPADDRESS_TABLE              *Table,
  _In_    PSTABLE_UNICAST_IPADDRESS_TABLE_CALLBACK CallerCallback,
  _In_    PVOID                                    CallerContext,
  _Inout_ HANDLE                                   *NotificationHandle
);
View the official Windows hardware development documentation

NtDoc

No description available.

Windows hardware development documentation (notifystableunicastipaddresstable)

NotifyStableUnicastIpAddressTable function

The NotifyStableUnicastIpAddressTable function retrieves the stable unicast IP address table on a local computer.

Parameters

Return value

NotifyStableUnicastIpAddressTable returns STATUS_SUCCESS and the stable unicast IP table is returned in the Table parameter if the function succeeds immediately.

If the I/O request is pending, the function returns ERROR_IO_PENDING and the function that the CallerCallback parameter points to is called when the I/O request has completed with the stable unicast IP address table.

If the function fails, NotifyStableUnicastIpAddressTable returns one of the following error codes:

Return code Description
ERROR_INVALID_HANDLE An internal error occurred where an invalid handle was encountered.
STATUS_INVALID_PARAMETER An invalid parameter was passed to the function. This error is returned if the Table parameter was a NULL pointer, the NotificationHandle parameter was a NULL pointer, or the Family parameter was not either AF_INET, AF_INET6, or AF_UNSPEC.
STATUS_NOT_ENOUGH_MEMORY There was insufficient memory.
Other Use the FormatMessage function to obtain the message string for the returned error.

Remarks

All unicast IP addresses, except dial-on-demand addresses, are considered stable only if they are in the preferred state. For a normal unicast IP address entry, this state would correspond to a DadState member of the MIB_UNICASTIPADDRESS_ROW for the IP address that is set to IpDadStatePreferred. Every dial-on-demand address defines its own stability metric. Currently the only dial-on-demand address that the NotifyStableUnicastIpAddressTable function considers is the unicast IP address that the Teredo client uses on the local computer.

Your driver must set the Family parameter to either AF_INET, AF_INET6, or AF_UNSPEC.

When NotifyStableUnicastIpAddressTable is successful and returns STATUS_SUCCESS, the Table parameter returns the stable unicast IP address table on the local computer.

When NotifyStableUnicastIpAddressTable returns ERROR_IO_PENDING, which indicates that the I/O request is pending, the stable unicast IP address table is returned to the function in the CallerCallback parameter.

If the unicast IP address that Teredo uses is available on the local computer but not in the stable (qualified) state, NotifyStableUnicastIpAddressTable returns ERROR_IO_PENDING and the stable unicast IP address table is eventually returned by calling the function in the CallerCallback parameter. If the Teredo address is not available or is in the stable state and the other unicast IP addresses are in a stable state, the function in the CallerCallback parameter is never called.

The callback function that is specified in the CallerCallback parameter should be defined as a function of type VOID. The parameters that are passed to the callback function include the following.

Parameter Description
IN PVOID CallerContext The CallerContext parameter that is passed to the NotifyStableUnicastIpAddressTable function when it is registering the driver for notifications.
IN PMIB_UNICASTIPADDRESS_TABLE AddressTable A pointer to a MIB_UNICASTIPADDRESS_TABLE structure that contains the stable unicast IP address table on the local computer.

The NotifyStableUnicastIpAddressTable function is used primarily by drivers that use the Teredo client.

To cancel the notification after the callback is complete, call the CancelMibChangeNotify2 function, passing the NotificationHandle parameter that NotifyStableUnicastIpAddressTable returns.

Requirements

Target platform Universal
Version Available in Windows Vista and later versions of the Windows operating systems.
Header Netioapi.h (include Netioapi.h)
Library Netio.lib
IRQL < DISPATCH_LEVEL

See also

CancelMibChangeNotify2

CreateUnicastIpAddressEntry

DeleteUnicastIpAddressEntry

GetTeredoPort

GetUnicastIpAddressEntry

GetUnicastIpAddressTable

InitializeUnicastIpAddressEntry

MIB_NOTIFICATION_TYPE

MIB_UNICASTIPADDRESS_ROW

MIB_UNICASTIPADDRESS_TABLE

NotifyTeredoPortChange

NotifyUnicastIpAddressChange

SetUnicastIpAddressEntry