// ndis.h
NDIS_STATUS NdisIfGetNetLuidFromInterfaceIndex(
NET_IFINDEX ifIndex,
[out] PNET_LUID pNetLuid
);
View the official Windows Driver Kit DDI referenceNo description available.
The NdisIfGetNetLuidFromInterfaceIndex function gets the NET_LUID value that is associated with a network interface index.
ifIndexA network interface index that NDIS assigned to a NET_LUID value in the NdisIfRegisterInterface function.
pNetLuid [out]A pointer to a caller-supplied NET_LUID variable. If NdisIfGetNetLuidFromInterfaceIndex succeeds, NDIS writes the NET_LUID value that is associated with the specified network interface index to this variable.
NdisIfGetNetLuidFromInterfaceIndex returns one of the following status values:
| Return code | Description |
|---|---|
| NDIS_STATUS_SUCCESS | The operation completed successfully. |
| NDIS_STATUS_INTERFACE_NOT_FOUND | NdisIfGetNetLuidFromInterfaceIndex failed because the specified network interface index is not assigned to a registered interface. |
NDIS drivers can call the NdisIfGetNetLuidFromInterfaceIndex function to get the NET_LUID value that is associated with a network interface index.
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 NdisIfGetInterfaceIndexFromNetLuid function to obtain the interface index for a specified NET_LUID.
NdisIfGetInterfaceIndexFromNetLuid