Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

sequence_analysis.h
1 /* sequence-analysis.h
2 * Flow sequence analysis
3 *
4 * Copied from gtk/graph_analysis.h
5 *
6 * Copyright 2004, Verso Technologies Inc.
7 * By Alejandro Vaquero <alejandrovaquero@yahoo.com>
8 *
9 * based on rtp_analysis.c and io_stat
10 *
11 *
12 * Wireshark - Network traffic analyzer
13 * By Gerald Combs <gerald@wireshark.org>
14 * Copyright 1998 Gerald Combs
15 *
16 * SPDX-License-Identifier: GPL-2.0-or-later
17 */
18
19 #ifndef __EPAN_SEQUENCE_ANALYSIS_H__
20 #define __EPAN_SEQUENCE_ANALYSIS_H__
21
22 #include "ws_symbol_export.h"
23
24 #include <glib.h>
25
26 #include "packet_info.h"
27 #include "tap.h"
28 #include "address.h"
29 #include "wsutil/file_util.h"
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34
35 #define MAX_NUM_NODES 40
36
38 typedef struct _seq_analysis_item {
39 guint32 frame_number;
40 address src_addr;
41 guint16 port_src;
42 address dst_addr;
43 guint16 port_dst;
44 gchar *frame_label;
45 gchar *time_str;
46 gchar *comment;
47 guint16 conv_num;
48 unsigned fg_color;
49 unsigned bg_color;
50 gboolean has_color_filter;
51 gboolean display;
52 guint src_node;
53 guint dst_node;
54 guint16 line_style;
55 } seq_analysis_item_t;
56
58 typedef struct _seq_analysis_info {
59 const char* name;
60 gboolean any_addr;
61 int nconv;
62 GQueue* items;
63 GHashTable *ht;
64 address nodes[MAX_NUM_NODES];
65 guint32 num_nodes;
66 } seq_analysis_info_t;
67
69 typedef struct register_analysis register_analysis_t;
70
71 #if 0
72 #define SEQ_ANALYSIS_DEBUG(...) { \
73 char *SEQ_ANALYSIS_DEBUG_MSG = g_strdup_printf(__VA_ARGS__); \
74 g_warning("sequence analysis: %s:%d %s", G_STRFUNC, __LINE__, SEQ_ANALYSIS_DEBUG_MSG); \
75 g_free(SEQ_ANALYSIS_DEBUG_MSG); \
76 }
77 #else
78 #define SEQ_ANALYSIS_DEBUG()
79 #endif
80
81 WS_DLL_PUBLIC void register_seq_analysis(const char* name, const char* ui_name, const int proto_id, const char* tap_listener, guint tap_flags, tap_packet_cb tap_func);
82
88 WS_DLL_PUBLIC const char* sequence_analysis_get_name(register_analysis_t* analysis);
89
95 WS_DLL_PUBLIC const char* sequence_analysis_get_tap_listener_name(register_analysis_t* analysis);
96
102 WS_DLL_PUBLIC const char* sequence_analysis_get_ui_name(register_analysis_t* analysis);
103
109 WS_DLL_PUBLIC tap_packet_cb sequence_analysis_get_packet_func(register_analysis_t* analysis);
110
116 WS_DLL_PUBLIC guint sequence_analysis_get_tap_flags(register_analysis_t* analysis);
117
126 WS_DLL_PUBLIC seq_analysis_item_t* sequence_analysis_create_sai_with_addresses(packet_info *pinfo, seq_analysis_info_t *sainfo);
127
133 WS_DLL_PUBLIC void sequence_analysis_use_color_filter(packet_info *pinfo, seq_analysis_item_t *sai);
134
140 WS_DLL_PUBLIC void sequence_analysis_use_col_info_as_label_comment(packet_info *pinfo, seq_analysis_item_t *sai);
141
147 WS_DLL_PUBLIC register_analysis_t* sequence_analysis_find_by_name(const char* name);
148
154 WS_DLL_PUBLIC void sequence_analysis_table_iterate_tables(wmem_foreach_func func, gpointer user_data);
155
159 WS_DLL_PUBLIC seq_analysis_info_t *sequence_analysis_info_new(void);
160
164 WS_DLL_PUBLIC void sequence_analysis_info_free(seq_analysis_info_t * sainfo);
165
169 WS_DLL_PUBLIC void sequence_analysis_list_sort(seq_analysis_info_t *sainfo);
170
175 WS_DLL_PUBLIC void sequence_analysis_list_free(seq_analysis_info_t *sainfo);
176
182 WS_DLL_PUBLIC int sequence_analysis_get_nodes(seq_analysis_info_t *sainfo);
183
188 WS_DLL_PUBLIC void sequence_analysis_free_nodes(seq_analysis_info_t *sainfo);
189
190
197 WS_DLL_PUBLIC void sequence_analysis_dump_to_file(FILE *of, seq_analysis_info_t *sainfo, unsigned int first_node);
198
199 #ifdef __cplusplus
200 }
201 #endif /* __cplusplus */
202
203 #endif /* __EPAN_SEQUENCE_ANALYSIS_H__ */
204
205 /*
206 * Editor modelines
207 *
208 * Local Variables:
209 * c-basic-offset: 4
210 * tab-width: 8
211 * indent-tabs-mode: nil
212 * End:
213 *
214 * ex: set shiftwidth=4 tabstop=8 expandtab:
215 * :indentSize=4:tabSize=8:noTabs=true:
216 */
_seq_analysis_item::has_color_filter
gboolean has_color_filter
Definition: sequence_analysis.h:50
_seq_analysis_item::fg_color
unsigned fg_color
Definition: sequence_analysis.h:48
_seq_analysis_info::nconv
int nconv
Definition: sequence_analysis.h:61
_packet_info
Definition: packet_info.h:44
wmem_foreach_func
gboolean(* wmem_foreach_func)(const void *key, void *value, void *userdata)
Definition: wmem_tree.h:213
_seq_analysis_item::frame_label
gchar * frame_label
Definition: sequence_analysis.h:44
_seq_analysis_item::comment
gchar * comment
Definition: sequence_analysis.h:46
_seq_analysis_info
Definition: sequence_analysis.h:58
_seq_analysis_item::line_style
guint16 line_style
Definition: sequence_analysis.h:54
_seq_analysis_item::display
gboolean display
Definition: sequence_analysis.h:51
_seq_analysis_item::conv_num
guint16 conv_num
Definition: sequence_analysis.h:47
_seq_analysis_info::num_nodes
guint32 num_nodes
Definition: sequence_analysis.h:65
_seq_analysis_info::ht
GHashTable * ht
Definition: sequence_analysis.h:63
_seq_analysis_item::time_str
gchar * time_str
Definition: sequence_analysis.h:45
_seq_analysis_item::bg_color
unsigned bg_color
Definition: sequence_analysis.h:49
_seq_analysis_item
Definition: sequence_analysis.h:38
_seq_analysis_info::name
const char * name
Definition: sequence_analysis.h:59
_seq_analysis_item::src_node
guint src_node
Definition: sequence_analysis.h:52
register_analysis
Definition: sequence_analysis.c:26
_seq_analysis_info::items
GQueue * items
Definition: sequence_analysis.h:62
_seq_analysis_info::any_addr
gboolean any_addr
Definition: sequence_analysis.h:60
_seq_analysis_item::dst_node
guint dst_node
Definition: sequence_analysis.h:53
packet_info.h
_address
Definition: address.h:47