IP Interface Information (IP Helper API)

Retrieves information about IP interfaces on the local computer.

Syntax


DWORD MIB_IF_TABLE_LEVEL; // Reserved.
typedef struct _MIB_IFTABLE {
  DWORD dwNumEntries;
  MIB_IFROW   table[ANY_SIZE];
} MIB_IFTABLE, *PMIB_IFTABLE;

typedef struct _MIB_IFROW {
  WCHAR       wszName[MAX_INTERFACE_NAME_LEN];
  DWORD       dwIndex;
  DWORD       dwType;
  DWORD       dwMtu;
  DWORD       dwSpeed;
  DWORD       dwPhysAddrLen;
  BYTE        bPhysAddr[MAX_PHYSADDR_LENGTH];
  DWORD       dwAdminStatus;
  DWORD       dwOperStatus;
  DWORD       dwLastChange;
  DWORD       dwPhysIfType;
  DWORD       dwPromiscuousMode;
  DWORD       dwForwardingEnabled;
} MIB_IFROW, *PMIB_IFROW;
            

Members

The _MIB_IFTABLE structure contains the following members:

Member Description
dwNumEntries The number of interface entries in the array.
table An array of MIB_IFROW structures. Each structure represents an interface.

The _MIB_IFROW structure contains the following members:

Member Description
wszName The name of the interface.
dwIndex The unique identifier for the interface.
dwType The type of the interface (e.g., Ethernet, Loopback).
dwMtu The Maximum Transmission Unit (MTU) for the interface.
dwSpeed The current speed of the interface in bits per second.
dwPhysAddrLen The length of the physical address in bytes.
bPhysAddr The physical address (MAC address) of the interface.
dwAdminStatus The administrative status of the interface (Up or Down).
dwOperStatus The operational status of the interface (Up or Down).
dwLastChange The time when the interface status last changed, in system ticks.
dwPhysIfType The type of the physical interface.
dwPromiscuousMode Indicates if promiscuous mode is enabled.
dwForwardingEnabled Indicates if IP forwarding is enabled for this interface.

Remarks

The GetIfTable function retrieves a table that contains multiprotocol interface information for the local computer. This information includes details like interface name, index, type, MTU, speed, MAC address, and operational status.

Note: This structure and the associated functions are part of the IP Helper API, which provides network configuration and management functionalities.

Requirements

Component Value
Minimum supported client Windows 2000 Professional
Minimum supported server Windows 2000 Server
Header ipifcons.h (include winsock2.h, windows.h)
Library Iphlpapi.lib
DLL Iphlpapi.dll

See Also