1999-12-09 20:43:38 +00:00
|
|
|
/* plugins.h
|
|
|
|
* definitions for plugins structures
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
1999-12-09 20:55:49 +00:00
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2009-10-23 17:52:18 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
1999-12-09 20:43:38 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
1999-12-09 20:43:38 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
1999-12-09 20:43:38 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
1999-12-09 20:43:38 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PLUGINS_H__
|
|
|
|
#define __PLUGINS_H__
|
|
|
|
|
2010-12-01 18:25:18 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2000-01-15 00:23:13 +00:00
|
|
|
#include <glib.h>
|
|
|
|
#include <gmodule.h>
|
|
|
|
|
|
|
|
#include "packet.h"
|
2013-03-01 23:53:11 +00:00
|
|
|
#include "ws_symbol_export.h"
|
2000-01-15 00:23:13 +00:00
|
|
|
|
1999-12-09 20:43:38 +00:00
|
|
|
typedef struct _plugin {
|
2010-10-12 18:25:42 +00:00
|
|
|
GModule *handle; /* handle returned by g_module_open */
|
1999-12-26 22:38:07 +00:00
|
|
|
gchar *name; /* plugin name */
|
|
|
|
gchar *version; /* plugin version */
|
2005-03-07 02:44:41 +00:00
|
|
|
void (*register_protoinfo)(void); /* routine to call to register protocol information */
|
2001-01-28 21:17:29 +00:00
|
|
|
void (*reg_handoff)(void); /* routine to call to register dissector handoff */
|
2005-02-27 22:04:48 +00:00
|
|
|
void (*register_tap_listener)(void); /* routine to call to register tap listener */
|
2007-05-24 22:26:51 +00:00
|
|
|
void (*register_wtap_module)(void); /* routine to call to register a wiretap module */
|
2007-10-25 09:38:15 +00:00
|
|
|
void (*register_codec_module)(void); /* routine to call to register a codec */
|
2001-01-28 21:17:29 +00:00
|
|
|
struct _plugin *next; /* forward link */
|
1999-12-09 20:43:38 +00:00
|
|
|
} plugin;
|
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC plugin *plugin_list;
|
1999-12-09 20:43:38 +00:00
|
|
|
|
Add a WIRESHARK_RUN_FROM_BUILD_DIRECTORY environment variable on UN*X;
if set, and if the program isn't running with additional privileges,
it'll treat the directory in which the program is found as the data
directory.
If, on Windows, the version-number subdirectory of {data
directory}\plugins doesn't exist (which is assumed to mean that the
program is being run from the build directory), or if, on UN*X,
WIRESHARK_RUN_FROM_BUILD_DIRECTORY is set, the plugin directory is the
"plugins" subdirectory of the data directory, and all subdirectories of
that directory are scanned for plugins, as the "plugins" subdirectory of
the build directory contains subdirectories for the plugins; this means
that if we're running from the build directory, we'll find the plugins
we built in the build tree.
When generating the wireshark-filter man page, run tshark with
WIRESHARK_RUN_FROM_BUILD_DIRECTORY set, so it uses the plugins from the
build to generate the list of filters.
svn path=/trunk/; revision=20261
2007-01-02 06:49:40 +00:00
|
|
|
extern void init_plugins(void);
|
2007-05-25 17:22:32 +00:00
|
|
|
extern void register_all_plugin_registrations(void);
|
2004-05-20 13:48:25 +00:00
|
|
|
extern void register_all_plugin_handoffs(void);
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC void register_all_plugin_tap_listeners(void);
|
|
|
|
WS_DLL_PUBLIC void plugins_dump_all(void);
|
2004-05-20 13:48:25 +00:00
|
|
|
|
2010-12-09 15:20:14 +00:00
|
|
|
typedef struct _wslua_plugin {
|
|
|
|
gchar *name; /**< plugin name */
|
|
|
|
gchar *version; /**< plugin version */
|
2011-06-01 21:48:17 +00:00
|
|
|
gchar *filename; /**< plugin filename */
|
2010-12-09 15:20:14 +00:00
|
|
|
struct _wslua_plugin *next;
|
|
|
|
} wslua_plugin;
|
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC wslua_plugin *wslua_plugin_list;
|
2010-12-09 15:20:14 +00:00
|
|
|
|
2010-12-01 18:25:18 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
1999-12-09 20:43:38 +00:00
|
|
|
#endif /* __PLUGINS_H__ */
|