aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
AgeCommit message (Collapse)AuthorFilesLines
2017-12-17Log output updates.Gerald Combs2-0/+58
Add a Qt message handler that calls g_log. Add milliseconds to the g_log_message_handler timestamp. Change-Id: I5b1c1d902b6b05cd8daa01741b19d6c2048dfb9a Reviewed-on: https://code.wireshark.org/review/24865 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-14Refactor plugin registration and loadingJoão Valverde2-233/+150
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>
2017-12-10Convert to using use SPDX identifier on wsutil directoryMichael Mann104-1366/+107
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>
2017-12-07wsjsmn: use SPDX identifier.Dario Lombardo2-26/+2
Change-Id: Iefdfd06b3b063a0d497587142996f2cd986d413f Reviewed-on: https://code.wireshark.org/review/24724 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-12-01[glib-compat] #include "ws_attributes.h" needed to handle _U_AndersBroman1-0/+2
Change-Id: Ie7aa8ef0a2ec8e65947e214488809d0df0ee015b Reviewed-on: https://code.wireshark.org/review/24670 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-29Threads: Set lifetimes and add a compatibility routine.Gerald Combs2-0/+14
Join the protocol registration threads so that they call g_thread_unref which in turn detaches/terminates the thread. This gets rid of many TSan and DRD errors here. The remaining ones appear to be false positives. Add g_thread_new to glib-compat (untested). Change-Id: I4beb6746ed08656715cf7870ac63ff80cf1ef871 Reviewed-on: https://code.wireshark.org/review/24619 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-23[glib-compat] g_async_queue_timeout_pop() needed for older glibsAndersBroman2-0/+23
(2.31.18) Change-Id: I727c8548c29b3409fab819dce072e86153232911 Reviewed-on: https://code.wireshark.org/review/24550 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-23[glib-compat] Add g_ptr_array_new_full().AndersBroman2-2/+39
Change-Id: Ic0e054cbb28106cc02f229ad4f2476b39e544378 Reviewed-on: https://code.wireshark.org/review/24544 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-19Fix (and chop) static build optionJoão Valverde1-8/+6
This sets the scope of the static build option to Wireshark support libraries only. Before the patch: Static plugins don't work with CMake and autotools. autotools static build is broken, and most likely will always be, as building Wireshark all-static is difficult and time-consuming. After the patch: For CMake Wireshark will be built with static or shared libraries and dynamic plugins. Everything just works. CMake apparently doesn't want you building static and shared libraries at the same time. For autotools Wireshark will be built with shared libraries by default. --disable-shared and --enable-static options work as usual. Dlopened plugins are not built if --disable-shared is given to configure (to disable shared libraries). This is a limitations imposed by libtool. Tested on Linux. This removes broken support for building plugins statically. Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c Reviewed-on: https://code.wireshark.org/review/24241 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-11-09Replace inet_addr() with our inet_pton() wrapperJoão Valverde2-1/+8
Error checking omitted like in original code. Change-Id: If8b4181d30ddf5717951aaf7ec61db25c0bc5322 Reviewed-on: https://code.wireshark.org/review/24309 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-10-30Avoid asserting with EAFNOSUPPORTJoão Valverde1-9/+34
We require support for AF_INET/AF_INET6 to run and assume this is available on all supported platforms. If and when reality clashes with that assumption just avoid aborting. Errors are to be expected as long as they don't produce a crash. Change-Id: I5c107b1a8fd64441eb96f48381412e180b66feb7 Reviewed-on: https://code.wireshark.org/review/24187 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-10-30Add wsutil/inet_ipv4.h.Guy Harris2-0/+45
It defines a ws_in4_addr type, which is intended to hold IPv4 addresses in network byte order, and some macros to test for IPv4 addresses in the local network control block and multicast IPv4 addresses. Use those macros in places where dissectors had their own code for that purpose. Change-Id: I4252b410e37207157be85119a332e2a6913b332f Reviewed-on: https://code.wireshark.org/review/24178 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-29Do not assert in ws_inet_ntop()João Valverde2-11/+17
Change-Id: I9d420c5f6bc29ce94855017739169dc8e8ce4d48 Reviewed-on: https://code.wireshark.org/review/24173 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-10-29More ws_inet_ntop() tweaks.João Valverde1-2/+20
Change-Id: I8f77f189337f9299e566a4149ae6ea481d3dbed6 Reviewed-on: https://code.wireshark.org/review/24162 Reviewed-by: João Valverde <j@v6e.pt>
2017-10-29Go with the RFC 2133-and-successors values for IPv4 and IPv6 address strings.Guy Harris1-4/+31
Add a comment explaining why Windows has different, larger values for INET_ADDRSTRLEN and INET6_ADDRSTRLEN. Change-Id: I4ad53c6cffae46d108f778460ce653dcc9343c64 Reviewed-on: https://code.wireshark.org/review/24155 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26Improve our inet_ntop() wrapperJoão Valverde3-11/+25
Also fix buffer length define, as it is not guaranteed to be 46 on Windows (it never was guaranteed anyway for the libc implementation, but the likelyhood of being greater was small). Change-Id: I2db705d86f825765ed32ec70b8d22058b5d629e8 Reviewed-on: https://code.wireshark.org/review/24074 Reviewed-by: João Valverde <j@v6e.pt>
2017-10-26Rename some IPv6 address test functions.Guy Harris1-3/+3
They test where the address is XXX, for various values of XXX, so name them accordingly. Change-Id: I437175f02b3f97fecee77e8bb9416bb5b71cd0d0 Reviewed-on: https://code.wireshark.org/review/24075 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26Add a ws_in6_addr typedef for struct e_in6_addr.Guy Harris3-10/+10
That allows a parallel typedef of ws_in4_addr for guint32. Change-Id: I03b230247065e0e3840eb87635315a8e523ef562 Reviewed-on: https://code.wireshark.org/review/24073 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26CMake: Don't check for windows.h or winsock2.h.Gerald Combs2-13/+3
If we're building on Windows we're going to have windows.h and winsock2.h. Don't bother checking for them. Change-Id: I0004c44d7364ab3f41682f34b8c84cd8617c9603 Reviewed-on: https://code.wireshark.org/review/24068 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-25Remove replacement inet_pton/inet_ntopJoão Valverde7-538/+21
Should be available on every platform we support. Change-Id: Ib65d78e351d22d581b427e5e93fc8d5e5348b260 Reviewed-on: https://code.wireshark.org/review/24047 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-25Remove inet_aton() usage everywhereJoão Valverde5-217/+0
Including where it says not to in comments. Use IPv4 dotted-decimal notation. Change-Id: Iafe1f6fbd2bd5867c41642dc27411f47dff8ce6a Reviewed-on: https://code.wireshark.org/review/24044 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-10-24Test g_printf() thousands grouping flag at runtimeJoão Valverde1-13/+29
This tests the runtime environment so avoid hard-coding it during the build. For now we avoid messing with locales for the test, unless it turns out to be necessary (ISO C printf behaviour with invalid conversion specifier is undefined). Change-Id: I341c2ab5e716973689cf9002f13435404a41369f Reviewed-on: https://code.wireshark.org/review/24038 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-10-23Make plugin support a runtime propertyJoão Valverde2-1/+17
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>
2017-10-20file_util.c: do not leak service handlePascal Quantin2-5/+4
Follow-up of gd64c30052 Change-Id: I620b3fb44fe3090120f2d29809961623e00d55a4 Reviewed-on: https://code.wireshark.org/review/23999 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-10-20Do not add Npcap path if npf.sys service is foundPascal Quantin1-5/+18
Otherwise you can end with 2 Packet.dll (the one from WinPcap and the one from Npcap) being loaded at the same time, which can create incompatibilities. Bug: 14134 Change-Id: Ia06066fd54b60296e55dbfce6c6f2ddd99367479 Reviewed-on: https://code.wireshark.org/review/23969 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-18Refresh wsutil/Makefile.amJoão Valverde1-29/+24
Change-Id: I6a70a2dc45257826c930f57a59cdd9bf5b4c3c73 Reviewed-on: https://code.wireshark.org/review/23973 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-10-18autotools: Remove abi-compliance-checker codeJoão Valverde1-20/+0
It's been broken for over a year, needs to be modernized and as implemented it's a maintenance nightmare. Get rid of it. Ping-Bug: 13036 Change-Id: I34a6e4c28b6d3b96dd6550dd21e9cbeaf050d58f Reviewed-on: https://code.wireshark.org/review/23967 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2017-10-17autotools: remove macOS Frameworks supportJoão Valverde1-9/+0
This treats macOS/OSX like any other Unix-like build target (Darwin), thus removing autotools support for macOS-specific build options. Anyone needing that is advised to use the fully-supported-on-macOS CMake build. Change-Id: I88e2fa7a8eea42241efcf84223ac2362d38b1e12 Reviewed-on: https://code.wireshark.org/review/23951 Petri-Dish: João Valverde <j@v6e.pt> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-17autotools: Fix bogus checkAPI targetsJoão Valverde1-1/+1
Change-Id: Ifc8884fc0f0e4548db79a68e3fbc35c7e5fb9be9 Reviewed-on: https://code.wireshark.org/review/23947 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-15autotools: make maintainer-clean should allow rerunning 'configure'João Valverde1-3/+0
Change-Id: Iedae94ffefe27b13b1967d69cacb757b5aa4576d Reviewed-on: https://code.wireshark.org/review/23928 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>
2017-10-15Remove superfluous null-checks before strdup/freeAhmad Fatoum1-2/+1
NULL checks were removed for following free functions: - g_free "If mem is NULL it simply returns" https://developer.gnome.org/glib/stable/glib-Memory-Allocation.html#g-free - g_slist_free(_full)? "NULL is considered to be the empty list" https://developer.gnome.org/glib/stable/glib-Singly-Linked-Lists.html - g_strfreev "If str_array is NULL, this function simply returns." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strfreev - g_slice_free "If mem is NULL, this macro does nothing." https://developer.gnome.org/glib/stable/glib-Memory-Slices.html#g-slice-free - g_match_info_free "not NULL... otherwise does nothing" https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html#g-match-info-free - dfilter_free defined in Wireshark code. Returns early when passed NULL epan/dfilter/dfilter.c They were also removed around calls to g_strdup where applicable: - g_strdup "If str is NULL it returns NULL." https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strdup Change-Id: Ie80c2db89bef531edc3aed7b7c9f654e1d654d04 Reviewed-on: https://code.wireshark.org/review/23406 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-10-13CMake: Allow user build flags to override default build flagsJoão Valverde1-2/+2
Autotools has the very useful feature by design of allowing the user to override the default build flags (you break it you keep it). Apparently CMake applies COMPILE_OPTIONS target property after CMAKE_{C,CXX}_FLAGS so that doesn't work here. Prepend our flags to those variables instead to make it work then. Specific target flag overrides can still be added with COMPILER_OPTIONS (e.g: generated files with -Wno-warning) but this is less effective and then we're back at the point where this overrides user flags. It's less of a concern though. Change-Id: I44761a79be4289238e02d4e781fef0099628817b Reviewed-on: https://code.wireshark.org/review/23675 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> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-10-03Add version check for plugin compatibilityJoão Valverde2-7/+20
Only plugins built for the same feature release (X.Y) are assured binary compatibility. Make sure we don't try to run unsuitable code and, if so, warn the user. This might happen for example if the user manually copies a binary plugin to the wrong folder, intentionally or by accident. I'm using "release version" to loosely mean not a patch release (i.e: a feature release). Change-Id: I896e9cbbd2d3843623fff6af8ef51002ec06f1f8 Reviewed-on: https://code.wireshark.org/review/23807 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>
2017-10-01plugins: Improve output formatJoão Valverde1-11/+13
And some minor code style changes. Change-Id: I97e53848db42c3981af69152b171b3a77f831da5 Reviewed-on: https://code.wireshark.org/review/23806 Reviewed-by: João Valverde <j@v6e.pt>
2017-09-26plugins: Move the build dir scanning code to a separate functionJoão Valverde1-68/+68
Change-Id: Iee476ac84d530810e5b70547c462050f1c03ee1b Reviewed-on: https://code.wireshark.org/review/23755 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>
2017-09-26plugins: No need to allocate a new structJoão Valverde1-30/+26
Change-Id: Ic39cf1c7f199dc5e4879d954a649d21453dcc5e5 Reviewed-on: https://code.wireshark.org/review/23753 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>
2017-09-26plugins: Build the description string while loadingJoão Valverde1-45/+18
Change-Id: Ia67133c1c9d005fc4a81b0727a7b1849571ab29c Reviewed-on: https://code.wireshark.org/review/23742 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>
2017-09-26plugins: Sort the descriptionsJoão Valverde2-20/+36
Change-Id: I8113ba9782962856ce86475cddf40d69ed267fb4 Reviewed-on: https://code.wireshark.org/review/23733 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>
2017-09-26plugins: Use hash table for book-keepingJoão Valverde1-98/+55
Avoid having to walk the list to check for existence on every file load. Now the binary plugin description list in About Wireshark is randomized instead of sorted by load order. We may want to change that. Add missing "const" to plugin->version. Fix an apparent trivial leak where the GModule handle was not closed on exit. Change-Id: I774215a84b080bbe889f88cc6a9b777bcf60b335 Reviewed-on: https://code.wireshark.org/review/23732 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-25plugins: Fix crash loading binary module twiceJoão Valverde2-30/+29
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>
2017-09-24autotools: Use package flags to configure libpcapJoão Valverde1-1/+3
Change-Id: Icd64014b597a8e60d2aff9d180c441c6ffccff26 Reviewed-on: https://code.wireshark.org/review/23329 Reviewed-by: João Valverde <j@v6e.pt>
2017-09-23plugins: Fixups for g9260461f4fJoão Valverde1-1/+1
Put plugins in CMake build dir with a version subdir. This avoids some weird special cases, however running with autotools from build dir displays the wrong global folder in about->folders. Unfortunately the hack to run from the autotools build dir is troublesome. Various fixes for Windows builds. Try to fix also build dir issue loading plugins on macOS with ENABLE_APPLICATION_BUNDLE (blind). Change-Id: Ic3c7c21f5850c12a53844202d61fa0592b45739c Reviewed-on: https://code.wireshark.org/review/23657 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: João Valverde <j@v6e.pt>
2017-09-20plugins: Be more descriptive in "about wireshark"->"folders"João Valverde3-20/+46
Display separate entries for binary plugins and lua scripts. This is explained in the user guide, that the binary folder is a subfolder of the lua folder, but it's probably a good idea to be more explicit about it, at the risk of cluttering the interface a bit. Move GeoIP information down because it seems the least important. Add helper functions to provide plugin version subdir. Change some #ifdefs while at it for legibility. Change-Id: Ieb8665df029b3c14de19e2c973bd9b1cc4ec4621 Reviewed-on: https://code.wireshark.org/review/23609 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>
2017-09-20Rename get_plugin_dir() for consistencyJoão Valverde3-4/+4
WS_DLL_PUBLIC const char *get_plugin_dir(void); WS_DLL_PUBLIC const char *get_plugins_pers_dir(void); Opt for the plural form consistently (for public functions at least). Change-Id: I8a5861ad7f90f9c87168bd3275bd9dbc5c83b749 Reviewed-on: https://code.wireshark.org/review/23608 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-17plugins: Change personal plugin dir path on UnixJoão Valverde1-0/+4
Installing machine code to XDG_CONFIG_HOME is problematic. Use ~/.local/lib/wireshark/plugins instead. XDG_CONFIG_HOME should be architecture independent. This allows copying the configuration between different architectures safely. Reference: https://www.freedesktop.org/software/systemd/man/file-hierarchy.html Change-Id: I1b18f64aab4dd351d611cfbea3b9333f23c98bfa Reviewed-on: https://code.wireshark.org/review/23498 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>
2017-09-17plugins: Use minor version number for plugin install pathJoão Valverde1-2/+4
Wireshark patch releases (X.Y.Z) are binary compatible so reflect that in the plugin installation path. By installing to $pkglibdir/plugins/X.Y out-of-tree plugins don't need to be reinstalled with every patch release. Change-Id: I9d1728e6fb12bcb51d2a723af22c750cb7a966cf Reviewed-on: https://code.wireshark.org/review/23497 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>
2017-09-17plugins: Fix paths to match WSUGJoão Valverde4-5/+15
The Wireshark User Guide seems to say: Global lua plugins are in $pkglibdir/plugins Personal lua plugins are in XDG_CONFIG_HOME/plugins Global binary plugins are in $pkglibdir/plugins/$version Personal binary plugins are in XDG_CONFIG_HOME/plugins/$version Fix code to match that. This is a backward-incompatible change for global lua plugins and personal binary plugins. Adds a version subfolder to the personal plugin folder for binary plugins. This allows for safe upgrades and side-by-side installations with different prefixes (they no longer use the same personal dir). Change-Id: Ie0f039113628a257625a9a9fb2cb30e532f5dd47 Reviewed-on: https://code.wireshark.org/review/23516 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>
2017-09-17CMake: Initial work to install headers for the benefit of pluginsJoão Valverde1-0/+64
To be continued incrementally to fix gaps and omissions. If we are willing to reorganize the source tree to have one or two header include folders this could be simplified considerably. It would also force developers to give more consideration to API issues, which is a good thing. See also e7ef19efc0e928b50644b37772ccbf176e74f766. Bug: 14062 Change-Id: I0759da2f9793cfb5cf92c9e231457bba43df4353 Reviewed-on: https://code.wireshark.org/review/23548 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>
2017-09-15Fix compilation errors when configured --without-plugins and without lua.Jakub Zawadzki1-1/+6
filesystem.c: In function ‘init_plugin_pers_dir’: filesystem.c:1041:5: error: ‘plugin_pers_dir’ undeclared (first use in this function) plugin_pers_dir = get_persconffile_path(PLUGINS_DIR_NAME, FALSE); ^~~~~~~~~~~~~~~ filesystem.c:1041:5: note: each undeclared identifier is reported only once for each function it appears in filesystem.c: In function ‘get_plugins_pers_dir’: filesystem.c:1062:10: error: ‘plugin_pers_dir’ undeclared (first use in this function) if (!plugin_pers_dir) ^~~~~~~~~~~~~~~ Change-Id: I9ace17da42665d135b9432b1f19970491589e3bf Reviewed-on: https://code.wireshark.org/review/23545 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-15autotools: Initial work to install headers for the benefit of pluginsJoão Valverde1-1/+5
Install public headers required to build plugins for libwireshark (taps and dissectors). The source tree is organized to serve the CLI/GUI parts of wireshark. Plugins are built in tree. This change is intende to allow plugins to be built out-of-tree but we want to avoid dumping all headers into /usr/include. To be continued incrementally to fix errors and omissions. Change-Id: Iaa0def0ba3de4b456a29114c315544d2d64fa748 Reviewed-on: https://code.wireshark.org/review/23374 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>