NetSim Source Code Help
Loading...
Searching...
No Matches
TCP.c File Reference
#include "main.h"
#include "TCP.h"
#include "TCP_Header.h"
#include "TCP_enum.h"
#include "NetSim_Plot.h"
Include dependency graph for TCP.c:

Go to the source code of this file.

Functions

char * GetStringTCP_Subevent (NETSIM_ID)
 
int fn_NetSim_TCP_Configure_F (void **var)
 
int fn_NetSim_TCP_Init_F (struct stru_NetSim_Network *net, NetSim_EVENTDETAILS *pevent, char *appPath, char *iopath, int version, void **fnPointer)
 
int fn_NetSim_TCP_CopyPacket_F (NetSim_PACKET *dst, NetSim_PACKET *src)
 
int fn_NetSim_TCP_FreePacket_F (NetSim_PACKET *packet)
 
int fn_NetSim_TCP_Finish_F ()
 
int fn_NetSim_TCP_Metrics_F (PMETRICSWRITER metricsWriter)
 
char * fn_NetSim_TCP_ConfigPacketTrace_F (const void *xmlNetSimNode)
 
int fn_NetSim_TCP_WritePacketTrace_F (NetSim_PACKET *pstruPacket, char **ppszTrace)
 
static int fn_NetSim_TCP_HandleTransportOut ()
 
static int fn_NetSim_TCP_HandleTransportIn ()
 
static int fn_NetSim_TCP_HandleTimer ()
 
static void handle_time_wait_timeout ()
 
int fn_NetSim_TCP_Run ()
 
int fn_NetSim_TCP_Configure (void **var)
 
int fn_NetSim_TCP_Init (struct stru_NetSim_Network *NETWORK_Formal, NetSim_EVENTDETAILS *pstruEventDetails_Formal, char *pszAppPath_Formal, char *pszWritePath_Formal, int nVersion_Type, void **fnPointer)
 
int fn_NetSim_TCP_Finish ()
 
char * fn_NetSim_TCP_Trace (int nSubEvent)
 
int fn_NetSim_TCP_FreePacket (NetSim_PACKET *pstruPacket)
 
int fn_NetSim_TCP_CopyPacket (NetSim_PACKET *pstruDestPacket, NetSim_PACKET *pstruSrcPacket)
 
int fn_NetSim_TCP_Metrics (PMETRICSWRITER metricsWriter)
 
char * fn_NetSim_TCP_ConfigPacketTrace (const void *xmlNetSimNode)
 
int fn_NetSim_TCP_WritePacketTrace (NetSim_PACKET *pstruPacket, char **ppszTrace)
 
TCPVARIANT get_tcp_variant_from_str (char *szVal)
 
TCPACKTYPE get_tcp_ack_type_from_str (char *szVal)
 
void start_timewait_timer (PNETSIM_SOCKET s)
 
void write_congestion_plot (PNETSIM_SOCKET s, NetSim_PACKET *packet)
 
bool isTCPlog ()
 

Function Documentation

◆ fn_NetSim_TCP_ConfigPacketTrace()

char * fn_NetSim_TCP_ConfigPacketTrace ( const void *  xmlNetSimNode)

This function will return the string to write packet trace heading.

Definition at line 155 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_ConfigPacketTrace_F()

char * fn_NetSim_TCP_ConfigPacketTrace_F ( const void *  xmlNetSimNode)
Here is the caller graph for this function:

◆ fn_NetSim_TCP_Configure()

int fn_NetSim_TCP_Configure ( void **  var)

This function is called by NetworkStack.dll, while configuring the device TRANSPORT layer for TCP protocol.

Definition at line 85 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_Configure_F()

int fn_NetSim_TCP_Configure_F ( void **  var)
Here is the caller graph for this function:

◆ fn_NetSim_TCP_CopyPacket()

int fn_NetSim_TCP_CopyPacket ( NetSim_PACKET pstruDestPacket,
NetSim_PACKET pstruSrcPacket 
)

This function is called by NetworkStack.dll, to copy the TCP protocol pstruTransportData->Packet_TransportProtocol from source packet to destination.

Definition at line 139 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_CopyPacket_F()

int fn_NetSim_TCP_CopyPacket_F ( NetSim_PACKET dst,
NetSim_PACKET src 
)
Here is the caller graph for this function:

◆ fn_NetSim_TCP_Finish()

int fn_NetSim_TCP_Finish ( )

This function is called by NetworkStack.dll, once simulation end to free the allocated memory for the network.

Definition at line 112 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_Finish_F()

int fn_NetSim_TCP_Finish_F ( )
Here is the caller graph for this function:

◆ fn_NetSim_TCP_FreePacket()

int fn_NetSim_TCP_FreePacket ( NetSim_PACKET pstruPacket)

This function is called by NetworkStack.dll, to free the TCP protocol pstruTransportData->Packet_TransportProtocol.

Definition at line 130 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_FreePacket_F()

int fn_NetSim_TCP_FreePacket_F ( NetSim_PACKET packet)
Here is the caller graph for this function:

◆ fn_NetSim_TCP_HandleTimer()

static int fn_NetSim_TCP_HandleTimer ( )
static

Definition at line 198 of file TCP.c.

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

◆ fn_NetSim_TCP_HandleTransportIn()

static int fn_NetSim_TCP_HandleTransportIn ( )
static

Definition at line 183 of file TCP.c.

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

◆ fn_NetSim_TCP_HandleTransportOut()

static int fn_NetSim_TCP_HandleTransportOut ( )
static

Definition at line 168 of file TCP.c.

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

◆ fn_NetSim_TCP_Init()

int fn_NetSim_TCP_Init ( struct stru_NetSim_Network NETWORK_Formal,
NetSim_EVENTDETAILS pstruEventDetails_Formal,
char *  pszAppPath_Formal,
char *  pszWritePath_Formal,
int  nVersion_Type,
void **  fnPointer 
)

This function initializes the TCP parameters.

Definition at line 93 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_Init_F()

int fn_NetSim_TCP_Init_F ( struct stru_NetSim_Network net,
NetSim_EVENTDETAILS pevent,
char *  appPath,
char *  iopath,
int  version,
void **  fnPointer 
)
Here is the caller graph for this function:

◆ fn_NetSim_TCP_Metrics()

int fn_NetSim_TCP_Metrics ( PMETRICSWRITER  metricsWriter)

This function write the Metrics in Metrics.txt

Definition at line 147 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_Metrics_F()

int fn_NetSim_TCP_Metrics_F ( PMETRICSWRITER  metricsWriter)
Here is the caller graph for this function:

◆ fn_NetSim_TCP_Run()

int fn_NetSim_TCP_Run ( )

This function is called by NetworkStack.dll, whenever the event gets triggered inside the NetworkStack.dll for the Transport layer TCP protocol It includes TRANSPORT_OUT,TRANSPORT_IN and TIMER_EVENT.

Definition at line 60 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_Trace()

char * fn_NetSim_TCP_Trace ( int  nSubEvent)

This function is called by NetworkStack.dll, while writing the event trace to get the sub event as a string.

Definition at line 121 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_WritePacketTrace()

int fn_NetSim_TCP_WritePacketTrace ( NetSim_PACKET pstruPacket,
char **  ppszTrace 
)

This function will return the string to write packet trace.

Definition at line 163 of file TCP.c.

Here is the call graph for this function:

◆ fn_NetSim_TCP_WritePacketTrace_F()

int fn_NetSim_TCP_WritePacketTrace_F ( NetSim_PACKET pstruPacket,
char **  ppszTrace 
)
Here is the caller graph for this function:

◆ get_tcp_ack_type_from_str()

TCPACKTYPE get_tcp_ack_type_from_str ( char *  szVal)

Definition at line 236 of file TCP.c.

◆ get_tcp_variant_from_str()

TCPVARIANT get_tcp_variant_from_str ( char *  szVal)

Definition at line 217 of file TCP.c.

◆ GetStringTCP_Subevent()

char * GetStringTCP_Subevent ( NETSIM_ID  )
Here is the caller graph for this function:

◆ handle_time_wait_timeout()

static void handle_time_wait_timeout ( )
static

Definition at line 268 of file TCP.c.

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

◆ isTCPlog()

bool isTCPlog ( )

Definition at line 292 of file TCP.c.

◆ start_timewait_timer()

void start_timewait_timer ( PNETSIM_SOCKET  s)

Definition at line 246 of file TCP.c.

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

◆ write_congestion_plot()

void write_congestion_plot ( PNETSIM_SOCKET  s,
NetSim_PACKET packet 
)

Definition at line 276 of file TCP.c.

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