2021-11-25 22:31:05 -05:00
|
|
|
/** @file
|
1999-12-09 20:43:38 +00:00
|
|
|
* definitions for plugins structures
|
|
|
|
*
|
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
|
|
|
*
|
2018-02-07 12:26:45 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
1999-12-09 20:43:38 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PLUGINS_H__
|
|
|
|
#define __PLUGINS_H__
|
|
|
|
|
2021-10-16 10:33:34 +01:00
|
|
|
#include <wireshark.h>
|
2021-03-16 04:33:00 -07:00
|
|
|
|
2010-12-01 18:25:18 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2023-12-19 22:02:04 +01:00
|
|
|
typedef void (*plugin_register_func)(void);
|
|
|
|
typedef uint32_t (*plugin_describe_func)(void);
|
|
|
|
|
|
|
|
typedef void plugins_t;
|
|
|
|
|
2018-01-05 09:09:40 -08:00
|
|
|
typedef enum {
|
|
|
|
WS_PLUGIN_EPAN,
|
|
|
|
WS_PLUGIN_WIRETAP,
|
|
|
|
WS_PLUGIN_CODEC
|
|
|
|
} plugin_type_e;
|
|
|
|
|
2023-10-29 23:05:54 +00:00
|
|
|
#define WS_PLUGIN_DESC_DISSECTOR (1UL << 0)
|
|
|
|
#define WS_PLUGIN_DESC_FILE_TYPE (1UL << 1)
|
|
|
|
#define WS_PLUGIN_DESC_CODEC (1UL << 2)
|
|
|
|
#define WS_PLUGIN_DESC_EPAN (1UL << 3)
|
|
|
|
#define WS_PLUGIN_DESC_TAP_LISTENER (1UL << 4)
|
2023-12-19 21:55:10 +01:00
|
|
|
#define WS_PLUGIN_DESC_DFILTER (1UL << 5)
|
2023-10-25 20:11:01 +01:00
|
|
|
|
2018-01-05 09:09:40 -08:00
|
|
|
WS_DLL_PUBLIC plugins_t *plugins_init(plugin_type_e type);
|
2017-10-01 00:56:03 +01:00
|
|
|
|
2017-09-25 20:42:29 +01:00
|
|
|
typedef void (*plugin_description_callback)(const char *name, const char *version,
|
2023-12-19 21:55:14 +01:00
|
|
|
uint32_t flags, const char *filename,
|
2017-09-25 20:42:29 +01:00
|
|
|
void *user_data);
|
2017-10-01 00:56:03 +01:00
|
|
|
|
2013-12-02 08:30:29 +00:00
|
|
|
WS_DLL_PUBLIC void plugins_get_descriptions(plugin_description_callback callback, void *user_data);
|
2017-10-01 00:56:03 +01:00
|
|
|
|
2013-03-01 23:53:11 +00:00
|
|
|
WS_DLL_PUBLIC void plugins_dump_all(void);
|
2017-10-01 00:56:03 +01:00
|
|
|
|
2017-10-22 20:30:07 +01:00
|
|
|
WS_DLL_PUBLIC int plugins_get_count(void);
|
2017-10-01 00:56:03 +01:00
|
|
|
|
|
|
|
WS_DLL_PUBLIC void plugins_cleanup(plugins_t *plugins);
|
2004-05-20 13:48:25 +00:00
|
|
|
|
2023-09-22 13:42:49 -07:00
|
|
|
WS_DLL_PUBLIC bool plugins_supported(void);
|
2023-01-30 20:27:06 +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__ */
|
2013-11-17 14:03:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Editor modelines
|
|
|
|
*
|
|
|
|
* Local Variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* ex: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|