aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ieee80211.c
AgeCommit message (Collapse)AuthorFilesLines
2012-03-07Fix incorrect packet-details display of certain 1 bit FT_BOOLEAN fields.Bill Meier1-3/+3
(Use a valid 'parent field width' in the hf[] 'display' field. svn path=/trunk/; revision=41396
2012-03-06Don't use FT_*INT with true_false strings: the code to generateJeff Morriss1-2/+2
representations of former is expecting value_strings--which are quite different than the latter. svn path=/trunk/; revision=41362
2012-02-16Let part of the patch speak for itself:Jörg Mayer1-3/+25
{ &hf_ieee80211_addr, - {"Source or Destination address", "wlan.addr", FT_ETHER, BASE_NONE, NULL, 0, - "Source or Destination Hardware Address", HFILL }}, + {"Hardware address", "wlan.addr", FT_ETHER, BASE_NONE, NULL, 0, + "SA, DA, BSSID, RA or TA Hardware Address", HFILL }}, svn path=/trunk/; revision=41038
2012-02-14- dissect_vendor_ie_atheros:Jörg Mayer1-20/+29
Remove tag_len parameter - it was redundant. The length passed no longer contains the vendor id. - add_tagged_field / TAG_VENDOR_SPECIFIC_IE: Reorder so that the ieee "standard" vendor ids come fist, after that the really vendor specific stuff. svn path=/trunk/; revision=41027
2012-02-13In a loop of the formGuy Harris1-12/+14
for (i = 1; i <= N; i++) ... the type of "i" must have, as its maximum value, a value >= the maximum value of N; otherwise, if N is equal to the maximum value that fits in "i", the loop willnever terminate. (If that requires "i" to be larger than you'd like, do the loop as for (i = 0; i < N; i++) ... which doesn't have that problem.) Clean up the "i = 1" clause's white space in those for loops. svn path=/trunk/; revision=41010
2012-02-11Don't use 16-bit integers as counters. The code won't be any faster onGuy Harris1-3/+5
anything that can run Wireshark (it might be slower), and if the maximum count value is 16-bit, you can loop forever if the maximum count value happens to be 65535. (Yes, this means that guint i, j; ... for (i = 0; i < j; i++) ... risks looping forever if j is 2^32-1, and the same applies to 64-bit counters. There are probably fewer protocols with 32-bit counts, and probably even fewer with 64-bit counts, but the way it should be done in those cases, for safety, is i = 0; for (;;) { if (i >= j) break; ... if (i == j - 1) break; } or something such as that.) Fixes bug 6809. #BACKPORT Will schedule for 1.6.x. svn path=/trunk/; revision=40967
2012-02-09Eliminate a C++/C99-style comment.Jeff Morriss1-2/+2
svn path=/trunk/; revision=40942
2012-02-09Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-11/+10
svn path=/trunk/; revision=40940
2011-12-09From beelzebutt via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6597Alexis La Goutte1-1/+1
Mesh Peering Management reason code field interpreted as status code The Mesh Peering Management tag displays a status code instead of a reason code svn path=/trunk/; revision=40132
2011-12-09From Johannes BergJaap Keuter1-1/+24
It's tedious to parse the blockack bitmap by hand, showing it in wireshark directly is much nicer. Attached patch does so, only for compressed BA for now. From me: made it filterable. svn path=/trunk/; revision=40126
2011-11-27Don't specify an hf[] item as using a range_string when it's really using a ↵Bill Meier1-1/+1
value_string. Fixes Bug #6618 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6618 svn path=/trunk/; revision=40020
2011-11-08Remove a duplicate "TID" found by checkAPIs.pl.Gerald Combs1-1/+1
svn path=/trunk/; revision=39755
2011-11-08From Pontus Fuchs via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6548Alexis La Goutte1-0/+10
80211 QoS Control: Add Raw TID svn path=/trunk/; revision=39754
2011-11-01Remove comma at the end of several enumerator lists.Jeff Morriss1-3/+3
svn path=/trunk/; revision=39700
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-20Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.Bill Meier1-67/+67
(Some minor whitespace cleanup). svn path=/trunk/; revision=39488
2011-10-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-3/+3
(previously missed). 57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN 31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN 10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA 1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA 21 FT_BYTES: FALSE-->ENC_NA 2 FT_BYTES: TRUE-->ENC_NA 2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA 6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA 1 FT_IPv6: FALSE-->ENC_NA 6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA 19 FT_NONE: FALSE-->ENC_NA 3 FT_NONE: TRUE-->ENC_NA 1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA 1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA 5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA 1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA 4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA 8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA 1 FT_INT32: FALSE-->ENC_BIG_ENDIAN 1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN 11 FT_UINT8: 0-->ENC_BIG_ENDIAN 111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN 17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT16: 0-->ENC_BIG_ENDIAN 68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN 18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN 70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN svn path=/trunk/; revision=39442
2011-10-16From Jouni Malinen: Anders Broman1-6/+121
Reassemble GAS Query Response if needed. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6443 svn path=/trunk/; revision=39440
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-13/+13
FT_STRINGZ, FT_UINT_STRING as follows: 1. If there's no character encoding (ENC_ASCII, ...) specified then use ENC_ASCII. 2. For all but FT_UINT_STRING, always use ENC_NA (replacing any existing True/1/FALSE/0 /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN). svn path=/trunk/; revision=39426
2011-10-12From Jouni Malinen: Anders Broman1-1099/+0
Move sniffer meta data parsing to separate files packet-ieee80211.c includes dissectors for three different styles of IEEE 802.11 sniffer meta data (like signal strength). Move these to separate files in the same style as a fourth format (radiotap) was already handled, so that packet-ieee80211.c focuses on the actual IEEE 802.11 frame dissecting. This reverts http://anonsvn.wireshark.org/viewvc?revision=23911&view=revision Objections? https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6443 svn path=/trunk/; revision=39379
2011-10-12Fix a case wherein proto_tree_add_boolean() was intended instead of ↵Bill Meier1-3/+3
proto_tree_add_item(). Also: Use proto_tree_add_boolean() instead of proto_tree_add_item() for code consistency in 2 other cases. svn path=/trunk/; revision=39378
2011-10-11From Jouni Malinen: Anders Broman1-208/+173
Dissect Time Advertisement and Time Zone elements. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6443 svn path=/trunk/; revision=39371
2011-10-11From Jouni Malinen: Anders Broman1-244/+413
ieee80211: Start splitting add_tagged_field into helper functions. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6443 svn path=/trunk/; revision=39370
2011-10-11From Jouni Malinen: Anders Broman1-84/+83
Simplify tag_num_vals. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6443 svn path=/trunk/; revision=39369
2011-10-11From Jouni Malinen: Anders Broman1-1/+211
Dissect WNM (IEEE 802.11v) information. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6443 svn path=/trunk/; revision=39368
2011-10-11From Jouni Malinen: Anders Broman1-1/+1
Wi-Fi P2P: Show frame name in col_info Make it easier to find specific P2P frames by adding the name of the P2P Public Action frames into col_info. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6443 svn path=/trunk/; revision=39367
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-3/+3
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-09From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6422Alexis La Goutte1-188/+135
Clean up IEEE 802.11 dissector - fixed fields Many of the fixed fields use similar bitfield construction in the proto_tree. Use proto_tree_add_bitmask() to avoid having to implement the same subtree and item addition separately for each field. svn path=/trunk/; revision=39322
2011-10-08From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6422Alexis La Goutte1-69/+73
Clean up IEEE 802.11 dissector - fixed fields The fixed field identifiers were defined to have specific values. However, this is used only within the parser and does not correspond to any specific packet field. As such, there is no need for the specific values to be maintained and an enum makes it simpler to add and remove these fields as needed. svn path=/trunk/; revision=39315
2011-10-08From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6422Alexis La Goutte1-994/+1310
Clean up IEEE 802.11 dissector - fixed fields The app_fixed_field() function has grown to overly complex and long function. Split it into separate helper functions for each fixed field and a table of dissector functions. This makes it easier to extend and maintain the implementation. svn path=/trunk/; revision=39314
2011-10-08From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6421Alexis La Goutte1-7/+50
IEEE 802.11u ANQP enhancements Dissect vendor-specific ANQP Capabilities svn path=/trunk/; revision=39313
2011-10-08From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6421Alexis La Goutte1-1/+208
IEEE 802.11u ANQP enhancements Dissect NAI Realm List svn path=/trunk/; revision=39312
2011-10-08From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6420Alexis La Goutte1-2/+2
WPA IE pairwise cipher suite dissector uses incorrect value_string list From me : * Use correct value_string for WPA Key MGMT... svn path=/trunk/; revision=39311
2011-10-06Fix for bug 6356:Jaap Keuter1-5/+7
Wireshark encounters error while parsing ieee80211 QoS Null data. The error is because of invalid read when trying to read mesh_flags (after the header), which doesn't exist. svn path=/trunk/; revision=39295
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-5/+5
non-autogenerated epan/dissectors: Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_UINT8 FT_UINT16 FT_UINT24 FT_UINT32 FT_UINT64 FT_INT8 FT_INT16 FT_INT24 FT_INT32 FT_INT64 FT_FLOAT FT_DOUBLE svn path=/trunk/; revision=39288
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-40/+40
reference an hf item (in hf[] with types: FT_NONE FT_BYTES FT_IPV6 FT_IPXNET FT_OID Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN svn path=/trunk/; revision=39260
2011-09-30From Clemix via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6408Alexis La Goutte1-4/+129
Dissector for ieee802.11e QoS Info field of QoS Capability Element(46) is missed From me : * Fix checkAPIs error (Found non-ASCII characters) svn path=/trunk/; revision=39193
2011-09-27From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6359Alexis La Goutte1-163/+150
IEEE 802.11 dissector shows duplicated proto item for Action category Action frame dissecting is first adding hf_ieee80211_action (wlan_mgt.fixed.action) field before the category-based processing. Immediately after that, the per-category implementations are adding FIELD_CATEGORY_CODE (hf_ieee80211_ff_category_code, i.e., wlan_mgt.fixed.category_code) to the proto tree for the exact same octet. Remove hf_ieee80211_action to avoid the duplicated item in the tree. In addition, remove the now unused action_item and action_tree variables. svn path=/trunk/; revision=39169
2011-09-21Fix ex "modeline" so it works;Bill Meier1-1/+1
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748 svn path=/trunk/; revision=39081
2011-09-16Change encoding type from TRUE/FALSE to ENC_LITTLE_ENDIAN/ ENC_BIG_ENDIANAnders Broman1-567/+567
svn path=/trunk/; revision=39025
2011-09-16From Jouni Malinen:Anders Broman1-4/+19
If the GAS Query Request/Response Length field is incorrect, the dissector function may return a value that is larger than the remaining packet buffer. This results in a Tagged parameters item being added with -1 byte length since tvb_reported_length_remaining() reports -1 once the offset goes beyond the end of the packet. Clicking on that item results in Wireshark dying on Gtk-ERROR. Note: this does not show up in tshark and as such, cannot apparently be triggered with fuzz-test.sh. Fix this by refusing to dissect GAS frames that have too large length field value. In addition, verify that tvb_reported_length_remaining() is returning a value larger than 0 instead of non-zero (which could be -1) to make the IEEE 802.11 dissector more robust against this type of issues. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6345 svn path=/trunk/; revision=39024
2011-09-16From Jouni Malinen:Anders Broman1-1/+336
- Dissect ANQP Network Authentication Type - Dissect ANQP Domain Name List - Dissect Interworking element - Dissect Roaming Consortium element https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339 svn path=/trunk/; revision=39023
2011-09-15From Jouni Malinen:Anders Broman1-0/+92
-Dissect ANQP Roaming Consortium list -Dissect ANQP IP Address Type Availability https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339 svn path=/trunk/; revision=39016
2011-09-15From Jouni Malinen:Anders Broman1-0/+23
Dissect ANQP Capability List https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339 svn path=/trunk/; revision=39015
2011-09-15From Jouni Malinen:Anders Broman1-0/+78
Dissect ANQP Venue Name info https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339 svn path=/trunk/; revision=39014
2011-09-15From Jouni Malinen:Anders Broman1-0/+23
Dissect ANQP Query List https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339 svn path=/trunk/; revision=39013
2011-09-15From Jouni Malinen:Anders Broman1-0/+5
Append ANQP information to COL_INFO https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339 svn path=/trunk/; revision=39012
2011-09-15From Jouni Malinen:Anders Broman1-1/+1
Remove unnecessary Action subtree https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339 svn path=/trunk/; revision=39011
2011-09-15From Jouni Malinen:Anders Broman1-34/+55
ieee80211: Support multiple ANQP info elements in response ANQP Query Response may include multiple ANQP info elements. Parse each one of these separately. In addition, clean up three ANQP subtrees to avoid the unnecessary subtree at higher layer and instead, use a separate subtree for each ANQP info elements. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339 svn path=/trunk/; revision=39008
2011-09-15From Jouni Malinen:Anders Broman1-4/+6
ieee80211: Show ANQP adv proto on subtree title line This makes it easier to get the most significant information from the Advertisement Protocol element in GAS messages without having to expand subtrees. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6339 svn path=/trunk/; revision=39007