GetIpInterfaceEntry (NETIOAPI) (Compact 7)
3/12/2014
This function retrieves IP information for the specified interface on a local device.
Syntax
NETIOAPI_API
GetIpInterfaceEntry(
IN OUT PMIB_IPINTERFACE_ROW Row
);
Parameters
- Row
A pointer to a MIB_IPINTERFACE_ROW structure that, on successful return, receives information for an interface on the local device. On input, your driver must set the InterfaceLuid member or the InterfaceIndex member of the MIB_IPINTERFACE_ROW to the interface to retrieve information for.
Return Value
Error Code | Meaning |
---|---|
STATUS_SUCCESS |
The function succeeds. |
STATUS_INVALID_PARAMETER |
An invalid parameter was passed to the function. This error is returned if a NULL pointer is passed in the Row parameter, the Family member of the MIB_IPINTERFACE_ROW structure that the Row parameter points to was not specified as AF_INET or AF_INET6, or the InterfaceLuid and InterfaceIndex members of the MIB_IPINTERFACE_ROW structure were unspecified. |
STATUS_NOT_FOUND |
The specified interface could not be found. This error is returned if the function cannot find the network interface that is specified by the InterfaceLuid or InterfaceIndex member of the MIB_IPINTERFACE_ROW structure that the Row parameter points to. |
Other |
Use the FormatMessage function to obtain the message string for the returned error. |
Remarks
On input, your driver must initialize the following members of the MIB_IPINTERFACE_ROW structure that the Row parameter points to.
- Family
Set to either AF_INET or AF_INET6.
- InterfaceLuid or InterfaceIndex
These members are used in the order that is listed earlier. So if InterfaceLuid is specified, this member is used to determine the interface. If no value was set for the InterfaceLuid member (the value of this member was set to zero), the InterfaceIndex member is next used to determine the interface.
On output, GetIpInterfaceEntry fills in the remaining members of the MIB_IPINTERFACE_ROW structure that the Row parameter points to.
Your driver must use the InitializeIpInterfaceEntry (NETIOAPI) function to initialize the fields of a MIB_IPINTERFACE_ROW structure entry with default values. A driver can then change the fields in the MIB_IPINTERFACE_ROW entry that it wants to modify, and then call the SetIpInterfaceEntry (NETIOAPI) function.
See Also
Reference
IP Helper Kernel-Mode Functions
GetBestRoute2 (NETIOAPI)
GetIfEntry2 (NETIOAPI)
GetIfTable2 (NETIOAPI)
GetIfTable2Ex (NETIOAPI)
GetIpInterfaceTable (NETIOAPI)
MIB_IF_ROW2
MIB_IF_TABLE2
MIB_IPINTERFACE_ROW
MIB_IPINTERFACE_TABLE
SetIpInterfaceEntry (NETIOAPI)