Refactor plugin registration and loading
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>
Sat, 30 Sep 2017 23:56:03 +0000 (00:56 +0100)
committerJoão Valverde <j@v6e.pt>
Thu, 14 Dec 2017 08:43:57 +0000 (08:43 +0000)
commit995812c5f1add94df1c237596939130c1704b099
tree42542c56b9a70c7d2d231c8bc36649be35af46b4
parenta9821caab8a1f2c6e265bd5b63a060f1f241c704
Refactor plugin registration and loading

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>
75 files changed:
capinfos.c
captype.c
cmake/modules/WiresharkPlugin.cmake
codecs/codecs.c
codecs/codecs.h
debian/libwireshark0.install
debian/libwireshark0.symbols
debian/libwiretap0.symbols
debian/libwscodecs0.symbols
debian/libwsutil0.symbols
dftest.c
doc/README.plugins
doc/plugins.example/Makefile.am
doc/plugins.example/configure.ac
doc/plugins.example/hello.c
docbook/wsug_src/WSUG_app_files.asciidoc
editcap.c
epan/epan.c
epan/epan.h
epan/prefs.c
epan/prefs.h
epan/proto.c
epan/proto.h
epan/tap.c
epan/tap.h
extcap/androiddump.c
mergecap.c
packaging/nsis/wireshark.nsi
packaging/wix/DirectoryStructure.wxi
packaging/wix/Plugins.wxi
plugins/Makefile.am.inc
plugins/docsis/CMakeLists.txt
plugins/docsis/Makefile.am
plugins/ethercat/CMakeLists.txt
plugins/ethercat/Makefile.am
plugins/gryphon/CMakeLists.txt
plugins/gryphon/Makefile.am
plugins/irda/CMakeLists.txt
plugins/irda/Makefile.am
plugins/mate/CMakeLists.txt
plugins/mate/Makefile.am
plugins/opcua/CMakeLists.txt
plugins/opcua/Makefile.am
plugins/pluginifdemo/CMakeLists.txt
plugins/pluginifdemo/Makefile.am
plugins/profinet/CMakeLists.txt
plugins/profinet/Makefile.am
plugins/stats_tree/CMakeLists.txt
plugins/stats_tree/Makefile.am
plugins/stats_tree/pinfo_stats_tree.h
plugins/stats_tree/stats_tree_plugin.c
plugins/transum/CMakeLists.txt
plugins/transum/Makefile.am
plugins/unistim/CMakeLists.txt
plugins/unistim/Makefile.am
plugins/wimax/CMakeLists.txt
plugins/wimax/Makefile.am
plugins/wimaxasncp/CMakeLists.txt
plugins/wimaxasncp/Makefile.am
plugins/wimaxmacphy/CMakeLists.txt
plugins/wimaxmacphy/Makefile.am
randpkt.c
reordercap.c
sharkd.c
tfshark.c
tools/make-plugin-reg.py
tools/oss-fuzzshark/fuzzshark.c
tshark.c
ui/gtk/main.c
wireshark-qt.cpp
wireshark.pc.in
wiretap/wtap.c
wiretap/wtap.h
wsutil/plugins.c
wsutil/plugins.h