Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Typedefs | Functions
init_wslua.h File Reference
#include "ws_symbol_export.h"
#include <epan/register.h>
#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef void(* wslua_plugin_description_callback) (const char *, const char *, const char *, const char *, void *)
 

Functions

WS_DLL_PUBLIC int wslua_count_plugins (void)
 Counts the number of Lua plugins.
 
WS_DLL_PUBLIC bool wslua_reload_plugins (register_cb cb, void *client_data, const char *app_env_var_prefix)
 Reloads Lua plugins.
 
WS_DLL_PUBLIC void wslua_reload_done (void)
 Signal that a Lua plugin reload is complete.
 
WS_DLL_PUBLIC void wslua_plugins_get_descriptions (wslua_plugin_description_callback callback, void *user_data)
 Retrieves descriptions of all loaded WSLua plugins.
 
WS_DLL_PUBLIC void wslua_plugins_dump_all (void)
 Dumps all Lua plugins.
 
WS_DLL_PUBLIC const char * wslua_plugin_type_name (void)
 Returns the type name of the WSLUA plugin.
 

Detailed Description

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

◆ wslua_count_plugins()

WS_DLL_PUBLIC int wslua_count_plugins ( void  )

Counts the number of Lua plugins.

This function counts the total number of Lua plugins, including global scripts, user scripts, and scripts specified from the command line.

Returns
The total count of Lua plugins.

◆ wslua_plugin_type_name()

WS_DLL_PUBLIC const char * wslua_plugin_type_name ( void  )

Returns the type name of the WSLUA plugin.

This function provides a string that identifies the type of the WSLUA plugin, which is "Lua script".

Returns
A constant character pointer to the string "Lua script".

◆ wslua_plugins_get_descriptions()

WS_DLL_PUBLIC void wslua_plugins_get_descriptions ( wslua_plugin_description_callback  callback,
void *  user_data 
)

Retrieves descriptions of all loaded WSLua plugins.

This function iterates through a list of loaded WSLua plugins and calls a provided callback function for each plugin, passing details such as the plugin's name, version, type, and filename.

Parameters
callbackA pointer to the callback function that will be called for each plugin.
user_dataA pointer to user-specific data that will be passed to the callback function.

◆ wslua_reload_done()

WS_DLL_PUBLIC void wslua_reload_done ( void  )

Signal that a Lua plugin reload is complete.

This function is called to notify that a Lua plugin reload has been completed, allowing any necessary cleanup or restoration of state.

◆ wslua_reload_plugins()

WS_DLL_PUBLIC bool wslua_reload_plugins ( register_cb  cb,
void *  client_data,
const char *  app_env_var_prefix 
)

Reloads Lua plugins.

This function reloads all Lua plugins by notifying the debugger, deregistering heuristics and protocols, and reinitializing the Lua environment.

Parameters
cbCallback function to be called during the reload process.
client_dataUser data passed to the callback function.
app_env_var_prefixPrefix for application environment variables.
Returns
true if the reload was successful, false otherwise.