aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/epan/ethercat
AgeCommit message (Collapse)AuthorFilesLines
2023-02-25Change some `wmem_packet_scope()` to `pinfo->pool`David Perry1-3/+3
As requested [here][1] by @eapache, help with removing calls to `wmem_packet_scope()` in favour of references to `pinfo->pool`. * Plugins chosen semi-randomly. * When a calling function already has a `pinfo` argument, use that. * Remove `_U_` from its signature if it was there. * If a function seems narrowly focused on getting and (possibly) returning memory, change the function signature to take a `wmem_allocator_t *`. * If it seems more focused on packet-based operations, pass in a `packet_info *` instead and use `pinfo->pool` within. * If there are several functions defined with the same call signature, add `pinfo _U_` to the argument list of similar functions in order to maintain clarity/symmetry. [1]: https://www.wireshark.org/lists/wireshark-dev/202107/msg00052.html
2023-01-17ECATMB: Get filename with encoding when adding to columnJohn Thacker1-7/+7
When retrieving a string, don't just use tvb_memcpy, even if expected to be ASCII (because it might have errors.) This doesn't get truncated, even if all replacement characters, because the eventual returned buffer is 200 octets long and the max filename is 49. Fix #18800
2023-01-16Fix various issues seen with tools/check_typed_item_calls.pyMartin Mathieson1-20/+24
2022-10-08esl_eth: support nanosecond timestampsDavid Perry1-0/+1
Applies the patch from #18308, in lieu of original commenter doing so. Closes #18308
2022-07-23ECATMB: Add SDO Information to CANopenTypeUli Heilmeier1-0/+1
Fixes #18220
2022-06-16ethercat: Fix EEPROM Ctrl/Status bitmask fieldsJohn Thacker1-8/+9
When the field width was corrected by commit b240d5baa062a475ff0943b91205eb2aee2a0471, the masks got messed up. There's 4 reserved bits that don't have fields and the bits are in Little Endian order. Fix #18132.
2022-04-04CMake: Finish splitting ADD_PLUGIN_LIBRARY.Gerald Combs1-1/+1
Rename add_plugin_library to add_wireshark_plugin_library and add a backward compatibility wrapper. Make Falco Bridge a Logwolf plugin.
2022-02-04Trivial: change some formatting in hf item definitionsMartin Mathieson1-1/+1
2021-12-19Replace g_snprintf() with snprintf()João Valverde5-41/+41
Use macros from inttypes.h with format strings.
2021-10-11Fix some spelling errorsMartin Mathieson1-1/+1
2021-10-07Fix some field mask widths.Martin Mathieson1-20/+20
2021-10-06Ethercat: try to fix EEPROM Ctrl/Status bitmask fieldsMartin Mathieson1-12/+12
Fixes remaining errors detected by ./tools/check_typed_item_calls.py --mask
2021-09-22Fix the lengths of some masks.Martin Mathieson1-5/+5
2021-09-21ethercat: Fix some too-wide mask widths.Martin Mathieson2-30/+30
N.B. Some other issues spotted have been reported in https://gitlab.com/wireshark/wireshark/~/issues/17605
2021-07-13prefs_register_protocol_obsolete protocols with only obsolete prefsChuck Craft1-1/+1
Related to #17465 and !3526
2021-07-11More mask checks and some fixes.Martin Mathieson1-3/+3
2021-04-30Cast away the return value of g_strlcpy() and g_strlcat().Guy Harris1-7/+7
Most of the time, the return value tells us nothing useful, as we've already decided that we're perfectly willing to live with string truncation. Hopefully this keeps Coverity from whining that those routines could return an error code (NARRATOR: They don't) and thus that we're ignoring the possibility of failure (as indicated, we've already decided that we can live with string truncation, so truncation is *NOT* a failure).
2021-03-29CMake: Remove non existent '/codecs' include pathJoão Valverde1-2/+0
The '/codecs' dir was removed in g63af1da7e7. Avoid using include_directories(), prefer target_include_directories(). Remove some unnecessary CMAKE_CURRENT_*_DIR includes and some other small cleanups while at it.
2021-03-01CMake: Use CheckAPI's abort/termoutput with dissectors onlyJoão Valverde1-1/+2
I believe this was the original intention, to use these API restricitons with dissectors only (not that I necessarily agree with that policy either), and through copy-paste and lack of clear guidelines it spread to other parts of the build. Rename the checkAPI groups to make it very clear that this is dissector-only. This doesn't mean, of course, that good programming practices shouldn't be followed everywhere. In particular assertions need to be used properly. Don't use them to catch runtime errors or validate input data. This commit will be followed by another removing the various ugly hacks people have been using to get around the checkAPI hammer.
2020-09-05Tools: Clean up checkAPI and add ui/qt.Gerald Combs1-1/+1
Remove the --check-addtext and --build flags. They were used for checkAddTextCalls, which was removed in e2735ecfdd. Add the sources in ui/qt except for qcustomplot.{cpp,h}. Fix issues in main.cpp, rtp_audio_stream.cpp, and wireshark_zip_helper.cpp. Rename "index"es in packet-usb-hid.c.
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-41/+41
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-27HTTPS In More Places, update some URLs.Guy Harris1-1/+1
Change-Id: Ice2e1e2e4d94f6c9da7c651866cfa1a8ac4a31d8 Reviewed-on: https://code.wireshark.org/review/34096 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26HTTPS (almost) everywhere.Guy Harris8-8/+8
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-10doxygen: Try to fix warnings.Anders Broman1-2/+0
Change-Id: I1517c968f05e7d9c6b561c0f5a7c6a059462d175 Reviewed-on: https://code.wireshark.org/review/33889 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-09ethercat: add new hf item for sdo abort code.Richard Kuemmel2-3/+8
Add new hf item for sdo abort code and display abort code instead of index. Added check of APWR and FPRW to decide if an EtherCAT command is a mailbox command. Change-Id: I42877c26cb70c7567dc2d1b703e84aad8a3f7ac8 Reviewed-on: https://code.wireshark.org/review/33405 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-14/+14
Convert our various PROTO_ITEM_ macros to inline functions and document them. Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c Reviewed-on: https://code.wireshark.org/review/32706 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-27Try to squeeze some bytes out of the frame_data structure.Guy Harris1-2/+2
Make the time stamp precision a 4-bit bitfield, so, when combined with the other bitfields, we have 32 bits. That means we put the flags at the same structure level as the time stamp precision, so they can be combined; that gets rid of an extra "flags." for references to the flags. Put the two pointers next to each other, and after a multiple of 8 bytes worth of other fields, so that there's no padding before or between them. It's still not down to 64 bytes, which is the next lower power of 2, so there's more work to do. Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe Reviewed-on: https://code.wireshark.org/review/31213 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-18Older versions of Clang don't understand -Wpedantic.Guy Harris2-4/+4
Define DIAG_OFF_PEDANTIC and DIAG_ON_PEDANTIC, and have it do nothing on Clang prior to 4.0. Change-Id: Ic6b2e607659db66f3210401024bf3f2239665506 Reviewed-on: https://code.wireshark.org/review/27649 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
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 Lombardo1-77/+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-03-07spdx: more licenses converted.Dario Lombardo1-13/+1
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-17Don't have CLEAN_FILES variables for the "clean" source files.Guy Harris1-5/+1
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-09plugins: use SPDX identifiers.Dario Lombardo13-169/+13
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-04Have individual plugin CMakeLists.txt files add library dependencies.Guy Harris1-0/+2
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 Keuter1-1/+1
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-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 Valverde16-0/+9926
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>