aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/epan
AgeCommit message (Collapse)AuthorFilesLines
2018-05-14Free g_ptr_array_free-related memory leaksPeter Wu3-3/+3
g_ptr_array_free(a, FALSE) returns "a->pdata". Callers that do not handle this will leak memory (e.g. "tshark -G plugins"). Convert other users to use the return value instead of direct access to "a->pdata". Change-Id: I29835477d587f5f54bf0d94cdae9f375e3da3ce3 Reviewed-on: https://code.wireshark.org/review/27437 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-02MATE: fix compilation with gcc 8Pascal Quantin2-2/+12
mate_runtime.c:816:35: error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type] mate_parser.l:401:40: error: cast between incompatible function types from ‘void (*)(mate_config_frame *)’ {aka ‘void (*)(struct _mate_config_frame *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type] Change-Id: I90fbed9c52f6fe43958a0ff11b21f0fe4c23c41a Reviewed-on: https://code.wireshark.org/review/27267 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-01Use common indenting space in headingStig Bjørlykke26-247/+247
Change-Id: I47022f9c7d568ca6d9705ba63c669a980822818a Reviewed-on: https://code.wireshark.org/review/27229 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-22EtherCAT: Fix small bugs for mailbox typeMichalis Kapsalakis1-3/+5
This commit fixes the bug in the EtherCAT dissector for the FoE mailbox type. With this commit, the dissector displays the either foe_efw or foe_data in the ECAT_FOE_OPMODE_DATA, and not both of them as until now. Bug: 14613 Change-Id: I09fc569f5adc5665c64653087c475f7f1d94639a Reviewed-on: https://code.wireshark.org/review/25336 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-18Remove autotools build system.Dario Lombardo14-1105/+0
It has been replaced by cmake. Change-Id: I83a5eddb8645dbbf6bca9f026066d2e995d8e87a Reviewed-on: https://code.wireshark.org/review/26969 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16Forbid leading, duplicated and trailing dots in field namesPeter Wu1-1/+1
In order to simplify the display filter scanner, try to restrict the use of dots ('.') in field names. Forbid leading dots, does not affect current dissectors. Fix '..' typo in fpp dissector and forbid it. Forbid trailing dots after fixing dissectors: some of them just have an excess dot, others are missing a name after the dot. Change-Id: I6e58a04ef0306ee8c16fbf6a3cabb076d7fc69c9 Reviewed-on: https://code.wireshark.org/review/26967 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-10Add, and use, "fetch signed value" for lengths < 40 bits.Guy Harris2-2/+2
Add 8-bit, 16-bit, 24-bit, and 32-bit "fetch signed value" routines, and use them rather than casting the result of the 8/16/24/32-bit "fetch unsigned value" routines to a signed type (which, BTW, isn't sufficient for 24-bit values, so this appears to fix a bug in epan/dissectors/packet-zbee-zcl.c). Use numbers rather than sizeof()s in various tvb_get_ routines. Change-Id: I0e48a57fac9f70fe42de815c3fa915f1592548bd Reviewed-on: https://code.wireshark.org/review/26844 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-09Remove const from fields in a dynamically-allocated structure.Guy Harris2-2/+2
There's no need for them to be const, and that causes compiler warnings when you try to give them a value. Change-Id: I666a03dd443dff462de0fe2e393284f3341535d0 Reviewed-on: https://code.wireshark.org/review/26834 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-09Remove const from fields in a dynamically-allocated structure.Guy Harris1-2/+2
There's no need for them to be const, and that causes compiler warnings when you try to give them a value. Change-Id: Ib9bb034f3876abb7e86b6c9f41ebdd35192b5af3 Reviewed-on: https://code.wireshark.org/review/26831 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-26dcerpc-pn-io (profinet): Fix Dead Store (Dead assignement/Dead increment) ↵Alexis La Goutte1-1/+0
Warning found by Clang Change-Id: I8dd3fe09d7b5d3132814e3531314220f600746ba Reviewed-on: https://code.wireshark.org/review/26649 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-22PROFINET: Am_location dissection was wrong byte order.Gizem Yurdagul1-48/+96
Dissection is updated according to spec. Unnecessary tab and spaces are removed. Change-Id: Ia9b3252f5e9dcdc3617286a802fffeef250888c2 Reviewed-on: https://code.wireshark.org/review/26542 Reviewed-by: Birol Capa <birol.capa@siemens.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-13Removed assert which was only used for debugging.ciechanowski1-6/+1
Change-Id: I647f023e0e40c90a71b3328717c7ab9eaf30aac5 Reviewed-on: https://code.wireshark.org/review/26461 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-11gryphon: fix 'gryphon.usdt.action_flags' exists multiple times with NOT ↵Alexis La Goutte1-1/+1
compatible types: FT_BOOLEAN and FT_UINT8 Change-Id: Id273b1f80728042122b6bfa3053d263b25f6bdbe Reviewed-on: https://code.wireshark.org/review/26412 Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-03-08gryphon: Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+0
Change-Id: I08b59156dbe537c6c4a6b3502ab469c88e984b67 Reviewed-on: https://code.wireshark.org/review/26357 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-08gryphon(.h): fix indent (use 4 spaces)Alexis La Goutte1-324/+324
Change-Id: Ic3ba745e22b5c28ffb8dd9d7fe513c4d86f3d603 Reviewed-on: https://code.wireshark.org/review/26360 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07Gryphon Protocol dissector fixes and updates.ciechanowski5-122/+2579
These updates fix the incorrect "malformed packet" errors. The updates include Gryphon Protocol commands that were not included in the prior version of the Gryphon dissector. Specifically, added LIN Protocol commands for LDF files, LIN ioctls, LIN signal conversion commands, and USDT ISO-15765-2 commands. Change-Id: I746aa871d8496f3a73374eefd52ed900a069d16b Reviewed-on: https://code.wireshark.org/review/26269 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07spdx: more licenses converted.Dario Lombardo13-169/+13
Change-Id: I3861061ec261e63b23621799e020e811ed78a343 Reviewed-on: https://code.wireshark.org/review/26333 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-23mate: change strcmp in g_strcmp0 that supports NULL (found by clang).Dario Lombardo1-1/+1
Change-Id: I66e6183a4f356adfdfd9c55b7b39245a9913857e Reviewed-on: https://code.wireshark.org/review/25988 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-02-17Don't have CLEAN_FILES variables for the "clean" source files.Guy Harris13-79/+18
Except for the one directory that (currently) has "not yet clean" files, epan/dissectors, we don't need a separate variable to keep track of the "clean" source files. In the cases where not all files were in CLEAN_FILES, put them into the variable used to enable -Werror or its equivalent. Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b Reviewed-on: https://code.wireshark.org/review/25830 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17Use -Werror except for explicitly listed dirty dissectors.Guy Harris2-2/+2
Use AM_CFLAGS for everything except for libdirtydissectors in epan/dissectors. Rename GENERATED_CFLAGS/GENERATED_CXXFLAGS to DIRTY_CFLAGS/DIRTY_CXXFLAGS, as it doesn't apply to all generated files. Change-Id: I702b53e185d6972c08d68ef31c05df7b03669daa Reviewed-on: https://code.wireshark.org/review/25829 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16Use DIAG_OFF_FLEX/DIAG_ON_FLEX more consistently.Guy Harris1-13/+8
Add warning C4267 (size_t to int conversion) with MSVC to DIAG_OFF_FLEX. Addd -Wshorten-64-to-32 with Clang and GCC to DIAG_OFF_FLEX. Don't explicitly use #pragma to turn off warnings; use DIAG_OFF_FLEX for all of them. If we use DIAG_OFF_FLEX, use DIAG_ON_FLEX, even if we have no section of entirely included code at the end. Change-Id: Ibfd44e8954704e9a8bcb1bd8e54f31d28357fffb Reviewed-on: https://code.wireshark.org/review/25817 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16Add DIAG_OFF_FLEX and DIAG_ON_FLEX for use in Flex scanners.Guy Harris1-8/+8
DIAG_OFF_FLEX turns off all warnings that we want to disable for Flex-generated code due to some versions of Flex generating code that triggers those warnings. DIAG_ON_FLEX restores those warnings, so we do the checks for code that *we* wrote. Use them in .l files. Change-Id: I613a20309a30cd4c61111a1edbe27a5d05fcbf59 Reviewed-on: https://code.wireshark.org/review/25815 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-15Disable warning C4267 in generated files.Gerald Combs1-0/+6
Disable warning C4267 in Visual C++ in order to squelch the following warnings: 125>dtd_parse.c(1699): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\cmbuild\epan\epan.vcxproj] 125>diam_dict.c(2348): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\cmbuild\epan\epan.vcxproj] 125>C:/buildbot/builders/windows-x86-64-petri-dish/windows-x86-64-petri-dish/build/cmbuild/epan/uat_load.c(1476): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\cmbuild\epan\epan.vcxproj] 130>wimaxasncp_dict.c(2103): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\buildbot\builders\windows-x86-64-petri-dish\windows-x86-64-petri-dish\build\cmbuild\plugins\epan\wimaxasncp\wimaxasncp.vcxproj] Change-Id: Ie29ae096e5a8b5037abaf3f2aa97754260f4cace Reviewed-on: https://code.wireshark.org/review/25800 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>
2018-02-13Make the DOCSIS dissector a built-in dissector.Guy Harris10-17887/+0
Stuff that calls it is built in, and stuff it calls is built in, so there's not much point in having it be a plugin; we already have examples of plugin dissectors. Change-Id: I512e0fda62faedb5f03f476fbece2e267e1d644f Reviewed-on: https://code.wireshark.org/review/25775 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-09plugins: use SPDX identifiers.Dario Lombardo153-1766/+153
Change-Id: I8155573933daeb69c6e4c95c6702bdd6fc1fa89b Reviewed-on: https://code.wireshark.org/review/25707 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.Dario Lombardo1-1/+1
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>
2018-02-04Have individual plugin CMakeLists.txt files add library dependencies.Guy Harris14-1/+27
This removes any knowledge of plugin types from cmake/modules/WiresharkPlugin.cmake, so that it doesn't have to be changed if we add a new plugin type. Revert to the second argument to add_plugin_library() and install_plugin() being the subfolder. Change-Id: I668ab90b28c73a8b12ca8e3e906b8de2f9395ca5 Reviewed-on: https://code.wireshark.org/review/25585 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-21autotools: Rework the plugin MakefilesJaap Keuter15-14/+57
The plugin.c generation in an autotools build comes in from an included Makefile.am file. The various types of plugins need different parameters for the generation script. Put the plugin.c production rule is a seperate include file so each plugin type build can include its own variant. Also amend the README.plugins file with regards to the new directory structure and the fact that there are multiple types of plugins, not just dissector plugins. Change-Id: I3a815d0d767baa555356cf428861b18697401355 Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-on: https://code.wireshark.org/review/25398 Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-19wimax (plugins): fix no previous prototype for function ↵Alexis La Goutte1-0/+1
'proto_reg_handoff_wimax' [-Wmissing-prototypes] Change-Id: Icc79994ace4e32def3f03cf62b49f3c7dd3011df Reviewed-on: https://code.wireshark.org/review/25384 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-16EtherCAT: Add Mailbox as a string in EtherCAT Frame Types.Michalis Kapsalakis1-0/+1
This commit adds the missing mailbox type to the EthercatFrameTypes array. Change-Id: I0710b723cdfa6cff28b6655729dafb68678518cb Reviewed-on: https://code.wireshark.org/review/25338 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-01-16plugins: Add source tree subfolder for plugin libraryJoão Valverde225-0/+137855
This allows some simplification and makes things more consistent, particularly for loading plugins from the build dir. Also fixes the issue reported here: https://www.wireshark.org/lists/wireshark-dev/201801/msg00061.html Change-Id: I0d8a000ee679172bccad546a3b0c47a79486f44d Reviewed-on: https://code.wireshark.org/review/25329 Petri-Dish: João Valverde <j@v6e.pt> Reviewed-by: João Valverde <j@v6e.pt>