This documentation is archived and is not being maintained.

IPv6GetBestRouteInfo function

The IPv6GetBestRouteInfo function determines the best route to an IPv6 destination address.

Syntax


IP_STATUS IPv6GetBestRouteInfo(
  _In_  const IPv6Addr      *Addr,
  _In_        ulong         ScopeId,
  _In_        ulong         Index,
  _Out_       IP6RouteEntry *Ire
);

Parameters

Addr [in]

A pointer to an IPv6Addr structure that contains the IPv6 destination address.

ScopeId [in]

The IPv6 scope identifier for the destination address.

Index [in]

The interface index for the network interface from which packets are sent to the destination address. This parameter is optional and can be zero. A value of zero indicates that the result should not be constrained to a particular network interface.

Ire [out]

A pointer to an IP6RouteEntry structure that receives the route information.

Return value

IPv6GetBestRouteInfo returns one of the following IP_STATUS codes:

Return codeDescription
IP_SUCCESS

The route information was obtained successfully. The IP6RouteEntry structure pointed to by the Ire parameter contains the route information.

IP_DEST_NO_ROUTE

The destination address is unreachable.

IP_BAD_ROUTE

A source address could not be found for sending packets to the destination address.

IP_PARAMETER_PROBLEM

An invalid value was specified for one of the parameters.

IP_NO_RESOURCES

A memory allocation error occurred.

 

Remarks

An IPv6 firewall-hook driver calls the IPv6GetBestRouteInfo function from within its FirewallHook function if it needs to examine the route to a packet's destination address to determine whether the network packet should be accepted or dropped.

Requirements

Target platform

Desktop

Version

Available on Microsoft Windows XP with Service Pack 2 (SP2) and Windows Server 2003 with Service Pack 1 (SP1).

Header

Ip6firewall.h (include Ip6firewall.h)

Library

Tcpip6.lib

IRQL

Any level

See also

FirewallHook
IP6RouteEntry
IPv6Addr

 

 

Send comments about this topic to Microsoft

Show: