| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
sequence_analysis.h
Go to the documentation of this file.
1
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 enum _ga_info_type {
39 GA_INFO_TYPE_NONE=0,
40 GA_INFO_TYPE_RTP
41} ga_info_type;
42
43 typedef void (*ga_info_ptr_free_cb)(void*);
44
46 typedef struct _seq_analysis_item {
47 uint32_t frame_number;
48 address src_addr;
49 uint16_t port_src;
50 address dst_addr;
51 uint16_t port_dst;
52 char *frame_label;
53 char *time_str;
54 char *comment;
55 uint16_t conv_num;
56 unsigned fg_color;
57 unsigned bg_color;
58 bool has_color_filter;
59 bool display;
60 unsigned src_node;
61 unsigned dst_node;
62 uint16_t line_style;
63 ga_info_type info_type;
64 void *info_ptr;
65 ga_info_ptr_free_cb free_info_ptr;
66} seq_analysis_item_t;
67
69 typedef struct _seq_analysis_info {
70 const char* name;
71 bool any_addr;
72 int nconv;
73 GQueue* items;
74 GHashTable *ht;
75 address nodes[MAX_NUM_NODES];
76 uint8_t occurrence[MAX_NUM_NODES];
77 uint32_t num_nodes;
78} seq_analysis_info_t;
79
81 typedef struct register_analysis register_analysis_t;
82
83WS_DLL_PUBLIC void register_seq_analysis(const char* name, const char* ui_name, const int proto_id, const char* tap_listener, unsigned tap_flags, tap_packet_cb tap_func);
84
90WS_DLL_PUBLIC const char* sequence_analysis_get_name(register_analysis_t* analysis);
91
97WS_DLL_PUBLIC const char* sequence_analysis_get_tap_listener_name(register_analysis_t* analysis);
98
104WS_DLL_PUBLIC const char* sequence_analysis_get_ui_name(register_analysis_t* analysis);
105
111WS_DLL_PUBLIC tap_packet_cb sequence_analysis_get_packet_func(register_analysis_t* analysis);
112
118WS_DLL_PUBLIC unsigned sequence_analysis_get_tap_flags(register_analysis_t* analysis);
119
128WS_DLL_PUBLIC seq_analysis_item_t* sequence_analysis_create_sai_with_addresses(packet_info *pinfo, seq_analysis_info_t *sainfo);
129
135WS_DLL_PUBLIC void sequence_analysis_use_color_filter(packet_info *pinfo, seq_analysis_item_t *sai);
136
142WS_DLL_PUBLIC void sequence_analysis_use_col_info_as_label_comment(packet_info *pinfo, seq_analysis_item_t *sai);
143
149WS_DLL_PUBLIC register_analysis_t* sequence_analysis_find_by_name(const char* name);
150
156WS_DLL_PUBLIC void sequence_analysis_table_iterate_tables(wmem_foreach_func func, void *user_data);
157
161WS_DLL_PUBLIC seq_analysis_info_t *sequence_analysis_info_new(void);
162
166WS_DLL_PUBLIC void sequence_analysis_info_free(seq_analysis_info_t * sainfo);
167
171WS_DLL_PUBLIC void sequence_analysis_list_sort(seq_analysis_info_t *sainfo);
172
177WS_DLL_PUBLIC void sequence_analysis_list_free(seq_analysis_info_t *sainfo);
178
184WS_DLL_PUBLIC int sequence_analysis_get_nodes(seq_analysis_info_t *sainfo);
185
190WS_DLL_PUBLIC void sequence_analysis_free_nodes(seq_analysis_info_t *sainfo);
191
192
199WS_DLL_PUBLIC void sequence_analysis_dump_to_file(FILE *of, seq_analysis_info_t *sainfo, unsigned first_node);
200
201#ifdef __cplusplus
202}
203#endif /* __cplusplus */
204
205#endif /* __EPAN_SEQUENCE_ANALYSIS_H__ */
206
207/*
208 * Editor modelines
209 *
210 * Local Variables:
211 * c-basic-offset: 4
212 * tab-width: 8
213 * indent-tabs-mode: nil
214 * End:
215 *
216 * ex: set shiftwidth=4 tabstop=8 expandtab:
217 * :indentSize=4:tabSize=8:noTabs=true:
218 */
address.h
file_util.h
wmem_foreach_func
bool(* wmem_foreach_func)(const void *key, void *value, void *userdata)
Function type for processing one node of a tree during a traversal.
Definition wmem_tree.h:389
packet_info.h
sequence_analysis_get_nodes
WS_DLL_PUBLIC int sequence_analysis_get_nodes(seq_analysis_info_t *sainfo)
Definition sequence_analysis.c:333
sequence_analysis_find_by_name
WS_DLL_PUBLIC register_analysis_t * sequence_analysis_find_by_name(const char *name)
Definition sequence_analysis.c:89
sequence_analysis_dump_to_file
WS_DLL_PUBLIC void sequence_analysis_dump_to_file(FILE *of, seq_analysis_info_t *sainfo, unsigned first_node)
sequence_analysis_info_new
WS_DLL_PUBLIC seq_analysis_info_t * sequence_analysis_info_new(void)
Definition sequence_analysis.c:163
ga_info_type
enum _ga_info_type ga_info_type
seq_analysis_item_t
struct _seq_analysis_item seq_analysis_item_t
sequence_analysis_use_color_filter
WS_DLL_PUBLIC void sequence_analysis_use_color_filter(packet_info *pinfo, seq_analysis_item_t *sai)
Definition sequence_analysis.c:127
sequence_analysis_get_name
WS_DLL_PUBLIC const char * sequence_analysis_get_name(register_analysis_t *analysis)
Definition sequence_analysis.c:63
sequence_analysis_get_tap_listener_name
WS_DLL_PUBLIC const char * sequence_analysis_get_tap_listener_name(register_analysis_t *analysis)
Definition sequence_analysis.c:73
sequence_analysis_create_sai_with_addresses
WS_DLL_PUBLIC seq_analysis_item_t * sequence_analysis_create_sai_with_addresses(packet_info *pinfo, seq_analysis_info_t *sainfo)
Definition sequence_analysis.c:99
seq_analysis_info_t
struct _seq_analysis_info seq_analysis_info_t
_ga_info_type
_ga_info_type
Definition sequence_analysis.h:38
sequence_analysis_get_packet_func
WS_DLL_PUBLIC tap_packet_cb sequence_analysis_get_packet_func(register_analysis_t *analysis)
Definition sequence_analysis.c:78
sequence_analysis_table_iterate_tables
WS_DLL_PUBLIC void sequence_analysis_table_iterate_tables(wmem_foreach_func func, void *user_data)
Definition sequence_analysis.c:94
sequence_analysis_free_nodes
WS_DLL_PUBLIC void sequence_analysis_free_nodes(seq_analysis_info_t *sainfo)
Definition sequence_analysis.c:346
sequence_analysis_list_sort
WS_DLL_PUBLIC void sequence_analysis_list_sort(seq_analysis_info_t *sainfo)
Definition sequence_analysis.c:220
sequence_analysis_use_col_info_as_label_comment
WS_DLL_PUBLIC void sequence_analysis_use_col_info_as_label_comment(packet_info *pinfo, seq_analysis_item_t *sai)
Definition sequence_analysis.c:136
sequence_analysis_get_tap_flags
WS_DLL_PUBLIC unsigned sequence_analysis_get_tap_flags(register_analysis_t *analysis)
Definition sequence_analysis.c:83
sequence_analysis_get_ui_name
WS_DLL_PUBLIC const char * sequence_analysis_get_ui_name(register_analysis_t *analysis)
Definition sequence_analysis.c:68
sequence_analysis_list_free
WS_DLL_PUBLIC void sequence_analysis_list_free(seq_analysis_info_t *sainfo)
Definition sequence_analysis.c:227
sequence_analysis_info_free
WS_DLL_PUBLIC void sequence_analysis_info_free(seq_analysis_info_t *sainfo)
Definition sequence_analysis.c:173
_address
Definition address.h:58
_packet_info
Definition packet_info.h:43
_seq_analysis_info
Definition sequence_analysis.h:69
_seq_analysis_info::occurrence
uint8_t occurrence[MAX_NUM_NODES]
Definition sequence_analysis.h:76
_seq_analysis_info::ht
GHashTable * ht
Definition sequence_analysis.h:74
_seq_analysis_info::any_addr
bool any_addr
Definition sequence_analysis.h:71
_seq_analysis_info::num_nodes
uint32_t num_nodes
Definition sequence_analysis.h:77
_seq_analysis_info::nodes
address nodes[MAX_NUM_NODES]
Definition sequence_analysis.h:75
_seq_analysis_info::name
const char * name
Definition sequence_analysis.h:70
_seq_analysis_info::nconv
int nconv
Definition sequence_analysis.h:72
_seq_analysis_info::items
GQueue * items
Definition sequence_analysis.h:73
_seq_analysis_item
Definition sequence_analysis.h:46
_seq_analysis_item::line_style
uint16_t line_style
Definition sequence_analysis.h:62
_seq_analysis_item::free_info_ptr
ga_info_ptr_free_cb free_info_ptr
Definition sequence_analysis.h:65
_seq_analysis_item::dst_node
unsigned dst_node
Definition sequence_analysis.h:61
_seq_analysis_item::display
bool display
Definition sequence_analysis.h:59
_seq_analysis_item::bg_color
unsigned bg_color
Definition sequence_analysis.h:57
_seq_analysis_item::comment
char * comment
Definition sequence_analysis.h:54
_seq_analysis_item::info_ptr
void * info_ptr
Definition sequence_analysis.h:64
_seq_analysis_item::time_str
char * time_str
Definition sequence_analysis.h:53
_seq_analysis_item::has_color_filter
bool has_color_filter
Definition sequence_analysis.h:58
_seq_analysis_item::conv_num
uint16_t conv_num
Definition sequence_analysis.h:55
_seq_analysis_item::frame_label
char * frame_label
Definition sequence_analysis.h:52
_seq_analysis_item::fg_color
unsigned fg_color
Definition sequence_analysis.h:56
_seq_analysis_item::info_type
ga_info_type info_type
Definition sequence_analysis.h:63
_seq_analysis_item::src_node
unsigned src_node
Definition sequence_analysis.h:60
register_analysis
Definition sequence_analysis.c:27
tap.h