2 * definitions for plugins structures
4 * $Id: plugins.h,v 1.6 2000/03/31 21:42:24 oabad Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@zing.org>
8 * Copyright 1999 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
35 #define HAVE_PLUGINS 1
37 #endif /* HAVE_CONFIG_H */
51 typedef struct _plugin {
52 GModule *handle; /* handle returned by dlopen */
53 gchar *name; /* plugin name */
54 gchar *version; /* plugin version */
55 gboolean enabled; /* is it active ? */
56 gchar *protocol; /* protocol which should call the dissector
57 * for this plugin eg "tcp" */
58 gchar *filter_string; /* display filter string matching frames for
59 * which the dissector should be used */
60 dfilter *filter; /* compiled display filter */
62 void (*dissector) (const u_char *, int, frame_data *, proto_tree *);
63 struct _plugin *next; /* forward link */
66 extern plugin *plugin_list;
67 extern guint32 enabled_plugins_number;
69 int add_plugin(void *, gchar *, gchar *, gchar *, gchar *, dfilter *,
70 void (*) (const u_char *, int, frame_data *, proto_tree *));
71 void *enable_plugin(const gchar *, const gchar *);
72 void *disable_plugin(const gchar *, const gchar *);
73 void *find_plugin(const gchar *, const gchar *);
74 gboolean is_enabled(const gchar *, const gchar *);
75 void plugin_replace_filter(const gchar *, const gchar *, const gchar *, dfilter *);
76 int save_plugin_status();
79 #endif /* __PLUGINS_H__ */