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

Go to the source code of this file.

Functions

bool isSynPacket (NetSim_PACKET *packet)
 
bool isSynbitSet (NetSim_PACKET *packet)
 
void set_tcp_option (PTCP_SEGMENT_HDR hdr, void *option, TCP_OPTION type, UINT32 size)
 
void * get_tcp_option (PTCP_SEGMENT_HDR hdr, TCP_OPTION type)
 
static void add_tcp_extra_option (PTCP_SEGMENT_HDR hdr, UINT32 l)
 
static void set_tcp_packet_size (NetSim_PACKET *p)
 
static void add_tcp_mss_option (PNETSIM_SOCKET s, PTCP_SEGMENT_HDR hdr)
 
static void add_tcp_sack_permitted_option (PNETSIM_SOCKET s, PTCP_SEGMENT_HDR hdr)
 
static void add_tcp_window_scale_option (PNETSIM_SOCKET s, PTCP_SEGMENT_HDR hdr)
 
static void add_tcp_timestamp_option (PNETSIM_SOCKET s, PTCP_SEGMENT_HDR hdr)
 
NetSim_PACKETcreate_tcp_ctrl_packet (PNETSIM_SOCKET s, TCPPACKET type, double time)
 
NetSim_PACKETcreate_syn (PNETSIM_SOCKET s, double time)
 
NetSim_PACKETcreate_synAck (PNETSIM_SOCKET s, double time)
 
NetSim_PACKETcreate_rst (NetSim_PACKET *p, double time, UINT c)
 
NetSim_PACKETcreate_ack (PNETSIM_SOCKET s, double time, UINT32 seqno, UINT32 ackno)
 
NetSim_PACKETcreate_fin (PNETSIM_SOCKET s, double time)
 
void add_tcp_hdr (NetSim_PACKET *p, PNETSIM_SOCKET s)
 
static PTCPOPTION copy_tcp_mss_option (PTCPOPTION opt)
 
static PTCPOPTION copy_tcp_sack_permitted_option (PTCPOPTION opt)
 
static PTCPOPTION copy_tcp_extra_option (PTCPOPTION opt)
 
static PTCPOPTION copy_sack_option (PTCPOPTION t)
 
static PTCPOPTION copy_window_scale_option (PTCPOPTION opt)
 
static PTCPOPTION copy_timestamp_option (PTCPOPTION opt)
 
static void copy_tcp_option (PTCP_SEGMENT_HDR dhdr, PTCP_SEGMENT_HDR hdr)
 
PTCP_SEGMENT_HDR copy_tcp_hdr (PTCP_SEGMENT_HDR hdr)
 
static void free_tcp_mss_option (PMSS_OPTION mss)
 
static void free_tcp_sack_permitted_option (PSACKPERMITTED_OPTION sackPermitted)
 
static void free_tcp_extra_option (PEXTRA_OPTION ex)
 
static void free_tcp_sack_option (PSACK_OPTION sack)
 
static void free_tcp_window_scale_option (PWsopt opt)
 
static void free_tcp_timestamp_option (PTSopt opt)
 
static void free_tcp_option (PTCPOPTION opt)
 
void free_tcp_hdr (PTCP_SEGMENT_HDR hdr)
 

Function Documentation

◆ add_tcp_extra_option()

static void add_tcp_extra_option ( PTCP_SEGMENT_HDR  hdr,
UINT32  l 
)
static

Definition at line 77 of file TCP_Packet.c.

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

◆ add_tcp_hdr()

void add_tcp_hdr ( NetSim_PACKET p,
PNETSIM_SOCKET  s 
)

Definition at line 341 of file TCP_Packet.c.

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

◆ add_tcp_mss_option()

static void add_tcp_mss_option ( PNETSIM_SOCKET  s,
PTCP_SEGMENT_HDR  hdr 
)
static

Definition at line 109 of file TCP_Packet.c.

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

◆ add_tcp_sack_permitted_option()

static void add_tcp_sack_permitted_option ( PNETSIM_SOCKET  s,
PTCP_SEGMENT_HDR  hdr 
)
static

Definition at line 119 of file TCP_Packet.c.

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

◆ add_tcp_timestamp_option()

static void add_tcp_timestamp_option ( PNETSIM_SOCKET  s,
PTCP_SEGMENT_HDR  hdr 
)
static

Definition at line 142 of file TCP_Packet.c.

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

◆ add_tcp_window_scale_option()

static void add_tcp_window_scale_option ( PNETSIM_SOCKET  s,
PTCP_SEGMENT_HDR  hdr 
)
static

Definition at line 128 of file TCP_Packet.c.

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

◆ copy_sack_option()

static PTCPOPTION copy_sack_option ( PTCPOPTION  t)
static

Definition at line 402 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ copy_tcp_extra_option()

static PTCPOPTION copy_tcp_extra_option ( PTCPOPTION  opt)
static

Definition at line 390 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ copy_tcp_hdr()

PTCP_SEGMENT_HDR copy_tcp_hdr ( PTCP_SEGMENT_HDR  hdr)

Definition at line 493 of file TCP_Packet.c.

Here is the call graph for this function:

◆ copy_tcp_mss_option()

static PTCPOPTION copy_tcp_mss_option ( PTCPOPTION  opt)
static

Definition at line 366 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ copy_tcp_option()

static void copy_tcp_option ( PTCP_SEGMENT_HDR  dhdr,
PTCP_SEGMENT_HDR  hdr 
)
static

Definition at line 446 of file TCP_Packet.c.

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

◆ copy_tcp_sack_permitted_option()

static PTCPOPTION copy_tcp_sack_permitted_option ( PTCPOPTION  opt)
static

Definition at line 378 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ copy_timestamp_option()

static PTCPOPTION copy_timestamp_option ( PTCPOPTION  opt)
static

Definition at line 434 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ copy_window_scale_option()

static PTCPOPTION copy_window_scale_option ( PTCPOPTION  opt)
static

Definition at line 422 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ create_ack()

NetSim_PACKET * create_ack ( PNETSIM_SOCKET  s,
double  time,
UINT32  seqno,
UINT32  ackno 
)

Definition at line 297 of file TCP_Packet.c.

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

◆ create_fin()

NetSim_PACKET * create_fin ( PNETSIM_SOCKET  s,
double  time 
)

Definition at line 322 of file TCP_Packet.c.

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

◆ create_rst()

NetSim_PACKET * create_rst ( NetSim_PACKET p,
double  time,
UINT  c 
)

Definition at line 254 of file TCP_Packet.c.

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

◆ create_syn()

NetSim_PACKET * create_syn ( PNETSIM_SOCKET  s,
double  time 
)

Definition at line 194 of file TCP_Packet.c.

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

◆ create_synAck()

NetSim_PACKET * create_synAck ( PNETSIM_SOCKET  s,
double  time 
)

Definition at line 223 of file TCP_Packet.c.

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

◆ create_tcp_ctrl_packet()

NetSim_PACKET * create_tcp_ctrl_packet ( PNETSIM_SOCKET  s,
TCPPACKET  type,
double  time 
)

Definition at line 163 of file TCP_Packet.c.

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

◆ free_tcp_extra_option()

static void free_tcp_extra_option ( PEXTRA_OPTION  ex)
static

Definition at line 515 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ free_tcp_hdr()

void free_tcp_hdr ( PTCP_SEGMENT_HDR  hdr)

Definition at line 576 of file TCP_Packet.c.

Here is the call graph for this function:

◆ free_tcp_mss_option()

static void free_tcp_mss_option ( PMSS_OPTION  mss)
static

Definition at line 505 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ free_tcp_option()

static void free_tcp_option ( PTCPOPTION  opt)
static

Definition at line 541 of file TCP_Packet.c.

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

◆ free_tcp_sack_option()

static void free_tcp_sack_option ( PSACK_OPTION  sack)
static

Definition at line 520 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ free_tcp_sack_permitted_option()

static void free_tcp_sack_permitted_option ( PSACKPERMITTED_OPTION  sackPermitted)
static

Definition at line 510 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ free_tcp_timestamp_option()

static void free_tcp_timestamp_option ( PTSopt  opt)
static

Definition at line 536 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ free_tcp_window_scale_option()

static void free_tcp_window_scale_option ( PWsopt  opt)
static

Definition at line 531 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ get_tcp_option()

void * get_tcp_option ( PTCP_SEGMENT_HDR  hdr,
TCP_OPTION  type 
)

Definition at line 65 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ isSynbitSet()

bool isSynbitSet ( NetSim_PACKET packet)

Definition at line 38 of file TCP_Packet.c.

Here is the call graph for this function:

◆ isSynPacket()

bool isSynPacket ( NetSim_PACKET packet)

Definition at line 28 of file TCP_Packet.c.

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

◆ set_tcp_option()

void set_tcp_option ( PTCP_SEGMENT_HDR  hdr,
void *  option,
TCP_OPTION  type,
UINT32  size 
)

Definition at line 45 of file TCP_Packet.c.

Here is the caller graph for this function:

◆ set_tcp_packet_size()

static void set_tcp_packet_size ( NetSim_PACKET p)
static

Definition at line 97 of file TCP_Packet.c.

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