Compartir a través de


2.2.1.2.11 INTERFACE_ROUTE_INFO

The INTERFACE_ROUTE_INFO structure MAY<25> be used or MIB_IPFORWARDROW (section 2.2.1.2.35) structure MAY<26> be used to specify the routes to be added or deleted on the RRAS server. Whenever this structure is used, the InfoType of RTR_TOC_ENTRY (section 2.2.1.2.4) structure MUST be 0xFFFF0005 to specify IP route information.<27>

This structure is used in the following methods:

  • RRouterInterfaceTransportAdd (section 3.1.4.18)

  • RRouterInterfaceTransportGetInfo (section 3.1.4.19)

  • RRouterInterfaceTransportSetInfo (section 3.1.4.20)

     typedef struct _INTERFACE_ROUTE_INFO {
       union {
         struct {
           DWORD dwRtInfoDest;
           DWORD dwRtInfoMask;
           DWORD dwRtInfoPolicy;
           DWORD dwRtInfoNextHop;
           DWORD dwRtInfoAge;
           DWORD dwRtInfoNextHopAS;
           DWORD dwRtInfoMetric1;
           DWORD dwRtInfoMetric2;
           DWORD dwRtInfoMetric3;
         };
         struct {
           IN6_ADDR DestinationPrefix;
           DWORD DestPrefixLength;
           IN6_ADDR NextHopAddress;
           ULONG ValidLifeTime;
           DWORD Flags;
           ULONG Metric;
         };
       };
       DWORD dwRtInfoIfIndex;
       DWORD dwRtInfoType;
       DWORD dwRtInfoProto;
       DWORD dwRtInfoPreference;
       DWORD dwRtInfoViewSet;
       BOOL bV4;
     } INTERFACE_ROUTE_INFO,
      *PINTERFACE_ROUTE_INFO;
    

dwRtInfoDest: This MUST be the destination IPv4 address of the route. An entry with an IPv4 address of 0.0.0.0 is considered a default route. This member cannot be set to a multicast IPv4 address.

dwRtInfoMask: This MUST be the IPv4 subnet mask to be logically ANDed with the destination IPv4 address before being compared to the value in the dwRtInfoDest member. See [RFC950].

dwRtInfoPolicy: This MUST be set to the conditions that would cause the selection of a multipath route (the set of next hops for a given destination). This member is typically in IP TOS format. The encoding of this member is specified in [RFC1354].

dwRtInfoNextHop: This MUST be the IPv4 address of the next system in the route. Otherwise, this member SHOULD be an IPv4 address of 0.0.0.0.

dwRtInfoAge: This MUST be the number of seconds since the route was added or modified in the network routing table.

dwRtInfoNextHopAS: This MUST be the autonomous system number of the next hop. When this member is unknown or not relevant to the protocol or routing mechanism specified in dwRtInfoProto, this value SHOULD be set to 0. This value is documented in [RFC1354].

dwRtInfoMetric1: This MUST be the primary routing metric value for this route. The semantics of this metric are determined by the routing protocol specified in the dwRtInfoProto member. If this metric is not used, its value SHOULD be set to -1. This value is documented in [RFC1354].

dwRtInfoMetric2: This MUST be an alternate routing metric value for this route. The semantics of this metric are determined by the routing protocol specified in the dwRtInfoProto member. If this metric is not used, its value SHOULD be set to -1. This value is documented in [RFC1354].

dwRtInfoMetric3: This MUST be an alternate routing metric value for this route. The semantics of this metric are determined by the routing protocol specified in the dwRtInfoProto member. If this metric is not used, its value SHOULD be set to -1. This value is documented in [RFC1354].

DestinationPrefix: This MUST be the IPv6 address prefix for the destination IP address for this route.

DestPrefixLength: The length, in bits, of the site prefix or network part of the IP address specified in DestinationPrefix. Any value greater than 128 is an illegal value. A value of 255 is commonly used to represent an illegal value.

NextHopAddress: This MUST be the IPv6 address of the next system or gateway for a remote route. If the route is to a local loopback address or an IP address on the local link, the next hop is unspecified (all zeros). For a local loopback route, this member SHOULD be an IPv6 address of 0::0.

ValidLifeTime: The maximum time, in seconds, the IP route entry is valid. A value of 0xFFFFFFFF is infinite.

Flags: Reserved. This MUST be set to 0.

Metric: The route metric offset for this IP route entry. The semantics of this metric are determined by the routing protocol specified in dwRtInfoProto. If this metric is not used, its value SHOULD be set to -1. This value is documented in [RFC4292].

dwRtInfoIfIndex: This MUST be the index of the local interface through which the next hop of this route is reachable.

dwRtInfoType: This MUST be the route type as specified in [RFC1354].

The following list shows the possible values for this member.<28>

Value

Meaning

MIB_IPROUTE_TYPE_OTHER

0x00000001

A type other than what is specified in [RFC1354].

MIB_IPROUTE_TYPE_INVALID

0x00000002

An invalid route is logically deleted.

MIB_IPROUTE_TYPE_DIRECT

0x00000003

A local route where the next hop is the final destination (a local interface).

MIB_IPROUTE_TYPE_INDIRECT

0x00000004

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

dwRtInfoProto: The protocol or routing mechanism that generated the route. It MUST be one of the values specified in the MIB_IPFORWARD_PROTO enumeration.

dwRtInfoPreference: Specifies the route preference as determined by the routing protocol in dwRtInfoProto.

dwRtInfoViewSet: Specifies the Route Information Table views. It MUST be a combination of the following values, or a combination of RTM_VIEW_MASK_UCAST and RTM_VIEW_MASK_MCAST.

Value

Meaning

RTM_VIEW_MASK_ANY

0x00000000

This value is used to define or set the mask for the Route Information Table view. This value is a mask for any type of route.

RTM_VIEW_MASK_UCAST

0x00000001

This value is used to define or set the mask for Route Information Table view. This value is a mask for unicast routes.

RTM_VIEW_MASK_MCAST

0x00000002

This value is used to define or set the mask for the Route Information Table view. This value is a mask for multicast routes.

RTM_VIEW_MASK_ALL

0xFFFFFFFF

This value is used to define or set the mask for the Route Information Table view. This value is a mask for all types of routes.

bV4: Set to 1 if it is an IPV4 route; set to 0 to indicate an IPV6 route. For an IPV4 route, the first structure in the union is used. For an IPV6 route, the second structure in the union is used.