metze/wireshark/wip.git
8 years ago[Automatic update for 2015-12-20]
Gerald Combs [Sun, 20 Dec 2015 16:10:16 +0000 (08:10 -0800)]
[Automatic update for 2015-12-20]

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

Change-Id: I888e6e56894ab3226ad32e8f1d5e3d351cfcd8d8
Reviewed-on: https://code.wireshark.org/review/12747
Reviewed-by: Gerald Combs <gerald@wireshark.org>
8 years ago[png] add two more chunk names
Martin Kaiser [Sun, 20 Dec 2015 15:45:55 +0000 (16:45 +0100)]
[png] add two more chunk names

Change-Id: Ic6c6113e91adb416f19aeea5ed85d5deb61832d4
Reviewed-on: https://code.wireshark.org/review/12746
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years ago[AES_unwrap] initialize the output array with 0s
Martin Kaiser [Sun, 20 Dec 2015 11:23:18 +0000 (12:23 +0100)]
[AES_unwrap] initialize the output array with 0s

for cipher_len==56, some bytes of the output array are not written

An alternative approach would be to add a check for cipher_len.
I understand from RFC 3394 that the AES key wrap algorithm works on
multiples of 64bits and has no upper limit, we couldn't easily reject 56
bytes cipher_len.

Bug: 11527
Change-Id: Ie82357bbe5512de391813dd55098df7a16bda9ae
Reviewed-on: https://code.wireshark.org/review/12741
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years ago[USB] dissect the data part in outgoing isochronous URBs on Linux
Martin Kaiser [Sat, 19 Dec 2015 19:08:28 +0000 (20:08 +0100)]
[USB] dissect the data part in outgoing isochronous URBs on Linux

The kernel sets the URBs status to -EXDEV in this case. Don't require
status == OK in this case.

Set pinfo->p2p_dir for USB packets. Sent/received is from the
perspective of the host.

Bug: 11868
Change-Id: I2be2348507bef47272d3d8786019ec90457141ac
Reviewed-on: https://code.wireshark.org/review/12731
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
8 years agoAdd %ProgramW6432% to the list of search paths when looking for 7-Zip.
Christian Tellefsen [Sun, 20 Dec 2015 10:02:04 +0000 (11:02 +0100)]
Add %ProgramW6432% to the list of search paths when looking for 7-Zip.

This allows a 64bit 7-Zip installation to be located even though
win-setup.ps1 is run by a 32-bit process.

This applies to 64bit Windows (7, 10, Server 2008 R2, Server 2012).
Tested on 2012.

Ref:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa384274%28v=vs.85%29.aspx

Change-Id: I6f4f3226b25c890cd674bf4c4d9ea73ddfc8ece0
Reviewed-on: https://code.wireshark.org/review/12740
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoQt: Add missing multi-field column validation
Michal Labedzki [Fri, 11 Dec 2015 08:34:08 +0000 (09:34 +0100)]
Qt: Add missing multi-field column validation

GTK already has it, but Qt forgot about it, so multi-field custom column
works ok if previously saved in GTK-shark. Invalid validation prevent from
modifying and saving multi-field custom column in Qt version.

While at it, rename "custom field" to "custom fields" to ensure
we think about multi-field custom column.

Change-Id: I99588150ccb38be11b75f5dd5b0f6443e7055ebb
Reviewed-on: https://code.wireshark.org/review/12685
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoCreate capture dissector table for LLC non-snap dissectors.
Michael Mann [Sun, 20 Dec 2015 02:43:53 +0000 (21:43 -0500)]
Create capture dissector table for LLC non-snap dissectors.

Change-Id: I37602d0e2148150b55b2812855bccf2f181d31b8
Reviewed-on: https://code.wireshark.org/review/12737
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoCondense DMX dissectors into a single file and create a dissector table for them.
Michael Mann [Sun, 20 Dec 2015 03:36:58 +0000 (22:36 -0500)]
Condense DMX dissectors into a single file and create a dissector table for them.

Change-Id: Ie7b8964fcbb5e0a7c6b4296ee2b63e168dcc55fa
Reviewed-on: https://code.wireshark.org/review/12738
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agopacket-enc.c: Convert flags to use proto_tree_add_bitmask.
Michael Mann [Sun, 20 Dec 2015 02:10:25 +0000 (21:10 -0500)]
packet-enc.c: Convert flags to use proto_tree_add_bitmask.

Change-Id: Ie828a38ea0da14224ccf38ae5c703038bddcc835
Reviewed-on: https://code.wireshark.org/review/12736
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoflags_set_truth -> tfs_set_notset
Michael Mann [Sun, 20 Dec 2015 01:56:15 +0000 (20:56 -0500)]
flags_set_truth -> tfs_set_notset

Change-Id: I127f55f4ed26a99facea4d1ecc29786ab4898a75
Reviewed-on: https://code.wireshark.org/review/12735
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoextcap: plug some memleaks
Peter Wu [Fri, 11 Dec 2015 10:42:28 +0000 (11:42 +0100)]
extcap: plug some memleaks

The working directory for g_spawn_sync should not be escaped, it is
simply passed to chdir. The escaping was needed for the command, so do
so (hmm... maybe the argv arguments should be escaped too for Windows).

Also remove an unnecessary NULL command argument for extcap_foreach.

Note: there is still a memleak when exiting because the ifaces table is
not cleared after querying the list.

Change-Id: I1251d623b954a81848044b6d1faf8dcec8ce465b
Reviewed-on: https://code.wireshark.org/review/12530
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>
8 years agoAdd menu item for capture comment dialog in GTK+
Dirk [Sat, 19 Dec 2015 16:21:12 +0000 (11:21 -0500)]
Add menu item for capture comment dialog in GTK+

Qt already has a menu item for this in Statistics -> Capture File Properties

Bug: 9628
Change-Id: I85dd6f85d43fbfb60c2f4db82d9a02d91866127c
Reviewed-on: https://code.wireshark.org/review/12725
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoGet rid of the argument to filter_expression_init().
Guy Harris [Sat, 19 Dec 2015 19:20:15 +0000 (11:20 -0800)]
Get rid of the argument to filter_expression_init().

It's always TRUE.

Clean up indentation while we're at it.

Change-Id: I11f5b849274b68bbda4fa32a8d909d6d5e71cbb1
Reviewed-on: https://code.wireshark.org/review/12732
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoAdd missing ERF types, mention another missing type, mention reserved space.
Guy Harris [Sat, 19 Dec 2015 18:24:47 +0000 (10:24 -0800)]
Add missing ERF types, mention another missing type, mention reserved space.

Add the TYPE_COLOR_HASH_POS and TYPE_COLOR_HASH_ETH types, note that
type 26 has no #define, mention that types 28 through 31 are reserved
for future record types.

Change-Id: Ic828254599599c6bd7399d4682f9a3d4bff1f0f7
Reviewed-on: https://code.wireshark.org/review/12728
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoERF: Add basic no-break support for ERF_TYPE_META.
Anthony Coddington [Thu, 19 Nov 2015 03:23:53 +0000 (16:23 +1300)]
ERF: Add basic no-break support for ERF_TYPE_META.

Update erf_open heuristic to not break when ERF_TYPE_META records are present.
Remove check for maximum non-pad ERF type and add defines for reserved types.
No dissection in this commit beyond record type name, this will come later.

Change-Id: Ib64e450e26b2878b5519fb6afeafa2ce9477ac85
Reviewed-on: https://code.wireshark.org/review/12708
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agosctp_graph_dlg: fix Expression 'tsn->secs >= min_secs' is always true. Unsigned type...
Alexis La Goutte [Thu, 3 Dec 2015 08:03:53 +0000 (09:03 +0100)]
sctp_graph_dlg: fix Expression 'tsn->secs >= min_secs' is always true. Unsigned type value is always >= 0

min_secs is always set to 0

Change-Id: I62e3a5b71b423ae9ae15be1206bd1deeb9962760
Reviewed-on: https://code.wireshark.org/review/12400
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>
8 years agoAdding Flow Measurement and Occupancy Sensing Clusters for Zigbee
Aditya Jain [Thu, 17 Dec 2015 09:30:44 +0000 (15:00 +0530)]
Adding Flow Measurement and Occupancy Sensing Clusters for Zigbee

Change-Id: I5b43c02a75ae2ade1d389d01f352b1500417779d
Reviewed-on: https://code.wireshark.org/review/12696
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>
8 years agoQt UI: use a default (and minimum) value of 2 for the number of files in a
Jeff Morriss [Fri, 18 Dec 2015 02:58:01 +0000 (21:58 -0500)]
Qt UI: use a default (and minimum) value of 2 for the number of files in a
ring buffer.

This matches the Gtk UI.

(Note that the Qt UI's upper limit for this option (1k) is much lower than
the Gtk UI's (100k).)

Change-Id: Ie5b5b7b4bdb9205594ed7fcc38630a6268cc3acf
Reviewed-on: https://code.wireshark.org/review/12711
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>
8 years agoAllow "capture info data" to not be a singleton.
Michael Mann [Thu, 17 Dec 2015 04:15:03 +0000 (23:15 -0500)]
Allow "capture info data" to not be a singleton.

It was buried as a static variable in capture_info.c, and functions were refactored to allow a pointer to the info_data_t structure to be passed in. TShark and GTK will have their own single (global) copy of the structure, while it opens up Qt to have multiple instances.

Change-Id: Ic2d7a2ad574de43f457cb18b194d6bc3fffb6120
Reviewed-on: https://code.wireshark.org/review/12691
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoQt: Try to fix Main Welcome Interfaces List Scrollbar
Michal Labedzki [Sat, 5 Dec 2015 15:22:09 +0000 (16:22 +0100)]
Qt: Try to fix Main Welcome Interfaces List Scrollbar

Bug: 11733

Change-Id: Ic144634acce7b9e9eb9821ca6452694cb2dcf4dd
Reviewed-on: https://code.wireshark.org/review/12684
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
8 years agoGet rid of a couple of extra blank lines.
Guy Harris [Sat, 19 Dec 2015 03:38:36 +0000 (19:38 -0800)]
Get rid of a couple of extra blank lines.

Change-Id: I57fd59a065e987e0e188b0898a874116e7cc56e8
Reviewed-on: https://code.wireshark.org/review/12722
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoRemove a comment that didn't need to be copied and pasted.
Guy Harris [Fri, 18 Dec 2015 20:51:03 +0000 (12:51 -0800)]
Remove a comment that didn't need to be copied and pasted.

Change-Id: Id05c3fbf0c667ae2b2e349b73eba62a23d9e9e9e
Reviewed-on: https://code.wireshark.org/review/12721
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQt UI: there's no need to capitalize kilobytes, megabytes, and megabytes in
Jeff Morriss [Fri, 18 Dec 2015 03:10:17 +0000 (22:10 -0500)]
Qt UI: there's no need to capitalize kilobytes, megabytes, and megabytes in
the ring buffer and autostop configuration sections.

Change-Id: I2a260e4f9e52444ee9d6c072bce34067dd74cc19
Reviewed-on: https://code.wireshark.org/review/12712
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>
8 years agoCMake: Make "install ... DESTINATION" paths relative.
Gerald Combs [Fri, 4 Dec 2015 19:12:45 +0000 (11:12 -0800)]
CMake: Make "install ... DESTINATION" paths relative.

Make sure we use relative destination paths in each install
command. Apparently many CPack generators don't support absolute paths,
particularly on Windows. This fixes the following error when running
`cpack -G WIX` here:

----
CPack: Create package using WIX
CPack: Install projects
CPack: - Install project: Wireshark
CMake Error at C:/Development/wireshark/cmbuild/cmake_install.cmake:206 (message):
  ABSOLUTE path INSTALL DESTINATION forbidden (by caller): C:/Program Files/Wireshark/lib/wireshark/extcap/androiddump.exe

CPack Error: Error when generating package: wireshark
----

Change-Id: Ifdcd40814df8163ea722a65ef55acc1a511b2f75
Reviewed-on: https://code.wireshark.org/review/12657
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
8 years ago[NFS] adding stateid hash based on stateid.other
Olga Kornievskaia [Fri, 11 Dec 2015 19:41:33 +0000 (14:41 -0500)]
[NFS] adding stateid hash based on stateid.other

In NFS protocol, stateid's seq# changes within the stateid and therefore
it changes the calculated hash of the stateid displayed by the wireshark.
It makes it inconvenient to filter packets based on such value.

This patches adds additional field (instead of replacing old) to display
the CRC32 hash of the stateid.other field.

Bug:11895
Change-Id: I70c6d2b88822b6f735e8bc506a1bfcb421f6ddb9
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Reviewed-on: https://code.wireshark.org/review/12536
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>
8 years agoRemoved local definition of offsetof().
Stig Bjørlykke [Fri, 18 Dec 2015 07:40:23 +0000 (08:40 +0100)]
Removed local definition of offsetof().

Change-Id: Icca723d08e25ecd492ba553d5a0f66af558e7556
Reviewed-on: https://code.wireshark.org/review/12716
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoprefs_register_modules() is used only in epan/prefs.c; make it static.
Guy Harris [Fri, 18 Dec 2015 09:27:29 +0000 (01:27 -0800)]
prefs_register_modules() is used only in epan/prefs.c; make it static.

Change-Id: If2a5ad5c836c5dfddb4f6c4ffa41c52e52f2b671
Reviewed-on: https://code.wireshark.org/review/12717
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQt: use recent.gui_bytes_view preference to remember bits / byte view
Pascal Quantin [Thu, 17 Dec 2015 19:41:46 +0000 (20:41 +0100)]
Qt: use recent.gui_bytes_view preference to remember bits / byte view

While we are at it, let's centralize bytes_view_type definition

Bug: 11903
Change-Id: I606c779a8efaea668db1b440d3ae0336e6e3fc67
Reviewed-on: https://code.wireshark.org/review/12706
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoRemoved local definitions of offsetof().
Stig Bjørlykke [Thu, 17 Dec 2015 21:57:55 +0000 (22:57 +0100)]
Removed local definitions of offsetof().

The offsetof() macro is an ANSI C library feature.

Change-Id: I2ac91b0b4c94c6f6baf14133b076fdc5ed2e182b
Reviewed-on: https://code.wireshark.org/review/12707
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRTPS: Added dissection of PID_BUILTIN_ENDPOINT_SET
Juanjo Martin [Fri, 4 Dec 2015 12:46:07 +0000 (13:46 +0100)]
RTPS: Added dissection of PID_BUILTIN_ENDPOINT_SET

Change-Id: I5ea72998de9bbc3db02a33b53c0bb5a89e597b6d
Reviewed-on: https://code.wireshark.org/review/12427
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoMore common code for string-like preferences.
Guy Harris [Fri, 18 Dec 2015 03:50:19 +0000 (19:50 -0800)]
More common code for string-like preferences.

Change-Id: I0143c40cabc0e60265aad2004884cb24cd41a8ac
Reviewed-on: https://code.wireshark.org/review/12714
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoProvide routines to set string-like and range preferences from a string.
Guy Harris [Fri, 18 Dec 2015 03:18:33 +0000 (19:18 -0800)]
Provide routines to set string-like and range preferences from a string.

That gets rid of some duplicate code.

Change-Id: I4b65c6c73929d18602f6b0425e4f3dbbabbf0127
Reviewed-on: https://code.wireshark.org/review/12713
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agodebian: Fix .deb package generation on wheezy
Balint Reczey [Thu, 17 Dec 2015 22:30:40 +0000 (23:30 +0100)]
debian: Fix .deb package generation on wheezy

Bug: 11901
Change-Id: Id2bfd33d05e74d197832af21a4ac701e0d84ab50
Reviewed-on: https://code.wireshark.org/review/12709
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
8 years agoXML, JSON: Added DDS Web Integration Service
Juanjo Martin [Wed, 16 Dec 2015 15:11:33 +0000 (16:11 +0100)]
XML, JSON: Added DDS Web Integration Service

Change-Id: I18e272d060cee063c32be4eadd1643f080bbee22
Reviewed-on: https://code.wireshark.org/review/12701
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>
8 years agoAdding Commissioning Cluster for Zigbee.
Darshan Nevgi [Fri, 11 Dec 2015 12:26:19 +0000 (17:56 +0530)]
Adding Commissioning Cluster for Zigbee.

Change-Id: I9ed2f8e74f0860126726a059299c5ef9081787f9
Reviewed-on: https://code.wireshark.org/review/12531
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRTPS: Make guidPrefix filterable directly.
Juanjo Martin [Wed, 16 Dec 2015 14:55:43 +0000 (15:55 +0100)]
RTPS: Make guidPrefix filterable directly.

This patch is to improve the usability of the filtering wrt the
guidPrefix.

Change-Id: I45367c642a405a6a57811743ef2a0f85d96792ce
Reviewed-on: https://code.wireshark.org/review/12700
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>
8 years agoanddroiddump: fix compilation errors with Win64 and OSX 10.5 x86
Pascal Quantin [Thu, 17 Dec 2015 19:33:15 +0000 (20:33 +0100)]
anddroiddump: fix compilation errors with Win64 and OSX 10.5 x86

Change-Id: Ie8aa666cd0b10b4260bf184ff35734589c71a8aa
Reviewed-on: https://code.wireshark.org/review/12705
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoQt: reset columns when applying a display filter
Pascal Quantin [Wed, 16 Dec 2015 22:41:13 +0000 (23:41 +0100)]
Qt: reset columns when applying a display filter

Bug: 11786
Change-Id: I7d3b4139328adaf2f79f008a8772b3182c1eb1f0
Reviewed-on: https://code.wireshark.org/review/12688
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoTry to fix some PVS Studio warnings
Michal Labedzki [Tue, 1 Dec 2015 18:02:04 +0000 (19:02 +0100)]
Try to fix some PVS Studio warnings

V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 626
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 661
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 678
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 689
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 700
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 711
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 728
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 739
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 750
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 761
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 810
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 867
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 889
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 949
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. androiddump.c 971
V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. androiddump.c 1876
V512 A call of the 'memcpy' function will lead to underflow of the buffer 'packet + exported_pdu_headers_size'. androiddump.c 1950
V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. androiddump.c 2053
V804 Decreased performance. The 'strlen' function is called twice in the specified expression to calculate length of the same string. androiddump.c 2056
V512 A call of the 'memcpy' function will lead to underflow of the buffer 'packet + exported_pdu_headers_size'. androiddump.c 2122
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. androiddump.c 2207
V590 Consider inspecting this expression. The expression is excessive or contains a misprint. androiddump.c 2227
V530 The return value of function 'freopen' is required to be utilized. androiddump.c 2275
V530 The return value of function 'freopen' is required to be utilized. androiddump.c 2279
V808 'name' object of 'QString' type was created but was not utilized. bluetooth_devices_dialog.cpp 201
V807 Decreased performance. Consider creating a pointer to avoid using the 'ui->tableTreeWidget->headerItem()' expression repeatedly. bluetooth_devices_dialog.cpp 337
V807 Decreased performance. Consider creating a pointer to avoid using the 'item->child(i_item)' expression repeatedly. bluetooth_hci_summary_dialog.cpp 648
V807 Decreased performance. Consider creating a pointer to avoid using the 'ui->tableTreeWidget->headerItem()' expression repeatedly. bluetooth_hci_summary_dialog.cpp 669

Change-Id: Ia81b5f867b2b1e0ee58eed0bd297800774bc37f9
Reviewed-on: https://code.wireshark.org/review/12683
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
8 years agoandroiddump: Remove all mallocs
Michal Labedzki [Sun, 29 Nov 2015 16:58:39 +0000 (17:58 +0100)]
androiddump: Remove all mallocs

Removing all malloc improve reliability, simplify code,
reduces memory usage...

Bug: 11608
Change-Id: Ie56312a1afdf298e926bb242825565b52dbd85d3
Reviewed-on: https://code.wireshark.org/review/12682
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
8 years agoandroiddump: Some Coverity fixes
Michal Labedzki [Sun, 29 Nov 2015 16:45:12 +0000 (17:45 +0100)]
androiddump: Some Coverity fixes

CID 1295677: (CHECKED_RETURN)
CID 1293385: (NEGATIVE_RETURNS)

Change-Id: I142f1f9629af9339261b74e54a1a40b595ddecb5
Reviewed-on: https://code.wireshark.org/review/12681
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
8 years agorandpkt-core: add modelines
Dario Lombardo [Thu, 17 Dec 2015 10:58:38 +0000 (11:58 +0100)]
randpkt-core: add modelines

Change-Id: I2978288535c99238515164a245f8276d785984f4
Reviewed-on: https://code.wireshark.org/review/12699
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agossl: Fix heartbeat message length.
Stig Bjørlykke [Wed, 16 Dec 2015 12:07:27 +0000 (13:07 +0100)]
ssl: Fix heartbeat message length.

The length of the "Heartbeat Message" element is equal to the record
length.

Change-Id: I10010442db1615b61bad5f525aad4d49a4c8de29
Reviewed-on: https://code.wireshark.org/review/12678
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agorandpkt-core: add new line
Dario Lombardo [Thu, 17 Dec 2015 09:05:46 +0000 (10:05 +0100)]
randpkt-core: add new line

Change-Id: If3624e8b42cdc6d2fcf8b42d389456607682dbb3
Reviewed-on: https://code.wireshark.org/review/12695
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>
8 years agoQt: deactivate "limit to display filter" checkbox when retapping
Pascal Quantin [Wed, 16 Dec 2015 21:35:13 +0000 (22:35 +0100)]
Qt: deactivate "limit to display filter" checkbox when retapping

Bug: 11848
Bug: 11900
Change-Id: I39bc1f6d8006ee9c258c986a69b460cf99c7e65a
Reviewed-on: https://code.wireshark.org/review/12687
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoZbee ZCL (general): Fix build error changed new_register_dissector to register_dissector
Vikram Hegde [Thu, 17 Dec 2015 06:49:29 +0000 (12:19 +0530)]
Zbee ZCL (general): Fix build error changed new_register_dissector to register_dissector

Change-Id: Ie4409cc4d0a443ce6c8031a65f3d697a5d65b6e1
Reviewed-on: https://code.wireshark.org/review/12692
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoAdding Illuminance Level Sensing Cluster for zigbee
Aditya Jain [Tue, 15 Dec 2015 09:43:44 +0000 (15:13 +0530)]
Adding Illuminance Level Sensing Cluster for zigbee

Change-Id: I1c1b476f9f604e76ad9b71eee90b44143e4b7f71
Reviewed-on: https://code.wireshark.org/review/12648
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>
8 years agoAdding Level Control Cluster for ZigBee
Vikram Hegde [Thu, 10 Dec 2015 04:55:52 +0000 (10:25 +0530)]
Adding Level Control Cluster for ZigBee

Change-Id: I17628e675c07cb2a31df3b5750075a1e88d92b60
Reviewed-on: https://code.wireshark.org/review/12493
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>
8 years agoAdding the dissector for Alarms and Time clusters for zigbee
Rishi Dev Singh [Mon, 14 Dec 2015 08:49:53 +0000 (14:19 +0530)]
Adding the dissector for Alarms and Time clusters for zigbee

Change-Id: If4f134a5385d1db595ebf26c18ddde0fe2edd3a1
Reviewed-on: https://code.wireshark.org/review/12608
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRADIUS: Add AVP Type and AVP Length display field
Alexis La Goutte [Wed, 16 Dec 2015 10:24:34 +0000 (11:24 +0100)]
RADIUS: Add AVP Type and AVP Length display field

Add for each RADIUS attribut add type and length

Change-Id: I82c8588a80922a51174864482edfd42b5bef7661
Reviewed-on: https://code.wireshark.org/review/12676
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>
8 years agoRADIUS: Enhance display of Egress-VLAN-Name
Alexis La Goutte [Wed, 16 Dec 2015 09:32:31 +0000 (10:32 +0100)]
RADIUS: Enhance display of Egress-VLAN-Name

Bug:11894
Change-Id: I397219153dcd9932d899c681ac70323380ebd738
Reviewed-on: https://code.wireshark.org/review/12674
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoCreate capture dissector "info" structure (capture_packet_info_t)
Michael Mann [Tue, 15 Dec 2015 00:25:31 +0000 (19:25 -0500)]
Create capture dissector "info" structure (capture_packet_info_t)

While it currently only contains packet_counts, it will hopefully stabilize the capture function signature if more fields are added.

Change-Id: I003552c58043c7c2d67aec458187b12b233057e2
Reviewed-on: https://code.wireshark.org/review/12690
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoCapture dissectors must be registered only once at startup
Pascal Quantin [Wed, 16 Dec 2015 23:07:49 +0000 (00:07 +0100)]
Capture dissectors must be registered only once at startup

So ensure that register_capture_dissector() is not called again when changing a preference

Bug: 11884
Change-Id: I18ce05e89b19f106470a8ec843062c115dae60db
Reviewed-on: https://code.wireshark.org/review/12689
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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>
8 years agoldap: Add inetOrgPerson from RFC2798.
Stig Bjørlykke [Wed, 16 Dec 2015 11:18:01 +0000 (12:18 +0100)]
ldap: Add inetOrgPerson from RFC2798.

Change-Id: I3e2e3143f66db62c416fd7031d290e2a5b21fa93
Reviewed-on: https://code.wireshark.org/review/12677
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoMake zlib API constness-aware, take 2.
Guy Harris [Wed, 16 Dec 2015 09:37:00 +0000 (01:37 -0800)]
Make zlib API constness-aware, take 2.

ZLIB_CONST must be defined before including zlib.h to expose z_const,
*AND* z_const shouldn't be used unless it's defined, because older
versions of zlib don't define it even if you define ZLIB_CONST.

While we're at it, throw in some DIAG_OFF(cast-qual)/DIAG_ON(cast-qual)
pairs to suppress unavoidable "cast throws away const qualification"
warnings.

The original "make zlib constness-aware" change also removed an
unnecessary include of <zlib.h> from wiretap/wtap.c, so we do that as
well.

Change-Id: I3c5269a8fbc54bbbb4d316544cc7b8fa30614c19
Reviewed-on: https://code.wireshark.org/review/12675
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>
8 years agoRevert "Make zlib API constness-aware"
Guy Harris [Wed, 16 Dec 2015 08:59:01 +0000 (08:59 +0000)]
Revert "Make zlib API constness-aware"

This reverts commit fb0246c6fd7cd34b820558f75eb48bba6326b768.  That commit assumes that if you define Z_CONST, z_const will be defined; that is *not* the case with older versions of zlib, which don't define z_const under any circumstances.

Change-Id: I6f9b7ea18922799b1aaf94dc2c63120128f2550a
Reviewed-on: https://code.wireshark.org/review/12671
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQt: save custom colors in recent_common file
Pascal Quantin [Tue, 15 Dec 2015 18:47:02 +0000 (19:47 +0100)]
Qt: save custom colors in recent_common file

This allows to save colors across sessions for systems other than
OSX that do not provide a system wide color picker

While we are at it, let's stop reading the recent file twice at startup

Bug: 11888
Change-Id: I69ff14d699d8111fe6a8bdac0157fcd115a60c2b
Reviewed-on: https://code.wireshark.org/review/12659
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agopacket/gluster: Add GF_CBK_CACHE_INVALADATION dissector bits
Soumya Koduri [Fri, 11 Dec 2015 10:51:34 +0000 (16:21 +0530)]
packet/gluster: Add GF_CBK_CACHE_INVALADATION dissector bits

As part of Gluster UPCALL infrastructure support, a new rpc
CBK procedure has been added to gluster_cbk_actors program in
order to send CACHE-INVALIDATION callback requests from
the GlusterFS server to its client.

This change is to include that procedure to the wireshark dissector.

Files containing definitions related to this new RPC procedure added -
https://github.com/gluster/glusterfs/blob/master/rpc/rpc-lib/src/protocol-common.h#L129
https://github.com/gluster/glusterfs/blob/master/rpc/xdr/src/glusterfs3-xdr.x#L47
https://github.com/gluster/glusterfs/blob/master/libglusterfs/src/upcall-utils.h

bug:11880
Change-Id: I18616b00616c6a612417913373c1b9c900f4972c
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: https://code.wireshark.org/review/12565
Reviewed-by: Niels de Vos <ndevos@redhat.com>
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>
8 years agotelnet: full START_TLS support
Peter Wu [Tue, 15 Dec 2015 13:10:15 +0000 (14:10 +0100)]
telnet: full START_TLS support

Assumes that the source and destination ports are different (or else
some packets may be wrongly dissected as TLS instead of telnet). SSL
does something similar.

Bug: 11874
Change-Id: Ibf6d3ce2950cb5745c33716db21005cd28bf603b
Reviewed-on: https://code.wireshark.org/review/12652
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>
8 years agoQt: fix memleaks related to interface dialog
Peter Wu [Fri, 11 Dec 2015 10:41:07 +0000 (11:41 +0100)]
Qt: fix memleaks related to interface dialog

Also fix a not-so-problematic recent files "leak" when quitting
Wireshark.

Change-Id: I8556b07c197f0934f93d6da8c573c47fbd3fc060
Reviewed-on: https://code.wireshark.org/review/12529
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoMake zlib API constness-aware
João Valverde [Mon, 30 Nov 2015 17:35:34 +0000 (17:35 +0000)]
Make zlib API constness-aware

ZLIB_CONST must be defined before including zlib.h to expose 'z_const'.

Change-Id: Ic0dbd59ed3c760dd84ef4546f6ff4d5d3db91519
Reviewed-on: https://code.wireshark.org/review/12547
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: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRADIUS: Enhance display of Egress-VLANID
Alexis La Goutte [Tue, 15 Dec 2015 17:15:14 +0000 (18:15 +0100)]
RADIUS: Enhance display of Egress-VLANID

bug: 11894
Change-Id: I4170c85b55bb39aef37bb029bcf5df020a400fc9
Reviewed-on: https://code.wireshark.org/review/12656
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>
8 years agoRADIUS: fix indent
Alexis La Goutte [Tue, 15 Dec 2015 14:54:25 +0000 (15:54 +0100)]
RADIUS: fix indent

Change-Id: Id49f707ae869e5e8e4b31622167638b9168069fa
Reviewed-on: https://code.wireshark.org/review/12655
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRADIUS: fix typo on URL
Alexis La Goutte [Tue, 15 Dec 2015 14:42:38 +0000 (15:42 +0100)]
RADIUS: fix typo on URL

Missing rfc on url...

Change-Id: I6eb0af95c7b0ba44e43fe30010f784323b9fee4f
Reviewed-on: https://code.wireshark.org/review/12654
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agodebian: Sync patches with Debian
Balint Reczey [Tue, 15 Dec 2015 16:30:40 +0000 (17:30 +0100)]
debian: Sync patches with Debian

Change-Id: Iec369a7c5ecd559310198efca2cadb56a449de49
Reviewed-on: https://code.wireshark.org/review/12662
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoAdd files missing from make dists's tarball
Balint Reczey [Tue, 15 Dec 2015 16:43:16 +0000 (17:43 +0100)]
Add files missing from make dists's tarball

Bug: 11893
Change-Id: I11e6a40856f224e65401b01fafb3e561950ec086
Reviewed-on: https://code.wireshark.org/review/12663
Petri-Dish: Balint Reczey <balint@balintreczey.hu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoReport an error if the IP total length is bigger than the containing length.
Guy Harris [Wed, 16 Dec 2015 01:19:37 +0000 (17:19 -0800)]
Report an error if the IP total length is bigger than the containing length.

Change-Id: Ib5990fce89304808a585a99164c0176899acbbb7
Reviewed-on: https://code.wireshark.org/review/12667
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoDon't report an error for a non-multiple-of-4 chunk length.
Guy Harris [Wed, 16 Dec 2015 00:39:27 +0000 (16:39 -0800)]
Don't report an error for a non-multiple-of-4 chunk length.

To quote RFC 4960:

Chunk Length: 16 bits (unsigned integer)

      This value represents the size of the chunk in bytes, including
      the Chunk Type, Chunk Flags, Chunk Length, and Chunk Value fields.
      Therefore, if the Chunk Value field is zero-length, the Length
      field will be set to 4.  *The Chunk Length field does not count any
      chunk padding.*

      Chunks (including Type, Length, and Value fields) are padded out
      by the sender with all zero bytes to be a multiple of 4 bytes
      long.  This padding MUST NOT be more than 3 bytes in total.  The
      Chunk Length value does not include terminating padding of the
      chunk.  However, it does include padding of any variable-length
      parameter except the last parameter in the chunk.  The receiver
      MUST ignore the padding.

      Note: A robust implementation should accept the chunk whether or
      not the final padding has been included in the Chunk Length.

so the the chunk is *not* required to include the length of the final
padding in the chunk, although any padding *between* variable-length
parameters in the chunk must be included in the length (obviously, as
it's part of the chunk data).

Change-Id: I99d64fdd907c41229aa9ad10a230fff4bcdfa5f4
Reviewed-on: https://code.wireshark.org/review/12664
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years ago[GTPv2] Add dissection of Source to Target Transparent Container
AndersBroman [Tue, 15 Dec 2015 09:06:42 +0000 (10:06 +0100)]
[GTPv2] Add dissection of Source to Target Transparent Container
in SRVCC PS to CS Request

Change-Id: I663d31f5e35d8264241f73fc4e33bce18fa31333
Reviewed-on: https://code.wireshark.org/review/12646
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>
8 years agoQt: apply '-Y' display filter unconditionally and not only when opening a capture...
Pascal Quantin [Tue, 15 Dec 2015 08:15:51 +0000 (09:15 +0100)]
Qt: apply '-Y' display filter unconditionally and not only when opening a capture file

Bug: 11891
Change-Id: I20c4497bdf255627c845f5d6fba2ad7797815b08
Reviewed-on: https://code.wireshark.org/review/12645
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoQt: resize Follow Stream conversation QComboBox to its content
Pascal Quantin [Tue, 15 Dec 2015 08:01:37 +0000 (09:01 +0100)]
Qt: resize Follow Stream conversation QComboBox to its content

Bug: 11887
Change-Id: Ibc3bd6ed8c0615f8bcf417ca1ba4d872f81ade92
Reviewed-on: https://code.wireshark.org/review/12644
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
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>
8 years agodisabled_protos.c: Fix heur_compare() constness [-Wcast-qual]
João Valverde [Tue, 15 Dec 2015 07:21:16 +0000 (07:21 +0000)]
disabled_protos.c: Fix heur_compare() constness [-Wcast-qual]

Change-Id: Ibe2df9dbad432d5480f1f64f11968b645e9cf967
Reviewed-on: https://code.wireshark.org/review/12641
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoqt: add init values to make clang happy.
Dario Lombardo [Wed, 14 Oct 2015 14:51:23 +0000 (16:51 +0200)]
qt: add init values to make clang happy.

Found by clang analyzer.

Change-Id: I04598e8e9fcb716b373d4b2f707de8f263ff36b0
Reviewed-on: https://code.wireshark.org/review/11029
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>
8 years agoQt: TCP/UDP streams are off by one in follow stream window
Pascal Quantin [Tue, 15 Dec 2015 07:52:09 +0000 (08:52 +0100)]
Qt: TCP/UDP streams are off by one in follow stream window

Bug: 11889
Change-Id: I6a274c8b1df8b78f4063534d534002848bd0f199
Reviewed-on: https://code.wireshark.org/review/12642
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agocmake: Fix Unix introspection for floorl() [-Wredundant-decls]
João Valverde [Sat, 12 Dec 2015 07:09:29 +0000 (07:09 +0000)]
cmake: Fix Unix introspection for floorl() [-Wredundant-decls]

Change-Id: I76a909c6f14b50b1a71205f9da2cb44a2e67969f
Reviewed-on: https://code.wireshark.org/review/12561
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: João Valverde <j@v6e.pt>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoConfigureChecks (cmake): Fix indent (use tabs) and modelines
Alexis La Goutte [Mon, 14 Dec 2015 10:53:27 +0000 (11:53 +0100)]
ConfigureChecks (cmake): Fix indent (use tabs) and modelines

Change-Id: I905c10583baf71b105c65c25f43fb09dd2279b8e
Reviewed-on: https://code.wireshark.org/review/12609
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoT.38: don't register for TCP and UDP ports 6004.
Jeff Morriss [Tue, 15 Dec 2015 03:08:13 +0000 (22:08 -0500)]
T.38: don't register for TCP and UDP ports 6004.

T.38 normally picks up its port number dynamically from signalling, port 6004
isn't registered to T.38, and anyway port 6004 is now (correctly) registered
to X11.

(For the cases where the signaling is missing there's still Decode-As.)

Change-Id: I53d8aa27ed1b042dd60bbdb0df2bd89254f1f001
Reviewed-on: https://code.wireshark.org/review/12640
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoMake init_progfile_dir() take a function pointer [-Wpedantic]
João Valverde [Sat, 12 Dec 2015 02:34:47 +0000 (02:34 +0000)]
Make init_progfile_dir() take a function pointer [-Wpedantic]

Change-Id: I45f8ea5ee6ccc5a484c60ad6e686aaf30f6b0c98
Reviewed-on: https://code.wireshark.org/review/12557
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoCreate some more capture dissector tables.
Michael Mann [Mon, 14 Dec 2015 13:48:59 +0000 (08:48 -0500)]
Create some more capture dissector tables.

These were created from capture dissector functions that had switch statements determine "next" protocol/dissector.  The registration decreases the need for function declarations in header files.

Added new capture dissection tables for IP, IPv6, TCP and UDP as that seems like the next logical place to expand

Change-Id: I1ec0cd54eecda4f400669ee5b026bf6e2b46545a
Reviewed-on: https://code.wireshark.org/review/12634
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoNote why we do -Wno-variadic-macros.
Guy Harris [Mon, 14 Dec 2015 22:26:29 +0000 (14:26 -0800)]
Note why we do -Wno-variadic-macros.

Change-Id: Id57a6985eb37d9bf5246cf0f57cc24bb0ca153b9
Reviewed-on: https://code.wireshark.org/review/12639
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoNote why we do -Wno-variadic-macros.
Guy Harris [Mon, 14 Dec 2015 22:06:14 +0000 (14:06 -0800)]
Note why we do -Wno-variadic-macros.

Change-Id: Icaa5c1e927d0984bd76d9d157166de359891d381
Reviewed-on: https://code.wireshark.org/review/12638
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoLua: Fix switch-case braces.
Stig Bjørlykke [Mon, 14 Dec 2015 21:17:46 +0000 (22:17 +0100)]
Lua: Fix switch-case braces.

+ fixed a comment.

Change-Id: Ib1a8449054afde3b4df7ad57f0c3da07016281c2
Reviewed-on: https://code.wireshark.org/review/12635
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoLua: Free Pref enum values
Stig Bjørlykke [Mon, 14 Dec 2015 19:08:20 +0000 (20:08 +0100)]
Lua: Free Pref enum values

Free the Pref enum values in Pref__gc().

Change-Id: I4d66dbe7ee4879f3b14094135887d78cba876ea3
Reviewed-on: https://code.wireshark.org/review/12628
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoAdd comments to explain what we're doing with strings.
Guy Harris [Mon, 14 Dec 2015 19:24:53 +0000 (11:24 -0800)]
Add comments to explain what we're doing with strings.

Change-Id: I043d02092464ec8cbbec08d11b29dfee248116bf
Reviewed-on: https://code.wireshark.org/review/12629
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoLua: Free Pref default string
Stig Bjørlykke [Mon, 14 Dec 2015 18:40:51 +0000 (19:40 +0100)]
Lua: Free Pref default string

Store the Pref default string value and ensure this is freed both
when registering the pref and when not.

Use g_malloc0 to allocate Pref and avoid several init's.

Change-Id: I5f97a15d06068d7805f02f7c7feea61f9b2030f5
Reviewed-on: https://code.wireshark.org/review/12626
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years ago64-bit constants need to be wrapped in G_GUINT64_CONSTANT().
Guy Harris [Mon, 14 Dec 2015 18:37:08 +0000 (10:37 -0800)]
64-bit constants need to be wrapped in G_GUINT64_CONSTANT().

When building for ILP32 platforms, they need to be appropriately marked
so the compiler treats them as 64-bit.

Change-Id: I7a463f88540c446f08a9137953276ed5a735c644
Reviewed-on: https://code.wireshark.org/review/12625
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agowslua: Change macro to avoid nuisance warning [-Wredundant-decls]
João Valverde [Sat, 12 Dec 2015 06:16:03 +0000 (06:16 +0000)]
wslua: Change macro to avoid nuisance warning [-Wredundant-decls]

Change-Id: I358735b5ff69e414a227ce8c69e75ff3e04ad3b3
Reviewed-on: https://code.wireshark.org/review/12624
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: Guy Harris <guy@alum.mit.edu>
8 years ago[PPP] Dissect BCP NCP Options data.
AndersBroman [Mon, 14 Dec 2015 15:20:00 +0000 (16:20 +0100)]
[PPP] Dissect BCP NCP Options data.

Change-Id: Ic8bf173d3fded75da93c9c956827a7e250db351d
Reviewed-on: https://code.wireshark.org/review/12623
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoCreate capture dissector tables.
Michael Mann [Sun, 13 Dec 2015 21:54:16 +0000 (16:54 -0500)]
Create capture dissector tables.

They are modeled after dissection dissector tables, but for the moment, don't have/need the flexibility.  They are intended to be much simpler/faster than full dissection.
The two most used/needed are "wtap_encap" and "ethertype", so they were the basis of starting to use and test capture dissector table API.  Others may be added in the future.

The "capture dissector" function signature needed a bit of tweeking to handling "claiming" of a packet.
The current application of this is capture functions returning TRUE if they affected a "type" of packet count.  Returning FALSE ends up considering the packet an "other" type.

Change-Id: I81d06a6ccb2c03665f087258a46b9d78d513d6cd
Reviewed-on: https://code.wireshark.org/review/12607
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoPPP: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Thu, 10 Dec 2015 13:49:10 +0000 (14:49 +0100)]
PPP: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I85757acbc920288f7554e29a784ddf60b0446d88
Reviewed-on: https://code.wireshark.org/review/12499
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>
8 years agoGTPv2 conversation adaptation
Gloria Pozuelo [Thu, 10 Dec 2015 14:45:41 +0000 (15:45 +0100)]
GTPv2 conversation adaptation

Change-Id: I55356532619d4dbeb225fc8a1684c22630bd00bd
Reviewed-on: https://code.wireshark.org/review/12501
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoLua: Cleanup ProtoField_time
Stig Bjørlykke [Fri, 11 Dec 2015 18:52:15 +0000 (19:52 +0100)]
Lua: Cleanup ProtoField_time

Reverted some unneeded changes from 7f074364 because it's currently
only used for FT_ABSOLUTE_TIME.

Also fixed some small indent issues.

Change-Id: I923e35bf8ad4e991518bee973b87d4be06137463
Reviewed-on: https://code.wireshark.org/review/12539
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoNo need to free the value of a string preference in the garbage collector.
Guy Harris [Sun, 13 Dec 2015 23:37:18 +0000 (15:37 -0800)]
No need to free the value of a string preference in the garbage collector.

The preference has already been deregistered at that point, so the value
of the preference has been freed and the pointer to it has been set to
null, so it's already been freed and its pointer no longer points to it
and the free from Lua will do nothing.
Change-Id: I11bf74932303151483cd3699659f67d64b466759
Reviewed-on: https://code.wireshark.org/review/12606
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agorecent.c: fix declaration of ‘value_string’ shadows a global declaration
Pascal Quantin [Sun, 13 Dec 2015 22:06:55 +0000 (23:06 +0100)]
recent.c: fix declaration of ‘value_string’ shadows a global declaration

Change-Id: I7dff01e534094c27839476f322f88c2774bd9e62
Reviewed-on: https://code.wireshark.org/review/12605
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoULP: prettify dissection
Pascal Quantin [Sun, 13 Dec 2015 19:14:22 +0000 (20:14 +0100)]
ULP: prettify dissection

Bug: 11039
Change-Id: I1d39367818a0039bc3100cd464baa6268c8863dd
Reviewed-on: https://code.wireshark.org/review/12603
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoUse common code for Boolean and enumerated recent values.
Guy Harris [Sun, 13 Dec 2015 21:45:24 +0000 (13:45 -0800)]
Use common code for Boolean and enumerated recent values.

Cleans up the code a bit, and means the comment written out for
enumerated values will contain the write list of value strings.

Change-Id: Iad484e5da9349ab48e3c55e69f671b0a68b5cc6d
Reviewed-on: https://code.wireshark.org/review/12604
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoFix crash at startup
Pascal Quantin [Sun, 13 Dec 2015 20:42:54 +0000 (21:42 +0100)]
Fix crash at startup

Change-Id: I6d21fb06ace6186991f4e481bfc7452364e6c4f7
Reviewed-on: https://code.wireshark.org/review/12602
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoui: Read and write correct recent timestamp format
Stig Bjørlykke [Sun, 13 Dec 2015 12:32:34 +0000 (13:32 +0100)]
ui: Read and write correct recent timestamp format

Rewrite to use value_string to ensure correct value strings used,
to add backward compatibility and to avoid global-buffer-overflow
in possible future inconsistencies.

This bug was introduced in 2a088c1d when adding new timestamp formats.

Change-Id: I1bf4ac8427db92bfb56b4e5b90809fe08eebed20
Reviewed-on: https://code.wireshark.org/review/12584
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQt: Removed applyRecentColumnWidths from recentFilesRead
Stig Bjørlykke [Sat, 12 Dec 2015 22:28:26 +0000 (23:28 +0100)]
Qt: Removed applyRecentColumnWidths from recentFilesRead

Adjusting column widths from recent settings is only needed
when columns has changed.

Don't recreate the columns when changing timestamp options or
name resolution, only reset columns.

Change-Id: I4c9a9f63c34542935dd282188d98b2b5b013c5f3
Reviewed-on: https://code.wireshark.org/review/12579
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years ago[ppi] initialize phdr to 0
Martin Kaiser [Sat, 12 Dec 2015 15:00:33 +0000 (16:00 +0100)]
[ppi] initialize phdr to 0

to make sure that it's not used without prior initialisation

Bug: 11876
Change-Id: Ic19279b01dfd7ac4be596b3aeb537e31604e4147
Reviewed-on: https://code.wireshark.org/review/12573
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>