ReactOS  0.4.13-dev-1089-g05f0b08
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 TI_DbgPrint(_t_, _x_)
Definition: debug.h:45
Definition: neighbor.h:28
PIP_INTERFACE FindOnLinkInterface(PIP_ADDRESS Address)
Definition: interface.c:221
PNEIGHBOR_CACHE_ENTRY RouterGetRoute(PIP_ADDRESS Destination)
Definition: router.c:239
PNEIGHBOR_CACHE_ENTRY NBFindOrCreateNeighbor(PIP_INTERFACE Interface, PIP_ADDRESS Address, BOOLEAN NoTimeout)
Definition: neighbor.c:501
smooth NULL
Definition: ftsmooth.c:416
UINT MTU
Definition: ip.h:157
IN PVOID IN PVOID IN USHORT IN USHORT IN PINTERFACE Interface
Definition: pci.h:359
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2891
#define DEBUG_RCACHE
Definition: debug.h:31
PIP_INTERFACE Interface
Definition: neighbor.h:33
#define MIN_TRACE
Definition: debug.h:14
#define DEBUG_ROUTER
Definition: debug.h:30
PCHAR A2S(PIP_ADDRESS Address)
Definition: address.c:17

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