![]() |
NetSim Source Code Help
|

Go to the source code of this file.
Data Structures | |
| struct | stru_tcp_option |
| struct | stru_tcp_header |
| struct | stru_mss_option |
| struct | stru_sack_permitted_option |
| struct | stru_sack_data |
| struct | stru_sack_option |
| struct | stru_tcp_extra_option |
| struct | stru_tcp_window_scale_option |
| struct | stru_tcp_timestamp_option |
Macros | |
| #define | _NETSIM_TCP_HEADER_H_ |
| #define | PNETSIM_SOCKET void* |
| #define | TCP_HDR_SIZE 20 |
| #define | MAX_TCP_OPT_LEN 40 |
| #define | MAX_TCP_HDR_SIZE (TCP_HDR_SIZE+MAX_TCP_OPT_LEN) |
| #define | MSS_OPTION_LEN 4 |
| #define | SACKPERMITTED_OPTION_LEN 2 |
| #define | SACKDATA_LEN 8 |
| #define | SACK_OPTION_FIX_LEN 2 |
| #define | SACK_OPTION_LEN(n) ((UINT8)(SACK_OPTION_FIX_LEN+(n)*SACKDATA_LEN)) |
| #define | get_sack_data_count(sack) ((sack->len-SACK_OPTION_FIX_LEN)/SACKDATA_LEN) |
| #define | EXTRA_OPTION_LEN 1 |
| #define | WSOPT_LEN 3 |
| #define | TSOPT_LEN 10 |
Typedefs | |
| typedef enum enum_tcp_packet | TCPPACKET |
| typedef enum enum_tcp_option | TCP_OPTION |
| typedef struct stru_tcp_option | TCPOPTION |
| typedef struct stru_tcp_option * | PTCPOPTION |
| typedef struct stru_tcp_header | TCP_SEGMENT_HDR |
| typedef struct stru_tcp_header * | PTCP_SEGMENT_HDR |
| typedef struct stru_mss_option | MSS_OPTION |
| typedef struct stru_mss_option * | PMSS_OPTION |
| typedef struct stru_sack_permitted_option | SACKPERMITTED_OPTION |
| typedef struct stru_sack_permitted_option * | PSACKPERMITTED_OPTION |
| typedef struct stru_sack_data | SACKDATA |
| typedef struct stru_sack_data * | PSACKDATA |
| typedef struct stru_sack_option | SACK_OPTION |
| typedef struct stru_sack_option * | PSACK_OPTION |
| typedef struct stru_tcp_extra_option | EXTRA_OPTION |
| typedef struct stru_tcp_extra_option * | PEXTRA_OPTION |
| typedef struct stru_tcp_window_scale_option | Wsopt |
| typedef struct stru_tcp_window_scale_option * | PWsopt |
| typedef struct stru_tcp_timestamp_option | TSopt |
| typedef struct stru_tcp_timestamp_option * | PTSopt |
Enumerations | |
| enum | enum_tcp_packet { TCPPACKET_SYN = TX_PROTOCOL_TCP * 100 + 1 , TCPPACKET_SYNACK , TCPPACKET_FIN , TCPPACKET_RST , TCPPACKET_ACK } |
| enum | enum_tcp_option { TCP_OPTION_END , TCP_OPTION_NOOPERATION , TCP_OPTION_MSS , TCP_OPTION_WINDOW_SCALE , TCP_OPTION_SACK_PERMITTED , TCP_OPTION_SACK , TCP_OPTION_ECHO , TCP_OPTION_ECHOREPLY , TCP_OPTION_TIMESTAMP } |
Functions | |
| static PTCP_SEGMENT_HDR | TCP_GET_SEGMENT_HDR (NetSim_PACKET *packet) |
| PTCP_SEGMENT_HDR | copy_tcp_hdr (PTCP_SEGMENT_HDR hdr) |
| void | free_tcp_hdr (PTCP_SEGMENT_HDR hdr) |
| void * | get_tcp_option (PTCP_SEGMENT_HDR hdr, TCP_OPTION type) |
| void | set_tcp_option (PTCP_SEGMENT_HDR hdr, void *option, TCP_OPTION type, UINT32 size) |
| void | set_sack_option (PNETSIM_SOCKET s, PTCP_SEGMENT_HDR hdr, double time) |
| void | receive_sack_option (PNETSIM_SOCKET s, PTCP_SEGMENT_HDR hdr) |
| void | set_window_scaling (PNETSIM_SOCKET s, PWsopt opt) |
| void | set_timestamp_value (PNETSIM_SOCKET s, PTCP_SEGMENT_HDR hdr, PTSopt opt) |
| #define _NETSIM_TCP_HEADER_H_ |
Definition at line 17 of file TCP_Header.h.
| #define EXTRA_OPTION_LEN 1 |
Definition at line 152 of file TCP_Header.h.
| #define get_sack_data_count | ( | sack | ) | ((sack->len-SACK_OPTION_FIX_LEN)/SACKDATA_LEN) |
Definition at line 146 of file TCP_Header.h.
| #define MAX_TCP_HDR_SIZE (TCP_HDR_SIZE+MAX_TCP_OPT_LEN) |
Definition at line 105 of file TCP_Header.h.
| #define MAX_TCP_OPT_LEN 40 |
Definition at line 104 of file TCP_Header.h.
| #define MSS_OPTION_LEN 4 |
Definition at line 122 of file TCP_Header.h.
| #define PNETSIM_SOCKET void* |
Definition at line 24 of file TCP_Header.h.
| #define SACK_OPTION_FIX_LEN 2 |
Definition at line 144 of file TCP_Header.h.
| #define SACK_OPTION_LEN | ( | n | ) | ((UINT8)(SACK_OPTION_FIX_LEN+(n)*SACKDATA_LEN)) |
Definition at line 145 of file TCP_Header.h.
| #define SACKDATA_LEN 8 |
Definition at line 136 of file TCP_Header.h.
| #define SACKPERMITTED_OPTION_LEN 2 |
Definition at line 129 of file TCP_Header.h.
| #define TCP_HDR_SIZE 20 |
Definition at line 103 of file TCP_Header.h.
| #define TSOPT_LEN 10 |
Definition at line 169 of file TCP_Header.h.
| #define WSOPT_LEN 3 |
Definition at line 160 of file TCP_Header.h.
| typedef struct stru_tcp_extra_option EXTRA_OPTION |
| typedef struct stru_mss_option MSS_OPTION |
| typedef struct stru_tcp_extra_option * PEXTRA_OPTION |
| typedef struct stru_mss_option * PMSS_OPTION |
| typedef struct stru_sack_option * PSACK_OPTION |
| typedef struct stru_sack_data * PSACKDATA |
| typedef struct stru_sack_permitted_option * PSACKPERMITTED_OPTION |
| typedef struct stru_tcp_header* PTCP_SEGMENT_HDR |
| typedef struct stru_tcp_option* PTCPOPTION |
| typedef struct stru_tcp_timestamp_option * PTSopt |
| typedef struct stru_tcp_window_scale_option * PWsopt |
| typedef struct stru_sack_option SACK_OPTION |
| typedef struct stru_sack_data SACKDATA |
| typedef struct stru_sack_permitted_option SACKPERMITTED_OPTION |
| typedef enum enum_tcp_option TCP_OPTION |
| typedef struct stru_tcp_header TCP_SEGMENT_HDR |
| typedef struct stru_tcp_option TCPOPTION |
| typedef enum enum_tcp_packet TCPPACKET |
| typedef struct stru_tcp_timestamp_option TSopt |
| typedef struct stru_tcp_window_scale_option Wsopt |
| enum enum_tcp_option |
| Enumerator | |
|---|---|
| TCP_OPTION_END | |
| TCP_OPTION_NOOPERATION | |
| TCP_OPTION_MSS | |
| TCP_OPTION_WINDOW_SCALE | |
| TCP_OPTION_SACK_PERMITTED | |
| TCP_OPTION_SACK | |
| TCP_OPTION_ECHO | |
| TCP_OPTION_ECHOREPLY | |
| TCP_OPTION_TIMESTAMP | |
Definition at line 36 of file TCP_Header.h.
| enum enum_tcp_packet |
| Enumerator | |
|---|---|
| TCPPACKET_SYN | |
| TCPPACKET_SYNACK | |
| TCPPACKET_FIN | |
| TCPPACKET_RST | |
| TCPPACKET_ACK | |
Definition at line 27 of file TCP_Header.h.
| PTCP_SEGMENT_HDR copy_tcp_hdr | ( | PTCP_SEGMENT_HDR | hdr | ) |
| void free_tcp_hdr | ( | PTCP_SEGMENT_HDR | hdr | ) |
| void * get_tcp_option | ( | PTCP_SEGMENT_HDR | hdr, |
| TCP_OPTION | type | ||
| ) |
| void receive_sack_option | ( | PNETSIM_SOCKET | s, |
| PTCP_SEGMENT_HDR | hdr | ||
| ) |
| void set_sack_option | ( | PNETSIM_SOCKET | s, |
| PTCP_SEGMENT_HDR | hdr, | ||
| double | time | ||
| ) |
| void set_tcp_option | ( | PTCP_SEGMENT_HDR | hdr, |
| void * | option, | ||
| TCP_OPTION | type, | ||
| UINT32 | size | ||
| ) |
| void set_timestamp_value | ( | PNETSIM_SOCKET | s, |
| PTCP_SEGMENT_HDR | hdr, | ||
| PTSopt | opt | ||
| ) |
| void set_window_scaling | ( | PNETSIM_SOCKET | s, |
| PWsopt | opt | ||
| ) |
|
static |