Commit Graph

21 Commits

Author SHA1 Message Date
Guy Harris a4b61bc069 gryphon: fix handling the ioctl code in a response.
It's not in the response message, it's taken from the request message,
so display it with a zero offset and length, so it doesn't match any
bytes in the packet.

It's a 32-bit field, so make it an FT_UINT32.
2023-02-21 00:34:05 -08:00
Martin Mathieson f4e9b9d4a8 Check that value_string values fit into field width 2023-02-20 08:33:34 +00:00
Martin Mathieson 4dd78f11c9 Fix various issues seen with tools/check_typed_item_calls.py 2023-01-16 15:35:04 +00:00
Moshe Kaplan 69d54d6f8e Corrects repeated words throughout the code.
Repeated words were found with:
egrep "(\b[a-zA-Z]+) +\1\b" . -Ir
and then manually reviewed.
Non-displayed strings (e.g., in comments)
were also corrected, to ease future review.
2021-12-22 11:01:11 +00:00
John Thacker ca71d1624c gryphon: Create pkt_info if it doesn't exist
Try to retrieve the per packet info data first, and create it if
it doesn't exist, rather than assuming it is there on the second
pass. Prevents segfaults in cases with strange TCP sequence issues
(that still show up as bugs in the TCP dissector.) Fix #17737.
2021-11-21 09:23:07 -05:00
Guy Harris 1ab3711132 gryphon: explain in detail why we can't import tfs strings from libwireshark. 2021-08-25 17:29:59 -07:00
Evan Huus 9311982664 plugins: convert to pinfo->pool
Convert all plugin dissectors from wmem_packet_scope to pinfo->pool.
2021-08-25 14:30:47 +00:00
Guy Harris a70c120a04 gryphon: get rid of unused variables.
Found by cppcheck.
2021-08-25 08:57:47 +00:00
Martin Mathieson 8b4e0148a2 Fix some more wrong filter names.
These are duplicates detected seen by running
check_typed_item_calls.py  --consecutive.

There are still quite a few more to go.
2020-09-28 18:20:09 +01:00
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
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>
2020-06-19 11:32:26 +00:00
Michael Mann b28952afd4 gryphon: General cleanup/improvements of dissector
1. Use switch statement for request/response functions
2. Reorder functions to limit the need for forward declarations
3. Use proto_tree_add_item_ret_uint and proto_tree_add_item_ret_length to
limit "duplicate" functionality.
4. Create initial (simple) request/response matching.  This can probably be
improved upon.
5. Use the request/response matching structures to pass (ioctl) context between
request and response.

Change-Id: I3f4c16c07f4b3aa9556d229d003a4842ff118cd9
Reviewed-on: https://code.wireshark.org/review/34404
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-01 09:02:19 +00:00
Michael Mann 627917faff Gryphon: Prevent endless loop
Bug: 16020
Change-Id: I59c24d3bdb3f3a85f6e498683594ee12db9642a8
Reviewed-on: https://code.wireshark.org/review/34392
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-29 14:47:28 +00:00
Guy Harris 5cf3fd03f1 HTTPS In More Places, update some URLs.
Change-Id: Ice2e1e2e4d94f6c9da7c651866cfa1a8ac4a31d8
Reviewed-on: https://code.wireshark.org/review/34096
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-27 07:55:36 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
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-26 18:44:40 +00:00
Gerald Combs 8d3ac3af86 epan: Convert our PROTO_ITEM_ macros to inline functions.
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>
2019-04-04 04:03:38 +00:00
ciechanowski fa27833548 Removed assert which was only used for debugging.
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-13 18:17:21 +00:00
Alexis La Goutte ab7fbb7395 gryphon: fix 'gryphon.usdt.action_flags' exists multiple times with NOT 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-11 00:56:04 +00:00
Alexis La Goutte 7ddfccec19 gryphon: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I08b59156dbe537c6c4a6b3502ab469c88e984b67
Reviewed-on: https://code.wireshark.org/review/26357
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-08 12:42:27 +00:00
ciechanowski cc45082635 Gryphon Protocol dissector fixes and updates.
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-07 22:06:16 +00:00
Dario Lombardo d2d1f793f8 plugins: use SPDX identifiers.
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-09 14:12:48 +00:00
João Valverde 5352ef42f9 plugins: Add source tree subfolder for plugin library
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>
2018-01-16 08:51:37 +00:00