diff --git a/doc/README.plugins b/doc/README.plugins index ae71345895..828a52bf4b 100644 --- a/doc/README.plugins +++ b/doc/README.plugins @@ -9,7 +9,7 @@ Plugins have three distinct binary types: * wiretap: These plugins can implement various extensions to libwiretap * epan: These plugins implement extensions to libwireshark -Whithin each type we can differentiate by the features and APIs used. There +Within each type we can differentiate by the features and APIs used. There are the following functional types: * codec: is its own class of functionality, described above @@ -178,7 +178,6 @@ You must include the plugin API header: First declare a struct with the plugin metadata fields: static struct ws_module module = { - .license = WS_PLUGIN_IS_GPLv2_OR_LATER, .flags = WS_PLUGIN_DESC_DISSECTOR, .version = "X.Y.Z", .spdx_id = "GPL-2.0-or-later", @@ -187,23 +186,19 @@ static struct ws_module module = { .register_cb = &plugin_register, }; -You must declare if the plugin license is GPLv2 or later, or compatible -with the GPLv2. Only GPLv2 compatible plugins can be used with Wireshark. -See [gpl-compat] for details on GPL license compatibility. - -Flags currently is only used to categorize a plugin according to its +The flags field is currently only used to categorize a plugin according to its functionality, for display purposes. A plugin can implement more than one functionality type within each binary type, although this is rare in practice. Version is a string and conventionally uses the format major.minor.micro, -althout this isn't enforced. +although this isn't enforced. -spdx_is is the SPDX license ID. +The spdx_id field is the SPDX license ID for your plugin. -Home URL should be a string where users can obtain the source for the plugin -and more detailed information about the plugin. +Home URL should be a string where users can obtain the source code +and other detailed information about the plugin. -The blurb is a short description of that the plugin does. +The blurb is a short description of what the plugin does. The plugin registration callback implementation is specific for each plugin type (see the various plugins bundled with Wireshark for examples). @@ -225,8 +220,6 @@ macro (but they all have the same arguments). The macro takes a pointer to the struct ws_module as the first argument. The second argument is currently unused and should be zero. -[gpl-compat]https://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean - 6 How to plugin related interface options To demonstrate the functionality of the plugin interface options, a diff --git a/doc/plugins.example/hello.c b/doc/plugins.example/hello.c index 19178bfeab..6536a47805 100644 --- a/doc/plugins.example/hello.c +++ b/doc/plugins.example/hello.c @@ -52,7 +52,6 @@ plugin_register(void) } static struct ws_module module = { - .license = WS_PLUGIN_IS_GPLv2_OR_LATER, .flags = WS_PLUGIN_DESC_DISSECTOR, .version = VERSION, .spdx_id = "GPL-2.0-or-later", diff --git a/plugins/epan/dfilter/ipaddr/ipaddr.c b/plugins/epan/dfilter/ipaddr/ipaddr.c index 857eb1f3f7..3090edeff8 100644 --- a/plugins/epan/dfilter/ipaddr/ipaddr.c +++ b/plugins/epan/dfilter/ipaddr/ipaddr.c @@ -349,7 +349,6 @@ plugin_register(void) } static struct ws_module module = { - .license = WS_PLUGIN_IS_GPLv2_OR_LATER, .flags = WS_PLUGIN_DESC_DFILTER, .version = PLUGIN_VERSION, .spdx_id = WS_PLUGIN_SPDX_GPLv2, diff --git a/tools/make-plugin-reg.py b/tools/make-plugin-reg.py index 8747a12987..e48fb4cc36 100755 --- a/tools/make-plugin-reg.py +++ b/tools/make-plugin-reg.py @@ -193,7 +193,6 @@ PLUGIN_REGISTER = { reg_code += """ static struct ws_module module = { - .license = WS_PLUGIN_IS_GPLv2_OR_LATER, .flags = %s, .version = PLUGIN_VERSION, .spdx_id = WS_PLUGIN_SPDX_GPLv2, diff --git a/wsutil/plugins.c b/wsutil/plugins.c index 1ec3afd071..885891bba2 100644 --- a/wsutil/plugins.c +++ b/wsutil/plugins.c @@ -110,8 +110,7 @@ compare_plugins(gconstpointer a, gconstpointer b) static bool pass_plugin_compatibility(const char *name, plugin_type_e type, - int abi_version, - struct ws_module *module) + int abi_version) { if (abi_version != plugins_abi_version(type)) { report_failure("The plugin '%s' has incompatible ABI, have version %d, expected %d", @@ -119,13 +118,6 @@ pass_plugin_compatibility(const char *name, plugin_type_e type, return false; } - if (module->license != WS_PLUGIN_IS_GPLv2_OR_LATER && - module->license != WS_PLUGIN_IS_GPLv2_COMPATIBLE) { - report_failure("The plugin '%s' is not GPLv2 compatible (invalid license 0x%x, with SPDX ID \"%s\")", - name, module->license, module->spdx_id); - return false; - } - return true; } @@ -210,7 +202,7 @@ DIAG_ON_PEDANTIC continue; } - if (!pass_plugin_compatibility(name, type, abi_version, module)) { + if (!pass_plugin_compatibility(name, type, abi_version)) { g_module_close(handle); g_free(plugin_file); continue; diff --git a/wsutil/plugins.h b/wsutil/plugins.h index 6df44a3d06..2e15a70082 100644 --- a/wsutil/plugins.h +++ b/wsutil/plugins.h @@ -23,16 +23,6 @@ typedef enum { WS_PLUGIN_CODEC } plugin_type_e; -typedef enum { - /* Plug-in license is GPLv2-or-later */ - WS_PLUGIN_IS_GPLv2_OR_LATER = 0x2222, /* Ok */ - /* Plug-in license is compatible with the GPL version 2, according to the FSF. */ - /* https://www.gnu.org/licenses/gpl-faq.html#WhatDoesCompatMean */ - WS_PLUGIN_IS_GPLv2_COMPATIBLE = 0x2002, /* Ok */ - /* Plug-in license is none of the above */ - WS_PLUGIN_IS_GPLv2_INCOMPATIBLE = 0, /* Not allowed, will refuse to load.*/ -} plugin_license_e; - #define WS_PLUGIN_SPDX_GPLv2 "GPL-2.0-or-later" #define WS_PLUGIN_GITLAB_URL "https://gitlab.com/wireshark/wireshark" @@ -48,7 +38,6 @@ typedef void plugins_t; typedef void (*module_register_func)(void); struct ws_module { - plugin_license_e license; uint32_t flags; const char *version; const char *spdx_id;