ConvertInterfaceLuidToIndex function

The ConvertInterfaceLuidToIndex function converts a locally unique identifier (LUID) for a network interface to the local index for the interface.

Note

The ConvertInterfaceXxx API family enumerates identifiers over all interfaces bound to TCP/IP, which may include virtual miniports, lightweight filters, tunnel adapters, and physical interfaces.

Syntax

NETIOAPI_API ConvertInterfaceLuidToIndex(
  _In_  const NET_LUID     *InterfaceLuid,
  _Out_       PNET_IFINDEX InterfaceIndex
);

Parameters

  • InterfaceLuid [in]
    A pointer to a NET_LUID union for the network interface.

  • InterfaceIndex [out]
    The local index value for the network interface.

Return value

ConvertInterfaceLuidToIndex returns STATUS_SUCCESS if the function succeeds. If the function fails, the InterfaceIndex parameter is set to NET_IFINDEX_UNSPECIFIED, and ConvertInterfaceLuidToIndex returns the following error code:

Return code Description
STATUS_INVALID_PARAMETER

One of the parameters is invalid. ConvertInterfaceLuidToIndex returns this error if either InterfaceLuid or InterfaceIndex is NULL, or if InterfaceLuid is invalid.

Remarks

The ConvertInterfaceLuidToIndex function is protocol-independent and works with network interfaces for both the IPv6 and IPv4 protocols.

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

PASSIVE_LEVEL

See also

ConvertInterfaceAliasToLuid

ConvertInterfaceGuidToLuid

ConvertInterfaceIndexToLuid

ConvertInterfaceLuidToAlias

ConvertInterfaceLuidToGuid

ConvertInterfaceLuidToNameA

ConvertInterfaceLuidToNameW

ConvertInterfaceNameToLuidA

ConvertInterfaceNameToLuidW

NET_LUID