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

Go to the source code of this file.

Functions

int fn_NetSim_AODV_InsertInRouteTable (NETSIM_IPAddress ip, unsigned int seqNumber, unsigned int hopCount, NETSIM_IPAddress nextHop, double lifeTime, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_InsertInPrecursorsList (NETSIM_IPAddress ip, NetSim_EVENTDETAILS *pstruEventDetails)
 
NETSIM_IPAddress fn_NetSim_AODV_FindNextHop (AODV_DEVICE_VAR *devVar, NETSIM_IPAddress dest, NetSim_EVENTDETAILS *pstruEventDetails)
 
AODV_ROUTETABLEfnFindRouteTable (AODV_ROUTETABLE *table, NETSIM_IPAddress dest)
 
int fn_NetSim_AODV_UpdateRouteTable (NETSIM_IPAddress ip, double lifetime, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_AODV_ActiveRouteTimeout (NetSim_EVENTDETAILS *pstruEventDetails)
 

Function Documentation

◆ fn_NetSim_AODV_ActiveRouteTimeout()

int fn_NetSim_AODV_ActiveRouteTimeout ( NetSim_EVENTDETAILS pstruEventDetails)

This function adds the timeout event of a Route Table which is equal to the table_LifeTime

Definition at line 165 of file RouteTable.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_FindNextHop()

NETSIM_IPAddress fn_NetSim_AODV_FindNextHop ( AODV_DEVICE_VAR devVar,
NETSIM_IPAddress  dest,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function returns the next hop IP to the destination from the Route Table

Definition at line 115 of file RouteTable.c.

◆ fn_NetSim_AODV_InsertInPrecursorsList()

int fn_NetSim_AODV_InsertInPrecursorsList ( NETSIM_IPAddress  ip,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function adds the given IP in the ADOV precursor list if not already present.

Definition at line 90 of file RouteTable.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_InsertInRouteTable()

int fn_NetSim_AODV_InsertInRouteTable ( NETSIM_IPAddress  ip,
unsigned int  seqNumber,
unsigned int  hopCount,
NETSIM_IPAddress  nextHop,
double  lifeTime,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function adds the route in the Route table of the node. If the table is not there, it creates one with a certain timeout after which the entries are deleted.

Definition at line 22 of file RouteTable.c.

Here is the call graph for this function:

◆ fn_NetSim_AODV_UpdateRouteTable()

int fn_NetSim_AODV_UpdateRouteTable ( NETSIM_IPAddress  ip,
double  lifetime,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function updates the lifetime of the Route Table

Definition at line 147 of file RouteTable.c.

◆ fnFindRouteTable()

AODV_ROUTETABLE * fnFindRouteTable ( AODV_ROUTETABLE table,
NETSIM_IPAddress  dest 
)

This function returns the Route table with the mentioned destination IP

Definition at line 132 of file RouteTable.c.

Here is the caller graph for this function: