| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
sequence_analysis.h
Go to the documentation of this file.
1
18#pragma once
19#include "ws_symbol_export.h"
20
21#include <glib.h>
22
23#include "packet_info.h"
24#include "tap.h"
25#include "address.h"
26#include "wsutil/file_util.h"
27
28#ifdef __cplusplus
29 extern "C" {
30#endif /* __cplusplus */
31
32#define MAX_NUM_NODES 40
33
37 typedef enum _ga_info_type {
38 GA_INFO_TYPE_NONE = 0,
39 GA_INFO_TYPE_RTP
40} ga_info_type;
41
47 typedef void (*ga_info_ptr_free_cb)(void *info_ptr);
48
52 typedef struct _seq_analysis_item {
53 uint32_t frame_number;
54 address src_addr;
55 uint16_t port_src;
56 address dst_addr;
57 uint16_t port_dst;
58
59 char *frame_label;
60 char *time_str;
61 char *comment;
62
63 uint16_t conv_num;
64 unsigned fg_color;
65 unsigned bg_color;
66 bool has_color_filter;
67 bool display;
68
69 unsigned src_node;
70 unsigned dst_node;
71 uint16_t line_style;
72
73 ga_info_type info_type;
74 void *info_ptr;
75 ga_info_ptr_free_cb free_info_ptr;
76} seq_analysis_item_t;
77
79 typedef struct _seq_analysis_info {
80 const char* name;
81 bool any_addr;
82 int nconv;
83 GQueue* items;
84 GHashTable *ht;
85 address nodes[MAX_NUM_NODES];
86 uint8_t occurrence[MAX_NUM_NODES];
87 uint32_t num_nodes;
88} seq_analysis_info_t;
89
91 typedef struct register_analysis register_analysis_t;
92
103WS_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);
104
110WS_DLL_PUBLIC const char* sequence_analysis_get_name(register_analysis_t* analysis);
111
117WS_DLL_PUBLIC const char* sequence_analysis_get_tap_listener_name(register_analysis_t* analysis);
118
124WS_DLL_PUBLIC const char* sequence_analysis_get_ui_name(register_analysis_t* analysis);
125
131WS_DLL_PUBLIC tap_packet_cb sequence_analysis_get_packet_func(register_analysis_t* analysis);
132
138WS_DLL_PUBLIC unsigned sequence_analysis_get_tap_flags(register_analysis_t* analysis);
139
148WS_DLL_PUBLIC seq_analysis_item_t* sequence_analysis_create_sai_with_addresses(packet_info *pinfo, seq_analysis_info_t *sainfo);
149
155WS_DLL_PUBLIC void sequence_analysis_use_color_filter(packet_info *pinfo, seq_analysis_item_t *sai);
156
162WS_DLL_PUBLIC void sequence_analysis_use_col_info_as_label_comment(packet_info *pinfo, seq_analysis_item_t *sai);
163
169WS_DLL_PUBLIC register_analysis_t* sequence_analysis_find_by_name(const char* name);
170
176WS_DLL_PUBLIC void sequence_analysis_table_iterate_tables(wmem_foreach_func func, void *user_data);
177
181WS_DLL_PUBLIC seq_analysis_info_t *sequence_analysis_info_new(void);
182
186WS_DLL_PUBLIC void sequence_analysis_info_free(seq_analysis_info_t * sainfo);
187
191WS_DLL_PUBLIC void sequence_analysis_list_sort(seq_analysis_info_t *sainfo);
192
197WS_DLL_PUBLIC void sequence_analysis_list_free(seq_analysis_info_t *sainfo);
198
204WS_DLL_PUBLIC int sequence_analysis_get_nodes(seq_analysis_info_t *sainfo);
205
210WS_DLL_PUBLIC void sequence_analysis_free_nodes(seq_analysis_info_t *sainfo);
211
212
219WS_DLL_PUBLIC void sequence_analysis_dump_to_file(FILE *of, seq_analysis_info_t *sainfo, unsigned first_node);
220
221#ifdef __cplusplus
222}
223#endif /* __cplusplus */
224
225/*
226 * Editor modelines
227 *
228 * Local Variables:
229 * c-basic-offset: 4
230 * tab-width: 8
231 * indent-tabs-mode: nil
232 * End:
233 *
234 * ex: set shiftwidth=4 tabstop=8 expandtab:
235 * :indentSize=4:tabSize=8:noTabs=true:
236 */
address.h
address
struct _address address
Holds a network or link-layer address of any supported type.
file_util.h
packet_info
struct _packet_info packet_info
Represents the metadata and indexing information for a single captured frame.
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
register_seq_analysis
WS_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)
Registers a new sequence analysis.
Definition sequence_analysis.c:39
ga_info_type
enum _ga_info_type ga_info_type
Identifies the type of protocol-specific supplementary data attached to a graph analysis item.
seq_analysis_item_t
struct _seq_analysis_item seq_analysis_item_t
Represents a single event or message arrow in a sequence / flow graph analysis.
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
register_analysis_t
struct register_analysis register_analysis_t
Definition sequence_analysis.h:91
seq_analysis_info_t
struct _seq_analysis_info seq_analysis_info_t
_ga_info_type
_ga_info_type
Identifies the type of protocol-specific supplementary data attached to a graph analysis item.
Definition sequence_analysis.h:37
GA_INFO_TYPE_RTP
@ GA_INFO_TYPE_RTP
Definition sequence_analysis.h:39
GA_INFO_TYPE_NONE
@ GA_INFO_TYPE_NONE
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
ga_info_ptr_free_cb
void(* ga_info_ptr_free_cb)(void *info_ptr)
Callback invoked to release the protocol-specific data pointed to by seq_analysis_item_t::info_ptr.
Definition sequence_analysis.h:47
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
_seq_analysis_info
Definition sequence_analysis.h:79
_seq_analysis_info::ht
GHashTable * ht
Definition sequence_analysis.h:84
_seq_analysis_info::any_addr
bool any_addr
Definition sequence_analysis.h:81
_seq_analysis_info::num_nodes
uint32_t num_nodes
Definition sequence_analysis.h:87
_seq_analysis_info::occurrence
uint8_t occurrence[40]
Definition sequence_analysis.h:86
_seq_analysis_info::name
const char * name
Definition sequence_analysis.h:80
_seq_analysis_info::nconv
int nconv
Definition sequence_analysis.h:82
_seq_analysis_info::items
GQueue * items
Definition sequence_analysis.h:83
_seq_analysis_info::nodes
address nodes[40]
Definition sequence_analysis.h:85
_seq_analysis_item
Represents a single event or message arrow in a sequence / flow graph analysis.
Definition sequence_analysis.h:52
_seq_analysis_item::line_style
uint16_t line_style
Definition sequence_analysis.h:71
_seq_analysis_item::free_info_ptr
ga_info_ptr_free_cb free_info_ptr
Definition sequence_analysis.h:75
_seq_analysis_item::dst_node
unsigned dst_node
Definition sequence_analysis.h:70
_seq_analysis_item::dst_addr
address dst_addr
Definition sequence_analysis.h:56
_seq_analysis_item::display
bool display
Definition sequence_analysis.h:67
_seq_analysis_item::bg_color
unsigned bg_color
Definition sequence_analysis.h:65
_seq_analysis_item::port_src
uint16_t port_src
Definition sequence_analysis.h:55
_seq_analysis_item::src_addr
address src_addr
Definition sequence_analysis.h:54
_seq_analysis_item::comment
char * comment
Definition sequence_analysis.h:61
_seq_analysis_item::info_ptr
void * info_ptr
Definition sequence_analysis.h:74
_seq_analysis_item::time_str
char * time_str
Definition sequence_analysis.h:60
_seq_analysis_item::has_color_filter
bool has_color_filter
Definition sequence_analysis.h:66
_seq_analysis_item::conv_num
uint16_t conv_num
Definition sequence_analysis.h:63
_seq_analysis_item::frame_label
char * frame_label
Definition sequence_analysis.h:59
_seq_analysis_item::fg_color
unsigned fg_color
Definition sequence_analysis.h:64
_seq_analysis_item::info_type
ga_info_type info_type
Definition sequence_analysis.h:73
_seq_analysis_item::port_dst
uint16_t port_dst
Definition sequence_analysis.h:57
_seq_analysis_item::frame_number
uint32_t frame_number
Definition sequence_analysis.h:53
_seq_analysis_item::src_node
unsigned src_node
Definition sequence_analysis.h:69
register_analysis
Definition sequence_analysis.c:27
tap.h