Share via


MIB_IPFORWARDROW (Compact 2013)

3/26/2014

This structure contains information that describes an IP network route.

Syntax

typedef struct _MIB_IPFORWARDROW {
  DWORD dwForwardDest; 
  DWORD dwForwardMask; 
  DWORD dwForwardPolicy; 
  DWORD dwForwardNextHop; 
  DWORD dwForwardIfIndex; 
  DWORD dwForwardType; 
  DWORD dwForwardProto; 
  DWORD dwForwardAge; 
  DWORD dwForwardNextHopAS; 
  DWORD dwForwardMetric1; 
  DWORD dwForwardMetric2; 
  DWORD dwForwardMetric3; 
  DWORD dwForwardMetric4; 
  DWORD dwForwardMetric5; 
} MIB_IPFORWARDROW, *PMIB_IPFORWARDROW;

Members

  • dwForwardDest
    IP address of the destination host
  • dwForwardMask
    Subnet mask of the destination host
  • dwForwardPolicy
    The set of conditions that would cause the selection of a multipath route. This member is typically in IP TOS format. For more information, see RFC 1354.
  • dwForwardNextHop
    The IP address of the next hop in the route
  • dwForwardIfIndex
    The index of the interface for this route
  • dwForwardType
    The route type as defined in RFC 1354. The following table shows the possible values for this member:

    Value

    Description

    4

    The next hop is not the final destination (remote route)

    3

    The next hop is the final destination (local route)

    2

    The route is invalid

    1

    Other

  • dwForwardProto
    The protocol that generated the route
  • dwForwardAge
    The age of the route in seconds
  • dwForwardNextHopAS
    The autonomous system number of the next hop
  • dwForwardMetric1
    A routing-protocol-specific metric value, documented in RFC 1354
  • dwForwardMetric2
    A routing-protocol-specific metric value, documented in RFC 1354
  • dwForwardMetric3
    A routing-protocol-specific metric value, documented in RFC 1354
  • dwForwardMetric4
    A routing-protocol-specific metric value, documented in RFC 1354
  • dwForwardMetric5
    A routing-protocol-specific metric value, documented in RFC 1354

Remarks

The GetIpForwardTable function enumerates the IPv4 route entries on a local system and returns this information in a MIB_IPFORWARDTABLE structure that contains an array of MIB_IPFORWARDROW structure entries.

The dwForwardDesk, dwForwardMask, and dwForwardNextHop members of the MIB_IPFORWARDROW structure represent IPv4 addresses in network byte order.

The dwForwardProto member of the MIB_IPFORWARDROW structure specifies the protocol or routing mechanism that generated the route. Routing protocol identifiers are used to identify route information for the specified routing protocol. For example, MIB_IPPROTO_NETMGMT is used to identify route information for IP routing set through network management such as the DCHP, SNMP, or by calls to the CreateIpForwardEntry, DeleteIpForwardEntry , or SetIpForwardEntry functions.

An IPv4 address of 0.0.0.0 in the dwForwardDest member of the MIB_IPFORWARDROW structure is considered a default route. The MIB_IPFORWARDTABLE can contain multiple MIB_IPFORWARDROW entries with the dwForwardDest member set to 0.0.0.0 when there are multiple network adapters installed.

When dwForwardAge is set to INFINITE, the route will not be removed based on a time-out value. Any other value for dwForwardAge specifies the number of seconds since the route was added or modified in the network routing table.

Several members of the MIB_IPFORWARDROW structure are currently not used by IPv4 routing. These members include dwForwardPolicy, dwForwardNextHopAS, dwForwardMetric2, dwForwardMetric3, dwForwardMetric4, and dwForwardMetric5.

The header files organization has changed. This structure is defined in the Ipmib.h header file instead of in the Iprtrmib.h header file. Be aware that the Ipmib.h header file is automatically included in Iprtrmib.h, which is automatically included in the Iphlpapi.h header file. The Ipmib.h and Iprtrmib.h header files should never be used directly.

Example Code

To view an example that retrieves the MIB_IPFORWARDTABLE structure and then prints out the MIB_IPFORWARDROW structure entries in this table, see the GetIpForwardTable function.

Requirements

Header

iprtrmib.h,
ws2def.h,
ws2ipdef.h

See Also

Reference

MIB Structures
IP Helper Structures
CreateIpForwardEntry
DeleteIpForwardEntry
GetIpForwardTable
GetIpInterfaceEntry
MIB_IPFORWARDTABLE
MIB_IPINTERFACE_ROW
SetIpForwardEntry