Compartir a través de


LookupRouteInformation function

Do not write a firewall-hook driver to process incoming and outgoing packets. For more information, see Firewall-Hook Drivers.

The LookupRouteInformation function retrieves packet-routing information.

Syntax

NTSTATUS LookupRouteInformation(
  _In_      VOID             *RouteLookupData,
  _Out_opt_ VOID             *RouteEntry,
  _In_opt_  IPROUTEINFOCLASS RouteInfoClass,
  _Out_opt_ VOID             *RouteInformation,
  _Out_opt_ UINT             *RouteInfoLength
);

Parameters

  • RouteLookupData [in]
    Pointer to a buffer that contains data from a route lookup table.

  • RouteEntry [out, optional]
    Pointer to a buffer that optionally receives route-entry information; NULL if no information is available.

  • RouteInfoClass [in, optional]
    Optionally specifies one of the following values from the IPROUTEINFOCLASS enumerated type to indicate the type of routing information to retrieve:

    Value Meaning

    IPRouteNoInformation

    No routing information

    IPRouteOutgoingFirewallContext

    Route outgoing using the firewall context

    IPRouteOutgoingFilterContext

    Route outgoing using the filter context

     

    Specifies zero if no information is required.

  • RouteInformation [out, optional]
    Pointer to a buffer that optionally receives routing information; NULL if no information is available.

  • RouteInfoLength [out, optional]
    Pointer to a buffer that optionally receives the size, in bytes, of the routing information received; NULL if no information is available.

Return value

Returns STATUS_SUCCESS on success; otherwise, it returns one of the error status values defined in ntstatus.h.

Requirements

Target platform

Desktop

Header

Ipfirewall.h (include Ipfirewall.h)

Library

Tcpip.lib

 

 

Send comments about this topic to Microsoft