aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-awdl.c
AgeCommit message (Collapse)AuthorFilesLines
2023-08-16Misc dissector fixesMartin Mathieson1-1/+1
2023-07-14Improve consistency of includesDr. Lars Völker1-3/+3
2023-06-27Fix more full item masks that should not be.Martin Mathieson1-5/+8
2023-06-26More checking labels vs filterMartin Mathieson1-1/+1
2023-05-16Use `register_dissector()` for more protocolsDavid Perry1-17/+17
Changes several calls of `create_dissector_handle()` to instead call `register_dissector()` with a name for the dissector. This should handle all dissectors in `epan/` from `packet-a*` to `packet-d*`. This change allows affected dissectors to be findable by calls to `find_dissector()`. In turn, this opens up more command-line use for these protocols, including fuzzshark and rawshark, as well as lua use via `Dissector.get()`. Where needed, move the call from the protocol handoff function to the protocol register function, and use `find_dissector()` in the handoff function. There were some calls to `create_dissector_handle()` or `register_dissector()` which passed `-1` as the protocol argument. When I saw those I corrected them to pass the actual `proto_foo` identifier instead. Partially addresses #5612
2023-02-25Change some `wmem_packet_scope()` to `pinfo->pool`David Perry1-14/+14
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-25Fix some spelling errors.Martin Mathieson1-1/+1
2022-12-15tools/check_typed_item_calls: check FT_BOOLEAN mask lengthMartin Mathieson1-32/+32
2022-12-03wmem: Remove strbuf max size parameterJoão Valverde1-2/+2
This parameter was introduced as a safeguard for bugs that generate an unbounded string but its utility for that purpose is doubtful and the way it is being used creates problems with invalid truncation of UTF-8 strings. Rename wmem_strbuf_sized_new() with a better name.
2022-02-15Tools: Fix fix-encoding-args.pl ASCII string validationJoão Valverde1-1/+1
Do not require a useless ENC_NA parameter for string encodings. FT_STRING and FT_STRINGZ types don't have any ndianness. Follow-up to 6ec429622c9258eefd388caf21ce92ab5b9f54b4.
2021-07-29More fussing with masks.Martin Mathieson1-16/+16
Mostly longer masks with odd numbers of digits.
2020-11-15awdl: fix item lengthAlexis La Goutte1-1/+1
reported by check_typed_proto_items.py packet-awdl.c:889 proto_tree_add_item called for hf_awdl_electionparams_private_phc - item type is FT_UINT32 but call has len 2
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-8/+8
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-05-09Fix dissection of gatewayed/bridged LLAP packets.Guy Harris1-8/+8
EtherTalk and TokenTalk frames use LLC/SNAP headers with an OUI of 08:00:07 and a PID of 0x809B. Frames with an Ethertype of 0x809B - either as the Ethertype field of an Ethernet frame or as the PID, in combination of an OUI of 00:00:00, of an LLC/SNAP frame - have an LLAP frame, complete with an LLAP header, as the payload. Don't treat 08:00:07 as a special case - register it as an OUI and give it a dissector table, and register the DDP dissector in that dissector table with ETHERTYPE_ATALK. Register the LLAP dissector in the "ethertype" table with the Ethertype ETHERTYPE_ATALK. This means we now have two separate LLC+SNAP PID tables for Apple; name them appropriately. That also means we need to add packet-atalk.c to the list of files allowed to add "llc." named fields. Change-Id: I00bafd692f83f73bd347628cb9e950863c26a2b7 Reviewed-on: https://code.wireshark.org/review/33125 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-24dissectors: remove execute bits from awdl, gbcs, pcomtcpPeter Wu1-0/+0
Change-Id: I82fb3dabc999a43561be0e438e4ded73d198bfa9 Reviewed-on: https://code.wireshark.org/review/32970 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-1/+1
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-11-29Add Apple Wireless Direct Link (AWDL) dissectorMilan Stute1-0/+2671
More information on Apple's proprietary AWDL protocol can be found in Milan Stute, David Kreitschmann, and Matthias Hollick. "One Billion Apples' Secret Sauce: Recipe for the Apple Wireless Direct Link Ad hoc Protocol" in ACM MobiCom '18. https://doi.org/10.1145/3241539.3241566 Bug: 15245 Change-Id: I5ce18125b3c957f338909e46f18e30405a3d3941 Reviewed-on: https://code.wireshark.org/review/30413 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>