38#define CONV_ID_UNSET UINT32_MAX
128#define CONV_FILTER_INVALID "INVALID"
132typedef void (*conv_gui_init_cb)(
struct register_ct* ct,
const char *filter);
134typedef void (*endpoint_gui_init_cb)(
struct register_ct* ct,
const char *filter);
199#define ENDPOINT_TAP_PREFIX "endpoints"
213WS_DLL_PUBLIC
void register_conversation_table(
const int proto_id,
bool hide_ports, tap_packet_cb conv_packet_func, tap_packet_cb endpoint_packet_func);
387 uint32_t src_port, uint32_t dst_port,
int num_frames,
int num_bytes,
nstime_t *ts,
nstime_t *abs_ts,
410 uint32_t dst_port,
conv_id_t conv_id,
int num_frames,
int num_bytes,
435 uint32_t dst_port,
conv_id_t conv_id,
int num_frames,
int num_bytes,
458 uint32_t dst_port,
conv_id_t conv_id,
int num_frames,
int num_bytes,
475 uint32_t port,
bool sender,
int num_frames,
int num_bytes,
et_dissector_info_t *et_info, endpoint_type etype);
491 uint32_t port,
bool sender,
int num_frames,
int num_bytes,
et_dissector_info_t *et_info, endpoint_type etype);
struct _address address
Holds a network or link-layer address of any supported type.
struct conversation conversation_t
conversation_type
Conversation key types recognized by Wireshark dissectors.
Definition conversation.h:115
WS_DLL_PUBLIC void add_endpoint_table_data(conv_hash_t *ch, const address *addr, uint32_t port, bool sender, int num_frames, int num_bytes, et_dissector_info_t *et_info, endpoint_type etype)
Add some data to the endpoint table.
Definition conversation_table.c:920
WS_DLL_PUBLIC char * get_endpoint_filter(endpoint_item_t *endpoint_item)
Get a display filter for the given endpoint.
Definition conversation_table.c:588
WS_DLL_PUBLIC void add_conversation_table_data_ipv4_subnet(conv_hash_t *ch, const address *src, const address *dst, uint32_t src_port, uint32_t dst_port, conv_id_t conv_id, int num_frames, int num_bytes, nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, conversation_type ctype)
Encapsulates add_conversation_table_data_with_conv_id() for the IPv4 specific case when the subnet ag...
Definition conversation_table.c:824
WS_DLL_PUBLIC char * get_endpoint_port(wmem_allocator_t *allocator, endpoint_item_t *item, bool resolve_names)
Get the string representation of the port for an endpoint_item_t.
Definition conversation_table.c:344
WS_DLL_PUBLIC bool get_conversation_hide_ports(register_ct_t *ct)
Should port columns be hidden?
Definition conversation_table.c:33
WS_DLL_PUBLIC conv_item_t * add_conversation_table_data_with_conv_id(conv_hash_t *ch, const address *src, const address *dst, uint32_t src_port, uint32_t dst_port, conv_id_t conv_id, int num_frames, int num_bytes, nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, conversation_type ctype)
Add some data to the conversation table, passing a value to be used in addition to the address and po...
Definition conversation_table.c:638
const char *(* endpoint_get_filter_type)(struct _endpoint_item_t *item, conv_filter_type_e filter_type)
Callback that resolves a display filter field name for a given endpoint item and filter type.
Definition conversation_table.h:119
struct _conversation_extension_tcp_t conv_extension_tcp_t
WS_DLL_PUBLIC char * get_conversation_port(wmem_allocator_t *allocator, uint32_t port, conversation_type ctype, bool resolve_names)
Get the string representation of a port.
Definition conversation_table.c:325
conv_filter_type_e
Field type selector for building a conversation display filter.
Definition conversation_table.h:47
@ CONV_FT_ANY_ADDRESS
Definition conversation_table.h:50
@ CONV_FT_DST_ADDRESS
Definition conversation_table.h:49
@ CONV_FT_SRC_ADDRESS
Definition conversation_table.h:48
@ CONV_FT_SRC_PORT
Definition conversation_table.h:51
@ CONV_FT_ANY_PORT
Definition conversation_table.h:53
@ CONV_FT_DST_PORT
Definition conversation_table.h:52
WS_DLL_PUBLIC register_ct_t * get_conversation_by_proto_id(int proto_id)
get conversation table from protocol ID
Definition conversation_table.c:120
WS_DLL_PUBLIC int get_conversation_proto_id(register_ct_t *ct)
Get protocol ID of a conversation table.
Definition conversation_table.c:38
WS_DLL_PUBLIC void dissector_endpoint_init(const char *opt_arg, void *userdata)
Initialize dissector endpoint for stats and (possibly) GUI.
Definition conversation_table.c:110
struct _conversation_item_t conv_item_t
WS_DLL_PUBLIC tap_packet_cb get_conversation_packet_func(register_ct_t *ct)
Get conversation tap function handler of a conversation table.
Definition conversation_table.c:46
WS_DLL_PUBLIC void conversation_table_iterate_tables(wmem_foreach_func func, void *user_data)
Iterator to walk conversation tables and execute func.
Definition conversation_table.c:198
WS_DLL_PUBLIC unsigned conversation_table_get_num(void)
Get the total number of conversation tables.
Definition conversation_table.c:203
void conversation_table_init(void)
Initialize the conversation table system.
Definition conversation_table.c:125
struct _conversation_key_t conv_key_t
Composite hash table key identifying a conversation by its two endpoints and optional ID.
WS_DLL_PUBLIC tap_packet_cb get_endpoint_packet_func(register_ct_t *ct)
Get endpoint tap function handler for a conversation table.
Definition conversation_table.c:51
struct _et_dissector_info et_dissector_info_t
Dissector info block for an endpoint table, providing filter-type resolution.
WS_DLL_PUBLIC char * get_conversation_filter(conv_item_t *conv_item, conv_direction_e direction)
Get a display filter for the given conversation and direction.
Definition conversation_table.c:412
uint32_t conv_id_t
Definition conversation_table.h:37
struct _ct_dissector_info ct_dissector_info_t
Dissector info block for a conversation table, providing filter-type resolution.
WS_DLL_PUBLIC char * get_conversation_address(wmem_allocator_t *allocator, address *addr, bool resolve_names)
Get the string representation of an address.
Definition conversation_table.c:316
conv_direction_e
Directional filter scope for a conversation, relative to endpoints A and B.
Definition conversation_table.h:60
@ CONV_DIR_ANY_FROM_B
Definition conversation_table.h:69
@ CONV_DIR_A_TO_B
Definition conversation_table.h:62
@ CONV_DIR_A_TO_FROM_B
Definition conversation_table.h:61
@ CONV_DIR_A_TO_ANY
Definition conversation_table.h:65
@ CONV_DIR_ANY_TO_FROM_B
Definition conversation_table.h:67
@ CONV_DIR_ANY_TO_B
Definition conversation_table.h:68
@ CONV_DIR_A_FROM_ANY
Definition conversation_table.h:66
@ CONV_DIR_A_TO_FROM_ANY
Definition conversation_table.h:64
@ CONV_DIR_A_FROM_B
Definition conversation_table.h:63
WS_DLL_PUBLIC void add_conversation_table_data(conv_hash_t *ch, const address *src, const address *dst, uint32_t src_port, uint32_t dst_port, int num_frames, int num_bytes, nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, conversation_type ctype)
Add some data to the conversation table.
Definition conversation_table.c:631
WS_DLL_PUBLIC void reset_endpoint_table_data(conv_hash_t *ch)
Remove all entries from the endpoint table.
Definition conversation_table.c:292
WS_DLL_PUBLIC void register_conversation_table(const int proto_id, bool hide_ports, tap_packet_cb conv_packet_func, tap_packet_cb endpoint_packet_func)
Register the conversation table for the conversation and endpoint windows.
Definition conversation_table.c:131
struct _endpoint_item_t endpoint_item_t
WS_DLL_PUBLIC void add_conversation_table_data_extended(conv_hash_t *ch, const address *src, const address *dst, uint32_t src_port, uint32_t dst_port, conv_id_t conv_id, int num_frames, int num_bytes, nstime_t *ts, nstime_t *abs_ts, ct_dissector_info_t *ct_info, conversation_type ctype, uint32_t frameid, int(*proto_conv_cb)(conversation_t *))
Decorates add_conversation_table_data_with_conv_id() in order to be able to add protocol dependent ad...
Definition conversation_table.c:782
struct register_ct register_ct_t
Definition conversation_table.h:141
WS_DLL_PUBLIC void endpoint_table_set_gui_info(endpoint_gui_init_cb init_cb)
Register "initialization function" used by the GUI to create endpoint table display in GUI.
Definition conversation_table.c:193
WS_DLL_PUBLIC void conversation_table_set_gui_info(conv_gui_init_cb init_cb)
Register "initialization function" used by the GUI to create conversation table display in GUI.
Definition conversation_table.c:169
WS_DLL_PUBLIC void add_endpoint_table_data_ipv4_subnet(conv_hash_t *ch, const address *addr, uint32_t port, bool sender, int num_frames, int num_bytes, et_dissector_info_t *et_info, endpoint_type etype)
Encapsulates add_endpoint_table_data() for the IPv4 specific case when the subnet aggregation user pr...
Definition conversation_table.c:1005
struct _conversation_hash_t conv_hash_t
WS_DLL_PUBLIC void reset_conversation_table_data(conv_hash_t *ch)
Remove all entries from the conversation table.
Definition conversation_table.c:267
WS_DLL_PUBLIC void dissector_conversation_init(const char *opt_arg, void *userdata)
Initialize dissector conversation for stats and (possibly) GUI.
Definition conversation_table.c:80
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
struct _wmem_allocator_t wmem_allocator_t
Definition wmem_core.h:44
Definition conversation_table.h:144
uint64_t flows
Definition conversation_table.h:145
Definition conversation_table.h:75
GArray * conv_array
Definition conversation_table.h:77
void * user_data
Definition conversation_table.h:78
GHashTable * hashtable
Definition conversation_table.h:76
unsigned flags
Definition conversation_table.h:79
Definition conversation_table.h:149
conversation_type ctype
Definition conversation_table.h:153
nstime_t start_time
Definition conversation_table.h:168
uint64_t tx_bytes
Definition conversation_table.h:161
conv_id_t conv_id
Definition conversation_table.h:156
address src_address
Definition conversation_table.h:151
nstime_t start_abs_time
Definition conversation_table.h:170
uint64_t tx_frames_total
Definition conversation_table.h:164
uint64_t rx_frames_total
Definition conversation_table.h:163
bool filtered
Definition conversation_table.h:172
uint64_t rx_frames
Definition conversation_table.h:158
ct_dissector_info_t * dissector_info
Definition conversation_table.h:150
uint64_t tx_bytes_total
Definition conversation_table.h:166
address dst_address
Definition conversation_table.h:152
uint32_t dst_port
Definition conversation_table.h:155
uint32_t src_port
Definition conversation_table.h:154
uint64_t rx_bytes
Definition conversation_table.h:160
uint64_t rx_bytes_total
Definition conversation_table.h:165
uint64_t tx_frames
Definition conversation_table.h:159
nstime_t stop_time
Definition conversation_table.h:169
conv_extension_tcp_t ext_tcp
Definition conversation_table.h:174
Composite hash table key identifying a conversation by its two endpoints and optional ID.
Definition conversation_table.h:85
address addr2
Definition conversation_table.h:87
uint32_t port1
Definition conversation_table.h:88
address addr1
Definition conversation_table.h:86
conv_id_t conv_id
Definition conversation_table.h:90
uint32_t port2
Definition conversation_table.h:89
Dissector info block for a conversation table, providing filter-type resolution.
Definition conversation_table.h:107
conv_get_filter_type get_filter_type
Definition conversation_table.h:108
Definition conversation_table.h:178
uint64_t rx_frames_total
Definition conversation_table.h:189
bool modified
Definition conversation_table.h:194
address myaddress
Definition conversation_table.h:180
uint64_t rx_frames
Definition conversation_table.h:184
uint64_t rx_bytes
Definition conversation_table.h:186
uint64_t tx_bytes
Definition conversation_table.h:187
et_dissector_info_t * dissector_info
Definition conversation_table.h:179
endpoint_type etype
Definition conversation_table.h:181
uint64_t tx_bytes_total
Definition conversation_table.h:192
uint64_t rx_bytes_total
Definition conversation_table.h:191
uint64_t tx_frames
Definition conversation_table.h:185
bool filtered
Definition conversation_table.h:195
uint64_t tx_frames_total
Definition conversation_table.h:190
uint32_t port
Definition conversation_table.h:182
Dissector info block for an endpoint table, providing filter-type resolution.
Definition conversation_table.h:124
endpoint_get_filter_type get_filter_type
Definition conversation_table.h:125
Composite hash table key identifying a single network endpoint by address and port.
Definition conversation_table.h:96
uint32_t port
Definition conversation_table.h:98
address myaddress
Definition conversation_table.h:97
Definition conversation_table.c:24