Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Macros | Typedefs | Enumerations | Functions
plugins.h File Reference
#include <wireshark.h>

Go to the source code of this file.

Macros

#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)
 
#define WS_PLUGIN_DESC_DFILTER   (1UL << 5)
 
#define WS_PLUGIN_DESC_UI   (1UL << 6)
 

Typedefs

typedef void(* plugin_register_func) (void)
 
typedef uint32_t(* plugin_describe_func) (void)
 
typedef void plugins_t
 
typedef void(* plugin_description_callback) (const char *name, const char *version, uint32_t flags, const char *filename, void *user_data)
 

Enumerations

enum  plugin_type_e { WS_PLUGIN_EPAN , WS_PLUGIN_WIRETAP , WS_PLUGIN_CODEC , WS_PLUGIN_UI }
 

Functions

WS_DLL_PUBLIC plugins_t * plugins_init (plugin_type_e type, const char *app_env_var_prefix)
 Initialize plugins of a specific type.
 
WS_DLL_PUBLIC void plugins_get_descriptions (plugin_description_callback callback, void *user_data)
 Retrieves descriptions of all plugins.
 
WS_DLL_PUBLIC void plugins_dump_all (void)
 Prints the description of all plugins.
 
WS_DLL_PUBLIC int plugins_get_count (void)
 Gets the count of all loaded plugins.
 
WS_DLL_PUBLIC void plugins_cleanup (plugins_t *plugins)
 Cleans up and unloads a plugin.
 
WS_DLL_PUBLIC bool plugins_supported (void)
 Checks if plugins are supported.
 
WS_DLL_PUBLIC bool is_plugin_filename (const char *filename)
 Returns true if the given filename ends in .dll on Windows or .so on other platforms.
 

Detailed Description

definitions for plugins structures

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

Function Documentation

◆ is_plugin_filename()

WS_DLL_PUBLIC bool is_plugin_filename ( const char *  filename)

Returns true if the given filename ends in .dll on Windows or .so on other platforms.

Parameters
filenameThe name of the file to check.
Returns
true if the filename ends with the appropriate extension for the platform, false otherwise.

◆ plugins_cleanup()

WS_DLL_PUBLIC void plugins_cleanup ( plugins_t *  plugins)

Cleans up and unloads a plugin.

Parameters
pluginsPointer to the plugins_t structure to clean up.

◆ plugins_get_count()

WS_DLL_PUBLIC int plugins_get_count ( void  )

Gets the count of all loaded plugins.

Returns
The total number of loaded plugins.

◆ plugins_get_descriptions()

WS_DLL_PUBLIC void plugins_get_descriptions ( plugin_description_callback  callback,
void *  user_data 
)

Retrieves descriptions of all plugins.

Parameters
callbackCallback function to handle plugin descriptions.
user_dataUser data to pass to the callback function.

◆ plugins_init()

WS_DLL_PUBLIC plugins_t * plugins_init ( plugin_type_e  type,
const char *  app_env_var_prefix 
)

Initialize plugins of a specific type.

Initializes and loads plugins based on the given type and application environment variable prefix.

Parameters
typeThe type of plugin to initialize.
app_env_var_prefixPrefix for the application environment variables.
Returns
A pointer to the initialized plugins_t structure, or NULL if no plugins are supported.

◆ plugins_supported()

WS_DLL_PUBLIC bool plugins_supported ( void  )

Checks if plugins are supported.

Returns
true if plugins are supported, false otherwise.