NetSim Source Code Help
Loading...
Searching...
No Matches
CheckRouteFound.c
Go to the documentation of this file.
1/************************************************************************************
2 * Copyright (C) 2020 *
3 * TETCOS, Bangalore. India *
4 * *
5 * Tetcos owns the intellectual property rights in the Product and its content. *
6 * The copying, redistribution, reselling or publication of any or all of the *
7 * Product or its content without express prior written consent of Tetcos is *
8 * prohibited. Ownership and / or any other right relating to the software and all *
9 * intellectual property rights therein shall remain at all times with Tetcos. *
10 * *
11 * Author: Shashi Kant Suman *
12 * *
13 * ---------------------------------------------------------------------------------*/
14#include "main.h"
15#include "DSR.h"
16#include "List.h"
17/**
18This function checks if the route cache of the device has the route to the Destination
19*/
21{
22 *cache = DSR_FIND_CACHE(devVar,destAddress,dTime);
23 if(*cache)
24 {
25 //Update the next hop
26 *nextHop = (*cache)->address[1];
27 return true;
28 }
29 return false;
30}
31
32
bool fn_NetSim_DSR_CheckRouteFound(NETSIM_IPAddress destAddress, DSR_DEVICE_VAR *devVar, NETSIM_IPAddress *nextHop, double dTime, DSR_ROUTE_CACHE **cache)
#define DSR_FIND_CACHE(devVar, address, dTime)
Definition: DSR.h:726