ReactOS 0.4.16-dev-2491-g3dc6630
route.h File Reference
#include <neighbor.h>
#include <address.h>
#include <router.h>
#include <pool.h>
#include <info.h>
#include <arp.h>
Include dependency graph for route.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PNEIGHBOR_CACHE_ENTRY RouteGetRouteToDestination (PIP_ADDRESS Destination)
 

Function Documentation

◆ RouteGetRouteToDestination()

PNEIGHBOR_CACHE_ENTRY RouteGetRouteToDestination ( PIP_ADDRESS  Destination)

Definition at line 330 of file router.c.

342{
345
346 TI_DbgPrint(DEBUG_RCACHE, ("Called. Destination (0x%X)\n", Destination));
347
348 TI_DbgPrint(DEBUG_RCACHE, ("Destination (%s)\n", A2S(Destination)));
349
350#if 0
351 TI_DbgPrint(MIN_TRACE, ("Displaying tree (before).\n"));
352 PrintTree(RouteCache);
353#endif
354
355 /* Check if the destination is on-link */
357 if (Interface) {
358 /* The destination address is on-link. Check our neighbor cache */
360 } else {
361 /* Destination is not on any subnets we're on. Find a router to use */
363 }
364
365 if( NCE )
366 TI_DbgPrint(DEBUG_ROUTER,("Interface->MTU: %d\n", NCE->Interface->MTU));
367
368 return NCE;
369}
#define MIN_TRACE
Definition: debug.h:14
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define DEBUG_ROUTER
Definition: debug.h:30
#define DEBUG_RCACHE
Definition: debug.h:31
#define TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
PCHAR A2S(PIP_ADDRESS Address)
Definition: address.c:17
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3051
PNEIGHBOR_CACHE_ENTRY NBFindOrCreateNeighbor(PIP_INTERFACE Interface, PIP_ADDRESS Address, BOOLEAN NoTimeout)
Definition: neighbor.c:515
PIP_INTERFACE FindOnLinkInterface(PIP_ADDRESS Address)
Definition: interface.c:233
PNEIGHBOR_CACHE_ENTRY RouterGetRoute(PIP_ADDRESS Destination)
Definition: router.c:269
Definition: neighbor.h:28
PIP_INTERFACE Interface
Definition: neighbor.h:33
UINT MTU
Definition: ip.h:157
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition: wdffdo.h:465

Referenced by DispTdiQueryIpHwAddress(), ICMPReply(), RawIPSendDatagram(), TCPConnect(), TCPSendDataCallback(), and UDPSendDatagram().