metze/wireshark/wip.git
8 years agoDocument tvb_get_guintXXX and tvb_get_ieee_XXX
Michael Mann [Thu, 26 Nov 2015 02:40:43 +0000 (21:40 -0500)]
Document tvb_get_guintXXX and tvb_get_ieee_XXX

Change-Id: I498c0ca39befa0c0117ee78c23714bf7af193ce9
Reviewed-on: https://code.wireshark.org/review/12164
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agocmake: print the current CMAKE_C_FLAGS/CMAKE_CXX_FLAGS
Peter Wu [Wed, 25 Nov 2015 10:59:37 +0000 (11:59 +0100)]
cmake: print the current CMAKE_C_FLAGS/CMAKE_CXX_FLAGS

It is misleading to print RelWithDebInfo flags if I am using Debug.

Change-Id: I575d5c950cbe9d59852799c28fd88426f20cdaab
Reviewed-on: https://code.wireshark.org/review/12133
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 ago[RUDP] Use proto_tree_add_bitmask instead of something homegrown.
Michael Mann [Wed, 25 Nov 2015 20:18:02 +0000 (15:18 -0500)]
[RUDP] Use proto_tree_add_bitmask instead of something homegrown.

Also don't put calls to dissectors under an if (tree), even for the data dissector.

Change-Id: Ia897d7ae7aa61c89e92949225a54f40d56c1df74
Reviewed-on: https://code.wireshark.org/review/12155
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 agoReplace tvb_get_enctohl and tvb_get_enctohs with the functions already created in...
Michael Mann [Wed, 25 Nov 2015 19:11:06 +0000 (14:11 -0500)]
Replace tvb_get_enctohl and tvb_get_enctohs with the functions already created in tvbuff.h

Change-Id: Id44d4b11e0ba140f6ec4a8e87eaaa8eacbc2d8b6
Reviewed-on: https://code.wireshark.org/review/12151
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 agoRemove create_dissector_handle
Michael Mann [Wed, 25 Nov 2015 14:30:38 +0000 (09:30 -0500)]
Remove create_dissector_handle

Change-Id: I1ad7c112eda45a41c3f94b04348e328d44d8f585
Reviewed-on: https://code.wireshark.org/review/12152
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoMost fields in an ISO 8601 date/time are unsigned.
Guy Harris [Thu, 26 Nov 2015 03:01:07 +0000 (19:01 -0800)]
Most fields in an ISO 8601 date/time are unsigned.

Add some bounds checks while we're at it.

Change-Id: I19804aee10496fd68f95a27865f8f455d3abbe9f
Reviewed-on: https://code.wireshark.org/review/12166
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoISUP: fix a wrong removal of proto_tree_add_text()
Pascal Quantin [Wed, 25 Nov 2015 17:56:16 +0000 (18:56 +0100)]
ISUP: fix a wrong removal of proto_tree_add_text()

Bug: 11768
Change-Id: I42199f391f6559de88ce37104bd74a9f4be77e09
Reviewed-on: https://code.wireshark.org/review/12149
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 agoSCTP: verify frame pointer before dereferencing it
Pascal Quantin [Wed, 25 Nov 2015 16:53:30 +0000 (17:53 +0100)]
SCTP: verify frame pointer before dereferencing it

Bug: 11767
Change-Id: Icd01550e0aaa4cd0cc33ae3acc0ef702c38f4db4
Reviewed-on: https://code.wireshark.org/review/12146
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 agoPPP: RTP IPHC Compressed Non TCP packets and D bit zero packets (RFC 2507)
John A. Thacker [Wed, 25 Nov 2015 16:07:26 +0000 (11:07 -0500)]
PPP: RTP IPHC Compressed Non TCP packets and D bit zero packets (RFC 2507)

Add support for RFC 2507 style IP Header Compression Compressed Non TCP packets
(PPP protocol 0x0065). Also support RTP IPHC Full Header packets (protocol
0x0061) where the D bit is unset. Add expert info for when the D bit is unset
but the sequence number is nonzero.

Also fix an existing typo where the CUDP16 handle was being called for the
CUDP8 "ethertype" for NDISWAN (very rare.)

Bug: 11776
Change-Id: I9a7adcc5fdd4ee49bb75724142684043bd664111
Reviewed-on: https://code.wireshark.org/review/12143
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agowmem: add initializer (CID 1340194).
Dario Lombardo [Wed, 25 Nov 2015 16:00:26 +0000 (17:00 +0100)]
wmem: add initializer (CID 1340194).

Change-Id: I7b3d7a95af213a198b62c1475ba2125f8fe37ee6
Reviewed-on: https://code.wireshark.org/review/12142
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Evan Huus <eapache@gmail.com>
8 years agoWPA (IEEE802.11) decryption function cleanups
Alexander Wetzel [Sun, 22 Nov 2015 13:01:23 +0000 (14:01 +0100)]
WPA (IEEE802.11) decryption function cleanups

 - Updated AirPDcapPacketProcess function description
 - Try to return better error codes
 - Remove broken/useless return of keys from AirPDcapRsna4WHandshake

Change-Id: I1e4e0a76f6d1307e11c0466f17935dd7030561e1
Reviewed-on: https://code.wireshark.org/review/12033
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 agoRTPS: feature to add a preference that enables the dissection
Juanjo Martin [Tue, 24 Nov 2015 17:59:54 +0000 (18:59 +0100)]
RTPS: feature to add a preference that enables the dissection
of the RTPS special announcements that RTI sends. They just start
by RTPX and are sent to the domain 0 always.

Bug: 11765
Change-Id: I00b47f1aa1702bb35aeb8c4686c7012fecc94baa
Reviewed-on: https://code.wireshark.org/review/12105
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: move file close (CID 1159303)
Dario Lombardo [Wed, 25 Nov 2015 16:20:11 +0000 (17:20 +0100)]
qt: move file close (CID 1159303)

Change-Id: Ib21327babc77324313a1b3e2dd6ba0987a8fb333
Reviewed-on: https://code.wireshark.org/review/12144
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoRemove 'filetap' residue from .gitignore
João Valverde [Wed, 25 Nov 2015 14:17:31 +0000 (14:17 +0000)]
Remove 'filetap' residue from .gitignore

Change-Id: Ica5aff181e3b5031bd0be59c71a6bfa485e5c199
Reviewed-on: https://code.wireshark.org/review/12148
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoTACACS: fix indent (and add modelines)
Alexis La Goutte [Wed, 25 Nov 2015 10:51:51 +0000 (11:51 +0100)]
TACACS: fix indent (and add modelines)

Change-Id: Ia8d52e9d8f8600c28988dd8d3cc11c7fe08943a3
Reviewed-on: https://code.wireshark.org/review/12131
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agocreate_dissector_handle -> new_create_dissector_handle for ASN.1 dissectors
Michael Mann [Tue, 24 Nov 2015 23:03:04 +0000 (18:03 -0500)]
create_dissector_handle -> new_create_dissector_handle for ASN.1 dissectors

Change-Id: I3d7a61a5ddd79b7bcbec5b9c515470848f413fd5
Reviewed-on: https://code.wireshark.org/review/12121
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoRequire BER dissector (OID) registration to be "new style".
Michael Mann [Tue, 24 Nov 2015 18:13:18 +0000 (13:13 -0500)]
Require BER dissector (OID) registration to be "new style".

Both old and new style API existed, just remove the "old" one.

Change-Id: If725e778a0ecad5a431d634ed5c4856b4a281013
Reviewed-on: https://code.wireshark.org/review/12107
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoasn2wrs.py: always use relative paths
Peter Wu [Tue, 24 Nov 2015 23:24:40 +0000 (00:24 +0100)]
asn2wrs.py: always use relative paths

Avoids absolute paths when using cmake and doing an in-tree build.

Before (source directory is /tmp/wireshark):

    /*--- Included file: /tmp/wireshark/asn1/t38/packet-t38-exp.h ---*/

After:

    /*--- Included file: packet-t38-exp.h ---*/

Change-Id: Id5c98bff7b97447479e1a09751701f2f52132b20
Reviewed-on: https://code.wireshark.org/review/12118
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoPress Start instead of Manage Interfaces on Enter
Peter Wu [Wed, 25 Nov 2015 11:51:35 +0000 (12:51 +0100)]
Press Start instead of Manage Interfaces on Enter

In the Capture Interfaces dialog, the default dialog action was
non-existing. Fix Extcap while at it (searched for "YesRole").

Reported on #wireshark at Freenode.

Change-Id: I7920b806a855acc20dcd2081f6b0d58e993b4ac1
Reviewed-on: https://code.wireshark.org/review/12136
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
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: Peter Wu <peter@lekensteyn.nl>
8 years agoFix memory leak in write_prefs
Mikael Kanstrup [Mon, 23 Nov 2015 15:33:42 +0000 (16:33 +0100)]
Fix memory leak in write_prefs

Valgrind reports leaks like these:
384 bytes in 8 blocks are definitely lost in loss record 43,909 of 46,703
  at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0xD6A055F: __vasprintf_chk (vasprintf_chk.c:80)
  by 0xA5FD0FB: g_vasprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0xA5D8C7F: g_strdup_vprintf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0xA5D8D1B: g_strdup_printf (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0x6854FA6: write_prefs (prefs.c:4941)
  by 0x733A9A: prefs_main_write (preference_utils.c:266)
  by 0x5F8A5C: CaptureInterfacesDialog::saveOptionsToPreferences() (capture_interfaces_dialog.cpp:851)
  by 0x5F93CD: CaptureInterfacesDialog::on_manage_clicked() (capture_interfaces_dialog.cpp:858)
  by 0x7182AC: CaptureInterfacesDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (capture_interfaces_dialog.moc.cpp:316)
  by 0x718822: CaptureInterfacesDialog::qt_metacall(QMetaObject::Call, int, void**) (capture_interfaces_dialog.moc.cpp:413)
  by 0xBEBE36C: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)

When storing user preferences the constructed pathname of user's
preferences file is not freed properly.

Change-Id: I5cdc53ca836503af048e1d06e4614d83ef8921ac
Reviewed-on: https://code.wireshark.org/review/12114
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agocreate_dissector_handle -> new_create_dissector_handle
Michael Mann [Wed, 25 Nov 2015 02:59:51 +0000 (21:59 -0500)]
create_dissector_handle -> new_create_dissector_handle

This finalizes the transformation for dissectors.

Change-Id: Ie5986b72bb69a6e8779ca3f5e20a80357c9e6fea
Reviewed-on: https://code.wireshark.org/review/12122
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoFix memory leak in capture_get_if_capabilities
Mikael Kanstrup [Mon, 23 Nov 2015 15:33:40 +0000 (16:33 +0100)]
Fix memory leak in capture_get_if_capabilities

Valgrind reports memory leaks like these:
154 bytes in 10 blocks are possibly lost in loss record 8,660 of 11,855
  at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0xBD9EA38: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
  by 0xBDB3358: g_strndup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
  by 0xBDB49AD: g_strsplit (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3200.4)
  by 0x502291: capture_get_if_capabilities (capture_ifinfo.c:269)
  by 0x50A4CC: scan_local_interfaces (iface_lists.c:186)
  by 0x4C4BBD: refresh_local_interface_lists (capture_dlg.c:6117)
  by 0x504EC8: iface_mon_handler2 (iface_monitor.c:113)
  by 0xC9ADF1D: ??? (in /lib/libnl-3.so.200.3.0)
  by 0xC56DF19: ??? (in /usr/lib/libnl-route-3.so.200.3.0)
  by 0xC9ABE5E: nl_cache_parse (in /lib/libnl-3.so.200.3.0)
  by 0xC9AF5CA: nl_msg_parse (in /lib/libnl-3.so.200.3.0)

Under certain conditions raw_list variable was not freed properly.

Change-Id: Ibbaf0d67d983ee6912cfc9dc1a3169bc773b03c9
Reviewed-on: https://code.wireshark.org/review/12112
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: Michael Mann <mmann78@netscape.net>
8 years agoFix buffer overrun in zlib decompression
Peter Wu [Sun, 22 Nov 2015 17:16:46 +0000 (18:16 +0100)]
Fix buffer overrun in zlib decompression

After updating next_in (to remove the gzip header), avail_in must also
be updated. Failing to do makes zlib read past the input buffer. In
theory this would resukt in a buffer overrun of at most double the input
length, in practice zlib returns as soon as the compression fails (after
reading a few bytes).

Bug: 11548
Change-Id: If71691a2846338f46d866964a77cc4e74a9b61dd
Reviewed-on: https://code.wireshark.org/review/12038
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoFix memory leaks related to hide_interface function
Mikael Kanstrup [Mon, 23 Nov 2015 15:33:41 +0000 (16:33 +0100)]
Fix memory leaks related to hide_interface function

Valgrind report leaks like these:
6 bytes in 6 blocks are definitely lost in loss record 2,197 of 46,703
  at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0xA5C1610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0xA5D8B0E: g_strdup (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0x69A211: ManageInterfacesDialog::localAccepted() (manage_interfaces_dialog.cpp:454)
  by 0x69A500: ManageInterfacesDialog::on_buttonBox_accepted() (manage_interfaces_dialog.cpp:211)
  by 0x71DB32: ManageInterfacesDialog::qt_metacall(QMetaObject::Call, int, void**) (manage_interfaces_dialog.moc.cpp:245)
  by 0xBEBE36C: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
  by 0xBEBE2A5: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
  by 0xAF87E41: QAbstractButton::clicked(bool) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
  by 0xAD11095: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
  by 0xAD11BAD: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
  by 0xAD11D23: QAbstractButton::mouseReleaseEvent(QMouseEvent*) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)

96 bytes in 4 blocks are definitely lost in loss record 42,458 of 52,779
  at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0xA5C1610: g_malloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0xA5D722D: g_slice_alloc (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0xA5B84F3: g_list_append (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
  by 0x731F9A: hide_interface (iface_lists.c:426)
  by 0x69A211: ManageInterfacesDialog::localAccepted() (manage_interfaces_dialog.cpp:454)
  by 0x69A4F0: ManageInterfacesDialog::on_buttonBox_accepted() (manage_interfaces_dialog.cpp:211)
  by 0x71DB22: ManageInterfacesDialog::qt_metacall(QMetaObject::Call, int, void**) (manage_interfaces_dialog.moc.cpp:245)
  by 0xBEBE36C: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
  by 0xBEBE2A5: QMetaObject::activate(QObject*, int, int, void**) (in /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.2.1)
  by 0xAF87E41: QAbstractButton::clicked(bool) (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)
  by 0xAD11095: ??? (in /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.2.1)

These are caused by leaks inside hide_interface function and among
its users. Fixed by letting hide_interface function free its
resources properly and making sure the users follow the pattern.

Change-Id: I91527b83d36dc38b402d0f4a1db4b7db40fd83f9
Reviewed-on: https://code.wireshark.org/review/12113
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoPrint guint64's with G_GUINT64_FORMAT.
Guy Harris [Wed, 25 Nov 2015 11:33:44 +0000 (03:33 -0800)]
Print guint64's with G_GUINT64_FORMAT.

There is no guarantee that they will be long's, and thus no guarantee
that they can be printed with "%lu".

Change-Id: I5c2ff844a1024332f01dec58489a2d304ba4e7ce
Reviewed-on: https://code.wireshark.org/review/12135
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agocmake: fix dependencies for copy_data_files
Peter Wu [Wed, 25 Nov 2015 10:08:16 +0000 (11:08 +0100)]
cmake: fix dependencies for copy_data_files

Ensure that files from INSTALL_FILES depend on html_docs, not the parent
target copy_data_files (that would not help at all). Ensure that lua
scripts are generated before copying them (another moved dependency).
Explicitly track the help files that have to be textified for Windows
(this finalizes the addition of proper dependencies to copy_data_files
targets).

Since there is no compelling reason for the extra
copy_data_files_depends target now, remove it and move copy_data_files a
bit further in the file such that the dependencies can be set.

While at it, remove the unnecessary make_directory, the copy_data_files
target will create it automatically when copying a file into it.

Should fix the problem reported at https://code.wireshark.org/review/12028

Change-Id: I81e56c93ac0fc85e7385605b9c780a80b3d43c85
Reviewed-on: https://code.wireshark.org/review/12130
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoDon't check whether the C++ compiler supports a flag if there isn't one.
Guy Harris [Wed, 25 Nov 2015 10:53:48 +0000 (02:53 -0800)]
Don't check whether the C++ compiler supports a flag if there isn't one.

If we didn't find a C++ compiler, we can't check whether the
non-existent C++ compiler supports a flag, so don't do so.

Change-Id: I3d3232acae2dfc40deb0b01f35656ef53c4f1640
Reviewed-on: https://code.wireshark.org/review/12132
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoLua: fix URL to documentation
Uli Heilmeier [Wed, 25 Nov 2015 09:17:18 +0000 (10:17 +0100)]
Lua: fix URL to documentation

The Lua reference has been moved from User's Guide to Developer's Guide.

Change-Id: I3489d774e54310ce49997e33d5318adf5e0bb2bc
Reviewed-on: https://code.wireshark.org/review/12128
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoFix copy-and-pasteo.
Guy Harris [Wed, 25 Nov 2015 08:49:16 +0000 (00:49 -0800)]
Fix copy-and-pasteo.

Presumably the intent was to check for either of the two "CRC dropped"
event types.

(CID 1340186.)

Change-Id: Ieea8f5ab80bebbdbb683998a6747e5130d46b92d
Reviewed-on: https://code.wireshark.org/review/12127
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoProfinet: All SubframeData elements are not decoded
Birol Capa [Tue, 24 Nov 2015 14:23:33 +0000 (16:23 +0200)]
Profinet: All SubframeData elements are not decoded

In PDevData/PDirSubframeData/SubframeBlock, not all SubframeData elements are decoded/shown.
However, all bytes of the SubframeBlock are highlighted in the binary stream correctly.

Change-Id: Ic69999dff524e2e0c48a619def111c4bf9cca5e1
Reviewed-on: https://code.wireshark.org/review/12100
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 agoUse try_val_to_str_ext() in print_uuid().
Guy Harris [Wed, 25 Nov 2015 06:21:15 +0000 (22:21 -0800)]
Use try_val_to_str_ext() in print_uuid().

That's a much cleaner way of determining whether you found no matchin
bluetooth_uuid_vals_ext than checking whether val_to_str_ext_const()
returned the "use this if unknown" value.

It also lets us avoid a wmem_strdup().

Make print_numeric_uuid() and print_uuid() return const gchar *; there's
no reason for them *not* to be const, and that means we don't have to
throw away constness.

Change-Id: I62fb0b81c64c107dfea6c16ca8c5b9593f8f2a9d
Reviewed-on: https://code.wireshark.org/review/12126
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoFix typo.
Guy Harris [Wed, 25 Nov 2015 06:00:07 +0000 (22:00 -0800)]
Fix typo.

Convert the if-chain to a switch() statement while we're at it; if it
had been one originally, the compiler would have reported that there
were duplicate cases and failed.

(CID 1340190.)

Change-Id: I297ab32c51842af889bd6bebe764c0e45d57cea0
Reviewed-on: https://code.wireshark.org/review/12125
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoProfinet: ARProperties that contains Combined Object Container Bit
Birol Capa [Tue, 24 Nov 2015 14:13:15 +0000 (16:13 +0200)]
Profinet: ARProperties that contains Combined Object Container Bit

New ARProperties has a bit that contains if usage of Combined Object Container is required or not.

Change-Id: Ia4420cdf161d79933fcc0d8ffb411c02bfe26f3b
Reviewed-on: https://code.wireshark.org/review/12098
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>
8 years agoCheck whether create_tempfile() fails.
Guy Harris [Wed, 25 Nov 2015 05:38:05 +0000 (21:38 -0800)]
Check whether create_tempfile() fails.

Thanks and a tip of the Hatlo hat to Coverity for finding this.

Change-Id: Ie9d4089443e52ef427e0cc8ae6e90a9d9787134e
Reviewed-on: https://code.wireshark.org/review/12123
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoNo declarations in the middle of code.
Guy Harris [Wed, 25 Nov 2015 02:48:47 +0000 (18:48 -0800)]
No declarations in the middle of code.

We crank up pedantic warnings enough that this provokes "warning: ISO
C90 forbids mixed declarations and code" on the OS X 10.5 buildbot.

Change-Id: Ic3962f20d85e3ed003b84b298f83d12c3ae25ea1
Reviewed-on: https://code.wireshark.org/review/12120
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoAvoid colliding definitions of wmem_tree_t.
Guy Harris [Tue, 24 Nov 2015 23:40:44 +0000 (15:40 -0800)]
Avoid colliding definitions of wmem_tree_t.

Change-Id: I643eae3c35f96591770ab03ce44a85c806f17e1c
Reviewed-on: https://code.wireshark.org/review/12119
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoRemove support for "old style" dissectors in PER API.
Michael Mann [Tue, 24 Nov 2015 18:34:11 +0000 (13:34 -0500)]
Remove support for "old style" dissectors in PER API.

Most of it wasn't used in current Wireshark source anyway.

Change-Id: If395e4e940adc76a2701d226ba4f7c9b17cb795d
Reviewed-on: https://code.wireshark.org/review/12108
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 agoIntroduces augmented interval trees
Matthieu Coudron [Wed, 11 Nov 2015 02:19:43 +0000 (03:19 +0100)]
Introduces augmented interval trees

Interval trees (wmem_itree_t) are implemented as an extension of wmem_tree with a
guint64-based range as the key.
This is useful for instance in MPTCP analysis, to look for packets
matching a range defined by a mapping across TCP subflows.

Change-Id: Iea706d44fe975e390a4191ad0257ef37d5c71525
Reviewed-on: https://code.wireshark.org/review/11714
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQt: Save preferences when hide/show columns
Stig Bjørlykke [Tue, 24 Nov 2015 19:06:00 +0000 (20:06 +0100)]
Qt: Save preferences when hide/show columns

To preserve the hide/show column settings between switching profiles
the settings have to be saved.

Change-Id: I6f72b2980be149676e1c1099a604c8c6d0d995bf
Reviewed-on: https://code.wireshark.org/review/12109
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoVoIP: fix a null dereference when trying to retrieve the time of a T.38 tapped packet
Pascal Quantin [Tue, 24 Nov 2015 15:35:55 +0000 (16:35 +0100)]
VoIP: fix a null dereference when trying to retrieve the time of a T.38 tapped packet

Rather than trying to retrieve frame_data from the packet number row (while it could be filtered) let's use pinfo.

Bug: 11596
Change-Id: I53966bfdfbeb0c5918c3524f4b9748ea425fe8a5
Reviewed-on: https://code.wireshark.org/review/12103
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 agoQt: check that a file name was selected before trying to export follow content
Pascal Quantin [Tue, 24 Nov 2015 14:10:21 +0000 (15:10 +0100)]
Qt: check that a file name was selected before trying to export follow content

Bug: 11763
Change-Id: Iab117fe9f572eccc3cf88a9f3ff86a22aa0e33c9
Reviewed-on: https://code.wireshark.org/review/12099
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 agoArt-Net: Add missing ArtSync opcode
Ryan Mullen [Tue, 24 Nov 2015 15:18:16 +0000 (10:18 -0500)]
Art-Net: Add missing ArtSync opcode

Change-Id: I789219b4016507c7590598f4b04dd254abf13f5f
Reviewed-on: https://code.wireshark.org/review/12101
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRemove register_dissector.
Michael Mann [Tue, 24 Nov 2015 12:36:49 +0000 (07:36 -0500)]
Remove register_dissector.

new_register_dissector will eventually take its place, but that search/replace should be done when all "old style" APIs have been removed.

Change-Id: Ic3fdec67d5761fd72beeca7355f9de617562bb77
Reviewed-on: https://code.wireshark.org/review/12095
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoRemove the LDAP wrapping for registering dissectors and just use dissector_add_string...
Michael Mann [Tue, 24 Nov 2015 13:37:13 +0000 (08:37 -0500)]
Remove the LDAP wrapping for registering dissectors and just use dissector_add_string directly.

Change-Id: I307ee31562a5a84bc62691f367e3b8df3cb3f244
Reviewed-on: https://code.wireshark.org/review/12097
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoConvert T.124 API to use "new style" dissectors.
Michael Mann [Tue, 24 Nov 2015 13:22:57 +0000 (08:22 -0500)]
Convert T.124 API to use "new style" dissectors.

This seems like an unnecessary encapsulation of registering a dissector, but it can be used at runtime and not just a handoff function.

Change-Id: Ic13e34b5cecf493115f27a984bb886f2f76bc7de
Reviewed-on: https://code.wireshark.org/review/12096
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoConvert XMPP dissector to "new style".
Michael Mann [Tue, 24 Nov 2015 12:01:26 +0000 (07:01 -0500)]
Convert XMPP dissector to "new style".

Wasn't sure if the absence/disabling of the XML dissector should prevent this dissector from doing anything, but left the current implementation that allows it mostly because XMPP has an IANA registered TCP port.

Change-Id: Ie08b262d611e4d9add9566f440e3d825d6b0b55c
Reviewed-on: https://code.wireshark.org/review/12094
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 agosshdump: add default filter even when interfaces are not listed.
Dario Lombardo [Tue, 24 Nov 2015 09:20:10 +0000 (10:20 +0100)]
sshdump: add default filter even when interfaces are not listed.

Change-Id: I7fc6157a4ef0fff9b94f2ee222379f8d6d2962a9
Reviewed-on: https://code.wireshark.org/review/12090
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years ago[Custom plugins] CUSTOM_PLUGIN_IN_FILES is no longer required.
AndersBroman [Tue, 24 Nov 2015 11:59:37 +0000 (12:59 +0100)]
[Custom plugins] CUSTOM_PLUGIN_IN_FILES is no longer required.

Change-Id: I329a26ece145d70221d47c728e11dca54416a5cf
Reviewed-on: https://code.wireshark.org/review/12092
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoConvert PPI dissectors to "new style".
Michael Mann [Tue, 24 Nov 2015 05:18:24 +0000 (00:18 -0500)]
Convert PPI dissectors to "new style".

Also add some expert info and don't stop dissection based on version.

Change-Id: Ia471cb3d517008a486ec9ad8aaf11d06fa55a72d
Reviewed-on: https://code.wireshark.org/review/12082
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 agoFix NSIS installer generation broken in gffb5b3d
Pascal Quantin [Tue, 24 Nov 2015 09:16:48 +0000 (10:16 +0100)]
Fix NSIS installer generation broken in gffb5b3d

Change-Id: Ife7595f1bdeba02d53ec558cd4f26288b26687e7
Reviewed-on: https://code.wireshark.org/review/12091
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoMake dissect_mp4ves_config a real dissector to be called by SDP
Michael Mann [Mon, 23 Nov 2015 16:36:45 +0000 (11:36 -0500)]
Make dissect_mp4ves_config a real dissector to be called by SDP

Also convert packet-mp4ves.c to use only "new style" dissectors.

Change-Id: I949dd1300a66039906abffef5cc019f2b49cf414
Reviewed-on: https://code.wireshark.org/review/12074
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>
8 years agocmake: add dependency information for copy_data_files
Peter Wu [Sat, 21 Nov 2015 23:16:08 +0000 (00:16 +0100)]
cmake: add dependency information for copy_data_files

Original problem: run/radius/ (and other files) would continuously be
copied over because the "copy_directory" command is always invoked,
resulting in a newer timestamp (observable via rsync output).

Fix 1: convert from "copy_directory" to copying individual files
(matched via a glob pattern).

Fix 2: add DEPENDS information to the commands, ensuring that the
copy commands are only invoked when the file is actually newer.
(copy_if_different does not respect timestamp, so use plain copy.)

Other visible changes:
 - radius/Custom.make (automake thingey) is not copied anymore because
   an explicit list is used with glob patterns.
 - Removed comment about "default.tt" (gone since
   v1.99.0-rc1-1684-g07b003a, Makefile.nmake is still untouched though).

Due to fix 1, the number of processes increase by about 300. Due to fix
2 however, less processes are executed for repetitive runs. This is
visible in the following build time comparison:

    patch/generator cmake  build1  build2   clean
    before/make     24.86  152.73    3.46    1.04
    after/make      24.78  153.08    3.40    1.03
    before/ninja    22.99  141.68    0.64    0.24
    after/ninja     22.89  141.66    0.10    0.25

cmake is "cmake -DCMAKE_BUILD_TYPE=None -GNinja" (-G"Unix Makefiles");
build1 is invocation of "make -j10"/"ninja" on v2.1.0rc0-668-g94b9907;
build2 is the second invocation with this patch;
clean is "make clean" or "ninja clean".

Numbers are in seconds over 3 runs. This patch has no significant
performance impact for the first build, but the second run has improved
because the more efficient Ninja generator executes less processes.

Change-Id: I7b62556393520044aaaad17dafb82ac137ae73bb
Reviewed-on: https://code.wireshark.org/review/12028
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoDevelopers Guide updates for plugins with CMake
Graham Bloice [Mon, 23 Nov 2015 21:51:47 +0000 (21:51 +0000)]
Developers Guide updates for plugins with CMake

Remove references to nmake, add references to CMake.

Change-Id: Iea2d2b2fbdbab131bae823d5d6a5306630a70347
Reviewed-on: https://code.wireshark.org/review/12079
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years ago[docsis->type35ucd] Add support for type 35 UCD message.
AdrianSimionov [Wed, 18 Nov 2015 21:28:07 +0000 (22:28 +0100)]
[docsis->type35ucd] Add support for type 35 UCD message.

* Added support for TLV 20
* Added support for TLV 21
* Added support for TLV 22
* exceptions.h not needed compared to packet-ucd.c
and packet-type29ucd.c
* value_string iuc_vals3 became static const compared
to packet-ucd.c and packet-type29ucd.c
* if(tree) was removed to allow usage of expert on TLV length
* HEX crafted packet capture in Bug 11745

Bug: 11745
Change-Id: If21a44cf26941468747772cefffe29bafacb1c7c
Reviewed-on: https://code.wireshark.org/review/11956
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>
8 years agoFix indentation.
Guy Harris [Tue, 24 Nov 2015 05:50:08 +0000 (21:50 -0800)]
Fix indentation.

Change-Id: I2a64b9919d257ee0f7a57ba40c33bea1690ae0ad
Reviewed-on: https://code.wireshark.org/review/12086
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoCheck *how many* fields sscanf() found.
Guy Harris [Tue, 24 Nov 2015 05:48:04 +0000 (21:48 -0800)]
Check *how many* fields sscanf() found.

In the code that parses a GeneralizedTime field, don't assume that all
fields were found; check the return value from sscanf().

This should clean up a fuzz failure on the 2.0 buildbot:

https://buildbot.wireshark.org/wireshark-2.0/builders/Fuzz%20Test/builds/13/steps/valgrind-wireshark/logs/stdio

Change-Id: I431d7ed69ac1697bd42c22a37ca1451cfc85c94e
Reviewed-on: https://code.wireshark.org/review/12083
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQt (Recent Files): Fix typo on variable name
Alexis La Goutte [Sun, 22 Nov 2015 20:22:32 +0000 (21:22 +0100)]
Qt (Recent Files): Fix typo on variable name

Wrong variable (display field max) is updated when set max recent files

Change-Id: Ie995192ffbf56cbf6bd9cea5b029ab16ff547d2f
Ping-Bug:11748
Reviewed-on: https://code.wireshark.org/review/12046
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agodbus dissector: Handle alignments of basic types.
Nicolas Cavallari [Fri, 20 Nov 2015 13:45:24 +0000 (14:45 +0100)]
dbus dissector: Handle alignments of basic types.

The D-Bus Specifications states that all basic types have alignment
constraints.  Padding must be added before the value and not after.

Bug: 11758
Change-Id: I3c56689f47e1e385880dcea04506fe33b60670d3
Reviewed-on: https://code.wireshark.org/review/11994
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 agoDNS: Chain Query requests
Alexis La Goutte [Mon, 23 Nov 2015 10:59:10 +0000 (11:59 +0100)]
DNS: Chain Query requests

https://tools.ietf.org/html/draft-ietf-dnsop-edns-chain-query

Bug:11759
Change-Id: I631bf381dbfed956285855083a00a91f54a3c39c
Reviewed-on: https://code.wireshark.org/review/12064
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 agoDNS: Add EDNS(0) Padding Option
Alexis La Goutte [Fri, 13 Nov 2015 21:43:50 +0000 (22:43 +0100)]
DNS: Add EDNS(0) Padding Option

https://tools.ietf.org/html/draft-ietf-dprive-edns0-padding

Bug:11759
Change-Id: Ic71406dee2e5f44c6d2393bb325907f13222cf6f
Reviewed-on: https://code.wireshark.org/review/11815
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoDNS: Add edns-tcp-keepalive EDNS0 Option
Alexis La Goutte [Fri, 13 Nov 2015 21:28:03 +0000 (22:28 +0100)]
DNS: Add edns-tcp-keepalive EDNS0 Option

https://tools.ietf.org/html/draft-ietf-dnsop-edns-tcp-keepalive (draft-04)

Bug:11759
Change-Id: I12461d69f49068bfe46de76bc26f30d7374fc9c3
Reviewed-on: https://code.wireshark.org/review/11814
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoAdding RFC5512 extended community
Matt Texier [Mon, 23 Nov 2015 17:24:46 +0000 (18:24 +0100)]
Adding RFC5512 extended community

BGP: add the ability to decode Opaque extented community and in particular tunnel type

Change-Id: Ife53a267a2311397123a4e670924c673904bccbd
Ping-Bug: 11650
Reviewed-on: https://code.wireshark.org/review/12076
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoQt: Fix column resolve names
Stig Bjørlykke [Mon, 23 Nov 2015 19:15:48 +0000 (20:15 +0100)]
Qt: Fix column resolve names

Reset columns when resolve names column menu item is toggled,
and save preferences to preserve the setting.

We should probably have functions to redraw only one column.

Change-Id: I52dce8d104ab9bedd11edc5d200ab85154243cb5
Reviewed-on: https://code.wireshark.org/review/12077
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agosshdump: fix int issue
Dario Lombardo [Mon, 23 Nov 2015 12:27:10 +0000 (13:27 +0100)]
sshdump: fix int issue

Change-Id: Ic4367c90e79f6d3ee0d3e55f9f3ab0ebf74190f7
Reviewed-on: https://code.wireshark.org/review/12065
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoregister_dissector -> new_register_dissector
Michael Mann [Mon, 23 Nov 2015 15:56:36 +0000 (10:56 -0500)]
register_dissector -> new_register_dissector

Change-Id: Ifc8208e1b96e2a3bf297912500a5f252bfa8eed9
Reviewed-on: https://code.wireshark.org/review/12073
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agocmake: fix "multiple rules generate abi-descriptor.template" warning
Peter Wu [Sat, 21 Nov 2015 12:37:54 +0000 (13:37 +0100)]
cmake: fix "multiple rules generate abi-descriptor.template" warning

Fixes warning with "cmake -GNinja && ninja":

    ninja: warning: multiple rules generate
    /tmp/wireshark/abi-descriptor.template. builds involving this target
    will not be correct; continuing anyway [-w dupbuild=warn]

Change-Id: I82ed3aefd32852e6a98060c1a175df855062531d
Reviewed-on: https://code.wireshark.org/review/12009
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoQt: Fixed more column issues when changing profile.
Stig Bjørlykke [Mon, 23 Nov 2015 13:06:59 +0000 (14:06 +0100)]
Qt: Fixed more column issues when changing profile.

When changing profile without a loaded capture file we have to rebuild
cap_file_->cinfo when a capture is loaded.

Bug: 11493
Change-Id: I9b561a360236056c104cfdb478b855fa550325e2
Reviewed-on: https://code.wireshark.org/review/12068
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 agoPcap (pktdata): fix no previous prototype for ... [-Wmissing-prototypes]
Alexis La Goutte [Mon, 23 Nov 2015 13:11:44 +0000 (14:11 +0100)]
Pcap (pktdata): fix no previous prototype for ... [-Wmissing-prototypes]

no previous prototype for 'proto_register_pcap_pktdata' [-Wmissing-prototypes]
no previous prototype for 'proto_reg_handoff_pcap_pktdata' [-Wmissing-prototypes]

Change-Id: Id9c89b7217b4f0a0d1e1ca186ccfd8dfe1bcd2d9
Reviewed-on: https://code.wireshark.org/review/12067
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoRTPS: fix no previous prototype for 'compare/hash_by_guid' [-Wmissing-prototypes]
Alexis La Goutte [Mon, 23 Nov 2015 12:41:30 +0000 (13:41 +0100)]
RTPS: fix no previous prototype for 'compare/hash_by_guid' [-Wmissing-prototypes]

Change-Id: I31b36f1be6bf2476d801e891ac1799ce910a0105
Reviewed-on: https://code.wireshark.org/review/12066
Reviewed-by: Michael Mann <mmann78@netscape.net>
8 years agoHiSLIP: remove a DISSECTOR_ASSERT
Pascal Quantin [Mon, 23 Nov 2015 10:40:42 +0000 (11:40 +0100)]
HiSLIP: remove a DISSECTOR_ASSERT

It should not be used for request/response tracking

Change-Id: Ic93884cad5bcea40e082081097575908011871c8
Ping-Bug: 11752
Reviewed-on: https://code.wireshark.org/review/12063
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 agoRADIUS: fix indent
Alexis La Goutte [Mon, 23 Nov 2015 09:12:37 +0000 (10:12 +0100)]
RADIUS: fix indent

Add space (before and after) equal (=)

Change-Id: I3bc09cbd6b0524b6ebecb02bfdb245a394642a58
Reviewed-on: https://code.wireshark.org/review/12061
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 agoregister_dissector -> new_register_dissector
Michael Mann [Mon, 23 Nov 2015 03:59:08 +0000 (22:59 -0500)]
register_dissector -> new_register_dissector

Change-Id: Ic368dd8e83cf39e0c934da0ae2744778e2d54ce6
Reviewed-on: https://code.wireshark.org/review/12050
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 agoCMakeLists (root): fix indent (use tabs)
Alexis La Goutte [Mon, 16 Nov 2015 14:02:16 +0000 (15:02 +0100)]
CMakeLists (root): fix indent (use tabs)

Change-Id: I14089fbdafa00280ff7b3148c2e0a880b925958e
Reviewed-on: https://code.wireshark.org/review/11872
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 agoRADIUS: Use directly tvb_ip_to_str
Alexis La Goutte [Mon, 23 Nov 2015 09:21:34 +0000 (10:21 +0100)]
RADIUS: Use directly tvb_ip_to_str

Change-Id: I13e8307ec52b857876aa3582c6f4443e831f00a3
Reviewed-on: https://code.wireshark.org/review/12060
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRADIUS: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Mon, 23 Nov 2015 07:55:51 +0000 (08:55 +0100)]
RADIUS: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: I7f4db828dc63806a0cc524d0efd966f64635cbd5
Reviewed-on: https://code.wireshark.org/review/12056
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRADIUS: fix wrong offset for protocol
Alexis La Goutte [Mon, 23 Nov 2015 08:08:33 +0000 (09:08 +0100)]
RADIUS: fix wrong offset for protocol

Only work for IPv4 (Missing length of IPv6)

Bug:11630
Change-Id: I5436aa8dc66897472466ca9399c34457f1afa851
Reviewed-on: https://code.wireshark.org/review/12057
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 agolemon (tools): Fix Dereference of null pointer found by Clang analyzer
Alexis La Goutte [Mon, 6 Jul 2015 07:02:41 +0000 (09:02 +0200)]
lemon (tools): Fix Dereference of null pointer found by Clang analyzer

Change-Id: I6be51833b4268dbfde5c78820004a4714779b0c5
Reviewed-on: https://code.wireshark.org/review/9515
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoQt: Revert to more optimized code
Stig Bjørlykke [Mon, 23 Nov 2015 08:22:55 +0000 (09:22 +0100)]
Qt: Revert to more optimized code

Revert some changes in PacketListModel::headerData from c5fb4022
to preserve more optimized code.

Change-Id: If708999a6d446d70eca7414670dec0c618190fe0
Reviewed-on: https://code.wireshark.org/review/12058
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoFix 'make dumpapi' target
João Valverde [Mon, 23 Nov 2015 03:26:44 +0000 (03:26 +0000)]
Fix 'make dumpapi' target

Broken by 67d9daa65b9d555ced9fb1a9df90b1f8f1a4a257.

Also indent XML template.

Change-Id: I3a604a0319d16caca7e191c48c16f42691f4b910
Reviewed-on: https://code.wireshark.org/review/12049
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
8 years agoepan: Free pointers to deallocated memory
Stig Bjørlykke [Fri, 20 Nov 2015 18:39:55 +0000 (19:39 +0100)]
epan: Free pointers to deallocated memory

When redissecting packets we call epan_free() which deallocates
wmem_file_scope memory.  Such memory may be used in proto_data for
the currently selected packet (cf->edt) and leaves pointers to
deallocated memory (cf->edt->pi.fd->pfd).  Free them after
epan_free() to avoid unintended usage in packet_list_clear().

Bug: 11740
Change-Id: Ia3bc54f3f34e644a98b8a7eb1addd19b8aeeaab9
Reviewed-on: https://code.wireshark.org/review/11996
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 agohttp: case-insensitive custom headers match
Peter Wu [Thu, 19 Nov 2015 14:11:01 +0000 (15:11 +0100)]
http: case-insensitive custom headers match

Header names are typically not case-sensitive (like X-Powered-By).
Become consistent with headers such as User-Agent and match custom
headers case-insensitively.

Change-Id: Icde2dc32b5020cc8c68d631667c7c79dfc58435a
Reviewed-on: https://code.wireshark.org/review/11965
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 agomerge: fix parameter 'in_files/in_count_files' not found in the function declaration...
Alexis La Goutte [Sat, 21 Nov 2015 07:55:22 +0000 (08:55 +0100)]
merge: fix parameter 'in_files/in_count_files' not found in the function declaration [-Wdocumentation]

Change-Id: Ib3d9b7df5f1396179645456ea7359e711c26b8ef
Reviewed-on: https://code.wireshark.org/review/12003
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoQt: Preserve selected file in welcome screen.
Stig Bjørlykke [Sat, 21 Nov 2015 20:15:53 +0000 (21:15 +0100)]
Qt: Preserve selected file in welcome screen.

When closing a capture file the recent files list are updated to put
the most recent opened file on top.  Ensure we preserve the selection
of the closed file instead of having the file in the closed file's
previous position selected.

Change-Id: I14c9edde55b88abf7ca7f1828e269ad49203b1db
Reviewed-on: https://code.wireshark.org/review/12018
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoQt: Improved profiles popup menu
Stig Bjørlykke [Sun, 22 Nov 2015 14:25:27 +0000 (15:25 +0100)]
Qt: Improved profiles popup menu

* Don’t add a global profile if having a personal copy.
* Fetch profiles from _current_ profiles list.
* Separate personal and global profiles.
* Use bold and checked for the the current profile.

* Fixed selection of the current profile in the manage profiles dialog.
* Aligned GTK version with Qt version, removed the “New from Global” sub menu.

Change-Id: I2326b39f7d04411000b3c014e3775284392c48c7
Ping-Bug: 11704
Reviewed-on: https://code.wireshark.org/review/12034
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoQt: Set tooltip for packet list header
Stig Bjørlykke [Sun, 22 Nov 2015 20:25:15 +0000 (21:25 +0100)]
Qt: Set tooltip for packet list header

Added get_column_tooltip() to use common code in GTK and Qt.

Change-Id: I2f6ce95e2e129752bbb958a28aec6f42aa81be3d
Reviewed-on: https://code.wireshark.org/review/12047
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoRemove configure --enable-ipv6 option
João Valverde [Thu, 19 Nov 2015 11:24:44 +0000 (11:24 +0000)]
Remove configure --enable-ipv6 option

It's an ancient obsolete option with a confusing name.

Change-Id: Ib10330cf859cdea18fed2077c6539e56350ef380
Reviewed-on: https://code.wireshark.org/review/11967
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 agoAdd Windows CMake auto generated files to .gitignore
Pascal Quantin [Sun, 22 Nov 2015 19:26:56 +0000 (20:26 +0100)]
Add Windows CMake auto generated files to .gitignore

This is useful in case of in tree build.

Change-Id: I91a4503221ad097fd15e32677190b36c2d483c1f
Reviewed-on: https://code.wireshark.org/review/12045
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoQuote the source directory in Git commands.
Guy Harris [Sun, 22 Nov 2015 19:24:01 +0000 (11:24 -0800)]
Quote the source directory in Git commands.

It may contain spaces (it does on my Windows 7 VM), so it must be
quoted.  (There are probably other places where it needs to be quoted in
this script.)

Change-Id: If363691b0f94bbe75755072fd5245266566c3360
Reviewed-on: https://code.wireshark.org/review/12043
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQuote the path for the Windows setup script.
Guy Harris [Sun, 22 Nov 2015 19:15:43 +0000 (11:15 -0800)]
Quote the path for the Windows setup script.

The path may contain a space (it does on my Windows 7 VM), so quote it
in the PowerShell command.

Change-Id: Ib130991b8c29cb327832f2fe51cb37828526448b
Reviewed-on: https://code.wireshark.org/review/12041
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoWe *do* use setWindowModified; remove the XXX comment saying to do so.
Guy Harris [Sun, 22 Nov 2015 18:47:33 +0000 (10:47 -0800)]
We *do* use setWindowModified; remove the XXX comment saying to do so.

Change-Id: I00ffc4c787681a6bf2c84da9e44b3b3a33c0cec5
Reviewed-on: https://code.wireshark.org/review/12039
Reviewed-by: Guy Harris <guy@alum.mit.edu>
8 years agoQt: save columns position before freezing
Pascal Quantin [Fri, 20 Nov 2015 23:24:30 +0000 (00:24 +0100)]
Qt: save columns position before freezing

It allows to restore them properly in thaw()

Bug: 11737
Change-Id: Ibee6ee701ab64019ee03666c652c232770b3bb74
Reviewed-on: https://code.wireshark.org/review/11999
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>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
8 years agoRADIUS: Add display field for Ascend data Filter
Alexis La Goutte [Wed, 28 Oct 2015 19:46:26 +0000 (20:46 +0100)]
RADIUS: Add display field for Ascend data Filter

Ping-Bug:11630
Change-Id: I7183b5e957566b730f01a464e85ad594992b345d
Reviewed-on: https://code.wireshark.org/review/11370
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoQt: Added translate for "Capturing from ".
Stig Bjørlykke [Sat, 21 Nov 2015 23:20:54 +0000 (00:20 +0100)]
Qt: Added translate for "Capturing from ".

Change-Id: Ibd7b47169229395e5468ee2422c3dab7abe36413
Reviewed-on: https://code.wireshark.org/review/12022
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoQt: Set normal window icon when capture file closed.
Stig Bjørlykke [Sat, 21 Nov 2015 23:01:36 +0000 (00:01 +0100)]
Qt: Set normal window icon when capture file closed.

Also rename and use setDefaultWindowTitle() to set the window title
back to "The Wireshark Network Analyzer".

Change-Id: Ifa87d1a9b9140de4f256effdfca8485f65e2f839
Reviewed-on: https://code.wireshark.org/review/12025
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>
8 years agoasn2wrs.py: fix path substitution when generating ASN.1 dissectors with CMake on...
Pascal Quantin [Sun, 22 Nov 2015 09:01:28 +0000 (10:01 +0100)]
asn2wrs.py: fix path substitution when generating ASN.1 dissectors with CMake on Windows

Change-Id: I48e7d48544274f27d276e7128f8d2a2727c0b9cd
Reviewed-on: https://code.wireshark.org/review/12031
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
8 years agoDo not expand packets in packet dialog by default
Peter Wu [Fri, 20 Nov 2015 21:30:06 +0000 (22:30 +0100)]
Do not expand packets in packet dialog by default

Do not expand the packet tree in the packet dialog by default, it
results in forgetting the previous collapse state and deviates from
previous GTK+ behavior. It is just annoying to have all Frame, Ethernet,
etc. trees expanded while you are just looking at application layer
traffic.

(The previous tree is restored when calling ProtoTree::fillProtocolTree
which calls proto_tree_draw_node and then invokes setExpanded()).

Bug: 11731
Change-Id: I48c7f28a1777874b1c23025335305493777bca1d
Reviewed-on: https://code.wireshark.org/review/11998
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoFix RTP player crash on invalid streams
Peter Wu [Fri, 20 Nov 2015 19:08:10 +0000 (20:08 +0100)]
Fix RTP player crash on invalid streams

On Linux with pulseaudio, the RTP player can crash when an invalid RTP
stream is played. Prevent that by detecting when stream playback fails.

Since the stateChanged signal receiver is registered on the same
thread, it is guaranteed that any outputStateChanged calls happen before
returning from audio_output_->start().

GTK+ not have this issue, its player simply does not show the decoded
stream at all.

Change-Id: I51a91a7f410ef3d46551bc8df0049542efbb806f
Reviewed-on: https://code.wireshark.org/review/11997
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
8 years agoSCSI: Fix mixed up SCSI senddiag PF values
Stefan Pöschel [Sun, 22 Nov 2015 00:11:59 +0000 (01:11 +0100)]
SCSI: Fix mixed up SCSI senddiag PF values

Change-Id: I5e4b3ff0579789d81bf4eaad3dc2669472d22dd7
Reviewed-on: https://code.wireshark.org/review/12024
Reviewed-by: Anders Broman <a.broman58@gmail.com>
8 years agoCisco FabricPath MiM: rename file name
Alexis La Goutte [Sat, 21 Nov 2015 12:29:47 +0000 (13:29 +0100)]
Cisco FabricPath MiM: rename file name

packet-mim -> packet-cisco-fp-mim.c

Change-Id: Ife2414f8e74ec818720da1e80d6b8f87589d8150
Reviewed-on: https://code.wireshark.org/review/12008
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 agoregister_dissector -> new_register_dissector for ASN.1 dissectors.
Michael Mann [Sun, 22 Nov 2015 03:03:26 +0000 (22:03 -0500)]
register_dissector -> new_register_dissector for ASN.1 dissectors.

Change-Id: I0476519c02ffdd426b4fdfe8a206d61b728c327a
Reviewed-on: https://code.wireshark.org/review/12026
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>