| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
conversation_filter.h
Go to the documentation of this file.
1/* conversation_filter.h
2 * Routines for dissector-generated conversation filters for use as
3 * display and color filters
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11#pragma once
12#include <glib.h>
13
14#include "ws_symbol_export.h"
15
16#ifdef __cplusplus
17 extern "C" {
18#endif /* __cplusplus */
19
22
26 extern void conversation_filters_init(void);
27
35 typedef bool (*is_filter_valid_func)(struct _packet_info *pinfo, void *user_data);
36
46 typedef char* (*build_filter_string_func)(struct _packet_info *pinfo, void *user_data);
47
57WS_DLL_PUBLIC void register_conversation_filter(const char *proto_name, const char *display_name,
58 is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string, void *user_data);
59
69WS_DLL_PUBLIC void register_log_conversation_filter(const char *proto_name, const char *display_name,
70 is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string, void *user_data);
75WS_DLL_PUBLIC void add_conversation_filter_protocol(const char *proto_name);
76
82 extern void conversation_filters_cleanup(void);
83
92WS_DLL_PUBLIC char *conversation_filter_from_packet(struct _packet_info *pinfo);
93
102WS_DLL_PUBLIC char *conversation_filter_from_log(struct _packet_info *pinfo);
103
104/*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/
105
109 typedef struct conversation_filter_s {
110 const char *proto_name;
111 const char *display_name;
112 is_filter_valid_func is_filter_valid;
113 build_filter_string_func build_filter_string;
114 void *user_data;
115} conversation_filter_t;
116
117WS_DLL_PUBLIC GList *packet_conv_filter_list;
118WS_DLL_PUBLIC GList *log_conv_filter_list;
119
120#ifdef __cplusplus
121}
122#endif /* __cplusplus */
conversation_filter_t
struct conversation_filter_s conversation_filter_t
Describes a registered conversation filter that can build a display filter string from a packet.
conversation_filter_from_log
WS_DLL_PUBLIC char * conversation_filter_from_log(struct _packet_info *pinfo)
Definition conversation_filter.c:133
register_conversation_filter
WS_DLL_PUBLIC void register_conversation_filter(const char *proto_name, const char *display_name, is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string, void *user_data)
Definition conversation_filter.c:51
is_filter_valid_func
bool(* is_filter_valid_func)(struct _packet_info *pinfo, void *user_data)
Definition conversation_filter.h:35
add_conversation_filter_protocol
WS_DLL_PUBLIC void add_conversation_filter_protocol(const char *proto_name)
Prepend a protocol to the list of filterable protocols.
Definition conversation_filter.c:71
conversation_filters_init
void conversation_filters_init(void)
Initialize internal structures for conversation filters.
Definition conversation_filter.c:25
conversation_filter_from_packet
WS_DLL_PUBLIC char * conversation_filter_from_packet(struct _packet_info *pinfo)
Definition conversation_filter.c:128
conversation_filters_cleanup
void conversation_filters_cleanup(void)
Cleans up conversation filters.
Definition conversation_filter.c:102
build_filter_string_func
char *(* build_filter_string_func)(struct _packet_info *pinfo, void *user_data)
Definition conversation_filter.h:46
register_log_conversation_filter
WS_DLL_PUBLIC void register_log_conversation_filter(const char *proto_name, const char *display_name, is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string, void *user_data)
Register a new log conversation filter.
Definition conversation_filter.c:61
_packet_info
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
conversation_filter_s
Describes a registered conversation filter that can build a display filter string from a packet.
Definition conversation_filter.h:109
conversation_filter_s::build_filter_string
build_filter_string_func build_filter_string
Definition conversation_filter.h:113
conversation_filter_s::is_filter_valid
is_filter_valid_func is_filter_valid
Definition conversation_filter.h:112
conversation_filter_s::proto_name
const char * proto_name
Definition conversation_filter.h:110
conversation_filter_s::user_data
void * user_data
Definition conversation_filter.h:114
conversation_filter_s::display_name
const char * display_name
Definition conversation_filter.h:111