aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ixveriwave.c
AgeCommit message (Collapse)AuthorFilesLines
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>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-2/+2
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-13Use result of register_dissectorPeter Wu1-1/+0
Assign result of `register_dissector(..., func, proto)` to FOO_handle and remove `FOO_handle = create_dissector_handle(func, proto)`. Found by looking for files named packet-FOO.c having the above create_dissector_handle pattern. Some files (with different dissect routines for the two functions) remain unchanged. Change-Id: Ifbed8202c6dbc63a1dae9acc03313980ffbbbb90 Reviewed-on: https://code.wireshark.org/review/13247 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-01-08Fix a lot of typos and misspellingsmoshekaplan1-1/+1
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3 Reviewed-on: https://code.wireshark.org/review/13069 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> 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>
2015-12-24Refactor 802.11 radio flags.Simon Barber1-13/+12
The use of a flag field here is aesthetically unpleasing when the flags are referred to frequently. Convert these into bitfield entries. Change-Id: I6f47e31558439dfd343ec7f856d04480366a1237 Reviewed-on: https://code.wireshark.org/review/12511 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c Reviewed-on: https://code.wireshark.org/review/12485 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-14register_dissector -> new_register_dissectorMichael Mann1-46/+30
Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I25fe6a0aac93980333217d007702799d16946563 Reviewed-on: https://code.wireshark.org/review/11816 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-04Expand, correct, and otherwise improve comments.Guy Harris1-2/+28
Change-Id: Id33a1a66114f6b01d203ad717342ae90c12981cc Reviewed-on: https://code.wireshark.org/review/10789 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-04Fix shortening error introduced by commit f28e23f1Graham Bloice1-2/+2
Change-Id: I6cab511f65a8ec89e7fa05cdacc9bb11ca0901ce Reviewed-on: https://code.wireshark.org/review/10779 Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-10-03Remove incorrect comment.Guy Harris1-1/+1
(-1 means "we don't know whether there's an FCS", not "there's no FCS".) Change-Id: I8e422e0351fddb12d6593f08da35288160ede616 Reviewed-on: https://code.wireshark.org/review/10768 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-03Fill in some 11ac fields in the pseudo-header.Guy Harris1-1/+7
But don't look for any VHT stuff unless FLAGS_CHAN_VHT is set. Change-Id: I3f464344bce3b0b5c5a06808d851ef9d559c05e8 Reviewed-on: https://code.wireshark.org/review/10767 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-03ixveriwave: initialize vw_msdu_lengthPascal Quantin1-6/+1
Remove an unused field while we are at it Change-Id: If9506642b298afa1ffbb7fa4eeb1dc534099328e Reviewed-on: https://code.wireshark.org/review/10762 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-03Clean up whitespace.Guy Harris1-5/+5
Change-Id: I9c9301d7eff85b68a892af7b8c1318d0bf8d29bf Reviewed-on: https://code.wireshark.org/review/10757 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-10-02Fix some issues with Series III.Guy Harris1-67/+330
The packet data in some records has an FCS and in some records doesn't. It appears that only the Series III packets do. Handle that. Handle HT and VHT information supplied by Series III. Get rid of an unused include while we're at it, and make the checks for whether the protocol tree is being built a bit clearer, by testing the tree pointer we'll actually be using. Make some style cleanups. Get rid of some unused cruft. Fix FPGA version checks. This is based on Ixia's patches to an older version of Wireshark, but is much cleaned up. Bug: 11464 Change-Id: Ia341e6ffb1771cf38be812bf786f59b3250b7d5b Reviewed-on: https://code.wireshark.org/review/10756 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-07Add #defines for various aggregation flags, and use them.Guy Harris1-13/+20
Fewer magic hex numbers, more readability. Change-Id: I698e0e9b28b75249c7dff5f1e1c7fbe0b4a93be2 Reviewed-on: https://code.wireshark.org/review/9543 Reviewed-by: Guy Harris <guy@alum.mit.edu>