Wireshark 4.5.0
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 <[email protected]>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12#ifndef __DISSECTOR_FILTERS_H__
13#define __DISSECTOR_FILTERS_H__
14
15#include <glib.h>
16
17#include "ws_symbol_export.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif /* __cplusplus */
22
27extern void conversation_filters_init(void);
28
36typedef bool (*is_filter_valid_func)(struct _packet_info *pinfo, void *user_data);
37
47typedef char* (*build_filter_string_func)(struct _packet_info *pinfo, void *user_data);
48
58WS_DLL_PUBLIC void register_conversation_filter(const char *proto_name, const char *display_name,
59 is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string, void *user_data);
60
70WS_DLL_PUBLIC void register_log_conversation_filter(const char *proto_name, const char *display_name,
71 is_filter_valid_func is_filter_valid, build_filter_string_func build_filter_string, void *user_data);
76WS_DLL_PUBLIC void add_conversation_filter_protocol(const char *proto_name);
77
79extern void conversation_filters_cleanup(void);
80
89WS_DLL_PUBLIC char *conversation_filter_from_packet(struct _packet_info *pinfo);
90
99WS_DLL_PUBLIC char *conversation_filter_from_log(struct _packet_info *pinfo);
100
101/*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/
102
103typedef struct conversation_filter_s {
104 const char * proto_name;
105 const char * display_name;
106 is_filter_valid_func is_filter_valid;
107 build_filter_string_func build_filter_string;
108 void * user_data;
110
111WS_DLL_PUBLIC GList *packet_conv_filter_list;
112WS_DLL_PUBLIC GList *log_conv_filter_list;
113
114#ifdef __cplusplus
115}
116#endif /* __cplusplus */
117
118#endif /* conversation_filter.h */
WS_DLL_PUBLIC char * conversation_filter_from_log(struct _packet_info *pinfo)
Definition conversation_filter.c:133
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
bool(* is_filter_valid_func)(struct _packet_info *pinfo, void *user_data)
Definition conversation_filter.h:36
WS_DLL_PUBLIC void add_conversation_filter_protocol(const char *proto_name)
Definition conversation_filter.c:71
void conversation_filters_init(void)
Definition conversation_filter.c:25
WS_DLL_PUBLIC char * conversation_filter_from_packet(struct _packet_info *pinfo)
Definition conversation_filter.c:128
void conversation_filters_cleanup(void)
Definition conversation_filter.c:102
char *(* build_filter_string_func)(struct _packet_info *pinfo, void *user_data)
Definition conversation_filter.h:47
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)
Definition conversation_filter.c:61
Definition packet_info.h:43
Definition conversation_filter.h:103