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

Go to the source code of this file.

Functions

int fn_NetSim_DSR_GenerateRREP (NetSim_PACKET *rreqPacket, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_DSR_ProcessRREP (NetSim_EVENTDETAILS *pstruEventDetails)
 
static void determine_position (DSR_ROUTE_CACHE *cache, int *my, int *de, NETSIM_IPAddress myIP, NETSIM_IPAddress dest)
 
bool fn_NetSim_DSR_GenerateRREPUsingRouteCache (DSR_DEVICE_VAR *devVar, NetSim_PACKET *rreqPacket, double dTime, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_DSR_ForwardRREP ()
 

Function Documentation

◆ determine_position()

static void determine_position ( DSR_ROUTE_CACHE cache,
int *  my,
int *  de,
NETSIM_IPAddress  myIP,
NETSIM_IPAddress  dest 
)
static

Definition at line 94 of file RouteReply.c.

Here is the caller graph for this function:

◆ fn_NetSim_DSR_ForwardRREP()

int fn_NetSim_DSR_ForwardRREP ( )

This function checks if the current device is the last HOP. If it is, it drops the packet and no further forwarding is done.

Else, the RREP is forwarded to the Previous HOP

Definition at line 194 of file RouteReply.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_DSR_GenerateRREP()

int fn_NetSim_DSR_GenerateRREP ( NetSim_PACKET rreqPacket,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function Generates a route reply to be sent to the source.

Definition at line 20 of file RouteReply.c.

Here is the call graph for this function:

◆ fn_NetSim_DSR_GenerateRREPUsingRouteCache()

bool fn_NetSim_DSR_GenerateRREPUsingRouteCache ( DSR_DEVICE_VAR devVar,
NetSim_PACKET rreqPacket,
double  dTime,
NetSim_EVENTDETAILS pstruEventDetails 
)

This functions generates a route reply if the route to destination is there in the route cache.

Definition at line 113 of file RouteReply.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_DSR_ProcessRREP()

int fn_NetSim_DSR_ProcessRREP ( NetSim_EVENTDETAILS pstruEventDetails)

This function processes the route reply. It Updates the route cache of the device and adds the new route to the destination in the route cache. It checks the Send Buffer if any packets are in the list to be sent. Then it forwards the RREP packet to the prev HOP.

Definition at line 81 of file RouteReply.c.

Here is the call graph for this function: