Commit Graph

533 Commits

Author SHA1 Message Date
Bill Meier 4fbcfc1289 (Benign) Don't use "address-of" operator on arg of VALS() (not that it makes any actual difference)..
Change-Id: I0766d0f130648aaa5a58d9f4062fa24e898cbdc3
Reviewed-on: https://code.wireshark.org/review/545
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-03-07 05:03:41 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Alexis La Goutte 34933eb805 802.11 : Add channel number custom (to display info when report channel number is 0 or 255)
Fix also indent for other custom...

Change-Id: Ic95b65d5217a0d1e967892ac2694f3ba749242fb
Reviewed-on: https://code.wireshark.org/review/379
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-25 20:16:14 +00:00
Alexis La Goutte f5ebc083c6 802.11: Regulatory Class => Operating Class (changed in 802.11-2012)
Fix also typo for hf_ieee80211_tag_measure_request_regulatory_class wrong hf name...

Change-Id: I49e582c7683e58abb8785958dcc043789fd79a26
Reviewed-on: https://code.wireshark.org/review/378
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-25 20:15:53 +00:00
Bill Meier 93fe4d53e2 Remove trailing whitespace.
Change-Id: Ia03a1cd4590aceda30ead4aa93ad413d90c6aea6
Reviewed-on: https://code.wireshark.org/review/372
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 16:36:38 +00:00
Alexis La Goutte d3e03e97f0 Fix packet-ieee80211.c:13115:7: error: will never be executed [-Werror,-Wunreachable-code]
Change-Id: I0a87e6a2e9a819148a816ad1bc9da008b8cc1518
Reviewed-on: https://code.wireshark.org/review/324
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-02-25 15:37:53 +00:00
Alexis La Goutte 53deb521e7 Neighbor report (802.11k) may be have no subelement (len == 13)
Fix some malformed frame from sample on Bug 9724

Change-Id: I0874c2aab57799426f13e18123b05a7e73c6a75f
Partialy-Bug:9724
Reviewed-on: https://code.wireshark.org/review/340
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-25 05:57:17 +00:00
Gilbert Ramirez 4cc694839d Fix all -fstrict-alias warnings found by gcc 4.1.2
The majority of the fixes are for calls to uat_new(). Instead of
having each caller cast its private data to (void**), we use void*
in the uat_new() API itself. Inside uat_new(), we cast the void*
to void**.

Some dissectors use val64_string arrays, so a VALS64() macro was
added for those, to avoid using VALS(), which is useful only for
value_string arrays.

packet-mq.c was changed because dissect_nt_sid() requires
a char**, not a guint**. All other callers of dissect_nt_sid() use
char*'s (and take the address of it) for their local storage. So,
this was changed to follow the other practices.

A confusion between gint and absolute_time_display_e in packet-time.c
was cleared up.

The ugliest fix is the addition of ip6_guint8_to_str(), for exactly
one caller. The caller uses one type of ip6 address byte array,
while ip6_to_str() expects another. This new function is in place
until the various address implementations can be consolidated.

Add VALS64() to the developer documentation.

Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805
Reviewed-on: https://code.wireshark.org/review/48
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-03 09:26:10 +00:00
Evan Huus a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).

svn path=/trunk/; revision=54249
2013-12-19 15:49:09 +00:00
Jakub Zawadzki c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +00:00
Bill Meier ebaeed5a1f (Trivial)
- Fix indentation to match editor modelines (tabs-->spaces);
 - Rework/add some whitespace;

svn path=/trunk/; revision=53978
2013-12-12 20:16:30 +00:00
Jakub Zawadzki 3ae2e5ece2 Fix warnings
svn path=/trunk/; revision=53885
2013-12-09 20:15:47 +00:00
Guy Harris d62b116380 Make the code testing the Rx MCS Bitmask subfield of the Supported MCS
Set field of the HT Capabilities element a bit clearer, and add
comments.

Fix it so it doesn't assign a variable to itself, as clang warns about
that.

svn path=/trunk/; revision=53674
2013-11-30 10:17:30 +00:00
Michael Mann e1532f39ec Tx MCS set is not interpreted properly in WLAN beacon frame. Bug 8894 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8894)
#BACKPORT

svn path=/trunk/; revision=53670
2013-11-30 01:35:03 +00:00
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