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

Go to the source code of this file.

Functions

static void free_queue (PTCP_QUEUE queue)
 
UINT32 calculate_initial_seq_num (double time)
 
char * state_to_str (TCP_CONNECTION_STATE state)
 
static void set_tcp_variant (PNETSIM_SOCKET s, PTCP_DEV_VAR t)
 
static void setSackPermitted (PNETSIM_SOCKET s, PTCP_DEV_VAR t)
 
static void set_timestamp_option (PNETSIM_SOCKET s, PTCP_DEV_VAR t)
 
void create_TCB (PNETSIM_SOCKET s)
 
void free_tcb (PTCB tcb)
 
void delete_tcb (PNETSIM_SOCKET s)
 
void tcp_change_state (PNETSIM_SOCKET s, TCP_CONNECTION_STATE state)
 
void add_packet_to_queue (PTCP_QUEUE queue, NetSim_PACKET *packet, double time)
 
bool isSegmentInQueue (PTCP_QUEUE queue, NetSim_PACKET *packet)
 
NetSim_PACKETget_segment_from_queue (PTCP_QUEUE queue, UINT32 seqNo)
 
NetSim_PACKETget_earliest_segment_from_queue (PTCP_QUEUE queue)
 
NetSim_PACKETget_earliest_copy_segment_from_queue (PTCP_QUEUE queue)
 
NetSim_PACKETget_copy_segment_from_queue (PTCP_QUEUE queue, UINT32 seqNo, bool *isSacked)
 
UINT32 get_seg_len (NetSim_PACKET *p)
 
void delete_segment_from_queue (PTCP_QUEUE queue, UINT32 ackNo)
 
bool isAnySegmentInQueue (PTCP_QUEUE queue)
 
void delete_all_segment_from_queue (PTCP_QUEUE queue)
 
void update_seq_num_on_receiving (PNETSIM_SOCKET s, NetSim_PACKET *p)
 
double get_RTT (PTCB tcb, UINT ackNo)
 
NetSim_PACKETcheck_for_other_segment_to_send_from_queue (PNETSIM_SOCKET s)
 
void check_segment_in_queue (PNETSIM_SOCKET s)
 
void set_timestamp_value (PNETSIM_SOCKET s, PTCP_SEGMENT_HDR hdr, PTSopt opt)
 

Function Documentation

◆ add_packet_to_queue()

void add_packet_to_queue ( PTCP_QUEUE  queue,
NetSim_PACKET packet,
double  time 
)

Definition at line 164 of file TCB.c.

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

◆ calculate_initial_seq_num()

UINT32 calculate_initial_seq_num ( double  time)

Definition at line 23 of file TCB.c.

Here is the caller graph for this function:

◆ check_for_other_segment_to_send_from_queue()

NetSim_PACKET * check_for_other_segment_to_send_from_queue ( PNETSIM_SOCKET  s)

Definition at line 388 of file TCB.c.

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

◆ check_segment_in_queue()

void check_segment_in_queue ( PNETSIM_SOCKET  s)

Definition at line 410 of file TCB.c.

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

◆ create_TCB()

void create_TCB ( PNETSIM_SOCKET  s)

Definition at line 90 of file TCB.c.

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

◆ delete_all_segment_from_queue()

void delete_all_segment_from_queue ( PTCP_QUEUE  queue)

Definition at line 353 of file TCB.c.

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

◆ delete_segment_from_queue()

void delete_segment_from_queue ( PTCP_QUEUE  queue,
UINT32  ackNo 
)

Definition at line 316 of file TCB.c.

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

◆ delete_tcb()

void delete_tcb ( PNETSIM_SOCKET  s)

Definition at line 132 of file TCB.c.

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

◆ free_queue()

static void free_queue ( PTCP_QUEUE  queue)
static

Definition at line 151 of file TCB.c.

Here is the caller graph for this function:

◆ free_tcb()

void free_tcb ( PTCB  tcb)

Definition at line 126 of file TCB.c.

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

◆ get_copy_segment_from_queue()

NetSim_PACKET * get_copy_segment_from_queue ( PTCP_QUEUE  queue,
UINT32  seqNo,
bool *  isSacked 
)

Definition at line 285 of file TCB.c.

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

◆ get_earliest_copy_segment_from_queue()

NetSim_PACKET * get_earliest_copy_segment_from_queue ( PTCP_QUEUE  queue)

Definition at line 273 of file TCB.c.

◆ get_earliest_segment_from_queue()

NetSim_PACKET * get_earliest_segment_from_queue ( PTCP_QUEUE  queue)

Definition at line 258 of file TCB.c.

◆ get_RTT()

double get_RTT ( PTCB  tcb,
UINT  ackNo 
)

Definition at line 372 of file TCB.c.

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

◆ get_seg_len()

UINT32 get_seg_len ( NetSim_PACKET p)

Definition at line 307 of file TCB.c.

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

◆ get_segment_from_queue()

NetSim_PACKET * get_segment_from_queue ( PTCP_QUEUE  queue,
UINT32  seqNo 
)

Definition at line 229 of file TCB.c.

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

◆ isAnySegmentInQueue()

bool isAnySegmentInQueue ( PTCP_QUEUE  queue)

Definition at line 348 of file TCB.c.

Here is the caller graph for this function:

◆ isSegmentInQueue()

bool isSegmentInQueue ( PTCP_QUEUE  queue,
NetSim_PACKET packet 
)

Definition at line 214 of file TCB.c.

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

◆ set_tcp_variant()

static void set_tcp_variant ( PNETSIM_SOCKET  s,
PTCP_DEV_VAR  t 
)
static

Definition at line 59 of file TCB.c.

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

◆ set_timestamp_option()

static void set_timestamp_option ( PNETSIM_SOCKET  s,
PTCP_DEV_VAR  t 
)
static

Definition at line 85 of file TCB.c.

Here is the caller graph for this function:

◆ set_timestamp_value()

void set_timestamp_value ( PNETSIM_SOCKET  s,
PTCP_SEGMENT_HDR  hdr,
PTSopt  opt 
)

Definition at line 427 of file TCB.c.

Here is the caller graph for this function:

◆ setSackPermitted()

static void setSackPermitted ( PNETSIM_SOCKET  s,
PTCP_DEV_VAR  t 
)
static

Definition at line 80 of file TCB.c.

Here is the caller graph for this function:

◆ state_to_str()

char * state_to_str ( TCP_CONNECTION_STATE  state)

Definition at line 28 of file TCB.c.

Here is the caller graph for this function:

◆ tcp_change_state()

void tcp_change_state ( PNETSIM_SOCKET  s,
TCP_CONNECTION_STATE  state 
)

Definition at line 138 of file TCB.c.

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

◆ update_seq_num_on_receiving()

void update_seq_num_on_receiving ( PNETSIM_SOCKET  s,
NetSim_PACKET p 
)

Definition at line 358 of file TCB.c.

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