aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-09-11wsutil: Initialize and store plugin personal dirJoão Valverde3-18/+24
Obviate allocation on every call to get_plugins_pers_dir(). Change-Id: I089ae499f93739d490d4552f59b5db5996f7d26f Reviewed-on: https://code.wireshark.org/review/23495 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: João Valverde <j@v6e.pt>
2017-09-09ws_cpuid: include ws_attributesUli Heilmeier1-0/+2
Otherwise _U_ is not defined. Change-Id: I221f64c7d89c221e5a63a573e06457699d0a177e Reviewed-on: https://code.wireshark.org/review/23440 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-08sharkd: implement proper JSON string unescaping, based on JSON dissector.Jakub Zawadzki2-0/+108
Change-Id: I749b78b759f98c78526840b8bb1cbccfc17a5611 Reviewed-on: https://code.wireshark.org/review/23365 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
2017-09-06plugins: config.h must not be included by public headersJoão Valverde8-12/+2
For a sane plugin build environment. Include config.h as the first header in the .c file instead. Fix by moving required compiler attribute macros to a new "ws_attributes.h" API header. Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1 Reviewed-on: https://code.wireshark.org/review/23400 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-08-21More explanation in the comments.Guy Harris1-1/+5
Change-Id: I1e5597ac291d38370e8b1537a75f3ba1d9a86bc9 Reviewed-on: https://code.wireshark.org/review/23156 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-12Include xtea.[hs] in CMakeLists.txt and Makefile.amAhmad Fatoum2-1/+3
CMake part was missing. Autotools part didn't include header. Change-Id: I5a642a80d30b02bb16eb48e0e4e1f8e0e8332a75 Reviewed-on: https://code.wireshark.org/review/23051 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-08Fix a comment.Guy Harris1-1/+1
\, not /, is the standard pathname separator on Windows. Change-Id: Ia1f1be5e4bd76519e27df430e8ef46967ffe35f5 Reviewed-on: https://code.wireshark.org/review/23024 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-05Further cleanups.Guy Harris1-11/+32
If a variable is initialized in a loop body or an if clause or a switch clause, declare it inside the loop body/clause, and de-initialize it before leaving the loop body/clause. De-initialize the gnutls_pkcs12_t before leaving rsa_load_pkcs12(), so as not to leak it. Always leave the per-bag loop by "goto done", even if we're not within an inner loop, to make it clearer what we're doing. We initialize the bag structure at the beginning of that loop body; de-initialize it at the end. If we leave the loop without a private key, and we don't have an error message, the error is "we didn't find a PKCS8 key"; report that. Change-Id: I87cf296876c8f1879f69d01ce67ca2829b4f8d16 Reviewed-on: https://code.wireshark.org/review/22958 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-05rsa.c: strerror -> g_strerrorMichael Mann1-2/+2
Pacify checkAPIs.pl Change-Id: I637a6cd678b99d05cd1b26fd3cba6ad4dd19e8d2 Reviewed-on: https://code.wireshark.org/review/22957 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-04Fix up indentation.Guy Harris1-1/+1
Change-Id: I99445d9934dbb4c97c4c41192c8fe908441f2843 Reviewed-on: https://code.wireshark.org/review/22942 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-04Clean up private key file error reporting.Guy Harris1-13/+48
Ensure that rsa_load_pem_key() and rsa_load_pkcs12() always return an error message string if they fail, so that 1) they don't return NULL without supplying an error string; 2) they don't supply an error string if they succeed. If either of them fails, report the error; if there's no error string, report an unknown error (that shouldn't happen, but the wsutil/rsa.c code needs more cleanup before I'll believe it can't happen). While we're at it, clean up some of those error strings, return NULL rather than 0 as the failure case from rsa_load_pkcs12() as we do in rsa_load_pem_key() (they mean the same thing, but NULL makes it a bit clearer), and de-initialize the private key structure in rsa_load_pem_key() if we fail (so that we don't leak memory). Change-Id: Id9dd331800d87b017a500a6f579df446057f555b Reviewed-on: https://code.wireshark.org/review/22941 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-08-04SNMP: add support for USM SHA-2 algorithms (RFC 7860)Olivier Verriest1-2/+6
Generlize the USM handling and add support for HMAC-SHA-2 authentication protocols. Change-Id: I7cca2f24db61620423fded078c680322aff86400 Reviewed-on: https://code.wireshark.org/review/22846 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-01Use g_build_filename() instead, fix indentationJoão Valverde1-6/+3
Change-Id: I459208eed4a76b104bc28aa44ab05374e57043de Reviewed-on: https://code.wireshark.org/review/22873 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-05xtea[.ch] (wsutil): Add Modelines infoAlexis La Goutte2-0/+26
Change-Id: I32823df7a6ad543fd7912f64169050534b6ff3a4 Reviewed-on: https://code.wireshark.org/review/22532 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-22wsutil: Back out profile_write_info_fileStig Bjørlykke2-55/+0
Change-Id: I89a9aaeeba1689cce04f239dafdc9003492aba16 Reviewed-on: https://code.wireshark.org/review/22346 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-06-22wsutil: Return error from profile_write_info_fileStig Bjørlykke2-6/+22
Change-Id: I1d91cef01ced6cceaa75d1618ffcb59eae5b8e6f Reviewed-on: https://code.wireshark.org/review/22325 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-21wsutil: Check return from ws_writeStig Bjørlykke1-2/+3
Change-Id: I73f65222dc23ebcb484f2598a12f43b284654420 Reviewed-on: https://code.wireshark.org/review/22321 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-06-21wsutil: Ignore return from ws_writeStig Bjørlykke1-2/+2
Change-Id: Idad4dd84538e3ccb7b258775704db8b6bd6c301e Reviewed-on: https://code.wireshark.org/review/22319 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-06-21[filesystem.c] Add a cast to aviod a warning with VisualStudio 2017.Anders1-1/+1
Change-Id: I95186bd54ae487e112fcb533c62bb8f9b210dc24 Reviewed-on: https://code.wireshark.org/review/22309 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-21wsutil: Free files in reset_default_profileStig Bjørlykke1-0/+1
This plugs a memory leak. Change-Id: Ic989a89353d10de6f8f07df6a734d2b912facb7e Reviewed-on: https://code.wireshark.org/review/22305 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-21Qt: Write a list of profile files at startupStig Bjørlykke2-0/+39
This file will contain all personal config files which will be fetched from a profile. Change-Id: I430ca84ccefc17f0e21c8efb93a92602ab8d5661 Reviewed-on: https://code.wireshark.org/review/22303 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-20Qt: Create the user profiles dir at startupStig Bjørlykke2-25/+46
Ensure the user profiles directory is created at startup so that users can put downloaded profiles without creating the directory. Change-Id: Ib06bb3055daef8fd9e78d7887ce56f8fe50e48bf Reviewed-on: https://code.wireshark.org/review/22275 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-16Fix SURROGATE_VALUE() to match what RFC 2781 says.Guy Harris1-1/+1
While we're at it, note in the comment for get_utf_16_string() the "decoding UTF-16" algorithm in RFC 2781. Change-Id: I5d7dc5c09af0474c055796e49e0c7b94fa87d2ad Reviewed-on: https://code.wireshark.org/review/22171 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-16Change some names to reflect Apple's new UNIX-for-Macs name.Guy Harris3-8/+8
{OS_X,os_x} -> {MACOS,macos}. Change-Id: Icebea6ab566c65996ee97bacb88fac7e84ec32de Reviewed-on: https://code.wireshark.org/review/22161 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-16Rename a routine to match the OS name.Guy Harris1-2/+5
It's now "macOS". While we're at it, note that the property list from which it fetches version information still calls it "Mac OS X". Change-Id: I438ef9dc65c2619d7378b0deb5efc84734a2ac6d Reviewed-on: https://code.wireshark.org/review/22159 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-10Fix indentation.Guy Harris1-5/+5
Change-Id: I9ea3947a4100d4d566c0d6815de5336214f9f581 Reviewed-on: https://code.wireshark.org/review/22062 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-10Put the non-filter part of epan/color_filters.h into wsutil/color.h.Guy Harris2-0/+63
Places that only need color_t, such as certain preferences, don't need the color filter stuff. Change-Id: I88fc2858454d04e659b323a8bc28b21d362ca3fb Reviewed-on: https://code.wireshark.org/review/22060 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-06rsa.h: include <stdio.h>Michael Mann1-0/+1
Pacify OS/X buildbot Change-Id: Icbf49b747473adfa16c1a08c81489b68a88d9a93 Reviewed-on: https://code.wireshark.org/review/21979 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-05Move RSA key loading and decryption functions to wsutilAhmad Fatoum6-1/+490
Loading PEM and PKCS#11 keys was being done in static functions in packet-ssl-utils.c. These were moved to wsutil, with prototypes in a new <wsutil/rsa.h> header. This adds gnutls as optional dependency to wsutil. The RSA decryption helper was also moved and is now provided in <wsutil/wsgcrypt.h>. This allows more dissectors to access this functionality. Change-Id: I6cfbbf5203f2881c82bad721747834ccd76e2033 Reviewed-on: https://code.wireshark.org/review/21941 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-05wsutil: Add XTEA block cipherAhmad Fatoum3-2/+113
XTEA is a 64-bit block Feistel cipher with a 128-bit key and a suggested 64 rounds. It's used by the MMORPG Tibia for encrypting game server traffic. Usual XTEA treats the blocks as big-endian. Tibia treats them as little endian, therefore both versions are provided. Change-Id: I9ad0c8e066f848b20772ce4e1d3df19deff307b8 Reviewed-on: https://code.wireshark.org/review/21942 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-05-11Put the HAVE_REMOTE hack into wsutil/wspcap.h, and include that file.Guy Harris2-1/+49
Have a header file that defines HAVE_REMOTE if HAVE_PCAP_REMOTE is defined, and then includes pcap.h. Replace all other includes of pcap.h, and the definition of HAVE_REMOTE, with includes of that file. Check for anything other than wspcap.h including pcap.h in checkAPIs.pl. Change-Id: I3cbee8208944ad6f006f568b3fe3134e10b2a883 Reviewed-on: https://code.wireshark.org/review/21605 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-04Add g_get_monotonic_time() to glib-compat and useMartin Mathieson2-0/+15
Change-Id: If41dab19692516270e8b4bcf1a8a954bb8dc3ccc Reviewed-on: https://code.wireshark.org/review/21480 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-04-19Fix memory leak in create_persconffile_profileMax Dmitrichenko1-0/+3
found by valgrind Change-Id: I15aef9d78dffac44e36849349dc57b4b36f23de1 Reviewed-on: https://code.wireshark.org/review/21228 Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-18Check the result of localtime().Guy Harris1-2/+6
Unlikely to fail, but it squelches CID 1398220. Change-Id: I0e40146f0a32c1082e84052c6b3e382fe6a15ae7 Reviewed-on: https://code.wireshark.org/review/21177 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-08Clean up handling of enabled/disabled protocols/heuristic dissectors.Guy Harris7-122/+146
Add a "report a warning message" routine to the "report_err" code in libwsutil, and rename files and routines appropriately, as they don't only handle errors any more. Have a routine read_enabled_and_disabled_protos() that reads all the files that enable or disable protocols or heuristic dissectors, enables and disables them based on the contents of those files, and reports errors itself (as warnings) using the new "report a warning message" routine. Fix that error reporting to report separately on the disabled protocols, enabled protocols, and heuristic dissectors files. Have a routine to set up the enabled and disabled protocols and heuristic dissectors from the command-line arguments, so it's done the same way in all programs. If we try to enable or disable an unknown heuristic dissector via a command-line argument, report an error. Update a bunch of comments. Update the name of disabled_protos_cleanup(), as it cleans up information for disabled *and* enabled protocols and for heuristic dissectors. Support the command-line flags to enable and disable protocols and heuristic dissectors in tfshark. Change-Id: I9b8bd29947cccdf6dc34a0540b5509ef941391df Reviewed-on: https://code.wireshark.org/review/20966 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-05A bunch of "{Mac} OS X" -> "macOS" changes.Guy Harris6-11/+11
Avoid anachronisms, however; there was no "macOS 10.0" or even "OS X 10.0", for example. It was "Mac OS X" until 10.8 (although 10.7 was sometimes called "OS X" and sometimes called "Mac OS X"), and it was "OS X" from 10.8 to 10.11. Change-Id: Ie4a848997dcc6c45c2245c1fb84ec526032375c3 Reviewed-on: https://code.wireshark.org/review/20933 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-28wsutil: fix a NULL pointer dereference when there is a single plugin registeredPascal Quantin1-16/+6
Rework loop to avoid dereferencing a NULL pointer. Bug introduced in g6d79055 Change-Id: I88a9f2d045b633cc2365ff6ce939f3315e7d42cc Reviewed-on: https://code.wireshark.org/review/20751 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-16Add support for verifying CIP Safety CRC values.Michael Mann6-0/+281
Change-Id: I44f7ff6980f27b1a0d4199a91f9b217aec7e4652 Reviewed-on: https://code.wireshark.org/review/20557 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-10Replace aes.c and des.c by Libgcrypterikdejong8-1831/+33
Follow-up of https://code.wireshark.org/review/20095 Rewritten functions: - crypt_des_ecb crypt_des_ecb verified against previous crypt_des_ecb implementation with 4294967295 random keys and input buffers from /dev/random as I cannot find a suitable pcap which uses DES Change-Id: I21ec2572451e0ded4299ffadd8dd687817bc6318 Reviewed-on: https://code.wireshark.org/review/20429 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>