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

Go to the source code of this file.

Functions

int fn_NetSim_DSR_AddToMaintBuffer (NETSIM_ID nDeviceId, NetSim_PACKET *pstruPacket, double dTime)
 
int fn_NetSim_DSR_MaintTimeout (NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_DSR_RetransmitBuffer (DSR_MAINT_BUFFER *maintBuffer, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_DSR_EmptyMaintBuffer (NETSIM_ID nDeviceId, NETSIM_ID nextHop)
 

Function Documentation

◆ fn_NetSim_DSR_AddToMaintBuffer()

int fn_NetSim_DSR_AddToMaintBuffer ( NETSIM_ID  nDeviceId,
NetSim_PACKET pstruPacket,
double  dTime 
)

Whenever a packet is to be sent to the target and the device has the next Hop IP, the packet is added to the MaintBuffer and retained there until and acknowledge is received or a timeout happens in which case the packets are retransmitted.

Definition at line 22 of file MaintBuffer.c.

Here is the call graph for this function:

◆ fn_NetSim_DSR_EmptyMaintBuffer()

int fn_NetSim_DSR_EmptyMaintBuffer ( NETSIM_ID  nDeviceId,
NETSIM_ID  nextHop 
)

This function Empties the DSR Maintenance Buffer.

Definition at line 209 of file MaintBuffer.c.

◆ fn_NetSim_DSR_MaintTimeout()

int fn_NetSim_DSR_MaintTimeout ( NetSim_EVENTDETAILS pstruEventDetails)

This is called when DSR Maintenance Timeout happens. It retransmits the packets if acknowledgemnet is not received and the transmit count is less the DSR MaxMaintenance Retransmit limit. Else it empties the buffer.

Definition at line 123 of file MaintBuffer.c.

◆ fn_NetSim_DSR_RetransmitBuffer()

int fn_NetSim_DSR_RetransmitBuffer ( DSR_MAINT_BUFFER maintBuffer,
NetSim_EVENTDETAILS pstruEventDetails 
)

This function retransmits the packets in the DSR Maintanence Buffer.

Definition at line 174 of file MaintBuffer.c.

Here is the call graph for this function: