NdisIfGetInterfaceIndexFromNetLuid function (ndis.h)
The NdisIfGetInterfaceIndexFromNetLuid function gets the network interface index that is associated with a NET_LUID value.
Syntax
NDIS_STATUS NdisIfGetInterfaceIndexFromNetLuid(
[in] NET_LUID NetLuid,
[out] PNET_IFINDEX pIfIndex
);
Parameters
[in] NetLuid
A NET_LUID value that identifies a network interface.
[out] pIfIndex
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.
Return value
NdisIfGetInterfaceIndexFromNetLuid returns one of the following status values:
Return code | Description |
---|---|
|
The operation completed successfully. |
|
NdisIfGetInterfaceIndexFromNetLuid failed because the specified NET_LUID was not present in the list of registered interfaces. |
Remarks
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:
- Miniport drivers can obtain the interface index and NET_LUID for a miniport adapter in the NDIS_MINIPORT_INIT_PARAMETERS structure.
- Filter drivers can obtain the interface index and NET_LUID for a filter module in the NDIS_FILTER_ATTACH_PARAMETERS structure.
- Protocol drivers can obtain the interface index and NET_LUID of the highest and the lowest interfaces on a driver stack in the NDIS_BIND_PARAMETERS structure.
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported in NDIS 6.0 and later. |
Target Platform | Desktop |
Header | ndis.h (include Ndis.h) |
Library | Ndis.lib |
IRQL | PASSIVE_LEVEL |
DDI compliance rules | Irql_Interfaces_Function(ndis) |