14#ifndef __TAP_TCP_STREAM_H__
15#define __TAP_TCP_STREAM_H__
123#define COMPARE_CURR_DIR 0
124#define COMPARE_ANY_DIR 1
171 unsigned int end_seqno;
227tcp_seq_eq(uint32_t s1, uint32_t s2) {
228 return (int32_t)(s1 - s2) == 0;
239tcp_seq_before(uint32_t s1, uint32_t s2) {
240 return (int32_t)(s1 - s2) < 0;
251tcp_seq_eq_or_after(uint32_t s1, uint32_t s2) {
252 return !tcp_seq_before(s1, s2);
263tcp_seq_after(uint32_t s1, uint32_t s2) {
264 return (int32_t)(s1 - s2) > 0;
276tcp_seq_before_or_eq(uint32_t s1, uint32_t s2) {
277 return !tcp_seq_after(s1, s2);
Holds a network or link-layer address of any supported type.
Definition address.h:62
Represents a capture file and its associated metadata.
Definition cfile.h:84
Definition tap-tcp-stream.h:167
Represents a single decoded TCP segment extracted from a captured frame for graph analysis.
Definition tap-tcp-stream.h:56
uint32_t sack_right_edge[MAX_TCP_SACK_RANGES]
Definition tap-tcp-stream.h:77
uint32_t num
Definition tap-tcp-stream.h:58
uint32_t th_ack
Definition tap-tcp-stream.h:62
uint32_t sack_left_edge[MAX_TCP_SACK_RANGES]
Definition tap-tcp-stream.h:76
uint32_t th_rawseq
Definition tap-tcp-stream.h:63
nstime_t rel_ts
Definition tap-tcp-stream.h:59
struct segment * next
Definition tap-tcp-stream.h:57
uint32_t th_rawack
Definition tap-tcp-stream.h:64
uint32_t th_seq
Definition tap-tcp-stream.h:61
uint16_t th_flags
Definition tap-tcp-stream.h:65
uint8_t num_sack_ranges
Definition tap-tcp-stream.h:75
address ip_dst
Definition tap-tcp-stream.h:71
uint16_t th_dport
Definition tap-tcp-stream.h:69
uint16_t th_sport
Definition tap-tcp-stream.h:68
address ip_src
Definition tap-tcp-stream.h:70
uint32_t th_win
Definition tap-tcp-stream.h:66
bool ack_karn
Definition tap-tcp-stream.h:73
uint32_t th_seglen
Definition tap-tcp-stream.h:67
Describes a TCP stream graph, including the stream identity, graph type, and collected segment list.
Definition tap-tcp-stream.h:83
struct segment * segments
Definition tap-tcp-stream.h:96
address src_address
Definition tap-tcp-stream.h:89
tcp_graph_type type
Definition tap-tcp-stream.h:84
struct segment * last
Definition tap-tcp-stream.h:97
address dst_address
Definition tap-tcp-stream.h:91
uint8_t rtt_sampling
Definition tap-tcp-stream.h:86
uint16_t src_port
Definition tap-tcp-stream.h:90
uint32_t stream
Definition tap-tcp-stream.h:93
uint16_t dst_port
Definition tap-tcp-stream.h:92
enum rtt_sampling_method_ rtt_sampling_method
Selects which ACK events are used as RTT sample points in the RTT graph.
bool rtt_is_retrans(struct rtt_unack *list, unsigned int seqno)
Definition tap-tcp-stream.c:358
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.
Definition tap-tcp-stream.c:178
void rtt_put_unack_on_list(struct rtt_unack **l, struct rtt_unack *new_unack)
Adds a new unacknowledged packet to the list.
Definition tap-tcp-stream.c:384
uint32_t select_tcpip_session(capture_file *cf)
Selects a TCP/IP session based on capture file.
Definition tap-tcp-stream.c:283
enum tcp_graph_type_ tcp_graph_type
Selects the plot type displayed in the TCP Stream Graph dialog.
tcp_graph_type_
Selects the plot type displayed in the TCP Stream Graph dialog.
Definition tap-tcp-stream.h:24
@ GRAPH_UNDEFINED
Definition tap-tcp-stream.h:30
@ GRAPH_THROUGHPUT
Definition tap-tcp-stream.h:27
@ GRAPH_WSCALE
Definition tap-tcp-stream.h:29
@ GRAPH_TSEQ_TCPTRACE
Definition tap-tcp-stream.h:26
@ GRAPH_TSEQ_STEVENS
Definition tap-tcp-stream.h:25
@ GRAPH_RTT
Definition tap-tcp-stream.h:28
int get_num_dsegs(struct tcp_graph *tg)
Gets the number of data segments in a TCP graph.
Definition tap-tcp-stream.c:199
void graph_segment_list_get(capture_file *cf, struct tcp_graph *tg)
Fill in the segment list for a TCP graph.
Definition tap-tcp-stream.c:136
int get_num_acks(struct tcp_graph *tg, int *num_sack_ranges)
Gets the number of ACKs in a TCP graph.
Definition tap-tcp-stream.c:217
void rtt_destroy_unack_list(struct rtt_unack **l)
Destroys the unacknowledged list of TCP sequences.
Definition tap-tcp-stream.c:422
struct rtt_unack * rtt_get_new_unack(double time_val, unsigned int seqno, unsigned int seglen)
Creates a new RTT unacknowledged packet structure.
Definition tap-tcp-stream.c:372
void graph_segment_list_free(struct tcp_graph *tg)
Frees the memory allocated for a TCP graph segment list.
Definition tap-tcp-stream.c:160
rtt_sampling_method_
Selects which ACK events are used as RTT sample points in the RTT graph.
Definition tap-tcp-stream.h:45
@ SAMPLING_ALL
Definition tap-tcp-stream.h:46
@ SAMPLING_UNDEFINED
Definition tap-tcp-stream.h:50
@ SAMPLING_RTT
Definition tap-tcp-stream.h:48
@ SAMPLING_ALL_SACK
Definition tap-tcp-stream.h:47
@ SAMPLING_KARN
Definition tap-tcp-stream.h:49
void rtt_delete_unack_from_list(struct rtt_unack **l, struct rtt_unack *dead)
Removes a specific RTT unacknowledged packet from the list.
Definition tap-tcp-stream.c:400