Commit Graph

519 Commits

Author SHA1 Message Date
Jakub Zawadzki d99fdfda63 Replace macros: BSWAP16, BSWAP32, BSWAP64 with glib-version.
XXX, people are not aware that expression of this macros might be evaluated multiple times, like:
 -  BSWAP16(tvb_get_letohs(tvb, off)) : \
 +  GUINT16_SWAP_LE_BE(tvb_get_letohs(tvb, off)) : \

Should be tvb_get_ntohs() called?


svn path=/trunk/; revision=53653
2013-11-29 19:21:20 +00:00
Jakub Zawadzki 5ac6474c94 Rename some of pint.h macros to match common style (bits number on the end).
pntohs  -> pntoh16
   pntohl  -> pntoh32
   pletohs -> pletoh16
   pletohl -> pletoh32
   phtons  -> phton16
   phtonl  -> phton32


svn path=/trunk/; revision=53652
2013-11-29 18:59:06 +00:00
Michael Mann 9fa6c9fb80 Create new dissectors when a protocol goes across ethernet and "something else" instead a single dissector that uses pinfo->ethertype to determine if it's the "ethernet" or the "something else" case.
svn path=/trunk/; revision=53488
2013-11-21 19:51:17 +00:00
Alexis La Goutte 374683f052 Fix indent (2 spaces) and remove trailing whitespace
svn path=/trunk/; revision=53392
2013-11-17 14:28:42 +00:00
Jakub Zawadzki 4f78d3c69b Don't include <epan/bitswap.h> when not needed
svn path=/trunk/; revision=53364
2013-11-16 09:11:26 +00:00
Jakub Zawadzki b5916f0f12 Expand CHECK_DISPLAY_AS_X ('this macro looks like a hack') macro in packet-ieee80211.c, remove it.
svn path=/trunk/; revision=53327
2013-11-14 22:40:40 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Jakub Zawadzki c9b2ee3768 include <wsutil/pint.h> only when needed.
svn path=/trunk/; revision=53196
2013-11-09 15:44:29 +00:00
Alexis La Goutte 55e3b53563 From Peter Wu via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9373
ieee80211: Decode Radio Measurements (Action Frames)

The length of the fixed fields are dependent on the radio measurement
action. Before this patch, fields following the action code were
ignored, leading to wrong decoding results. This patch adds recognition
for the Radio Measurement action management frames as specified in
IEEE Std 802.11-2012.

From me:
* Rename some hf (Add ff_ in name)
* Link Margin and Transmit Power are signed
* Use always proto_tree_add_item (replace proto_tree_add_text)

svn path=/trunk/; revision=53074
2013-11-04 08:59:48 +00:00
Bill Meier 0ad98563a2 From didier gautheron: remove redundant or use faster col_xxx functions
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster.
- same for  replace col_append_fstr and col_append_str
- remove col_clear() when it's redundant:
    + before a col_set/col_add if the dissector can't throw an exception.
- replace col_append() after a col_clear() with faster col_add... or col_set

   https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344


svn path=/trunk/; revision=52948
2013-10-29 14:09:20 +00:00
Jörg Mayer 3392cb4772 Treat IE 173 (symbol proprietary) like we treat the vendor IE
svn path=/trunk/; revision=52886
2013-10-27 02:18:00 +00:00
Evan Huus 95f484a91e Add a very small hack to make the UAT update callback error string freeable, and
convert all existing UAT update callbacks to use glib memory instead of
ephemeral memory for that string.

UAT code paths are entirely distinct from packet dissection, so using ephemeral
memory was the wrong choice, because there was no guarantees about when it would
be freed.

The move away from emem still needs to be propogated deeper into the UAT code
itself at some point.

Net effect: remove another bunch of emem calls from dissectors, where replacing
with wmem would have caused assertions.

svn path=/trunk/; revision=52854
2013-10-25 22:14:25 +00:00
Jeff Morriss 0bf219035a Remove trailing spaces from hf name values (to satisfy checkAPIs).
svn path=/trunk/; revision=52796
2013-10-23 16:23:54 +00:00
Michael Mann 5abe9d8a89 The interpretation of Max Power Constraint in VHT TPE is incorrect. Bug 8939 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8939).
From chaitanya

svn path=/trunk/; revision=52791
2013-10-23 14:41:07 +00:00
Michael Mann 7f36cf3092 Add IEEE802.11ac VHT NDP announcement dissection. Bug 9224 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9224)
From Luca Coelho

From me: make sure return value of tvb_length_remaining is positive.

svn path=/trunk/; revision=52391
2013-10-06 01:53:26 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Alexis La Goutte 9c5ff393aa From Chun-Yeow via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9163 Ability to Decode the Number of Mesh Peerings
Decode the mesh formation information fields related to the number of mesh peerings

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>

svn path=/trunk/; revision=52152
2013-09-19 21:16:46 +00:00
Evan Huus be2ebb1934 Remove unused variables, fix typos.
svn path=/trunk/; revision=52046
2013-09-15 02:26:20 +00:00
Michael Mann b38ee917b1 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.

The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.

svn path=/trunk/; revision=52045
2013-09-15 01:48:30 +00:00
Michael Mann 9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Chris Maynard 6fc009baac Similar to the IPv4 dissector's hf_ip_dst_host, hf_ip_src_host and hf_ip_host fields, add to the Ethernet dissector:
hf_eth_dst_resolved
hf_eth_src_resolved
hf_eth_addr_resolved

and add to the IEEE802.11 dissector:

hf_ieee80211_addr_da_resolved
hf_ieee80211_addr_sa_resolved
hf_ieee80211_addr_ra_resolved
hf_ieee80211_addr_ta_resolved
hf_ieee80211_addr_bssid_resolved
hf_ieee80211_addr_resolved

Change motivated by:
http://ask.wireshark.org/questions/24314/possible-to-use-the-mac-info-in-the-wireshark-manuf-file-as-part-of-display-filter

svn path=/trunk/; revision=51742
2013-09-03 21:20:59 +00:00
Alexis La Goutte b4a4a768dc Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=51734
2013-09-03 18:43:29 +00:00
Jörg Mayer ee9c47b6eb Slightly improve the decoding of unknown Aironet IEs
svn path=/trunk/; revision=51570
2013-08-28 22:57:52 +00:00
Jörg Mayer b9a4e7a56c As reported by Ben Smith (thex1le@gmail.com) on #wireshark:
Aironet IE 20 is ClientMFP

svn path=/trunk/; revision=51561
2013-08-28 14:09:32 +00:00
Anders Broman 8ddf822285 From Chun-Yeow:
Decode the Mesh Configuration Capabilities Info in Details.
With a change to use tfs_yes_no.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9070

svn path=/trunk/; revision=51526
2013-08-27 04:57:27 +00:00
Michael Mann b56ffc4143 Make all expert info filterable. Display filter names may need review, but at least the filtering is in place.
svn path=/trunk/; revision=51520
2013-08-26 00:54:48 +00:00
Evan Huus d763a6909a Use the correct length field when tagging the SSID. Fixes the first valgrind
fuzz failure.

svn path=/trunk/; revision=51508
2013-08-24 12:13:11 +00:00
Alexis La Goutte 67131fcf8b FromChun-Yeow via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9059
Add Support of Decoding 802.11s Mesh Channel Switch Parameter Element

From me:
Remove some trailing whitespace
Add subtree for flag
Change typo of display filter

svn path=/trunk/; revision=51453
2013-08-21 17:05:20 +00:00
Alexis La Goutte 02462c7310 From Mark Phillips via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9038
802.11 HT Extended Capabilities B10 decode incorrect

#Backport 1.10 and 1.8

Within the 802.11 HT Capabilities IE the "HT Extended Capabilities" B10's name is incorrect.

It is currently titled "High Throughput". This is incorrect/missleading. It should be something like "High Throughput Control (+HTC)". The field indicates if the "High Throughput Control (HTC)" field is supported - not if HT itself is supported.

svn path=/trunk/; revision=51339
2013-08-13 17:50:22 +00:00
Evan Huus 5b485c3c0a Don't use emem or wmem in base_custom functions, just use a buffer on the stack,
since it's not needed after we write it into the output field. Fixes
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8996 which was introduced by
the wmem conversion.

svn path=/trunk/; revision=51065
2013-07-31 12:15:34 +00:00
Evan Huus f9d7a5ee47 Revert one tiny bit of r51043 where UAT code got wmemed by accident.
svn path=/trunk/; revision=51044
2013-07-31 01:47:00 +00:00
Evan Huus 960a461c8a Convert SSL and TCP dissectors to wmem (with the exception of UAT).
svn path=/trunk/; revision=51043
2013-07-31 01:26:05 +00:00
Alexis La Goutte 5988d137d8 From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8972 ieee80211: Dissect QoS Mapping information
This patch adds support for dissecting QoS Map Configure frame and QoS Map Set element per Interworking functionality that was added in IEEE 802.11u

svn path=/trunk/; revision=50908
2013-07-26 08:51:59 +00:00
Jörg Mayer fb5a3b90d1 Beginnings of Nintendo StreetProtocol support
svn path=/trunk/; revision=50783
2013-07-22 08:01:10 +00:00
Jakub Zawadzki a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Alexis La Goutte fde47f55a9 From chaitanya via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8837 Add support for VHT Transmit Power Envelope IE
Added support for VHT TPE IE and also tested it

Also fixed a small typo from "IEEE Stc" to "IEEE Std" for all 802.11ac references.

From me:
* Remove some trailing whitespace
* Fix bitmask PWR Info Unit
* Modify expert_info to display error in PWR Info Count
* Fix (possibility) loop
* Fix value_string (not need to have Reserved...)

svn path=/trunk/; revision=50123
2013-06-23 20:41:18 +00:00
Alexis La Goutte 8cd231162b From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8711 Wi-Fi Display dissector
This matches the style used for Wi-Fi Display and gets rid of a minimal
header file for functionality that extends packet-ieee80211.c.

svn path=/trunk/; revision=49594
2013-05-27 16:20:57 +00:00
Alexis La Goutte 816ed3ce0d From Jouni Malinen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8711 Wi-Fi Display dissector
The attached patch adds initial support for dissecting Wi-Fi Display information element

svn path=/trunk/; revision=49593
2013-05-27 16:20:29 +00:00
Alexis La Goutte 648ac74b5e Fix errors found by fix-encoding-args tools
svn path=/trunk/; revision=49158
2013-05-04 08:12:50 +00:00
Michael Mann 31320e7271 Dissect SSID List element.
From Jouni Malinen, bug 8613 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8613)

svn path=/trunk/; revision=49137
2013-05-02 13:08:31 +00:00
Michael Mann f52ecf47c8 Remove global variable g_pinfo.
svn path=/trunk/; revision=49135
2013-05-02 12:59:07 +00:00
Michael Mann 5b416c8479 IEEE802.11 improvements:
1. ANQP Venue Name is a UTF-8 string
2. Dissect Hotspot 2.0 indication and ANQP elements
3. Dissect TFS Request/Response
4. Dissect WNM-Notification Request frames

svn path=/trunk/; revision=49131
2013-05-02 01:59:34 +00:00
Michael Mann f1918b01e1 Add BSS Max Idle Period, WNM-Sleep Mode.
Fix and enhance TCLAS dissection.

From Jouni Malinen, bug 8613 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8613)

svn path=/trunk/; revision=49129
2013-05-02 01:15:25 +00:00
Alexis La Goutte 049399b2fa Add dissection of Aruba Networks Vendor Specific stuff. With ArubaOS 6.2, there is a option to add AP Name in Beacon frame.
svn path=/trunk/; revision=48963
2013-04-22 12:31:04 +00:00
Guy Harris 72c5985ec6 Don't use ENC_NA for integer fields longer than 1 byte; use
ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN.

Treat the AP PS Buffer State subfield of the QoS field the same way we
treat other subfields in the second byte of the QoS field - show it as
the upper 8 bits of the (shown as big-endian) QoS field.  Fix a bitmap
while we're at it.

Show the channel map as an FT_NONE - it's a structure with two bytes.

svn path=/trunk/; revision=48924
2013-04-19 08:59:45 +00:00
Jörg Mayer 171fe6de6c Small cosmetic fixes to CCX decoding
svn path=/trunk/; revision=48923
2013-04-19 05:44:41 +00:00
Alexis La Goutte b7844a673b From report of Mark Phillips via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8561 802.11 QoS decode broken from 1.9.2
Wrong encoding type (ENC_BIG_ENDIAN => ENC_LITTLE_ENDIAN)
Also fix a wrong increment offset about TXOP

svn path=/trunk/; revision=48769
2013-04-07 15:57:20 +00:00
Alexis La Goutte 8576eb409f Move #define OUI include in ieee80211 dissector to epan/oui.h Add Modelines to epan/oui.h
svn path=/trunk/; revision=48768
2013-04-07 15:57:11 +00:00
Alexis La Goutte a09722c937 Enhance 802.11 Vendor Specific IE * Remove hf_ieee80211_tag_interpretation...
svn path=/trunk/; revision=48766
2013-04-07 15:56:52 +00:00
Alexis La Goutte f84fde9439 Enhance 802.11(n) Vendor Specific IE HT * Remove hf_ieee80211_tag_interpretation...
svn path=/trunk/; revision=48765
2013-04-07 15:56:37 +00:00