aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ixveriwave.c
AgeCommit message (Collapse)AuthorFilesLines
2024-08-07Dissectors: Include what you use.Anders Broman1-0/+2
2024-08-07Add a UNS() macro, similar to TFS().Guy Harris1-21/+21
As "TFS" stands for "true_false_string", "UNS" stands for "unit_name_string".
2024-07-17epan: convert dissectors I to C99 typesJoakim Karlsson1-160/+160
Ping #19116
2024-06-09Prefer col_add_str() to col_add_fstr() with "%s"Martin Mathieson1-1/+1
2024-04-17Fix some spelling errorsMartin Mathieson1-5/+5
2024-04-14epan: Switch proto_tree_add_item_ret_boolean to boolsGerald Combs1-19/+19
Ping #19116
2024-04-05Remove init to zero for static variablesStig Bjørlykke1-1/+1
The C standard requires that objects with static storage duration is initialized to zero.
2024-01-25Fix more FT_BOOLEAN items with no mask - set len to BASE_NONEMartin Mathieson1-2/+2
2023-11-20Remove init of proto variablesStig Bjørlykke1-399/+399
Remove init of proto, header field, expert info and subtree variables. This will reduces the binary size by approximate 1266320 bytes due to using .bss to zero-initialize the fields. The conversion is done using the tools/convert-proto-init.py script.
2023-02-24Fix more warnings from tools/check_typed_item_calls.pyMartin Mathieson1-14/+14
2023-01-21Checked encoded values for proto_tree_add_item()Martin Mathieson1-12/+11
2021-10-04Fix some items where mask was wider than field.Martin Mathieson1-1/+1
Detected by ./tools/check_typed_item_calls.py --mask Error: epan/dissectors/packet-asterix.c filter= asterix.021_161_TN 0x0fff with len is 4 but type FT_UINT8 indicates max of 2 and extra digits are non-zero (0f) Error: epan/dissectors/packet-capwap.c filter= capwap.control.message_element.ieee80211_station_session_key.flags_a 0x2000 with len is 4 but type FT_BOOLEAN indicates max of 1 and extra digits are non-zero (200) Error: epan/dissectors/packet-capwap.c filter= capwap.control.message_element.ieee80211_station_session_key.flags_c 0x1000 with len is 4 but type FT_BOOLEAN indicates max of 1 and extra digits are non-zero (100) Error: epan/dissectors/packet-cfdp.c filter= cfdp.trans_stat_2_b 0x6000 with len is 4 but type FT_UINT8 indicates max of 2 and extra digits are non-zero (60) Error: epan/dissectors/packet-cfdp.c filter= cfdp.suspension_ind_b 0x8000 with len is 4 but type FT_UINT8 indicates max of 2 and extra digits are non-zero (80) Error: epan/dissectors/packet-ixveriwave.c filter= ixveriwave.tx.factorydebug 0x7f80 with len is 4 but type FT_UINT8 indicates max of 2 and extra digits are non-zero (7f)
2020-08-29Fix more spelling errors in dissector strings.Martin Mathieson1-4/+4
A second batch of spelling errors, detected using a script that uses pyspellcheck and a Wireshark-specific dictionary file. I will take at least one more pass through the dissectors, as further improvements are made to the script.
2020-08-12Fix some cases where item mask was wider than item type.Martin Mathieson1-6/+0
Error: epan/dissectors/packet-docsis.c filter= docsis.ehdr.rsvd FT_UINT8 so field_width= 8 but mask is 0x3FFF which is 14 bits wide! Error: epan/dissectors/packet-ixveriwave.c filter= ixveriwave.contextp.agc FT_BOOLEAN so field_width= 1 but mask is 0x0038 which is 3 bits wide! N.B. The ixveriwave field was not in use, so was deleted. Change-Id: Ife73eb9204f7339cc0fe2b4e991f0df553823ffe Reviewed-on: https://code.wireshark.org/review/38140 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-12/+12
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-26HTTPS (almost) everywhere.Guy Harris1-1/+1
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-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-3/+3
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-04-10Add, and use, "fetch signed value" for lengths < 40 bits.Guy Harris1-9/+9
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-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a Reviewed-on: https://code.wireshark.org/review/25756 Petri-Dish: Dario Lombardo <lomato@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-16Have two separate routines for wlantap dissection - OCTO and pre-OCTO.Guy Harris1-868/+904
The two code paths don't share any code, so they might as well be in separate routines. That makes it even easier to read. Change-Id: I8ee335f4cac2aedc42216db7f9674e1a609d9347 Reviewed-on: https://code.wireshark.org/review/22179 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-06-16Further cleanup.Guy Harris1-50/+24
Move some commented-out code where it belonged, and #if 0 it out instead. Have only *one* test for OCTO. Change-Id: I6e8803f936ebd88f1705b2185f034ec0b2bddb77 Reviewed-on: https://code.wireshark.org/review/22177 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-16Clean up the 802.11 payload handling a bit.Guy Harris1-6/+10
Two separate checks for OCTO, one right after the other, is a bit confusing. Change-Id: I702aa1809dc7271b69b5419dc850228fac516ed6 Reviewed-on: https://code.wireshark.org/review/22175 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09You can't have a field be both integer and string.Guy Harris1-6/+1
For an inter-frame gap that couldn't be determined, just add it with proto_tree_add_uint_format_value() and "Cannot be determined" as the way the value is displayed. (But why add it *at all* if it couldn't be determined?) Change-Id: I491f9a6fe430141a15568e9a7dec3253a1c78cf5 Reviewed-on: https://code.wireshark.org/review/21582 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09Give fields better names than ".bitN".Guy Harris1-587/+559
".bitN" names 1) don't indicate what the bit actually *means* and 2) run the risk of collisions if the bit in question has a different meaning in different bitsets. Combine the "receive case" and "transmit case" bitsets in some cases where the only difference between the two sets is that some bits are present only in one set, but if a bit is present in both sets, it has the same meaning. Change-Id: Ie1cb9d076e431b30b64ef05acab39efe38193d33 Reviewed-on: https://code.wireshark.org/review/21581 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09De-capitalize "error" - it's not capitalized in other field names.Guy Harris1-1/+1
Change-Id: I6f5aaaba47ab8d36124aa10c63ceec7cf1f70867 Reviewed-on: https://code.wireshark.org/review/21580 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-09Fix various field names and types.Guy Harris1-78/+30
Make some names used for multiple fields more stylistically consistent. If a bitfield has more than one bit, it's not Boolean - the extra bits mean it has more values than "true" or "false". If a bitfield has only one bit, and indicates that something is true/false, or enabled/disabled, or present/absent, or on/off, or something else obviously Boolean, it's Boolean. Change-Id: I89d5e214eb5c4e7f72eb59a78757f0f49fec3dbf Reviewed-on: https://code.wireshark.org/review/21579 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-07ixveriwave: Fix maybe-uninitialized warningUli Heilmeier1-1/+1
Fix maybe-uninitialized warning: packet-ixveriwave.c:2508:16: error: 'rate_mcs_index' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (rate_mcs_index < 4) Change-Id: I878f8d68104cf4f01990eebea85cfbb2a170a5bd Reviewed-on: https://code.wireshark.org/review/21553 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2017-05-07Clean up various things.Guy Harris1-1150/+1158
Sort the hf_ definitions, and the entries for them, as much as possible by the order in which they're put into the protocol tree. Indicate which if statement branches are for pre-OCTO hardware and which are for OCTO hardware. Pre-HT PHYs don't have an MCS index; the "MCS index" is, rather, an index into a table of bit rates, so call it a "rate index". Fill in some more 802.11 radio pseudoheader fields. Use proto_item_append_text to indicate the direction in the entry for the L1 information. Don't show irrelevant fields, such as the preamble length for HT and VHT. Change-Id: Ibd2baff09fd4ec6e4a84dc0ae2e4615631a2d15e Reviewed-on: https://code.wireshark.org/review/21550 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-06ixveriwave: Fix Dead Store (Dead assignement/Dead increment) Warning found ↵Alexis La Goutte1-8/+3
by Clang Change-Id: Ia4ff13fb9ab57ad6749ffdcb4a2b2243c98747b6 Reviewed-on: https://code.wireshark.org/review/21515 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-05-06Comments to indicate which bits of the header we're looking at.Guy Harris1-0/+2
Change-Id: I7b1c924af9d23894ff79767bbb1290b60d36e298 Reviewed-on: https://code.wireshark.org/review/21533 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-05Fix previous change.Guy Harris1-5/+6
Change-Id: I6093d9f5d498c003d14e4f3cec4220eb191d550e Reviewed-on: https://code.wireshark.org/review/21506 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-04Use proto_tree_add_item_ret_uint() for the RFID.Guy Harris1-11/+11
Do some whitespace cleanup while we're at it. Change-Id: I1c55ce916b6d8344736f5732130613f63cf4d60f Reviewed-on: https://code.wireshark.org/review/21502 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-02Improve the handling of the PLCP header.Guy Harris1-661/+651
Dissect the PLCP headers in a bit more detail, and use bit fields. Use common code. Change-Id: I8711cba71894bebf94f17fdba98b28cc7a620f81 Reviewed-on: https://code.wireshark.org/review/21448 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-05-01Fill in more fields of the 802.11 radio metadata structure.Guy Harris1-31/+125
Also, use #defines for the PLCP type, and add some comments about the PLCP format, and fill in the "short GI" flag from the PLCP header. Change-Id: Ia3c44cc12feb87c181783e9dc37fe0877d1e2a81 Reviewed-on: https://code.wireshark.org/review/21441 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-05-01Replace some proto_tree_add_uint() calls with proto_tree_add_item().Guy Harris1-30/+21
If we're fetching a value only to use it in proto_tree_add_uint(), we might as well just use proto_tree_add_item(). Change-Id: I504c54f972b2844f57f25c9ffc89c142c8dc495f Reviewed-on: https://code.wireshark.org/review/21440 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-30Remove now-unused variables and code and unnecesary headers.Guy Harris1-14/+0
We're not doing any CRC stuff here - that's the job of the 802.11 dissector, which does it Just Fine - so remove what remains of the stuff for it. Change-Id: If6a0113dec7773b3b4daa7fa014f02c6a97eca0d Reviewed-on: https://code.wireshark.org/review/21433 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-30Pass inforation from dissect_ixveriwave() to wlantap_dissect().Guy Harris1-19/+30
Always set log_mode - if the command type is 3, set log_mode to 0, as it's not supplied by the libwiretap code. Pass log_mode and is_octo from dissect_ixveriwave() to wlantap_dissect(). Test is_octo in wlantap_dissect(), just as we do in dissect_ixveriwave(). Change-Id: I536ca59f01e644d55e541df6d2e119db590ae48a Reviewed-on: https://code.wireshark.org/review/21432 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-30packet-ixveriwave.c: Initialize mgmt_byteMichael Mann1-1/+1
Suppress Ubuntu warning Change-Id: Ia95e19d59b768b6842ca58051ffbd97dce84174c Reviewed-on: https://code.wireshark.org/review/21426 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Uli Heilmeier <openid@heilmeier.eu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-30Get rid of some unused cruft, and rename an hf_ variable.Guy Harris1-25/+4
Change-Id: Ib74efc765d354b32b40ff298125d4e08f0eb3c2e Reviewed-on: https://code.wireshark.org/review/21420 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-30The encryption type field is part of a 16-bit bitfield.Guy Harris1-1/+1
Set its type accordingly. Change-Id: I3f80828d9e248235db6f4b30f02ada6b6786d25a Reviewed-on: https://code.wireshark.org/review/21419 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-30There's no "FCS is present" flag passed up from libwiretap.Guy Harris1-50/+2
For Ethernet, the FCS is absent; for 802.11, the Series I and II hardware doesn't provide an FCS, but the Series III hardware appears to. Get rid of the flag bit, and a bunch of other dead code (probably inherited by copy-and-paste). Change-Id: I44301c8211c25a5665eb528ac657925931d3f0b4 Reviewed-on: https://code.wireshark.org/review/21418 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-30Series III packets appear to have an FCS at the end.Guy Harris1-4/+4
Change-Id: I9c4ba78cba4cb32a1473c6b8573880f2b56f1fde Reviewed-on: https://code.wireshark.org/review/21417 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-30Get rid of unused flag bits and #defines.Guy Harris1-45/+1
The "sent/received during CFP", "sent/received with fragmentation" and "frame has padding between 802.11 header and payload" flag bits are never set by wiretap/vwr.c, so don't test them. They're copied over from radiotap, but this is *not* radiotap. Also, get rid of a bunch of unused #defines, and one instance of a duplicate #define. Again, they're copied over from radiotap, but this is *not* radiotap. Change-Id: I1d62e6400fb21c40512005d88cbc06d8576e8183 Reviewed-on: https://code.wireshark.org/review/21416 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-30Fix broken test for new Series III metadata header.Guy Harris1-19/+60
Add some comments while we're at it. Change-Id: I87f97ab640d9a02c01923867d3d3b91e755d0e40 Reviewed-on: https://code.wireshark.org/review/21413 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-29Fields added with proto_tree_add_bitfield() must have an integral type.Guy Harris1-4/+4
Change-Id: I314e192d1d2b6dbe1e098438ba4f407c9b5b6b14 Reviewed-on: https://code.wireshark.org/review/21411 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-29Fix some field type errors.Guy Harris1-3/+3
Don't add FT_BOOLEAN and FT_NONE fields with proto_tree_add_uint(). Change-Id: I3c89aa161775fc639e6a7306282b55649a3c473a Reviewed-on: https://code.wireshark.org/review/21406 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-29Improve ixveriwave dissectorMichael Mann1-688/+3327
Bug: 13652 Bug: 12535 Change-Id: Ie4c140acbe983a585776bc1430cf407cdcd6e07a Reviewed-on: https://code.wireshark.org/review/21356 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-12-16Adjust proto_tree_add_xxx_format_value calls to use unit stringMichael Mann1-24/+18
proto_tree_add_uint_format_value had the most use of unit strings, this patch handles all of the other proto_tree_add_xxx_format_value calls that could be better served using BASE_UNIT_STRING with a "unit string" in hf_ field. Added more "common" unit string values to unit_strings.[ch] Change-Id: I0fb680be781e10037eb7bd40dd21a9ee20c1fb1c Reviewed-on: https://code.wireshark.org/review/19288 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-2/+2
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector. Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector. "data" dissector was not considered to be a dependency. Change-Id: I15d0d77301306587ef8e7af5876e74231816890d Reviewed-on: https://code.wireshark.org/review/14509 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+2
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>