MIB_IFROW structure
The MIB_IFROW structure stores information about a particular interface.
Syntax
typedef struct _MIB_IFROW { WCHAR wszName[MAX_INTERFACE_NAME_LEN]; DWORD dwIndex; DWORD dwType; DWORD dwMtu; DWORD dwSpeed; DWORD dwPhysAddrLen; BYTE bPhysAddr[MAXLEN_PHYSADDR]; DWORD dwAdminStatus; DWORD dwOperStatus; DWORD dwLastChange; DWORD dwInOctets; DWORD dwInUcastPkts; DWORD dwInNUcastPkts; DWORD dwInDiscards; DWORD dwInErrors; DWORD dwInUnknownProtos; DWORD dwOutOctets; DWORD dwOutUcastPkts; DWORD dwOutNUcastPkts; DWORD dwOutDiscards; DWORD dwOutErrors; DWORD dwOutQLen; DWORD dwDescrLen; BYTE bDescr[MAXLEN_IFDESCR]; } MIB_IFROW, *PMIB_IFROW;
Members
- wszName
-
Type: WCHAR[MAX_INTERFACE_NAME_LEN]
-
A pointer to a Unicode string that contains the name of the interface.
- dwIndex
-
Type: DWORD
-
The index that identifies the interface. This index value may change when a network adapter is disabled and then enabled, and should not be considered persistent.
- dwType
-
Type: DWORD
-
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.
- dwMtu
-
Type: DWORD
-
The Maximum Transmission Unit (MTU) size in bytes.
- dwSpeed
-
Type: DWORD
-
The speed of the interface in bits per second.
- dwPhysAddrLen
-
Type: DWORD
-
The length, in bytes, of the physical address specified by the bPhysAddr member.
- bPhysAddr
-
Type: BYTE[MAXLEN_PHYSADDR]
-
The physical address of the adapter for this interface.
- dwAdminStatus
-
Type: DWORD
-
The interface is administratively enabled or disabled.
- dwOperStatus
-
Type: DWORD
-
The operational status of the interface. This member can be one of the following values defined in the INTERNAL_IF_OPER_STATUS enumeration defined in the Ipifcons.h header file.
- dwLastChange
-
Type: DWORD
-
The length of time, in hundredths of seconds (10^-2 sec), starting from the last computer restart, when the interface entered its current operational state. This value rolls over after 2^32 hundredths of a second.
The dwLastChange member is not currently supported by NDIS. On Windows Vista and later, NDIS returns zero for this member. On earlier versions of Windows, an arbitrary value is returned in this member for the interfaces supported by NDIS. For interfaces supported by other interface providers, they might return an appropriate value.
- dwInOctets
-
Type: DWORD
-
The number of octets of data received through this interface.
- dwInUcastPkts
-
Type: DWORD
-
The number of unicast packets received through this interface.
- dwInNUcastPkts
-
Type: DWORD
-
The number of non-unicast packets received through this interface. Broadcast and multicast packets are included.
- dwInDiscards
-
Type: DWORD
-
The number of incoming packets that were discarded even though they did not have errors.
- dwInErrors
-
Type: DWORD
-
The number of incoming packets that were discarded because of errors.
- dwInUnknownProtos
-
Type: DWORD
-
The number of incoming packets that were discarded because the protocol was unknown.
- dwOutOctets
-
Type: DWORD
-
The number of octets of data sent through this interface.
- dwOutUcastPkts
-
Type: DWORD
-
The number of unicast packets sent through this interface.
- dwOutNUcastPkts
-
Type: DWORD
-
The number of non-unicast packets sent through this interface. Broadcast and multicast packets are included.
- dwOutDiscards
-
Type: DWORD
-
The number of outgoing packets that were discarded even though they did not have errors.
- dwOutErrors
-
Type: DWORD
-
The number of outgoing packets that were discarded because of errors.
- dwOutQLen
-
Type: DWORD
-
The transmit queue length. This field is not currently used.
- dwDescrLen
-
Type: DWORD
-
The length, in bytes, of the bDescr member.
- bDescr
-
Type: BYTE[MAXLEN_IFDESCR]
-
A description of the interface.
Remarks
The dwSpeed member of the MIB_IFROW structure will be incorrect for very high-speed network interfaces (10 Gbit/s network adapter, for example) since the maximum value that can be store in a DWORD is 4,294,967,295. Applications should use the MIB_IF_ROW2 structure returned by the GetIfEntry2 and GetIfTable2 functions or the IP_ADAPTER_ADDRESSES structure returned by the GetAdaptersAddresses function for determining the speed for very high-speed network interfaces.
On the Microsoft Windows Software Development Kit (SDK) released for Windows Vista and later, the organization of header files has changed and the MIB_IFROW structure is defined in the Ifmib.h header file not in the Iprtrmib.h header file. Note that the Ifmib.h header file is automatically included in Iprtrmib.h which is automatically included in the Iphlpapi.h header file. The Ifmib.h and Iprtrmib.h header files should never be used directly.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
See also
- GetAdaptersAddresses
- GetIfEntry
- GetIfEntry2
- IP_ADAPTER_ADDRESSES
- MIB_IF_TABLE2
- MIB_IFSTATUS
- MIB_IFTABLE
- MPR_INTERFACE_0