// ndis.h
NDIS_STATUS NdisIfGetInterfaceIndexFromNetLuid(
[in] NET_LUID NetLuid,
[out] PNET_IFINDEX pIfIndex
);
View the official Windows Driver Kit DDI referenceNo description available.
The NdisIfGetInterfaceIndexFromNetLuid function gets the network interface index that is associated with a NET_LUID value.
NetLuid [in]A NET_LUID value that identifies a network interface.
pIfIndex [out]A pointer to a caller-supplied interface index variable. If NdisIfGetInterfaceIndexFromNetLuid succeeds, NDIS writes the network interface index that is associated with the specified NET_LUID to this variable.
NdisIfGetInterfaceIndexFromNetLuid returns one of the following status values:
| Return code | Description |
|---|---|
| NDIS_STATUS_SUCCESS | The operation completed successfully. |
| NDIS_STATUS_INTERFACE_NOT_FOUND | NdisIfGetInterfaceIndexFromNetLuid failed because the specified NET_LUID was not present in the list of registered interfaces. |
NDIS drivers can call the NdisIfGetInterfaceIndexFromNetLuid function to get the network interface index that is associated with a NET_LUID value.
For the interfaces that the NDIS proxy provider service manages, NDIS provides the interface index and NET_LUID in various driver initialization structures:
NDIS assigns an interface index to a network interface when the interface provider calls the NdisIfRegisterInterface function. An interface provider calls the NDIS_MAKE_NET_LUID macro to create the NET_LUID value before it registers an interface.
The interface index value can change without a computer restart. Deregistering and re-registering an interface that is associated with a NET_LUID value might result in different interface index values. Do not confuse the interface index with the NET_LUID index that persists after a computer restarts.
NDIS provides the NdisIfGetNetLuidFromInterfaceIndex function to get the NET_LUID value that is associated with a specified interface index.
NdisIfGetNetLuidFromInterfaceIndex