Add a minimum and maximum API level. Backward-compatible changes to
the API only bump the maximum API level. Backward incompatible
changes bump the maximum API level and the mininum, to the
new (maximum) level.
This may allow codec plugins to continue working without recompilation,
possibly with reduced functionality.
The API level is only defined for codecs because it is a small
and easy to define API, and very stable.
Maybe we could do the same for wiretap (file type) plugins. For the
various epan plugin types it seems pointless and futile. I cannot
see a scenario where a new Wireshark minor release does not increase
the minimum API level.
Remove the major.minor version from the plugin path, i.e:
lib/plugins/X.Y/{epan,wiretap,codecs}
and use an unversioned path:
lib/plugins/{epan,wiretap,codecs}
Introduce a new naming policy for plugins that requires
name.so.ABI_VERSION.
This is a simplified filesystem layoutfor plugins some
important benefits such as:
* improves compatibility between Wireshark versions, because
a plugin that wasn't recompiled will be automatically picked
up, but only if it has a compatible ABI version in the file name.
* does not clash with Apple guidelines
* simpler for users to understand and apply
* just overall simpler and easier to maintain, removes a lot
of complexity from CMake code
It does impose more requirements on the plugin naming scheme
but this should be handled completely transparently
by the build system.
It would also be possible to add support for unversioned *.so file
extensions at the same time, although in ths case it is not possible
to support multiple Wireshark ABI versions with only *.so, of course.
This wasn't done here but it may or may not be a useful enhancement
in the future.
Follow-up to 90b16b4092.
Allow epan plugins to push descriptions for each individual
plugin or extension managed by the epan plugin interface.
For example a Lua or Python epan plugin can push
descriptions for each *.lua or *.py script it registers.
Add an option to the tools menu to copy a binary plugin file
(a .dll or .so) to the personal plugin folder.
This avoids the user having to create the paths manually and
knowning a lot of relatively unimportant details about where and
how Wireshark loads binary plugins.
It will also try to validate the plugin and do some sanity checks to
ensure the ABI is compatible.
Instead of using a Path field, that is really long and contains
a lot of redundant information, use a scope field that indicates
if the plugin is a personal plugin (loaded from the personal plugins
folder) or a global plugin (loaded from the global plugins folder).
Together with the plugin name this allows to construct the path
completely. By right-clicking on the row it is possible to open the file
browser in the correct plugin path and the personal/global plugin
folder path itself is displayed elsewhere.
Extcap and Lua scripts need to be enhanced to provide this
information too.
Adds the description and homepage columns to the TableView in
the "About Wireshark" plugins tab.
Currently extcap and lua scripts lack this information, this
could be improved in the future.
This removes the license check introduce with commit 90b16b4092.
After discussion and criticism received on the mailing list
I now think this license requirement is too permissive on
one hand about GPL compatibility and on the other it can be
a significant inconvenience for users who do not wish to distribute
the modified work, and so in its current form the change did
not advance the project's goals or GPL compliance.
Remove the boilerplate and multiple symbols required
to write and load a plugin and use a simpler
interface that is also much more featureful and
extensible.
This removes the major.minor ABI check in favor of an
ABI version number that is simpler and more flexible.
In practice our 3 separate ABI versions still increase
with each major.minor version number but this may change
in the future, particularly for codecs that have a much
narrower and stable codec API.
There is a new license compatibility check. Plugins
must declare if the use GPLv2 or later, or alternatively
an FSF compliant GPLv2 compatible license. Otherwise
Wireshark refuses to load the plugin. The SPDX ID is
just an ancillary field and not enforced currently.
Adds more metadata fields during plugin registration.
These are only used for display and debugging.
There is an extra API level number in the registration API
that is reserved for future use.
Allow writing display filter plugins in C. Plugins can
register one or more display filter functions.
This should lower the barrier for implementing and sharing
new display feature extensions.
An example plugin will be provided in a follow-up commit.
TODO: Put some work into refactoring display filter headers.
Right now some plugin-related APIs are implemented in dfilter-int.h,
which we'd rather not install to the system.
Allow plugins to declare their type, for the purpose of inserting
a description in the UI. The type consist of one or more bit ORed
flags.
This fixes the 'stats_tree' plugin description in the UI.
The plugin is not a dissector type plugin, as was being displayed
before. Now it correctly shows "tap listener" plugin.
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
The first is deprecated, as per https://spdx.org/licenses/.
Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Make plugins.c the source of truth for plugin names. Where plugins
reside and what they do are two different things, so split the plugin
directory and description into two separate elements.
CMake creates portable[1] builds on Windows and macOS. That is, the
build-time directory layout is the same as the installation directory
layout. Adjust various plugin paths macOS accordingly.
[1] You have to run osx-app.sh on macOS to prepare the application
bundle, but the goal is to create a directory/bundle that can be moved
or copied to a different system and run in the new location.
Change-Id: Icf9d02e61918fdf1404468baf52542910edf2743
Reviewed-on: https://code.wireshark.org/review/25166
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Put different types of plugins (libwiretap, libwireshark) in different
subdirectories, give libwiretap and libwireshark init routines that
load the plugins, and have them scan the appropriate subdirectories
so that we don't even *try* to, for example, load libwireshark plugins
in programs that only use libwiretap.
Compiled plugins are stored in subfolders of the plugin folders, with
the subfolder name being the Wireshark minor version number (X.Y). There is
another hierarchical level for each Wireshark library (libwireshark, libwscodecs
and libwiretap).
The folder names are respectively plugins/X.Y/{epan,codecs,wiretap}.
Currently we only distribute "epan" (libwireshark) plugins.
Change-Id: I3438787a6f45820d64ba4ca91cbe3c8864708acb
Reviewed-on: https://code.wireshark.org/review/23983
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Change-Id: Id73e641499e75bc1afc1dea29682418156f461fe
Reviewed-on: https://code.wireshark.org/review/24751
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Keep the option to disable at compile-time but use AC_ARG_ENABLE instead.
Change-Id: Ie8c3f5ba0db1eb6d9d4ffd742cd3aa049ead5007
Reviewed-on: https://code.wireshark.org/review/24026
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
If a plugin is repeated we destroy the GModuleHandle in plugins_scan_dir()
but we have already added the entry points to the list of registered
plugins.
Check for repeated plugins before adding it to the list of registered
plugins, not after.
Don't check for both name and version, check only for repeated names.
Give the plugin callback a more descriptive name.
Change-Id: I22cbbb059b8029877580fc33517310496c93e5d5
Reviewed-on: https://code.wireshark.org/review/23726
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
That's a less gross hack to suppress load failures due to not having
libwiretap than providing a no-op failure-message routine, as it at
least allows other code using a failure-message routine, such as
cmdarg_err() and routines that call it, to be used.
We really should put libwiretap and libwireshark plugins into separate
subdirectories of the plugin directories, and avoid even looking at
libwireshark plugins in programs that don't use libwireshark.
Change-Id: I0a6ec01ecb4e718ed36233cfaf638a317f839a73
Reviewed-on: https://code.wireshark.org/review/17506
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')
Fix manually some typo (in export_object_dicom.c and crc16-plain.c)
Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
knowledge of particular types of plugins. Instead, let particular types
of plugins register with the common plugin code, giving a name and a
routine to recognize that type of plugin.
In particular applications, only process the relevant plugin types.
Add a Makefile.common to the codecs directory.
svn path=/trunk/; revision=53710