MIB_IF_ROW2 structure (netioapi.h)
The MIB_IF_ROW2 structure stores information about a particular interface.
typedef struct _MIB_IF_ROW2 {
NET_LUID InterfaceLuid;
NET_IFINDEX InterfaceIndex;
GUID InterfaceGuid;
WCHAR Alias[IF_MAX_STRING_SIZE + 1];
WCHAR Description[IF_MAX_STRING_SIZE + 1];
ULONG PhysicalAddressLength;
UCHAR PhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH];
UCHAR PermanentPhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH];
ULONG Mtu;
IFTYPE Type;
TUNNEL_TYPE TunnelType;
NDIS_MEDIUM MediaType;
NDIS_PHYSICAL_MEDIUM PhysicalMediumType;
NET_IF_ACCESS_TYPE AccessType;
NET_IF_DIRECTION_TYPE DirectionType;
struct {
BOOLEAN HardwareInterface : 1;
BOOLEAN FilterInterface : 1;
BOOLEAN ConnectorPresent : 1;
BOOLEAN NotAuthenticated : 1;
BOOLEAN NotMediaConnected : 1;
BOOLEAN Paused : 1;
BOOLEAN LowPower : 1;
BOOLEAN EndPointInterface : 1;
} InterfaceAndOperStatusFlags;
IF_OPER_STATUS OperStatus;
NET_IF_ADMIN_STATUS AdminStatus;
NET_IF_MEDIA_CONNECT_STATE MediaConnectState;
NET_IF_NETWORK_GUID NetworkGuid;
NET_IF_CONNECTION_TYPE ConnectionType;
ULONG64 TransmitLinkSpeed;
ULONG64 ReceiveLinkSpeed;
ULONG64 InOctets;
ULONG64 InUcastPkts;
ULONG64 InNUcastPkts;
ULONG64 InDiscards;
ULONG64 InErrors;
ULONG64 InUnknownProtos;
ULONG64 InUcastOctets;
ULONG64 InMulticastOctets;
ULONG64 InBroadcastOctets;
ULONG64 OutOctets;
ULONG64 OutUcastPkts;
ULONG64 OutNUcastPkts;
ULONG64 OutDiscards;
ULONG64 OutErrors;
ULONG64 OutUcastOctets;
ULONG64 OutMulticastOctets;
ULONG64 OutBroadcastOctets;
ULONG64 OutQLen;
} MIB_IF_ROW2, *PMIB_IF_ROW2;
InterfaceLuid
Type: NET_LUID
The locally unique identifier (LUID) for the network interface.
InterfaceIndex
Type: NET_IFINDEX
The index that identifies the network interface. This index value may change when a network adapter is disabled and then enabled, and should not be considered persistent.
InterfaceGuid
Type: GUID
The GUID for the network interface.
Alias[IF_MAX_STRING_SIZE + 1]
Type: WCHAR[IF_MAX_STRING_SIZE + 1]
A NULL-terminated Unicode string that contains the alias name of the network interface.
Description[IF_MAX_STRING_SIZE + 1]
Type: WCHAR[IF_MAX_STRING_SIZE + 1]
A NULL-terminated Unicode string that contains a description of the network interface.
PhysicalAddressLength
Type: ULONG
The length, in bytes, of the physical hardware address specified by the PhysicalAddress member.
PhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH]
Type: UCHAR[IF_MAX_PHYS_ADDRESS_LENGTH]
The physical hardware address of the adapter for this network interface.
PermanentPhysicalAddress[IF_MAX_PHYS_ADDRESS_LENGTH]
Type: UCHAR[IF_MAX_PHYS_ADDRESS_LENGTH]
The permanent physical hardware address of the adapter for this network interface.
Mtu
Type: ULONG
The maximum transmission unit (MTU) size, in bytes, for this network interface.
Type
Type: IFTYPE
The interface type as defined by the Internet Assigned Names Authority (IANA). For more information, see http://www.iana.org/assignments/ianaiftype-mib. Possible values for the interface type are listed in the Ipifcons.h header file.
The table below lists common values for the interface type although many other values are possible.
TunnelType
Type: TUNNEL_TYPE
The encapsulation method used by a tunnel if the Type member is IF_TYPE_TUNNEL. The tunnel type is defined by the Internet Assigned Names Authority (IANA). For more information, see http://www.iana.org/assignments/ianaiftype-mib. This member can be one of the values from the TUNNEL_TYPE enumeration type defined in the Ifdef.h header file.
MediaType
Type: NDIS_MEDIUM
The NDIS media type for the interface. This member can be one of the values from the NDIS_MEDIUM enumeration type defined in the Ntddndis.h header file.
PhysicalMediumType
Type: NDIS_PHYSICAL_MEDIUM
The NDIS physical medium type. This member can be one of the values from the NDIS_PHYSICAL_MEDIUM enumeration type defined in the Ntddndis.h header file.
AccessType
Type: NET_IF_ACCESS_TYPE
The interface access type. This member can be one of the values from the NET_IF_ACCESS_TYPE enumeration type defined in the Ifdef.h header file.
DirectionType
Type: NET_IF_DIRECTION_TYPE
The interface direction type. This member can be one of the values from the NET_IF_DIRECTION_TYPE enumeration type defined in the Ifdef.h header file.
InterfaceAndOperStatusFlags
A set of flags that provide information about the interface. These flags are combined with a bitwise OR operation. If none of the flags applies, then this member is set to zero.
InterfaceAndOperStatusFlags.HardwareInterface
Type: BOOLEAN Set if the network interface is for hardware.
InterfaceAndOperStatusFlags.FilterInterface
Type: BOOLEAN Set if the network interface is for a filter module.
InterfaceAndOperStatusFlags.ConnectorPresent
Type: BOOLEAN Set if a connector is present on the network interface. This value is set if there is a physical network adapter.
InterfaceAndOperStatusFlags.NotAuthenticated
Type: BOOLEAN Set if the default port for the network interface is not authenticated. If a network interface is not authenticated by the target, then the network interface is not in an operational mode. Although this applies to both wired and wireless network connections, authentication is more common for wireless network connections.
InterfaceAndOperStatusFlags.NotMediaConnected
Type: BOOLEAN Set if the network interface is not in a media-connected state. If a network cable is unplugged for a wired network, this would be set. For a wireless network, this is set for the network adapter that is not connected to a network.
InterfaceAndOperStatusFlags.Paused
Type: BOOLEAN Set if the network stack for the network interface is in the paused or pausing state. This does not mean that the computer is in a hibernated state.
InterfaceAndOperStatusFlags.LowPower
Type: BOOLEAN Set if the network interface is in a low power state.
InterfaceAndOperStatusFlags.EndPointInterface
Type: BOOLEAN Set if the network interface is an endpoint device and not a true network interface that connects to a network. This can be set by devices such as smart phones which use networking infrastructure to communicate to the PC but do not provide connectivity to an external network. It is mandatory for these types of devices to set this flag.
OperStatus
Type: IF_OPER_STATUS
The operational status for the interface as defined in RFC 2863 as IfOperStatus. For more information, see http://www.ietf.org/rfc/rfc2863.txt. This member can be one of the values from the IF_OPER_STATUS enumeration type defined in the Ifdef.h header file.
AdminStatus
Type: NET_IF_ADMIN_STATUS
The administrative status for the interface as defined in RFC 2863. For more information, see http://www.ietf.org/rfc/rfc2863.txt. This member can be one of the values from the NET_IF_ADMIN_STATUS enumeration type defined in the Ifdef.h header file.
MediaConnectState
Type: NET_IF_MEDIA_CONNECT_STATE
The connection state of the interface. This member can be one of the values from the NET_IF_MEDIA_CONNECT_STATE enumeration type defined in the Ifdef.h header file.
NetworkGuid
Type: NET_IF_NETWORK_GUID
The GUID that is associated with the network that the interface belongs to.
ConnectionType
Type: NET_IF_CONNECTION_TYPE
The NDIS network interface connection type. This member can be one of the values from the NET_IF_CONNECTION_TYPE enumeration type defined in the Ifdef.h header file.
TransmitLinkSpeed
Type: ULONG64
The speed in bits per second of the transmit link.
ReceiveLinkSpeed
Type: ULONG64
The speed in bits per second of the receive link.
InOctets
Type: ULONG64
The number of octets of data received without errors through this interface. This value includes octets in unicast, broadcast, and multicast packets.
InUcastPkts
Type: ULONG64
The number of unicast packets received without errors through this interface.
InNUcastPkts
Type: ULONG64
The number of non-unicast packets received without errors through this interface. This value includes broadcast and multicast packets.
InDiscards
Type: ULONG64
The number of inbound packets which were chosen to be discarded even though no errors were detected to prevent the packets from being deliverable to a higher-layer protocol.
InErrors
Type: ULONG64
The number of incoming packets that were discarded because of errors.
InUnknownProtos
Type: ULONG64
The number of incoming packets that were discarded because the protocol was unknown.
InUcastOctets
Type: ULONG64
The number of octets of data received without errors in unicast packets through this interface.
InMulticastOctets
Type: ULONG64
The number of octets of data received without errors in multicast packets through this interface.
InBroadcastOctets
Type: ULONG64
The number of octets of data received without errors in broadcast packets through this interface.
OutOctets
Type: ULONG64
The number of octets of data transmitted without errors through this interface. This value includes octets in unicast, broadcast, and multicast packets.
OutUcastPkts
Type: ULONG64
The number of unicast packets transmitted without errors through this interface.
OutNUcastPkts
Type: ULONG64
The number of non-unicast packets transmitted without errors through this interface. This value includes broadcast and multicast packets.
OutDiscards
Type: ULONG64
The number of outgoing packets that were discarded even though they did not have errors.
OutErrors
Type: ULONG64
The number of outgoing packets that were discarded because of errors.
OutUcastOctets
Type: ULONG64
The number of octets of data transmitted without errors in unicast packets through this interface.
OutMulticastOctets
Type: ULONG64
The number of octets of data transmitted without errors in multicast packets through this interface.
OutBroadcastOctets
Type: ULONG64
The number of octets of data transmitted without errors in broadcast packets through this interface.
OutQLen
Type: ULONG64
The transmit queue length. This field is not currently used.
The MIB_IF_ROW2 structure is defined on Windows Vista and later.
The values for the Type field are defined in the Ipifcons.h header file. Only the possible values listed in the description of the Type member are currently supported.
Note that the Netioapi.h header file is automatically included in the Iphlpapi.h header file. The Netioapi.h header file should never be used directly.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Header | netioapi.h (include Iphlpapi.h) |