metze/wireshark/wip.git
7 years agoDo RA_DISSECTORS in the Qt UI.
Guy Harris [Thu, 5 Jan 2017 04:03:35 +0000 (20:03 -0800)]
Do RA_DISSECTORS in the Qt UI.

It looks as if a fair bit of work is done under RA_DISSECTORS before we
register any individual items, so add it to the splash screen update
with the Qt UI - it's used in the GTK+ UI.

Update a comment to explicitly indicate what action transactions are
being counted (other than the individual-item ones, where we have to
call routines that give us a count of items).

Change-Id: I3ec5e5fbfdcf523d693bcf1b0f0ffbe0d05d61ae
Reviewed-on: https://code.wireshark.org/review/19553
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoFix comment.
Guy Harris [Thu, 5 Jan 2017 02:51:36 +0000 (18:51 -0800)]
Fix comment.

Change-Id: I5c18130dc22220ddd85109235383fcf61e543d89
Reviewed-on: https://code.wireshark.org/review/19552
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoRemove RA_CONFIGURATION.
Guy Harris [Thu, 5 Jan 2017 02:45:21 +0000 (18:45 -0800)]
Remove RA_CONFIGURATION.

It's not used at all in the Qt UI, and the point at which it's used in
the GTK+ UI doesn't involve reading configuration files - between it and
RA_INTERFACES, some mostly quick command-line argument processing is
done.

Change-Id: Ib4de97c8b6dba658a6e9d8f596b551f7c45739d2
Reviewed-on: https://code.wireshark.org/review/19551
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoQUIC: fix typo on ACK num revived field description
Alexis La Goutte [Wed, 4 Jan 2017 20:06:06 +0000 (21:06 +0100)]
QUIC: fix typo on ACK num revived field description

Found in https://ask.wireshark.org/questions/58396/some-question-about-quic-decode-result

Change-Id: Ic7fc2c2318186eabb5047f816987d2553a6fd449
Reviewed-on: https://code.wireshark.org/review/19547
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoClean up indentation.
Guy Harris [Wed, 4 Jan 2017 22:14:21 +0000 (14:14 -0800)]
Clean up indentation.

Change-Id: Ie5a2cc5650840a40fe3a84c04598e1f35dc47f4a
Reviewed-on: https://code.wireshark.org/review/19550
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoInclude extcap binaries in the count of things to point out during startup.
Guy Harris [Wed, 4 Jan 2017 22:10:16 +0000 (14:10 -0800)]
Include extcap binaries in the count of things to point out during startup.

The GTK+ version, at least, crashes if there are more "doing XXX..."
items put up than the calculated count, so, now that we're putting up
items for extcap binaries, we need to count the extcap binaries.

Clean up some stuff we found doing this (indentation, a _U_ on something
that's used).

Change-Id: I1f88042b64ce4b9ae352de37689677c694e3770b
Reviewed-on: https://code.wireshark.org/review/19549
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoEscape opening curly braces in gen-bugnote.
Gerald Combs [Mon, 19 Dec 2016 19:04:09 +0000 (11:04 -0800)]
Escape opening curly braces in gen-bugnote.

Curly braces are used for attribute replacement in AsciiDoc.

Change-Id: I1461ee26543dd20a9f799084a01710faef78f2d0
Reviewed-on: https://code.wireshark.org/review/19517
Reviewed-by: Gerald Combs <gerald@wireshark.org>
7 years agoAdd a startup message for Initializing extcap.
AndersBroman [Wed, 4 Jan 2017 09:53:29 +0000 (10:53 +0100)]
Add a startup message for Initializing extcap.

Change-Id: I06262e98bb4a55ee1eacd7a36b938b45eaffaf76
Reviewed-on: https://code.wireshark.org/review/19535
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoRevert "Another change required for that."
Guy Harris [Wed, 4 Jan 2017 11:11:18 +0000 (11:11 +0000)]
Revert "Another change required for that."

This reverts commit 3cfa4f760276bf995aca2479166a2128451fd402.

Nope, *not* needed, and not wanted, either.

Change-Id: I71ac174a9b9b19980d0a6f44088d0a66f71ef99b
Reviewed-on: https://code.wireshark.org/review/19538
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoAnother change required for that.
Guy Harris [Wed, 4 Jan 2017 11:08:07 +0000 (03:08 -0800)]
Another change required for that.

Bug: 13270
Change-Id: I86e779c8f7b89ca928556d8b1acc1015b96f9100
Reviewed-on: https://code.wireshark.org/review/19537
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoRunning Wireshark through a symlink doesn't work.
Guy Harris [Wed, 4 Jan 2017 11:05:14 +0000 (03:05 -0800)]
Running Wireshark through a symlink doesn't work.

We can't just symbolically link to the executables, as that means that
the executable won't be in Contents/MacOS, which means that all
@executable_path-relative references will go to the wrong place if we
run the executables using the symlink, which means that the executables
could fail (they *do* fail to find the Cocoa Qt plugin, for example).

So, instead, we go back to the old version of the utility launcher, and
put that in Contents/Resources/bin as well as, if the user requests the
CLI utilities, /usr/local/bin.  Maybe PackageMaker will find that
acceptable and include them in the installer package.

Bug: 13270
Change-Id: I4016b58c9ce0df05d78525d35e53431750c2b4d9
Reviewed-on: https://code.wireshark.org/review/19536
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoOops, source and target are the other way around.
Guy Harris [Wed, 4 Jan 2017 09:29:41 +0000 (01:29 -0800)]
Oops, source and target are the other way around.

Bug: 13270
Change-Id: Ibeddb435acca298c90f2d6b9c0228e8a9a747b38
Reviewed-on: https://code.wireshark.org/review/19534
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoCreate the Content/Resources/bin directory if necessary.
Guy Harris [Wed, 4 Jan 2017 08:07:46 +0000 (00:07 -0800)]
Create the Content/Resources/bin directory if necessary.

Bug: 13270
Change-Id: Idc4223a24d6d2037d13a85331ce63e5a24168d3a
Reviewed-on: https://code.wireshark.org/review/19533
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoQt: add SACK graphs to tcptrace graph
Kevin Hogan [Thu, 22 Dec 2016 21:03:03 +0000 (13:03 -0800)]
Qt: add SACK graphs to tcptrace graph

Primarily, this adds visual indication of SACK blocks to tcptrace.
In addition:
 - cleaned up focus behavior for graph selector and spinboxes
 - added time-delay update to streamNumber spinBox
    (similar to behavior of maWindow spinBox)
 - changed ACK selection to select only SACKed responses
    (rather than all ACKs - SACKs seemed more useful to look at)

Change-Id: I47d9e98d54f14e4955008ecea791b77f805c8ba9
Reviewed-on: https://code.wireshark.org/review/19388
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoRTPS: Added dissection for Parametrized user data
Juanjo Martin [Thu, 29 Dec 2016 14:24:28 +0000 (15:24 +0100)]
RTPS: Added dissection for Parametrized user data

Before we were showing an expert warning saying that it was not
supported. Now we show the parametrized data dissected in the form

sequence of (id, length, value)

Added also filters so it is possible to filter on the ids (useful
in RTPS)

Bug: 13278
Change-Id: I8569830305bc303febe6f3460221e7a52867a34d
Reviewed-on: https://code.wireshark.org/review/19458
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoRRC: upgrade dissector to v13.5.0
Pascal Quantin [Tue, 3 Jan 2017 22:01:39 +0000 (23:01 +0100)]
RRC: upgrade dissector to v13.5.0

Change-Id: I95323ed8aabff7a20442c848fa0dc39854297584
Reviewed-on: https://code.wireshark.org/review/19527
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoRemove trailing whitespace.
Guy Harris [Wed, 4 Jan 2017 04:43:54 +0000 (20:43 -0800)]
Remove trailing whitespace.

Change-Id: Ifdea8516ccce7a72c88470913ce36b9226dfcb54
Reviewed-on: https://code.wireshark.org/review/19532
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoPut symlinks to the executables in Contents/Resources/bin.
Guy Harris [Wed, 4 Jan 2017 04:42:12 +0000 (20:42 -0800)]
Put symlinks to the executables in Contents/Resources/bin.

PackageMaker appears not to put them into the installer package, so
construct them in the Wireshark post-install script.

Bug: 13270
Change-Id: Idfa10d4d123d2c0e2f7b3ad65888e075fbfd27a7
Reviewed-on: https://code.wireshark.org/review/19531
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoNo reason not to use etype_vals for an Ethertype field.
Guy Harris [Wed, 4 Jan 2017 02:09:49 +0000 (18:09 -0800)]
No reason not to use etype_vals for an Ethertype field.

Maybe there was an issue on Windows back in the old days, when 1) we
didn't have a shared libwireshark library from which to import functions
and data variables and thus you couldn't get variables such as
etype_vals in a plugin and 2) the Infiniband dissector was a plugin, but
neither of those are the case any more.

Change-Id: Id8b82886317bd36a32ad1e1591673623696d4808
Reviewed-on: https://code.wireshark.org/review/19530
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoEnsure that tcp.reassembled_in is added to the tree for first segment.
Martin Mathieson [Tue, 3 Jan 2017 22:23:13 +0000 (14:23 -0800)]
Ensure that tcp.reassembled_in is added to the tree for first segment.

Bug: 3264
Change-Id: I9fa8cfaf1e21a8a984941ee40e2e404ae21e55c9
Reviewed-on: https://code.wireshark.org/review/19528
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoinfiniband: remove offset variable.
Dario Lombardo [Tue, 3 Jan 2017 13:36:56 +0000 (14:36 +0100)]
infiniband: remove offset variable.

Change-Id: Ie86c2aece05ebbc35eb15a54d8c3f2c455ff53cf
Reviewed-on: https://code.wireshark.org/review/19516
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
7 years agoinfiniband: fix error for clobbered variable.
Dario Lombardo [Tue, 3 Jan 2017 11:07:58 +0000 (12:07 +0100)]
infiniband: fix error for clobbered variable.

Given by gcc-4.9.2 on arm:

epan/dissectors/packet-infiniband.c:2708:9: error: variable ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
     int offset = 0;
         ^
cc1: all warnings being treated as errors

Change-Id: I12066031093c1fa638792ff8be8f3f5457e3feda
Reviewed-on: https://code.wireshark.org/review/19515
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoISAKMP: add Reserved fields
Mirko Parthey [Mon, 2 Jan 2017 21:39:13 +0000 (22:39 +0100)]
ISAKMP: add Reserved fields

Add Reserved fields as defined by:
* RFC 7296 for IKEv2
* RFC 2408 for IKEv1
* draft-ietf-ipsec-isakmp-mode-cfg-05 for the IKEv1 Attributes Payload

Change-Id: I0c25de6e543aa5461650fb4cd2c103a6a3a8c392
Reviewed-on: https://code.wireshark.org/review/19480
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoUse g_slist_find_custom instead of g_slist_nth when just looking for item in list.
Michael Mann [Mon, 2 Jan 2017 21:24:41 +0000 (16:24 -0500)]
Use g_slist_find_custom instead of g_slist_nth when just looking for item in list.

Change-Id: Ida3c5d5826f0ca01a25052a67f1460ff4686008f
Reviewed-on: https://code.wireshark.org/review/19513
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agomake-version.pl: Fixup library version updates.
Gerald Combs [Mon, 2 Jan 2017 17:21:37 +0000 (09:21 -0800)]
make-version.pl: Fixup library version updates.

When updating {epan,wiretap}/{Makefile.am,CMakeLists.txt} make sure we
use an absolute path to each file and that we preserve the file's line
ending style.

Change-Id: Iee62a3ef8e89ca1ddae2569df62025805ee9a238
Reviewed-on: https://code.wireshark.org/review/19508
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoISAKMP: Fix size of ID in IKEv1 Attributes Payload
Mirko Parthey [Mon, 2 Jan 2017 14:14:07 +0000 (15:14 +0100)]
ISAKMP: Fix size of ID in IKEv1 Attributes Payload

Fix the size of the Identifier field in the IKEv1 Attributes Payload.
Reference: draft-ietf-ipsec-isakmp-mode-cfg-05, section 3.2

Change-Id: I30bfde9caa6750b342f7dfbad39e63341614a45b
Reviewed-on: https://code.wireshark.org/review/19502
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: Jaap Keuter <jaap.keuter@xs4all.nl>
7 years agoISAKMP: fix dissection of IKEv2 ID Payload
Mirko Parthey [Mon, 2 Jan 2017 12:45:24 +0000 (13:45 +0100)]
ISAKMP: fix dissection of IKEv2 ID Payload

Fix dissection of the IKEv2 Identification Payload.
Unlike IKEv1, it does not have Protocol and Port fields.

References:
* RFC 2407, section 4.6.2
* RFC 7296, section 3.5

Change-Id: I968e378abd49363785dd7308a4f27908c1c05a8a
Reviewed-on: https://code.wireshark.org/review/19497
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agoSnort: without explicit disable, expand preference to switch off
Martin Mathieson [Sun, 1 Jan 2017 12:35:57 +0000 (04:35 -0800)]
Snort: without explicit disable, expand preference to switch off

Change-Id: I5fd3b0cc6f19c4c873aaaae8c9e257a8b53a8419
Reviewed-on: https://code.wireshark.org/review/19489
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
7 years ago[Automatic update for 2017-01-01]
Gerald Combs [Sun, 1 Jan 2017 16:10:23 +0000 (08:10 -0800)]
[Automatic update for 2017-01-01]

Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I397e20ffbc5227cb22d838c9eec68fae0e216162
Reviewed-on: https://code.wireshark.org/review/19492
Reviewed-by: Gerald Combs <gerald@wireshark.org>
7 years agoOpenFlow (v4/1.3): Add complete dissection of error messages
Alexis La Goutte [Thu, 29 Dec 2016 15:02:49 +0000 (16:02 +0100)]
OpenFlow (v4/1.3): Add complete dissection of error messages

Bug: 13221
Change-Id: Ide3e734fca280a294a993afade2503cd751d78a2
Reviewed-on: https://code.wireshark.org/review/19459
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoHappy new Year 2017 !
Alexis La Goutte [Sat, 31 Dec 2016 23:00:01 +0000 (00:00 +0100)]
Happy new Year 2017 !

Change-Id: I8ae8a1fdc8d0df0779ef119c527f41dac9e0dbdb
Reviewed-on: https://code.wireshark.org/review/19476
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>
7 years agoFix backwards #if defined.
Guy Harris [Sun, 1 Jan 2017 05:45:51 +0000 (21:45 -0800)]
Fix backwards #if defined.

Left over from some stuff I was fiddling with.

Bug: 11785
Change-Id: Ifb06e8b65db65037b336c46e5e180012ae5b7a59
Reviewed-on: https://code.wireshark.org/review/19487
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoSquelch a compiler warning from Xcode 8 clang.
Guy Harris [Sun, 1 Jan 2017 05:43:43 +0000 (21:43 -0800)]
Squelch a compiler warning from Xcode 8 clang.

Unless I'm missing something, that code can't be reached, so local_proto
should always be set.

Change-Id: Idf765552d66cce684eb0de8dc8da57382aaf8444
Reviewed-on: https://code.wireshark.org/review/19486
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoAlways use the Windows time zone code on Windows.
Guy Harris [Sun, 1 Jan 2017 02:45:00 +0000 (18:45 -0800)]
Always use the Windows time zone code on Windows.

We *have* to use the Windows code on Windows for the reasons given in
the comment.  However, some versions of Visual Studio have a time.h that
CMake thinks defines tzname[] (which the header will do under some
circumstances), so HAVE_TZNAME gets defined on Windows.  We check for
Windows *before* checking for HAVE_TZNAME - or HAVE_STRUCT_TM_TM_ZONE.

Bug: 11785
Change-Id: I61360daf08203dbd9d109a87c05727b4dbecea66
Reviewed-on: https://code.wireshark.org/review/19483
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>
7 years agoMake TCP options into a dissector table.
Michael Mann [Thu, 29 Dec 2016 18:31:44 +0000 (13:31 -0500)]
Make TCP options into a dissector table.

This provides external access for dissectors and plugins to provide their
own implementation of TCP options.

Bug: 13141
Bug: 4452
Change-Id: I2fa6290616a4d8a8b421dd6daf98a23ce55479b9
Reviewed-on: https://code.wireshark.org/review/19461
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoAdd interface for "pinos" (Protocols in name only)
Michael Mann [Fri, 30 Dec 2016 00:41:33 +0000 (19:41 -0500)]
Add interface for "pinos" (Protocols in name only)

This is for dissectors that need distinguishing names either for registering
multiple dissection functions in a single dissector table or for "internal"
dissectors whose just need a name associated with the dissection function.
Features like enable/disable are handled by the "parent" protocol.
This avoids clutter in the "official" protocol list.

Change-Id: I69e7d27d332ae85286f254e95e8d79920da7a9e2
Reviewed-on: https://code.wireshark.org/review/19464
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoTLS(1.3): Add PSK Key Exchanges Modes (45) hello extension
Alexis La Goutte [Sat, 12 Nov 2016 16:04:14 +0000 (17:04 +0100)]
TLS(1.3): Add PSK Key Exchanges Modes (45) hello extension

Ping-Bug: 12779
Change-Id: Ie797a437240e5530d74e3039f12a60a6f0395d0a
Reviewed-on: https://code.wireshark.org/review/18916
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoDissectors don't need a journey of self discovery.
Michael Mann [Sat, 17 Dec 2016 01:06:11 +0000 (20:06 -0500)]
Dissectors don't need a journey of self discovery.

They already know who they are when they register themselves.  Saving the
handle then to avoid finding it later.
Not sure if this will increase unnecessary register_dissector functions
(instead of using create_dissector_handle in proto_reg_handoff function)
when other dissectors copy/paste, but it should make startup time
a few microseconds better.

Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43
Reviewed-on: https://code.wireshark.org/review/19481
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoAdd BASE_NO_DISPLAY_VALUE to allow field value to not be shown.
Michael Mann [Fri, 30 Dec 2016 17:26:34 +0000 (12:26 -0500)]
Add BASE_NO_DISPLAY_VALUE to allow field value to not be shown.

There are times when byte arrays don't want to show their value
in the packet tree or there is a field that is the "header" of
a subtree where showing the field value distracts from the tree
display.  For these cases, BASE_NO_DISPLAY_VALUE can be used
to not display the value.

Change-Id: I8c9f1f57cd2e663dbee07e2289e7f5e1f22d1e32
Reviewed-on: https://code.wireshark.org/review/19479
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoENC: fix parsing of header broken by gee242bd
Pascal Quantin [Fri, 30 Dec 2016 15:01:16 +0000 (16:01 +0100)]
ENC: fix parsing of header broken by gee242bd

From the code before change, it appears that only SPI field is in network byte order.

Bug: 13279
Change-Id: Ia157b43a9da30d61dc9cb7607c66d44c8f607498
Reviewed-on: https://code.wireshark.org/review/19477
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
7 years agoRevert "Support all MA modes, fix BB CRC and frag edge cases"
Paul Williamson [Wed, 28 Dec 2016 23:41:22 +0000 (23:41 +0000)]
Revert "Support all MA modes, fix BB CRC and frag edge cases"

Supporting all MA modes this way makes the dissector useless as a heuristic dissector; it always matches. I just didn't understand about heuristic dissectors, and will look for a better solution.

The fragmentation edge cases were also misunderstood. On closer reading of the spec, these are not valid edge cases to be handled smoothly, but packet formatting errors to be diagnosed.

The BB CRC fix is valid AFAIK, and will be resubmitted separately.

This reverts commit 2563503301aa4321a9a7a1ed392c9cbbe147fd2f.

Change-Id: I842f4eca59193b24f41a67ce7d081c681b70f449
Reviewed-on: https://code.wireshark.org/review/19449
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agocms: don't assert if eContent fails to be dissected
Роман Донченко [Wed, 28 Dec 2016 19:59:50 +0000 (22:59 +0300)]
cms: don't assert if eContent fails to be dissected

If eContent is not an octet string, content_tvb will be null, and
attempting to use it will trigger an assertion. Besides ill-formed
files, this can also occur in old-style PKCS #7 files, since in PKCS #7
the corresponding field has the ANY type, rather than OCTET STRING.

Change-Id: I9a5bce983aa82107a9602317737c183461cac7f3
Reviewed-on: https://code.wireshark.org/review/19448
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoQUIC: Add SMHL (Support Max Header List Size) tag
Alexis La Goutte [Fri, 30 Dec 2016 09:00:02 +0000 (10:00 +0100)]
QUIC: Add SMHL (Support Max Header List Size) tag

Change-Id: I093f71d3ca409e048211fedf671551721b94d535
Reviewed-on: https://code.wireshark.org/review/19474
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoQUIC: fix link to error code
Alexis La Goutte [Fri, 30 Dec 2016 08:54:17 +0000 (09:54 +0100)]
QUIC: fix link to error code

Change-Id: If5a0e547c1fb952584f7e661ae5ad1abfdf4bec3
Reviewed-on: https://code.wireshark.org/review/19473
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoenc (openBSD): Add reserved/unused field for flags
Alexis La Goutte [Fri, 30 Dec 2016 08:48:25 +0000 (09:48 +0100)]
enc (openBSD): Add reserved/unused field for flags

and fix also bitmap (32 bits)

Change-Id: I04b7cb64bf7d593648131c09d05eb8e9b1eca8ca
Reviewed-on: https://code.wireshark.org/review/19471
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoenc (openBSD): fix flags field description
Alexis La Goutte [Fri, 30 Dec 2016 08:16:13 +0000 (09:16 +0100)]
enc (openBSD): fix flags field description

Change-Id: I5b17d4bfea82770458b002aacfca0fc941639899
Reviewed-on: https://code.wireshark.org/review/19470
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoandroiddump: add missing sys/time.h header
Baruch Siach [Thu, 29 Dec 2016 18:16:53 +0000 (20:16 +0200)]
androiddump: add missing sys/time.h header

struct timeval requires sys/time.h. Fixes the following musl libc build error:

androiddump.c: In function 'useSndTimeout':
androiddump.c:262:18: error: variable 'socket_timeout' has initializer but incomplete type
     const struct timeval socket_timeout = {
                  ^

Change-Id: I52e204f32a012aabea2e54877e564576c072fe08
Reviewed-on: https://code.wireshark.org/review/19460
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
7 years agoUDLD: Use correct flag bits
Jaap Keuter [Thu, 29 Dec 2016 21:59:13 +0000 (22:59 +0100)]
UDLD: Use correct flag bits

Assigned flag bits are the least significant bits of the flags field,
not at the most significant end.

Bug: 13280
Change-Id: Ie568df6ca137c491fedb32cf2316a0240270b3d6
Reviewed-on: https://code.wireshark.org/review/19463
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoThree count 'em three different names for the OS.
Guy Harris [Fri, 30 Dec 2016 04:15:48 +0000 (20:15 -0800)]
Three count 'em three different names for the OS.

Change-Id: Icb53c200e95a55b648297bbf5237662c3adaeb84
Reviewed-on: https://code.wireshark.org/review/19465
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agolemon: Fix Dereference of null pointer found by Clang analyzer
Alexis La Goutte [Wed, 28 Dec 2016 15:15:02 +0000 (16:15 +0100)]
lemon: Fix Dereference of null pointer found by Clang analyzer

lemon.c:877:10: warning: Access to field 'lhs' results in a dereference of a null pointer (loaded from field 'startRule')
lemon.c:1141:22: warning: Access to field 'lhs' results in a dereference of a null pointer (loaded from field 'startRule')

it is false positve lem.nrule==0 implies lem.rule==NULL

Change-Id: Id63086990762fbf5195bce34a28f25aeb7a246f7
Reviewed-on: https://code.wireshark.org/review/19445
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoFix Interface Selection List
Roland Knall [Thu, 29 Dec 2016 09:20:01 +0000 (10:20 +0100)]
Fix Interface Selection List

Fixes issue introduced with Ib82519362454094f64abf1cbe6d7bc917990d7ac

Change-Id: I9fbf376c03f2ead1575ca30e8ff89dc36d99109f
Reviewed-on: https://code.wireshark.org/review/19450
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
7 years agozvt: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Wed, 28 Dec 2016 15:22:54 +0000 (16:22 +0100)]
zvt: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I0f7a620e5fbdab4a4c6b62b1b7bc884073bc0f45
Reviewed-on: https://code.wireshark.org/review/19447
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agozvt: mark some functions as inline
Martin Kaiser [Sat, 24 Dec 2016 13:01:16 +0000 (14:01 +0100)]
zvt: mark some functions as inline

Change-Id: I2637fc18b1eeda5e567ee62c8ed53c6757c259bd
Reviewed-on: https://code.wireshark.org/review/19457
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agozvt: dissect card type and result code bitmaps
Martin Kaiser [Fri, 16 Dec 2016 22:47:02 +0000 (17:47 -0500)]
zvt: dissect card type and result code bitmaps

Change-Id: I26a7821642224c707dc4542a35b2b5b5aee159d5
Reviewed-on: https://code.wireshark.org/review/19456
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agozvt: dissect the text lines TLV data object
Martin Kaiser [Wed, 14 Dec 2016 17:50:58 +0000 (12:50 -0500)]
zvt: dissect the text lines TLV data object

Change-Id: I3d54b4568b883b95294e29347bde0736b78157e1
Reviewed-on: https://code.wireshark.org/review/19455
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agozvt: dissect the status apdu, add some more bitmaps
Martin Kaiser [Tue, 13 Dec 2016 23:28:43 +0000 (18:28 -0500)]
zvt: dissect the status apdu, add some more bitmaps

Change-Id: If74221dd55d61c5794f570daf38c88771f4a2f38
Reviewed-on: https://code.wireshark.org/review/19454
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agozvt: add some more tag names
Martin Kaiser [Fri, 2 Dec 2016 19:13:25 +0000 (20:13 +0100)]
zvt: add some more tag names

Change-Id: If181a22f2794fb9fe812719593f8a7eb642bce42
Reviewed-on: https://code.wireshark.org/review/19453
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agozvt: print the tag name in the tree header
Martin Kaiser [Fri, 2 Dec 2016 18:13:10 +0000 (19:13 +0100)]
zvt: print the tag name in the tree header

Change-Id: Iac0744f830020a54790a39820abab9fb756ffa9f
Reviewed-on: https://code.wireshark.org/review/19452
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agoISAKMP: add Reserved fields for Fibre Channel
Mirko Parthey [Wed, 28 Dec 2016 13:56:52 +0000 (14:56 +0100)]
ISAKMP: add Reserved fields for Fibre Channel

Add Reserved fields for Fibre Channel Traffic Selectors.
Reference: RFC 4595, section 4.4

Change-Id: Iba0b3d9a4d3d96918971a9a597fa313b022b5ca2
Reviewed-on: https://code.wireshark.org/review/19444
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: Anders Broman <a.broman58@gmail.com>
7 years agoCMake,autotools: enable -Werror=implicit by default
Peter Wu [Sat, 17 Dec 2016 22:12:11 +0000 (23:12 +0100)]
CMake,autotools: enable -Werror=implicit by default

The -Wimplicit error covers two warnings, trying to catch these cases:

Setting a global variable without declaring its type (-Wimplicit-int):

    undeclared_type = 1;

More importantly, -Wimplicit-function-declaration catches the case where
a function is not declared (missing header, programming error, etc.).

Turn these warnings into errors, most likely it will be a programming
error that results in a link failure anyway. See also
https://fedoraproject.org/wiki/Changes/Fedora26CFlags

Also fix autotools checks not to trigger -Wimplicit-int and
-Wimplicit-function-declaration (in krb5 check due to missing include).
Tested on Ubuntu 16.04 (autotools & cmake) and Arch Linux (cmake),
configure/cmake output and config.h are identical.

Change-Id: I137284263f3b1223df6e6a893111c3640802631f
Reviewed-on: https://code.wireshark.org/review/19331
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
7 years agoQt: Remove "Extcap" from window title.
Stig Bjørlykke [Wed, 28 Dec 2016 10:11:36 +0000 (11:11 +0100)]
Qt: Remove "Extcap" from window title.

An average user does not need to know that an interface is of type extcap.
Remove "Extcap" from the "Extcap Interface Options" dialog.

Change-Id: Iafadf2d312a4ffd5530deeac63194151571fc7d3
Reviewed-on: https://code.wireshark.org/review/19443
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agoQt: Fix open extcap help URL.
Stig Bjørlykke [Wed, 28 Dec 2016 09:55:32 +0000 (10:55 +0100)]
Qt: Fix open extcap help URL.

The return value from QString::compare() is equal to zero when the
strings are equal.  Fix the code for checking and opening the extcap
help URL if not matching "file".

This bug was introduced in g46caff30.

Ping-Bug: 13218
Change-Id: I2a84e61f0191b57269f8ce829ff82200bf19a7ac
Reviewed-on: https://code.wireshark.org/review/19442
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
7 years agoInfiniband: Use base of packet tree (top_tree) for "infiniband.mad.cm.private" heuris...
Michael Mann [Wed, 28 Dec 2016 04:16:19 +0000 (23:16 -0500)]
Infiniband: Use base of packet tree (top_tree) for "infiniband.mad.cm.private" heuristic dissector.

The "infiniband.payload" heuristic dissector was converted to use the base
of the packet tree so that subdissectors could show their protocol as the
base layer.  Since many of the subdissectors use the same dissection function
for both "infiniband.payload" and "infiniband.mad.cm.private", ensure that
both use the same "tree level", but still pass in the "payload tree" as part
of the dissector data in case a subdissector wants to use it (currently used
by InfinibandSDP)

Ping-Bug: 13259
Change-Id: I899e8348f6b23d8eee9e74764d8ca32d7bf6e625
Tested-by: paravpandit@yahoo.com
Reviewed-on: https://code.wireshark.org/review/19441
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Parav Pandit <paravpandit@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoISAKMP: add traffic selector subtree
Mirko Parthey [Wed, 21 Dec 2016 20:28:39 +0000 (21:28 +0100)]
ISAKMP: add traffic selector subtree

Create a new subtree for each traffic selector.

Use the length field to find the next traffic selector
rather than accumulating the individual TS field sizes.

Split dissect_ts() to introduce separate offset variables.
After adding the final field, do not advance offset again
to avoid unused variable warnings.

Change-Id: I9951662c1bb3958994162b25b70b43ec1da103a7
Reviewed-on: https://code.wireshark.org/review/19440
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agomacosx: Update Read me first.rtf with some additional install/deinstall notes
Jim Young [Mon, 26 Dec 2016 17:29:45 +0000 (12:29 -0500)]
macosx: Update Read me first.rtf with some additional install/deinstall notes

Report that files /etc/paths.d/Wireshark and /etc/manpaths.d/Wireshark
are added and should be removed.

Change-Id: I2f9d3aea0dd4f86cb9a86065108a3948e28d3001
Reviewed-on: https://code.wireshark.org/review/19436
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoAdded basic support for NVM Express over Fabrics for RDMA.
Parav Pandit [Mon, 26 Dec 2016 05:47:57 +0000 (00:47 -0500)]
Added basic support for NVM Express over Fabrics for RDMA.

NVM Express is high speed interface for accessing solid state drives.
NVM Express specifications are maintained by NVM Express industry
association at http://www.nvmexpress.org.

Bug: 13201
Change-Id: Id40edaf72838eea9f4087c8ddba9518a9374efab
Tested-by: paravpandit@yahoo.com
Reviewed-on: https://code.wireshark.org/review/19063
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Parav Pandit <paravpandit@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoMove DigestInfo from pkcs12 to cms
Роман Донченко [Sat, 17 Dec 2016 21:55:14 +0000 (00:55 +0300)]
Move DigestInfo from pkcs12 to cms

This type is originally from PKCS #7, the predecessor of CMS, so it makes
more sense for it to be there.

Change-Id: I3a146f1d000a3bcbcd0d8f1cfe2fc27ed80cc69d
Reviewed-on: https://code.wireshark.org/review/19335
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoInterfaceList: Add check for remote interface
Roland Knall [Tue, 27 Dec 2016 09:14:32 +0000 (10:14 +0100)]
InterfaceList: Add check for remote interface

Add a check, to allow the filtering of remote only interfaces. Also
add the necessary options to the type menu.

Change-Id: Ib82519362454094f64abf1cbe6d7bc917990d7ac
Reviewed-on: https://code.wireshark.org/review/19438
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
7 years agoReplace assignment with structure assignment (CID 1397183)
Jaap Keuter [Mon, 26 Dec 2016 13:40:14 +0000 (14:40 +0100)]
Replace assignment with structure assignment (CID 1397183)

Replace the individual field assignment with struct assignement to
- Reduce code (only single line, but he),
- (Hopefully) show Coverity this is as intended.

Change-Id: I9400b6e38f86acf57018ee7993e66d5b06d1c39c
Reviewed-on: https://code.wireshark.org/review/19434
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoMerge AIM files into single dissector file.
Michael Mann [Mon, 26 Dec 2016 14:34:13 +0000 (09:34 -0500)]
Merge AIM files into single dissector file.

These are probably obsolete dissectors anyway, but they are a
bunch of very small files causing unnecessary file pollution.

Change-Id: I03976484996b4bf987d6743ed379534456809c2c
Reviewed-on: https://code.wireshark.org/review/19437
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agozvt: dissect the TLV container's payload
Martin Kaiser [Fri, 23 Dec 2016 18:06:24 +0000 (19:06 +0100)]
zvt: dissect the TLV container's payload

add a function to dissect the sequence of TLV elements
use a hash table for payload functions like we do for the bitmaps
add two tags whose payload is another TLV sequence

Change-Id: Ibb19fd7af2f58e201174d07d410557dc315c652a
Reviewed-on: https://code.wireshark.org/review/19435
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years agoDon't claim packet as MATE if there is no MATE configuration
Michael Mann [Mon, 26 Dec 2016 13:04:12 +0000 (08:04 -0500)]
Don't claim packet as MATE if there is no MATE configuration

This prevents MATE from (falsely) being included in the list of
protocols for any given frame.

Change-Id: I9ffdfb52cf31dfda89b674a41bcc0992e17de5e8
Reviewed-on: https://code.wireshark.org/review/19432
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years ago[Automatic update for 2016-12-25]
Gerald Combs [Sun, 25 Dec 2016 16:34:52 +0000 (08:34 -0800)]
[Automatic update for 2016-12-25]

Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I8fd8115fdfd4623bdf94602b6fd55a724e09cec3
Reviewed-on: https://code.wireshark.org/review/19429
Reviewed-by: Gerald Combs <gerald@wireshark.org>
7 years agoRemove individual post-dissect enable preferences.
Michael Mann [Sun, 25 Dec 2016 02:00:36 +0000 (21:00 -0500)]
Remove individual post-dissect enable preferences.

Use Analyze -> Enabled Protocol dialog interface.  Added support
for backwards compatibility of preference.

Change-Id: I32b3fce9d18083d9324197e3fd7ddc7eb888d1fb
Reviewed-on: https://code.wireshark.org/review/19422
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoDVB-CI: simplify dissection of the resource id
Martin Kaiser [Thu, 22 Dec 2016 23:20:13 +0000 (00:20 +0100)]
DVB-CI: simplify dissection of the resource id

Now that proto_tree_add_bitmask_value_with_flags() works for tvb==NULL,
we can use it to simplify the dissection of DVB-CI's resource id.

Change-Id: Ia09d5668bf0a61161ecd0cb412680838a67d7a7a
Reviewed-on: https://code.wireshark.org/review/19409
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoWireshark doesn't require X11 any more.
Guy Harris [Sun, 25 Dec 2016 09:39:34 +0000 (01:39 -0800)]
Wireshark doesn't require X11 any more.

Change-Id: Ib5ba38e5103f31f115608b92dd32f3ce1e5eec67
Reviewed-on: https://code.wireshark.org/review/19424
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agoFix some narrowing warnings.
Guy Harris [Sun, 25 Dec 2016 08:22:31 +0000 (00:22 -0800)]
Fix some narrowing warnings.

Don't narrow values until it's necessary, and then put in explicit casts
to indicate that the narrowing is intentional.

Change-Id: I8afc2a457822febbed33cee573953993013a7185
Reviewed-on: https://code.wireshark.org/review/19423
Reviewed-by: Guy Harris <guy@alum.mit.edu>
7 years agopacketbb: Add decoding for TLV with single value
Francois Schneider [Wed, 17 Feb 2016 20:34:52 +0000 (21:34 +0100)]
packetbb: Add decoding for TLV with single value

Bug: 4118
Change-Id: I282fb8da657701c5b855dafe1568a5f226d3c12b
Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-on: https://code.wireshark.org/review/13985
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agortp_analysis_dialog (Qt): Fix Dead Store (Dead assignement/Dead increment) Warning...
Alexis La Goutte [Sat, 24 Dec 2016 14:43:29 +0000 (15:43 +0100)]
rtp_analysis_dialog (Qt): Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I48dd8af83c97301b6bd314801ca36ac13c790eaa
Reviewed-on: https://code.wireshark.org/review/19413
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoCleanup transum post-dissector.
Michael Mann [Sat, 24 Dec 2016 22:54:36 +0000 (17:54 -0500)]
Cleanup transum post-dissector.

1. Enable/disable preference not needed - just use Enabled Protocol
dialog interface.  Added support for backwards compatibility of preference.
2. Add value_string for calculation values
3. Create an structured array of "hfs of interest" so they can more easily
be extended.
4. Convert a bunch of arrays into hash tables and lists.  For the amount
of wasted space they were taking up, we can live with the very slight
performance degrade.  Also puts less limits on number of things to process.

Change-Id: I7399789d62432b507062ed9cdc20ad974b9dde1b
Reviewed-on: https://code.wireshark.org/review/19406
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoSupport all MA modes, fix BB CRC and frag edge cases
MustBeArt [Mon, 19 Dec 2016 17:59:26 +0000 (09:59 -0800)]
Support all MA modes, fix BB CRC and frag edge cases

Support all four mode adaptation interface formats. Add a user preference to
specify which format is in use, or to request that the format be guessed.
Guessing is improved, but can never be reliable.

Fix problem with baseband header CRC check that caused almost all packets to
show a spurious CRC error, introduced with proto_tree_add_checksum.

Fix problem with GSE PDU fragmentation CRC beginning in one fragment and
ending in another. Any GSE frames following the fragment containing the
end of the CRC would be parsed at the wrong offset.

Fix problem with IPv4 or IPv6 starting exactly on a fragmentation boundary,
so that one baseband frame contains the complete GSE header but zero bytes
of the IP payload. Trying to further dissect the zero-length payload led to
a "malformed packet" display.

Standardize spelling per governing document: adaption -> adaptation

Change-Id: I69e64e74e4b4f02515411471e1d76b0eeb02fef1
Reviewed-on: https://code.wireshark.org/review/19421
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoAvoid recursive scan_local_interfaces operation
Mikael Kanstrup [Sat, 19 Mar 2016 08:36:57 +0000 (09:36 +0100)]
Avoid recursive scan_local_interfaces operation

When the local networks interfaces changes quickly or when refreshing the
list of network interfaces there's a risk of recursive calls into
scan_local_interfaces. The recursive calls are a result of calling
update_cb to process UI events during function operation which in turn
again discover a network interface change. This results in strange
duplicate entries of network interfaces and crashes.

To avoid recursive calls a check is added to stop running the function while
already updating. This patch is really just a workaround for the problem.
Ideally some asynchronous operation should be implemented instead to avoid
the UI update_cb callback alltogether.

Bug: 11553
Bug: 12263
Change-Id: I3b74d8f196677e0e261a395aff558dd9f685b538
Reviewed-on: https://code.wireshark.org/review/14492
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
7 years agoudpdump: remove libwireshark dependancy.
Dario Lombardo [Thu, 22 Dec 2016 13:19:30 +0000 (14:19 +0100)]
udpdump: remove libwireshark dependancy.

Export pdu routines have been rewritten here on purpose.

Change-Id: If4879de4c98b6f20a75df158cae0cf9a80ffae57
Reviewed-on: https://code.wireshark.org/review/19384
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years ago802.11(ad): split Sector Sweep Feedback in 2
Alexis La Goutte [Sat, 24 Dec 2016 18:19:53 +0000 (19:19 +0100)]
802.11(ad): split Sector Sweep Feedback in 2

one from ISS and other to ISS

Add also reserved field

Issue reported by Hany ASSASA

Bug:13244
Change-Id: Ib20cf6ae455664b87ea3470ebb6d5386a97b0f48
Reviewed-on: https://code.wireshark.org/review/19420
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years ago802.11(ad): fix typo
Alexis La Goutte [Sat, 24 Dec 2016 17:09:39 +0000 (18:09 +0100)]
802.11(ad): fix typo

Acknoledgment => Acknowledgment

Ping-Bug: 13244
Change-Id: Ia2e8eedec05c39ed0ebc38235cc52d43488e00d4
Reviewed-on: https://code.wireshark.org/review/19419
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>
7 years ago802.11(ad): Enhance dissection of Beam Refinement
Alexis La Goutte [Sat, 24 Dec 2016 15:53:49 +0000 (16:53 +0100)]
802.11(ad): Enhance dissection of Beam Refinement

You can now use bitmap on 64bits (or 40bits)

and also add a reserved field

Change-Id: Ibc68b56477e76c2b13624920eb7a9a49f8f887f3
Ping-Bug: 13244
Reviewed-on: https://code.wireshark.org/review/19418
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years ago802.11(ad): Add reserved field for BRP Request
Alexis La Goutte [Sat, 24 Dec 2016 15:11:37 +0000 (16:11 +0100)]
802.11(ad): Add reserved field for BRP Request

Change-Id: Iee6012e841007b731dc16545a1d9bf6f17377580
Ping-Bug: 13244
Reviewed-on: https://code.wireshark.org/review/19417
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years ago802.11(ad): fix wrong bitmask for BRP TX Antenna
Alexis La Goutte [Sat, 24 Dec 2016 14:58:39 +0000 (15:58 +0100)]
802.11(ad): fix wrong bitmask for BRP TX Antenna

Missing a zero

Change-Id: I43097bc62fb66dea849c5ed7882d01a6de768c82
Ping-Bug: 13244
Reviewed-on: https://code.wireshark.org/review/19416
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoLemon: resync with upstream
Alexis La Goutte [Fri, 17 Jun 2016 22:20:54 +0000 (00:20 +0200)]
Lemon: resync with upstream

lemon: Tue Aug 16 16:46:40 2016
lempar: Tue Dec 6 17:59:05 2016 +0000

a copy of all Wireshark changes are available https://github.com/alagoutte/sqlite/tree/wireshark

Change-Id: I144d0f983e4ac960b5a7a2fd8cd379f6282579f8
Reviewed-on: https://code.wireshark.org/review/15987
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>
7 years agoAFP: fix indent (use tabs)
Alexis La Goutte [Sat, 24 Dec 2016 17:07:44 +0000 (18:07 +0100)]
AFP: fix indent (use tabs)

Change-Id: I3d1078ddff6ec7b9c7efc5cda9a1821ef52b46ce
Reviewed-on: https://code.wireshark.org/review/19415
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoppi-vector: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Sat, 24 Dec 2016 14:35:41 +0000 (15:35 +0100)]
ppi-vector: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I44ae8a9cc6b09ad205b9c90e7d9595768fcac71b
Reviewed-on: https://code.wireshark.org/review/19412
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agobthci_evt: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Sat, 24 Dec 2016 14:34:44 +0000 (15:34 +0100)]
bthci_evt: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Ic9962a1824b9f9d137177c81cb15d7ef4bc7bfc2
Reviewed-on: https://code.wireshark.org/review/19411
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agodisabled_protos: fix no previous prototype for function 'read_protos_list' [-Wmissing...
Alexis La Goutte [Sat, 24 Dec 2016 16:54:58 +0000 (17:54 +0100)]
disabled_protos: fix no previous prototype for function 'read_protos_list' [-Wmissing-prototypes]

Change-Id: I5bfa11213ca27308204a1d8b6073661161c9151e
Reviewed-on: https://code.wireshark.org/review/19414
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>
7 years agoextcap_options_dialog: fix compilation with Qt4
Martin Kaiser [Sat, 24 Dec 2016 12:16:38 +0000 (13:16 +0100)]
extcap_options_dialog: fix compilation with Qt4

Qt4's QFileInfo::exist() can only be used with an existing QFileInfo
object. The version that accepts the file name as paramter was
introduced in Qt5.

Create a temporary QFileInfo object and call exists() on this object.

Change-Id: I162cc22ecba61b2c2f16f9f0916b0db7969abb51
Reviewed-on: https://code.wireshark.org/review/19408
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
7 years agozvt: len is used in dissect_zvt_int_status()
Martin Kaiser [Sun, 27 Nov 2016 14:30:48 +0000 (15:30 +0100)]
zvt: len is used in dissect_zvt_int_status()

Change-Id: I8937dc605abf0414159acfc75ee05ccac89658fb
Reviewed-on: https://code.wireshark.org/review/19410
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
7 years ago[TRANSUM] smb2.msg_id is now a FT_UINT64.
Michael Mann [Sat, 24 Dec 2016 03:24:05 +0000 (22:24 -0500)]
[TRANSUM] smb2.msg_id is now a FT_UINT64.

Per bug 12915, SMB2 message ID should be treated as a unsigned 64bit value.
Have transum logic match that as it was assuming SMB2 message ID was a
signed 64bit value

Change-Id: Ide0c12b505d1eef2aeb89d165a3ea59058e6be34
Reviewed-on: https://code.wireshark.org/review/19407
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoAdd enabled protocol list for dissectors who are disabled by default
Michael Mann [Fri, 23 Dec 2016 20:20:31 +0000 (15:20 -0500)]
Add enabled protocol list for dissectors who are disabled by default

We save a list of dissectors that are disabled through the Enabled Protocols
dialog.  This is because we assume dissectors are enabled by default.

For dissectors that are disabled by default, we have no way to keep them
enabled through the Enabled Protocols dialog.  A dissector that defaults
to being disabled has to be reset to enabled each time Wireshark is launched.

Add a list similar to the disabled list for enabling dissectors that are
disabled by default.
This mostly applies to post-dissectors.

Change-Id: I31a8d97a9fdbc472fe2a8666384e0f8786bb8e9f
Reviewed-on: https://code.wireshark.org/review/19405
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agoSet BCP BPDU to size of bytes used by the protocol, not whole packet.
Michael Mann [Fri, 23 Dec 2016 14:06:44 +0000 (09:06 -0500)]
Set BCP BPDU to size of bytes used by the protocol, not whole packet.

Bug: 13188
Change-Id: I29b2712d4d6ae57e4b0ea4bc0ec126cb80172779
Reviewed-on: https://code.wireshark.org/review/19400
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
7 years agobthci_cmd: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Fri, 23 Dec 2016 12:16:20 +0000 (13:16 +0100)]
bthci_cmd: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I84472632e715a6f13e2fa5b58ae95f9dc9d16776
Reviewed-on: https://code.wireshark.org/review/19399
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>
7 years agomake proto_tree_add_bitmask_value_with_flags() work for tvb==NULL
Martin Kaiser [Thu, 22 Dec 2016 23:20:56 +0000 (00:20 +0100)]
make proto_tree_add_bitmask_value_with_flags() work for tvb==NULL

proto_tree_add_bitmask_value_with_flags() eventually calls
proto_tree_add_XXX() for the main hf and for the field elements.

These functions work for tvb==NULL if the length is also set to 0.
Otherwise, we'll end up in proto_tree_add_pi(), get_hfi_length() and
run into the DISSECTOR_ASSERT() there.

proto_tree_add_bitmask_value...() are meant for cases where the data is
passed directly and not read from a tvb. If tvb==NULL, set our length to
0 instead of using the field length from the main hf.

Change-Id: Ia55b068e9842ba4a1ae8be8692320a8e93ea8631
Reviewed-on: https://code.wireshark.org/review/19394
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>