Go to the source code of this file.
|
|
#define | RTT_ALL 0x0001 |
| |
|
#define | RTT_SAK 0x0002 |
| |
|
#define | RTT_RTT 0x0004 |
| |
|
#define | RTT_KRN 0x0008 |
| |
|
#define | COMPARE_CURR_DIR 0 |
| |
|
#define | COMPARE_ANY_DIR 1 |
| |
|
|
typedef enum tcp_graph_type_ | tcp_graph_type |
| |
|
typedef enum rtt_sampling_method_ | rtt_sampling_method |
| |
|
| enum | tcp_graph_type_ {
GRAPH_TSEQ_STEVENS
, GRAPH_TSEQ_TCPTRACE
, GRAPH_THROUGHPUT
, GRAPH_RTT
,
GRAPH_WSCALE
, GRAPH_UNDEFINED
} |
| |
| enum | rtt_sampling_method_ {
SAMPLING_ALL
, SAMPLING_ALL_SACK
, SAMPLING_RTT
, SAMPLING_KARN
,
SAMPLING_UNDEFINED
} |
| |
|
| void | graph_segment_list_get (capture_file *cf, struct tcp_graph *tg) |
| | Fill in the segment list for a TCP graph.
|
| |
| void | graph_segment_list_free (struct tcp_graph *tg) |
| | Frees the memory allocated for a TCP graph segment list.
|
| |
| int | compare_headers (address *saddr1, address *daddr1, uint16_t sport1, uint16_t dport1, const address *saddr2, const address *daddr2, uint16_t sport2, uint16_t dport2, int dir) |
| | Compares the headers of two TCP segments.
|
| |
| int | get_num_dsegs (struct tcp_graph *tg) |
| | Gets the number of data segments in a TCP graph.
|
| |
| int | get_num_acks (struct tcp_graph *tg, int *num_sack_ranges) |
| | Gets the number of ACKs in a TCP graph.
|
| |
| uint32_t | select_tcpip_session (capture_file *cf) |
| | Selects a TCP/IP session based on capture file.
|
| |
| bool | rtt_is_retrans (struct rtt_unack *list, unsigned int seqno) |
| |
| struct rtt_unack * | rtt_get_new_unack (double time_val, unsigned int seqno, unsigned int seglen) |
| | Creates a new RTT unacknowledged packet structure.
|
| |
| void | rtt_put_unack_on_list (struct rtt_unack **l, struct rtt_unack *new_unack) |
| | Adds a new unacknowledged packet to the list.
|
| |
| void | rtt_delete_unack_from_list (struct rtt_unack **l, struct rtt_unack *dead) |
| | Removes a specific RTT unacknowledged packet from the list.
|
| |
| void | rtt_destroy_unack_list (struct rtt_unack **l) |
| | Destroys the unacknowledged list of TCP sequences.
|
| |
TCP stream statistics Originally from tcp_graph.c by Pavel Mores pvl@u.nosp@m.h.cz Win32 port: rwh@u.nosp@m.nifi.nosp@m.edtec.nosp@m.h.co.nosp@m.m
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
◆ compare_headers()
| int compare_headers |
( |
address * |
saddr1, |
|
|
address * |
daddr1, |
|
|
uint16_t |
sport1, |
|
|
uint16_t |
dport1, |
|
|
const address * |
saddr2, |
|
|
const address * |
daddr2, |
|
|
uint16_t |
sport2, |
|
|
uint16_t |
dport2, |
|
|
int |
dir |
|
) |
| |
Compares the headers of two TCP segments.
- Parameters
-
| saddr1 | Source address of the first segment. |
| daddr1 | Destination address of the first segment. |
| sport1 | Source port of the first segment. |
| dport1 | Destination port of the first segment. |
| saddr2 | Source address of the second segment. |
| daddr2 | Destination address of the second segment. |
| sport2 | Source port of the second segment. |
| dport2 | Destination port of the second segment. |
| dir | Direction flag for comparison. |
- Returns
- The result of the comparison.
◆ get_num_acks()
| int get_num_acks |
( |
struct tcp_graph * |
tg, |
|
|
int * |
num_sack_ranges |
|
) |
| |
Gets the number of ACKs in a TCP graph.
- Parameters
-
| tg | Pointer to the TCP graph structure. |
| num_sack_ranges | Pointer to an integer where the sum of SACK ranges will be stored. |
- Returns
- The count of ACKs.
◆ get_num_dsegs()
Gets the number of data segments in a TCP graph.
- Parameters
-
| tg | Pointer to the TCP graph structure. |
- Returns
- The count of data segments.
◆ graph_segment_list_free()
| void graph_segment_list_free |
( |
struct tcp_graph * |
tg | ) |
|
Frees the memory allocated for a TCP graph segment list.
This function releases all resources associated with the given TCP graph, including freeing memory for addresses and segments.
- Parameters
-
| tg | Pointer to the TCP graph structure to be freed. |
◆ graph_segment_list_get()
Fill in the segment list for a TCP graph.
- Parameters
-
| cf | Capture file to scan |
| tg | TCP graph. A valid stream must be set. If either the source or destination address types are AT_NONE the address and port information will be filled in using the first packet in the specified stream. |
◆ rtt_delete_unack_from_list()
Removes a specific RTT unacknowledged packet from the list.
- Parameters
-
| l | Pointer to the head of the RTT unacknowledged packet list. |
| dead | The RTT unacknowledged packet to be removed. |
◆ rtt_destroy_unack_list()
| void rtt_destroy_unack_list |
( |
struct rtt_unack ** |
l | ) |
|
Destroys the unacknowledged list of TCP sequences.
- Parameters
-
| l | Pointer to the pointer of the head of the unacknowledged list. |
◆ rtt_get_new_unack()
| struct rtt_unack * rtt_get_new_unack |
( |
double |
time_val, |
|
|
unsigned int |
seqno, |
|
|
unsigned int |
seglen |
|
) |
| |
Creates a new RTT unacknowledged packet structure.
- Parameters
-
| time_val | The timestamp of the packet. |
| seqno | The sequence number of the packet. |
| seglen | The length of the segment. |
- Returns
- A pointer to the newly created rtt_unack structure.
◆ rtt_is_retrans()
| bool rtt_is_retrans |
( |
struct rtt_unack * |
list, |
|
|
unsigned int |
seqno |
|
) |
| |
Check if a sequence number is currently in the Unacked list, typically for avoiding adding redundant sequences. In practice, the retrans meaning in this particular code is different from TCP's one and would rather cover Keep-Alives and Spurious Retrans.
- Parameters
-
| list | The list containing the Unacked sequences |
| seqno | The sequence number to be searched for in the Unacked list |
- Returns
- true if the list contains the sequence number, false otherwise
◆ rtt_put_unack_on_list()
Adds a new unacknowledged packet to the list.
- Parameters
-
| l | Pointer to the head of the unacknowledged packet list. |
| new_unack | The new unacknowledged packet to add. |
◆ select_tcpip_session()
Selects a TCP/IP session based on capture file.
This function is used to select a TCP/IP session from a capture file.
- Parameters
-
| cf | Pointer to the capture file containing the sessions. |
- Returns
- The selected TCP/IP session ID.