MIB_IPFORWARD_ROW2 - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// netioapi.h

typedef struct _MIB_IPFORWARD_ROW2 {
  NET_LUID          InterfaceLuid;
  NET_IFINDEX       InterfaceIndex;
  IP_ADDRESS_PREFIX DestinationPrefix;
  SOCKADDR_INET     NextHop;
  UCHAR             SitePrefixLength;
  ULONG             ValidLifetime;
  ULONG             PreferredLifetime;
  ULONG             Metric;
  NL_ROUTE_PROTOCOL Protocol;
  BOOLEAN           Loopback;
  BOOLEAN           AutoconfigureAddress;
  BOOLEAN           Publish;
  BOOLEAN           Immortal;
  ULONG             Age;
  NL_ROUTE_ORIGIN   Origin;
} MIB_IPFORWARD_ROW2, *PMIB_IPFORWARD_ROW2;
View the official Windows hardware development documentation

NtDoc

No description available.

Windows hardware development documentation (mib-ipforward-row2)

MIB_IPFORWARD_ROW2 structure

The MIB_IPFORWARD_ROW2 structure stores information about an IP route entry.

Members

Remarks

The GetIpForwardTable2 function enumerates the IP route entries on a local computer and returns this information in a MIB_IPFORWARD_TABLE2 structure as an array of MIB_IPFORWARD_ROW2 entries.

The GetIpForwardEntry2 function retrieves a single IP route entry and returns this information in a MIB_IPFORWARD_ROW2 structure.

An entry with the Prefix and the PrefixLength members of IP_ADDRESS_PREFIX set to zero in the DestinationPrefix member in the MIB_IPFORWARD_ROW2 structure is considered a default route. The MIB_IPFORWARD_TABLE2 might contain multiple MIB_IPFORWARD_ROW2 entries with the Prefix and the PrefixLength members of the IP_ADDRESS_PREFIX set to zero in the DestinationPrefix member when there are multiple network adapters installed.

The Metric member of a MIB_IPFORWARD_ROW2 entry is a value that is assigned to an IP route for a particular network interface that identifies the cost that is associated with using that route. For example, the metric can be valued in terms of link speed, hop count, or time delay. Automatic metric is a feature on Windows XP and later versions of the Windows operating systems that automatically configures the metric for the local routes that are based on link speed. By default, the automatic metric feature is enabled (the UseAutomaticMetric member of the MIB_IPINTERFACE_ROW structure is set to TRUE) on Windows XP and later. You can also manually configure this feature to assign a specific metric to an IP route.

The route metric that is specified in the Metric member of the MIB_IPFORWARD_ROW2 structure represents only the route metric offset. The complete metric is a combination of this route metric offset added to the interface metric that is specified in the Metric member of the MIB_IPINTERFACE_ROW structure of the associated interface. A driver can retrieve the interface metric by calling the GetIpInterfaceEntry function.

Requirements

Version Available in Windows Vista and later versions of the Windows operating systems.
Header Netioapi.h (include Netioapi.h)

See also

CreateIpForwardEntry2

DeleteIpForwardEntry2

GetIpForwardEntry2

GetIpForwardTable2

GetIpInterfaceEntry

IP_ADDRESS_PREFIX

MIB_IPFORWARD_TABLE2

MIB_IPINTERFACE_ROW

NL_ROUTE_ORIGIN

NL_ROUTE_PROTOCOL

SetIpForwardEntry2