NetSim Source Code Help
Loading...
Searching...
No Matches
RouteCache.c File Reference
#include "main.h"
#include "DSR.h"
#include "List.h"
Include dependency graph for RouteCache.c:

Go to the source code of this file.

Functions

int fn_NetSim_DSR_UpdateRouteCache (unsigned int length, NETSIM_IPAddress *address, double dTime)
 
DSR_ROUTE_CACHEfn_NetSim_DSR_FindCache (DSR_DEVICE_VAR *devVar, NETSIM_IPAddress address, double dTime)
 
bool fn_NetSim_DSR_ValidateRouteCache (DSR_ROUTE_CACHE *cache, NETSIM_IPAddress *addList, int count)
 
int fn_NetSim_DSR_DeleteEntryFromRouteCache (DSR_ROUTE_CACHE **ppcache, NETSIM_IPAddress ip1, NETSIM_IPAddress ip2)
 

Function Documentation

◆ fn_NetSim_DSR_DeleteEntryFromRouteCache()

int fn_NetSim_DSR_DeleteEntryFromRouteCache ( DSR_ROUTE_CACHE **  ppcache,
NETSIM_IPAddress  ip1,
NETSIM_IPAddress  ip2 
)

This function deletes an entry from the route cache.

Definition at line 95 of file RouteCache.c.

Here is the call graph for this function:

◆ fn_NetSim_DSR_FindCache()

DSR_ROUTE_CACHE * fn_NetSim_DSR_FindCache ( DSR_DEVICE_VAR devVar,
NETSIM_IPAddress  address,
double  dTime 
)

This function searches the route cache for a route to the target from the device. If route is found, it returns the route.

Definition at line 50 of file RouteCache.c.

◆ fn_NetSim_DSR_UpdateRouteCache()

int fn_NetSim_DSR_UpdateRouteCache ( unsigned int  length,
NETSIM_IPAddress address,
double  dTime 
)

This function adds a route to the route cache. This is the entire list of address from the device to the target in sequence

Definition at line 21 of file RouteCache.c.

Here is the call graph for this function:

◆ fn_NetSim_DSR_ValidateRouteCache()

bool fn_NetSim_DSR_ValidateRouteCache ( DSR_ROUTE_CACHE cache,
NETSIM_IPAddress addList,
int  count 
)

If the route cache contains the address in the addList, it returns a false.

Definition at line 78 of file RouteCache.c.