ReactOS 0.4.16-dev-250-g3ecd236
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 300 of file router.c.

312{
315
316 TI_DbgPrint(DEBUG_RCACHE, ("Called. Destination (0x%X)\n", Destination));
317
318 TI_DbgPrint(DEBUG_RCACHE, ("Destination (%s)\n", A2S(Destination)));
319
320#if 0
321 TI_DbgPrint(MIN_TRACE, ("Displaying tree (before).\n"));
322 PrintTree(RouteCache);
323#endif
324
325 /* Check if the destination is on-link */
327 if (Interface) {
328 /* The destination address is on-link. Check our neighbor cache */
330 } else {
331 /* Destination is not on any subnets we're on. Find a router to use */
333 }
334
335 if( NCE )
336 TI_DbgPrint(DEBUG_ROUTER,("Interface->MTU: %d\n", NCE->Interface->MTU));
337
338 return NCE;
339}
#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:3016
PNEIGHBOR_CACHE_ENTRY NBFindOrCreateNeighbor(PIP_INTERFACE Interface, PIP_ADDRESS Address, BOOLEAN NoTimeout)
Definition: neighbor.c:501
PIP_INTERFACE FindOnLinkInterface(PIP_ADDRESS Address)
Definition: interface.c:221
PNEIGHBOR_CACHE_ENTRY RouterGetRoute(PIP_ADDRESS Destination)
Definition: router.c:239
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().