MSWSP: add parse_CNatLanguageRestriction()
[wireshark-wip.git] / ui / tap-sequence-analysis.h
blob9afd3b3542798e6d44326c19db00ed86c39e1c75
1 /* tap-sequence-analysis.h
2 * Flow sequence analysis
4 * $Id$
6 * Copied from gtk/graph_analysis.h
7 *
8 * Copyright 2004, Verso Technologies Inc.
9 * By Alejandro Vaquero <alejandrovaquero@yahoo.com>
11 * based on rtp_analysis.c and io_stat
14 * Wireshark - Network traffic analyzer
15 * By Gerald Combs <gerald@wireshark.org>
16 * Copyright 1998 Gerald Combs
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2
21 * of the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
33 #ifndef __TAP_SEQUENCE_ANALYSIS_H__
34 #define __TAP_SEQUENCE_ANALYSIS_H__
36 #include <glib.h>
38 #include "cfile.h"
39 #include "epan/address.h"
41 #ifdef __cplusplus
42 extern "C" {
43 #endif /* __cplusplus */
45 #define MAX_NUM_NODES 40
47 typedef enum seq_analysis_type_ {
48 SEQ_ANALYSIS_ANY,
49 SEQ_ANALYSIS_TCP,
50 SEQ_ANALYSIS_VOIP
51 } seq_analysis_type;
53 /** defines an entry for the graph analysis */
54 typedef struct _seq_analysis_item {
55 frame_data *fd; /**< Holds the frame number and time information */
56 address src_addr;
57 guint16 port_src;
58 address dst_addr;
59 guint16 port_dst;
60 gchar *frame_label; /**< the label on top of the arrow */
61 gchar *time_str; /**< timestamp */
62 gchar *comment; /**< a comment that appears at the right of the graph */
63 guint16 conv_num; /**< the conversation number, each conversation will be colored */
64 gboolean display; /**< indicate if the packet is displayed or not in the graph */
65 guint16 src_node; /**< this is used by graph_analysis.c to identify the node */
66 guint16 dst_node; /**< a node is an IP address that will be displayed in columns */
67 guint16 line_style; /**< the arrow line width in pixels*/
68 } seq_analysis_item_t;
70 /** defines the graph analysis structure */
71 typedef struct _seq_analysis_info {
72 seq_analysis_type type; /**< sequence type */
73 gboolean all_packets; /**< all packets vs only displayed */
74 gboolean any_addr; /**< any addr (DL+net) vs net-only */
75 int nconv; /**< number of conversations in the list */
76 GList* list; /**< list with the graph analysis items */
77 GHashTable *ht; /**< hash table for retrieving graph analysis items */
78 address nodes[MAX_NUM_NODES]; /**< horizontal node list */
79 guint32 num_nodes; /**< actual number of nodes */
80 } seq_analysis_info_t;
82 /** Fill in the segment list for sequence analysis
84 * @param cf Capture file to scan
85 * @param sai Sequence analysis information. A valid type must be set.
87 void sequence_analysis_list_get(capture_file *cf, seq_analysis_info_t *sainfo);
89 /** Free the segment list
91 * @param sai Sequence analysis information.
93 void sequence_analysis_list_free(seq_analysis_info_t *sainfo);
95 /** Fill in the node address list
97 * @param sai Sequence analysis information.
98 * @return The number of transaction items (not nodes) processed.
100 int sequence_analysis_get_nodes(seq_analysis_info_t *sainfo);
102 /** Write an ASCII version of the sequence diagram to a file.
104 * @param pathname Pathname of the file to write.
105 * @param sai Sequence analysis information.
106 * @param cf Capture file associated with the diagram.
107 * @param first_node Start drawing at this node.
108 * @return TRUE on success, FALSE on failure.
110 gboolean sequence_analysis_dump_to_file(const char *pathname, seq_analysis_info_t *sainfo, capture_file *cf, unsigned int first_node);
112 #ifdef __cplusplus
114 #endif /* __cplusplus */
116 #endif /* __TAP_SEQUENCE_ANALYSIS_H__ */
119 * Editor modelines
121 * Local Variables:
122 * c-basic-offset: 4
123 * tab-width: 8
124 * indent-tabs-mode: nil
125 * End:
127 * ex: set shiftwidth=4 tabstop=8 expandtab:
128 * :indentSize=4:tabSize=8:noTabs=true: