2 * TCP stream statistics
3 * Originally from tcp_graph.c by Pavel Mores <pvl@uh.cz>
4 * Win32 port: rwh@unifiedtech.com
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 #ifndef __TAP_TCP_STREAM_H__
28 #define __TAP_TCP_STREAM_H__
32 #endif /* __cplusplus */
34 typedef enum tcp_graph_type_
{
55 guint32 th_win
; /* make it 32 bits so we can handle some scaling */
62 guint8 num_sack_ranges
;
63 guint32 sack_left_edge
[MAX_TCP_SACK_RANGES
];
64 guint32 sack_right_edge
[MAX_TCP_SACK_RANGES
];
70 /* The stream this graph will show */
76 /* Should this be a map or tree instead? */
77 struct segment
*segments
;
80 /** Fill in the segment list for a TCP graph
82 * @param cf Capture file to scan
83 * @param tg TCP graph. A valid stream must be set. If either the source or
84 * destination address types are AT_NONE the address and port
85 * information will be filled in using the first packet in the
87 * @param stream_known If FALSE, session information will be filled in using
88 * the currently selected packet. If FALSE, session information will
89 * be matched against tg.
91 void graph_segment_list_get(capture_file
*cf
, struct tcp_graph
*tg
, gboolean stream_known
);
92 void graph_segment_list_free(struct tcp_graph
* );
94 /* for compare_headers() */
95 /* segment went the same direction as the currently selected one */
96 #define COMPARE_CURR_DIR 0
97 #define COMPARE_ANY_DIR 1
99 int compare_headers(address
*saddr1
, address
*daddr1
, guint16 sport1
, guint16 dport1
, const address
*saddr2
, const address
*daddr2
, guint16 sport2
, guint16 dport2
, int dir
);
101 int get_num_dsegs(struct tcp_graph
* );
102 int get_num_acks(struct tcp_graph
*, int * );
104 struct tcpheader
*select_tcpip_session(capture_file
*, struct segment
* );
106 /* This is used by rtt module only */
113 int rtt_is_retrans(struct unack
* , unsigned int );
114 struct unack
*rtt_get_new_unack(double , unsigned int );
115 void rtt_put_unack_on_list(struct unack
** , struct unack
* );
116 void rtt_delete_unack_from_list(struct unack
** , struct unack
* );
121 #endif /* __cplusplus */
123 #endif /* __TAP_TCP_STREAM_H__ */
131 * indent-tabs-mode: nil
134 * ex: set shiftwidth=4 tabstop=8 expandtab:
135 * :indentSize=4:tabSize=8:noTabs=true: