metze/wireshark/wip.git
6 years agoCMake: Don't shadow PROCESSOR_ARCHITECTURE.
Gerald Combs [Fri, 9 Feb 2018 21:59:15 +0000 (13:59 -0800)]
CMake: Don't shadow PROCESSOR_ARCHITECTURE.

PROCESSOR_ARCHITECTURE is a standard Windows environment variable.
Rename the CMake variable WIRESHARK_TARGET_PROCESSOR_ARCHITECTURE.

Change-Id: I03109d45d6fb5f00742cd43085a9d33d9e5ddf1f
Reviewed-on: https://code.wireshark.org/review/25721
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoSeparately count all records and data records.
Guy Harris [Sat, 10 Feb 2018 02:45:14 +0000 (18:45 -0800)]
Separately count all records and data records.

A file might contain only metadata records, which exist only to provide
information needed to interpret data records; no point in showing them
in record counts.

Put the counts into the structure that we fill in, and rename the
structure and the routine to reflect that it determines statistics other
than just times.

Speak of data records rather than packets; the file might be full of
Sysdig event records but not have any packets in it, for example.

Change-Id: I8553181dca4129736bdae2c0cbba92becc28d6ef
Reviewed-on: https://code.wireshark.org/review/25722
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoMove the merge_action_e enum to the Win32 file dialog source file.
Guy Harris [Fri, 9 Feb 2018 20:42:32 +0000 (12:42 -0800)]
Move the merge_action_e enum to the Win32 file dialog source file.

It's only used with the Windows dialog, so no need to make it public.

Change-Id: I4976748d642399b57abc89bccc26f680e3938509
Reviewed-on: https://code.wireshark.org/review/25719
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoFix indentation.
Guy Harris [Fri, 9 Feb 2018 20:35:33 +0000 (12:35 -0800)]
Fix indentation.

Change-Id: I7f19b35032a686dfb2f776e8ff3527366b008331
Reviewed-on: https://code.wireshark.org/review/25718
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoPut the preview-generation loop into a common routine.
Guy Harris [Fri, 9 Feb 2018 19:18:22 +0000 (11:18 -0800)]
Put the preview-generation loop into a common routine.

Don't have all the file open dialogs have their own copies.

Change-Id: Icd6f2fd44b081575e6481a134027c90046938c64
Reviewed-on: https://code.wireshark.org/review/25717
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agocaputils/tools: more SPDX convertions.
Dario Lombardo [Fri, 9 Feb 2018 09:14:34 +0000 (10:14 +0100)]
caputils/tools: more SPDX convertions.

Change-Id: I44a8d1848f768acf4c3b31a68c845264c74e4bba
Reviewed-on: https://code.wireshark.org/review/25709
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoepan: more SPDX convertions.
Dario Lombardo [Fri, 9 Feb 2018 09:12:31 +0000 (10:12 +0100)]
epan: more SPDX convertions.

Change-Id: I3c9ba4542c50321ce60cba68696d99575a735392
Reviewed-on: https://code.wireshark.org/review/25708
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agotools: fix BSD license name in licensecheck.pl.
Dario Lombardo [Fri, 9 Feb 2018 13:58:53 +0000 (14:58 +0100)]
tools: fix BSD license name in licensecheck.pl.

Change-Id: I401efcbb4f8f9eec5ef38f3788e979a3752c4a7f
Reviewed-on: https://code.wireshark.org/review/25714
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoplugins: use SPDX identifiers.
Dario Lombardo [Fri, 9 Feb 2018 08:52:20 +0000 (09:52 +0100)]
plugins: use SPDX identifiers.

Change-Id: I8155573933daeb69c6e4c95c6702bdd6fc1fa89b
Reviewed-on: https://code.wireshark.org/review/25707
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agowslua: use SPDX identifiers.
Dario Lombardo [Thu, 8 Feb 2018 16:33:09 +0000 (17:33 +0100)]
wslua: use SPDX identifiers.

Change-Id: I80d9d4e3ffc25eebf09e6ef693c378b77554e1b8
Reviewed-on: https://code.wireshark.org/review/25693
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoDo changes from Generalize wtap_pkthdr into a structure for packet and
AndersBroman [Fri, 9 Feb 2018 09:50:12 +0000 (10:50 +0100)]
Do changes from Generalize wtap_pkthdr into a structure for packet and
non-packet records for file_dlg_win32.c

Change-Id: I34ce10e574036b2d857675008c7109d5e38be6e7
Reviewed-on: https://code.wireshark.org/review/25710
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agoUpdate symbols lists.
Guy Harris [Fri, 9 Feb 2018 11:04:29 +0000 (03:04 -0800)]
Update symbols lists.

Change-Id: Iecdef99d172fad793fd98ae10a6f03bb425d73de
Reviewed-on: https://code.wireshark.org/review/25712
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agopcap: Update link_type_vals
Stig Bjørlykke [Fri, 9 Feb 2018 08:24:40 +0000 (09:24 +0100)]
pcap: Update link_type_vals

Change-Id: I7d26883344f908f86bf7b2b4beb359db014fb28b
Reviewed-on: https://code.wireshark.org/review/25705
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoDo the maximum block size check in pcap_read_block().
Guy Harris [Fri, 9 Feb 2018 05:34:53 +0000 (21:34 -0800)]
Do the maximum block size check in pcap_read_block().

Do it before we even *try* to read the block, so that it's done in one
place rather than having to be done in every routine to handle
particular block types.

The check was missing in the routine to read sysdig event blocks, so if
we got a huge sysdig even block we'd try to allocate a huge amount of
memory.

Bug: 14403
Change-Id: Iff0fb0387e4499420598361be6d241f2832042d7
Reviewed-on: https://code.wireshark.org/review/25702
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoRLC graph: fix zooming, both in normal case and when graph direction has been switched
Martin Mathieson [Thu, 8 Feb 2018 09:51:13 +0000 (09:51 +0000)]
RLC graph: fix zooming, both in normal case and when graph direction has been switched

Change-Id: I05e02b2821367ef1a78b9ededd462324053cf06e
Reviewed-on: https://code.wireshark.org/review/25683
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agohtml2text: Skip some tags and add references.
Gerald Combs [Fri, 9 Feb 2018 01:21:24 +0000 (17:21 -0800)]
html2text: Skip some tags and add references.

Skip the contents of <style> and <script> tags. Add URL footnotes
similar to `lynx -dump`.

Change-Id: I721bdfabeacc000d604aa8475f13be1d797ad0fb
Reviewed-on: https://code.wireshark.org/review/25697
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoRename ft_specific_data to reflect what we're actually using it for.
Guy Harris [Fri, 9 Feb 2018 04:29:25 +0000 (20:29 -0800)]
Rename ft_specific_data to reflect what we're actually using it for.

It's only being used as a working buffer to hold the raw options data we
read in.

Change-Id: I17b812e447f575ad92394b9f957658fc655cdf8e
Reviewed-on: https://code.wireshark.org/review/25701
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoRemove redundant members from wtap_syscall_header.
Guy Harris [Fri, 9 Feb 2018 02:38:22 +0000 (18:38 -0800)]
Remove redundant members from wtap_syscall_header.

No need for len, and call caplen event_filelen and move it after
event_len.

Change-Id: I8b3825d4022ee083ee52f83f7a69f22829ed9fc4
Reviewed-on: https://code.wireshark.org/review/25698
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoGeneralize wtap_pkthdr into a structure for packet and non-packet records.
Guy Harris [Fri, 9 Feb 2018 00:19:12 +0000 (16:19 -0800)]
Generalize wtap_pkthdr into a structure for packet and non-packet records.

Separate the stuff that any record could have from the stuff that only
particular record types have; put the latter into a union, and put all
that into a wtap_rec structure.

Add some record-type checks as necessary.

Change-Id: Id6b3486858f826fce4b096c59231f463e44bfaa2
Reviewed-on: https://code.wireshark.org/review/25696
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoCIP: Highlight correct bytes in Req/Rsp processing
Dylan Ulis [Wed, 7 Feb 2018 21:34:11 +0000 (16:34 -0500)]
CIP: Highlight correct bytes in Req/Rsp processing

Previously, dissect_cip_generic_service_req and dissect_cip_generic_service_rsp
set lengths at different levels of the packet. In some cases, this would
cause a malformed packet when the data length was zero. This fixes the
malformed error by explicitly setting the length, instead of using -1.

The length of the service data set is not the data paylod for both
cases. Previously, for requests, it attempted to highlight the whole CIP
layer, but this was already covered by the full CIP protocol layer
length.

Change-Id: I4b4a99d30b9e04872fcf7ffb127c496e6062856c
Reviewed-on: https://code.wireshark.org/review/25672
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
6 years agoCIP Safety: Add decode options for I/O Payloads
Dylan Ulis [Wed, 7 Feb 2018 13:53:45 +0000 (08:53 -0500)]
CIP Safety: Add decode options for I/O Payloads

1. Add Decode Options for 4 Safety I/O types. Previously, you could only decode as "CIP Safety", which only showed as a generic data block (because all important things for parsing are in the FwdOpen).
2. Change some timestamp display formatting to match other related timestamp fields (now all Dec)
3. Don't create connections for Null Forward Opens.

Change-Id: Ia1031b3887739a864a453b9e566ebe6f29fa5b8b
Reviewed-on: https://code.wireshark.org/review/25664
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
6 years agoQUIC: Add initial draft-09 support
Alexis La Goutte [Wed, 7 Feb 2018 16:01:09 +0000 (17:01 +0100)]
QUIC: Add initial draft-09 support

Bug:13881
Change-Id: I4127330ff6af96291452dd31086b57d24ec368ab
Reviewed-on: https://code.wireshark.org/review/25687
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoepan: use SPDX indentifiers.
Dario Lombardo [Thu, 8 Feb 2018 16:59:17 +0000 (17:59 +0100)]
epan: use SPDX indentifiers.

Skipping dissectors dir for now.

Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa
Reviewed-on: https://code.wireshark.org/review/25694
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agowmem: use SPDX identifiers.
Dario Lombardo [Thu, 8 Feb 2018 16:31:35 +0000 (17:31 +0100)]
wmem: use SPDX identifiers.

Change-Id: Iad9a7a8a26bc6a7189a4578dfbcec1c2b3cc376e
Reviewed-on: https://code.wireshark.org/review/25692
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoGet rid of no-longer-used variables.
Guy Harris [Thu, 8 Feb 2018 18:29:04 +0000 (10:29 -0800)]
Get rid of no-longer-used variables.

They were used by the now-removed draft-07 support.

Change-Id: I4762d2a6bb81e231010f1fd4b2b51278bb3c4329
Reviewed-on: https://code.wireshark.org/review/25695
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoQUIC: remove draft-07 support
Alexis La Goutte [Wed, 7 Feb 2018 14:22:52 +0000 (15:22 +0100)]
QUIC: remove draft-07 support

Bug: 13881
Change-Id: I6e85eb99e8f9a75772f4752657d3706402bc17fe
Reviewed-on: https://code.wireshark.org/review/25686
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoQUIC: QUIC is not longer a ACRONYM
Alexis La Goutte [Wed, 7 Feb 2018 16:14:35 +0000 (17:14 +0100)]
QUIC: QUIC is not longer a ACRONYM

of Quick UDP Internet Connection

Change-Id: Ibe18191fca6495d817f6bc10ec4b5df552548396
Reviewed-on: https://code.wireshark.org/review/25690
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agowritecap: use SPDX identifiers.
Dario Lombardo [Wed, 7 Feb 2018 12:46:48 +0000 (13:46 +0100)]
writecap: use SPDX identifiers.

Change-Id: I800f8ccb516f69a15b535ee96a4b34754c008028
Reviewed-on: https://code.wireshark.org/review/25663
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agodebian: use SPDX identifiers.
Dario Lombardo [Wed, 7 Feb 2018 12:20:20 +0000 (13:20 +0100)]
debian: use SPDX identifiers.

Change-Id: Ib9e31d1fe917557a5e5c8bf6002afc2438c0baf4
Reviewed-on: https://code.wireshark.org/review/25662
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoreplace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.
Dario Lombardo [Wed, 7 Feb 2018 11:26:45 +0000 (12:26 +0100)]
replace SPDX identifier GPL-2.0+ with GPL-2.0-or-later.

The first is deprecated, as per https://spdx.org/licenses/.

Change-Id: I8e21e1d32d09b8b94b93a2dc9fbdde5ffeba6bed
Reviewed-on: https://code.wireshark.org/review/25661
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agotools: remove garbage from licensecheck.pl.
Dario Lombardo [Thu, 8 Feb 2018 13:36:53 +0000 (14:36 +0100)]
tools: remove garbage from licensecheck.pl.

Change-Id: I9a0e00c9e033618ee2ced94dadf1a98640e0d914
Reviewed-on: https://code.wireshark.org/review/25684
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agotools: add new SPDX GPL format to licensecheck.pl.
Dario Lombardo [Thu, 8 Feb 2018 07:55:45 +0000 (08:55 +0100)]
tools: add new SPDX GPL format to licensecheck.pl.

Change-Id: Ie148f8a660027df8194bd3890a108c0639a18823
Reviewed-on: https://code.wireshark.org/review/25680
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agotools: remake the indentation of licencecheck.pl.
Dario Lombardo [Tue, 6 Feb 2018 15:59:40 +0000 (16:59 +0100)]
tools: remake the indentation of licencecheck.pl.

Change-Id: Ib1b320e5b99e8842df61fd3dc584b6df4fc461f8
Reviewed-on: https://code.wireshark.org/review/25639
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agopacket: Whitespace cleanup
Stig Bjørlykke [Thu, 8 Feb 2018 08:31:29 +0000 (09:31 +0100)]
packet: Whitespace cleanup

Change-Id: I47d7994b5670ec6b954444b53aa9572f3ba5a047
Reviewed-on: https://code.wireshark.org/review/25682
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agojson: Add for decode-as udp.port
Stig Bjørlykke [Thu, 8 Feb 2018 08:29:42 +0000 (09:29 +0100)]
json: Add for decode-as udp.port

Change-Id: Ibd03cd64aa8de7fee8ad3cc7b7cc61e0370399ff
Reviewed-on: https://code.wireshark.org/review/25681
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoCleanup HTTP Referer tracking code and use less memory
Moshe Kaplan [Wed, 7 Feb 2018 17:35:32 +0000 (12:35 -0500)]
Cleanup HTTP Referer tracking code and use less memory

Change-Id: I7d9d8a1ab6ed9f180511281348d6b679b5fba1fb
Reviewed-on: https://code.wireshark.org/review/25665
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Moshe Kaplan <me@moshekaplan.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoGet rid of unneeded #includes.
Guy Harris [Thu, 8 Feb 2018 03:30:24 +0000 (19:30 -0800)]
Get rid of unneeded #includes.

Change-Id: Ica457e3fb2a6e2318ca1e03fb7b2569c7d8e6aba
Reviewed-on: https://code.wireshark.org/review/25679
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoFix white space.
Guy Harris [Thu, 8 Feb 2018 03:27:40 +0000 (19:27 -0800)]
Fix white space.

Change-Id: I90047f070f42991a67da5215b6eda60f70d7945f
Reviewed-on: https://code.wireshark.org/review/25678
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoGet rid of unused structure member.
Guy Harris [Thu, 8 Feb 2018 03:25:35 +0000 (19:25 -0800)]
Get rid of unused structure member.

Change-Id: I86c32f18f8168d776fc5eb2116bc600a87ab57e0
Reviewed-on: https://code.wireshark.org/review/25677
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoGet rid of a calculation whose result is not used.
Guy Harris [Thu, 8 Feb 2018 03:15:13 +0000 (19:15 -0800)]
Get rid of a calculation whose result is not used.

Change-Id: Ic481636d35953476b26be15d169f22e6db149828
Reviewed-on: https://code.wireshark.org/review/25676
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoDistinguish between "probably not pcapng" and "probably bad pcapng" errors.
Guy Harris [Wed, 7 Feb 2018 22:51:12 +0000 (14:51 -0800)]
Distinguish between "probably not pcapng" and "probably bad pcapng" errors.

Go back to having pcapng_read_block() and
pcapng_read_section_header_block() treating SHB read errors that might
be due to the file not being a pcapng file separately from other errors.

This keeps us from treating pcapng files with malformed SHBs as not
being pcapng files, making us dissect them using the pcapng file
dissector rather than reporting the malformation.

Change-Id: I1d92cc4ac521668b88638b2b3ed5257340451798
Ping-Bug: 14402
Reviewed-on: https://code.wireshark.org/review/25675
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoClean up the null pointer check in profile_exists().
Guy Harris [Wed, 7 Feb 2018 22:20:12 +0000 (14:20 -0800)]
Clean up the null pointer check in profile_exists().

Check only in the if (global) case, and note that it's necessary in that
case; in the !global case, note why we don't have to check for a null
pointer.

Change-Id: I80322204ec94eb3901f7bceabccb29351794adc8
Reviewed-on: https://code.wireshark.org/review/25674
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoSquelch an rc warning.
Gerald Combs [Wed, 7 Feb 2018 21:22:13 +0000 (13:22 -0800)]
Squelch an rc warning.

Don't include glib if RC_INVOKED is defined so that the Microsoft Windows
Resource Compiler doesn't generate the following complaint:

\path\to\glib/gatomic.h(87): warning RC4011: identifier truncated to '__GCC_HAVE_SYNC_COMPARE_AND_SWA'

Change-Id: I6637aee2842de4e7041b66ff4428f617478efcb4
Reviewed-on: https://code.wireshark.org/review/25670
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
6 years agoDon't crash if an IDB resolution value is too high.
Guy Harris [Wed, 7 Feb 2018 22:07:24 +0000 (14:07 -0800)]
Don't crash if an IDB resolution value is too high.

When dissecting an if_tsresol option in an IDB, calculate the resolution
from the base and the offset.  If the result overflows, mark it as an
overflow; otherwise, mark it with the units for more values than 1
microsecond.  Store the calculated resolution, which we initialize to
the default of 1 microsecond.

When displaying time stamps in blocks, use the calculated resolution,
rather than re-calculating it.  If it's 0, it means the resolution is
too high, so don't calculate it and end up dividing by zero.

Bug: 14402
Change-Id: Idc34ededb4f7250b3604b14d4468c32f6592793f
Reviewed-on: https://code.wireshark.org/review/25673
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoWSDG: Remove references to Windows XP and Vista.
Gerald Combs [Wed, 7 Feb 2018 21:32:36 +0000 (13:32 -0800)]
WSDG: Remove references to Windows XP and Vista.

Change-Id: Id3945f53722b7a69afa4a62eb3cfc2f8e8193d74
Reviewed-on: https://code.wireshark.org/review/25671
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agotools: Add SPDX MIT to licensecheck.pl.
Gerald Combs [Wed, 7 Feb 2018 19:22:56 +0000 (11:22 -0800)]
tools: Add SPDX MIT to licensecheck.pl.

Add a check for "SPDX-License-Identifier: MIT".

Change-Id: Id69c87e7d8d7fd3904a02f9fb410bae8e9d99d10
Reviewed-on: https://code.wireshark.org/review/25669
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoNSRPC: fix heuristic dissector
Pascal Quantin [Wed, 7 Feb 2018 17:32:50 +0000 (18:32 +0100)]
NSRPC: fix heuristic dissector

Do not check reported length but captured length, otherwise it can
can trigger an exception when trying to fetch at offset 4.
Once the (very basic heuristic) is verified, cann the right dissection
function.

Bug: 14399
Change-Id: Ie09d80e04f2501c940693a2ea9ecbd2f84d1e22f
Reviewed-on: https://code.wireshark.org/review/25666
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
6 years agowsutil: Allow NULL as profile name
Stig Bjørlykke [Wed, 7 Feb 2018 09:10:32 +0000 (10:10 +0100)]
wsutil: Allow NULL as profile name

Using NULL as profile name indicates the Default profile and
profile_exists() must not return FALSE for the Default profile.

This is a regression from ge0d04a75.

Change-Id: I2463a7d3e12dda794f3391d999442a303d80621c
Reviewed-on: https://code.wireshark.org/review/25659
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
6 years agonetmon: Initialize struct netmonrec_comment on alloc
Stig Bjørlykke [Wed, 7 Feb 2018 09:20:50 +0000 (10:20 +0100)]
netmon: Initialize struct netmonrec_comment on alloc

This avoids an illegal pointer to free() on error.

Bug: 14397
Change-Id: Id6e535141c7a3ee7b3d1822875b571e2199a5387
Reviewed-on: https://code.wireshark.org/review/25660
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoInclude as "ui/summary.h", as is done elsewhere.
Guy Harris [Wed, 7 Feb 2018 09:07:03 +0000 (01:07 -0800)]
Include as "ui/summary.h", as is done elsewhere.

Change-Id: I832c74554854bf380984cab83a53e7ffe165ad84
Reviewed-on: https://code.wireshark.org/review/25658
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoMove summary.[ch] to libui.
Guy Harris [Wed, 7 Feb 2018 08:28:59 +0000 (00:28 -0800)]
Move summary.[ch] to libui.

Change-Id: I49f1eeb4fc3a90e436da116577a7d0c5ba982eee
Reviewed-on: https://code.wireshark.org/review/25657
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agocaputils: use SPDX identifiers.
Dario Lombardo [Fri, 2 Feb 2018 10:50:31 +0000 (11:50 +0100)]
caputils: use SPDX identifiers.

Change-Id: I7c30002025c31a74dfa60c10ca7f7c0dd384e1c9
Reviewed-on: https://code.wireshark.org/review/25559
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years ago[PFCP] Fixed order of bytes in UP Function Features IE
Matej Tkac [Tue, 6 Feb 2018 09:45:55 +0000 (10:45 +0100)]
[PFCP] Fixed order of bytes in UP Function Features IE

  3GPP TS 29.244 V14.2.0 Section 8.2.25

Change-Id: I22395d05bfcdb5dce5355c0836ffb9bbdef7a8dd
Reviewed-on: https://code.wireshark.org/review/25631
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoGenerate HTTP Referer statistics
Moshe Kaplan [Mon, 15 Jan 2018 01:19:06 +0000 (20:19 -0500)]
Generate HTTP Referer statistics

The main benefit of this feature is that it enables users to see the
succession of HTTP requests that led to a specific request.

A sample PCAP is available here:
https://bugs.wireshark.org/bugzilla/attachment.cgi?id=16085

Change-Id: I7c521315b848fbce659fdc01e43f261d804a3a48
Reviewed-on: https://code.wireshark.org/review/25319
Reviewed-by: Moshe Kaplan <me@moshekaplan.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agowsutil: use SPDX identifiers.
Dario Lombardo [Fri, 2 Feb 2018 10:44:16 +0000 (11:44 +0100)]
wsutil: use SPDX identifiers.

Change-Id: I4863416ddc425b9138ffa47621eee823db9e7fda
Reviewed-on: https://code.wireshark.org/review/25557
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agotools: add files from wsutil and caputils to checklicense whitelist.
Dario Lombardo [Tue, 6 Feb 2018 17:08:18 +0000 (18:08 +0100)]
tools: add files from wsutil and caputils to checklicense whitelist.

Change-Id: I35b6df8fbb31c209e7e79d5c002568d5194f3485
Reviewed-on: https://code.wireshark.org/review/25641
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoLPPe: use V1_0-20160714-C specification
Pascal Quantin [Tue, 6 Feb 2018 22:28:06 +0000 (23:28 +0100)]
LPPe: use V1_0-20160714-C specification

Bug: 14361
Change-Id: I845e732100d866913bd17742dc18593938baac4a
Reviewed-on: https://code.wireshark.org/review/25646
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agotools: add licenses to licensecheck.pl.
Dario Lombardo [Tue, 6 Feb 2018 15:35:02 +0000 (10:35 -0500)]
tools: add licenses to licensecheck.pl.

Include the following licenses in licensecheck.pl
1. LGPL-2.0-or-later
2. Zlib
3. BSD-3-Clause

Change-Id: I65f0ca1f957ee072ed595ab56d20ec200bd7047e
Reviewed-on: https://code.wireshark.org/review/25638
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoieee1905: Fix the handling of AP Metric Queries.
Richard Sharpe [Wed, 7 Feb 2018 03:56:49 +0000 (19:56 -0800)]
ieee1905: Fix the handling of AP Metric Queries.

They changed when the spec was updated. This seems to be the last change
needed here.

Change-Id: Id47c1de5b5890bffa0842c33ae02033ddf6c8325
Reviewed-on: https://code.wireshark.org/review/25656
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoAdded wmem_map_contains and wmem_map_lookup_extended
Moshe Kaplan [Tue, 6 Feb 2018 04:31:58 +0000 (23:31 -0500)]
Added wmem_map_contains and wmem_map_lookup_extended

Change-Id: I2943c67238fb913258f0f1f15df968c17b1ea002
Reviewed-on: https://code.wireshark.org/review/25626
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoRemove range_foreach_r from debian symbols
Michael Mann [Wed, 7 Feb 2018 03:28:22 +0000 (22:28 -0500)]
Remove range_foreach_r from debian symbols

Change-Id: I209fde24ca421b8e2dfd982408b4610bc5e63d82
Reviewed-on: https://code.wireshark.org/review/25655
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoFCP: Add NULL check to prevent crash.
Michael Mann [Wed, 7 Feb 2018 02:36:05 +0000 (21:36 -0500)]
FCP: Add NULL check to prevent crash.

Fragmented FCP may not be called on the first pass, so add a NULL
check for proto_data that may not be there.

Bug: 14374
Change-Id: Icbbee8f0eb3a33655323283dbb5a01c350d784dc
Reviewed-on: https://code.wireshark.org/review/25649
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
6 years agoDon't assume all packets have time stamps.
Guy Harris [Wed, 7 Feb 2018 03:09:44 +0000 (19:09 -0800)]
Don't assume all packets have time stamps.

We explicitly allow the not to, and, for example, Simple Packet Blocks
in pcapng files don't have time stamps.

Change-Id: If1db5747c9e06faa7550162df8e04dc60b71d954
Reviewed-on: https://code.wireshark.org/review/25650
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoReapply "Fix typo in DTN dissector"
Justin Dailey [Tue, 6 Feb 2018 16:28:51 +0000 (11:28 -0500)]
Reapply "Fix typo in DTN dissector"

Sgement -> Segment

Change-Id: Ibf4aa2db14fd87c854a65da0de979ad4772243d8
Reviewed-on: https://code.wireshark.org/review/25640
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-on: https://code.wireshark.org/review/25648
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years ago2.5.0 → 2.5.1.
Gerald Combs [Tue, 6 Feb 2018 23:52:09 +0000 (15:52 -0800)]
2.5.0 → 2.5.1.

Change-Id: I185a3f359acfe5dfd06c0b7f5fff3b6586be1ff9
Reviewed-on: https://code.wireshark.org/review/25647
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoTemporarily revert "Fix typo in DTN dissector"
Gerald Combs [Tue, 6 Feb 2018 20:55:20 +0000 (20:55 +0000)]
Temporarily revert "Fix typo in DTN dissector"

This will be restored after the 2.5.0 release is complete.

This reverts commit 61cc7691691c5f8bd2e11b2caffe52cd8e14aab2.

Change-Id: I0b7d2435fe010070aaced5f395c75a1cd65b3f83
Reviewed-on: https://code.wireshark.org/review/25645
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoFix typo in DTN dissector
Justin Dailey [Tue, 6 Feb 2018 16:28:51 +0000 (11:28 -0500)]
Fix typo in DTN dissector

Sgement -> Segment

Change-Id: I275495fafdf76308ca36083256d6fcd2bed35203
Reviewed-on: https://code.wireshark.org/review/25640
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoBuild 2.5.0.
Gerald Combs [Tue, 6 Feb 2018 20:35:21 +0000 (12:35 -0800)]
Build 2.5.0.

Change-Id: I8be543c87d289b616b92ab178458382c93580f12
Reviewed-on: https://code.wireshark.org/review/25644
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoGet rid of the pkt_encap field in struct packet_info.
Guy Harris [Tue, 6 Feb 2018 20:35:11 +0000 (12:35 -0800)]
Get rid of the pkt_encap field in struct packet_info.

pinfo->pkt_encap is jsut a copy of pinfo->phdr->pkt_encap; no need for
the copy.

Expand a comment while we're at it.

Change-Id: I5fcfe694ecba42507f1d629d01440da0a0989501
Reviewed-on: https://code.wireshark.org/review/25643
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoChange the way we infer the type of the physical address.
Guy Harris [Tue, 6 Feb 2018 20:03:58 +0000 (12:03 -0800)]
Change the way we infer the type of the physical address.

Use the address type of the link-layer source address, rather than the
encapsulation of the outermost packet layer, to determine the type of
the physical client address in a Dead Station frame.  That should, for
example, handle cases where the actual Ethernet packets are being
carried within packets on some non-Ethernet network, or where the
packets aren't Ethernet packets but are packets on some other network
using MAC-48 addresses.

Change-Id: Ibd2e2322b03e81aa52c71b080f3c91d2f83fc3b4
Reviewed-on: https://code.wireshark.org/review/25642
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoMake sure we pass valid addresses to find_conversation.
Gerald Combs [Mon, 5 Feb 2018 22:28:10 +0000 (14:28 -0800)]
Make sure we pass valid addresses to find_conversation.

Pass empty (AT_NONE) addresses to find_conversation and
conversation_create_endpoint instead of NULL, similar to the LBTxx and
other dissectors.

Bug: 14394
Change-Id: Ia4573b276551a9c3d2da155faf786e8d15229100
Reviewed-on: https://code.wireshark.org/review/25620
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years ago[SBC-AP] Enhance info column information.
AndersBroman [Tue, 6 Feb 2018 13:54:01 +0000 (14:54 +0100)]
[SBC-AP] Enhance info column information.

Change-Id: If02d2b1dcda5df8a09b3689b2ba3dc5914db3420
Reviewed-on: https://code.wireshark.org/review/25635
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoabout_dialog (qt): Fix Dead Store (Dead assignement/Dead increment) Warning found...
Alexis La Goutte [Sun, 4 Feb 2018 20:49:29 +0000 (21:49 +0100)]
about_dialog (qt): Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Ib7c673980909551d9f817d60bbe2d77ed180b661
Reviewed-on: https://code.wireshark.org/review/25599
Reviewed-by: Roland Knall <rknall@gmail.com>
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
6 years ago[Thrift] Handle optional elememts in struct.
AndersBroman [Tue, 6 Feb 2018 13:21:23 +0000 (14:21 +0100)]
[Thrift] Handle optional elememts in struct.

Change-Id: Iee494c299f8f10588146f0b41b759ce0272d9caf
Reviewed-on: https://code.wireshark.org/review/25634
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years ago[Thrift] Add methods for the 64bit types.
AndersBroman [Tue, 6 Feb 2018 09:40:46 +0000 (10:40 +0100)]
[Thrift] Add methods for the 64bit types.

Change-Id: I4a3ca0eb715562c9ed535df471edb62830215369
Reviewed-on: https://code.wireshark.org/review/25630
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoUse the Wayback Machine for a reference.
Guy Harris [Tue, 6 Feb 2018 08:32:38 +0000 (00:32 -0800)]
Use the Wayback Machine for a reference.

Change-Id: I4745cdf6ba863674525851e98c8a52422d4e65f0
Reviewed-on: https://code.wireshark.org/review/25628
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoUse separate dissectors for LAPD and LAPD-with-Linux-SLL-header.
Guy Harris [Tue, 6 Feb 2018 08:15:44 +0000 (00:15 -0800)]
Use separate dissectors for LAPD and LAPD-with-Linux-SLL-header.

That obviates the need to check pinfo->pkt_encap.

Change-Id: I038e065932282ce9d3362fbc9ba6ea653a63f399
Reviewed-on: https://code.wireshark.org/review/25627
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoBACapp: Fix a loop check.
Gerald Combs [Mon, 5 Feb 2018 23:34:41 +0000 (15:34 -0800)]
BACapp: Fix a loop check.

Fix an offset check in a nested loop. Make our offset checks more
paranoid.

Bug: 14387
Change-Id: I2890b27731ec293a3cb08dcfdf7a18aef808ad31
Reviewed-on: https://code.wireshark.org/review/25622
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
6 years agoIPMI: Add NULL pointer checks.
Gerald Combs [Mon, 5 Feb 2018 23:24:19 +0000 (15:24 -0800)]
IPMI: Add NULL pointer checks.

Check for a valid data->curr_frame in ipmi_set_data and ipmi_get_data.

Bug: 14393
Change-Id: I615975015da864718dbd486d875aa3020db94edd
Reviewed-on: https://code.wireshark.org/review/25621
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
6 years agoProto tree: Update left arrow navigation behavior.
Gerald Combs [Tue, 6 Feb 2018 00:48:13 +0000 (16:48 -0800)]
Proto tree: Update left arrow navigation behavior.

If the user presses the left arrow when a non-expaned proto tree item is
selected, jump to its parent item as described in the "Main Window
Navigation" section of the User's Guide..

Change-Id: Ie7478a2c292df9a225555f5539d7ba90ab5e132d
Reviewed-on: https://code.wireshark.org/review/25623
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
6 years agoThrift: stop dissection when encountering an unknown/unexpected type
Pascal Quantin [Mon, 5 Feb 2018 21:35:10 +0000 (22:35 +0100)]
Thrift: stop dissection when encountering an unknown/unexpected type

Let's add an expert info, and set offset to the end of the current tvb.

Bug: 14379
Change-Id: Iaccf862c451eef58aaed11b26fceebf26bc2c818
Reviewed-on: https://code.wireshark.org/review/25619
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoDon't assume all packets have time stamps.
Guy Harris [Tue, 6 Feb 2018 04:24:33 +0000 (20:24 -0800)]
Don't assume all packets have time stamps.

We explicitly allow the not to, and, for example, Simple Packet Blocks
in pcapng files don't have time stamps.

Change-Id: I6c8921cf092de7831d0a3d6dab8467388f4e6286
Reviewed-on: https://code.wireshark.org/review/25625
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoWSUG: Minor edits.
Gerald Combs [Tue, 6 Feb 2018 00:57:28 +0000 (16:57 -0800)]
WSUG: Minor edits.

Use "or" instead of a comma for alternate keyboard shortcuts.

Change-Id: I3f2abf63b4c437ca0fe439d91dfac44e24d9d8e5
Reviewed-on: https://code.wireshark.org/review/25624
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoDon't assume records all have time stamps and captured lengths.
Guy Harris [Mon, 5 Feb 2018 21:26:40 +0000 (13:26 -0800)]
Don't assume records all have time stamps and captured lengths.

Not all do, so test the preference bits for them.

Change-Id: I62976f5d17de3611c4d2f9eb64a0763c0b698c8d
Reviewed-on: https://code.wireshark.org/review/25618
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoSpeak of records, not packets.
Guy Harris [Mon, 5 Feb 2018 20:55:00 +0000 (12:55 -0800)]
Speak of records, not packets.

Not everything wtap_read() returns is a packet.

Change-Id: I3784bbfa308da52f4c55db2a90f9b55f8bfbb2ef
Reviewed-on: https://code.wireshark.org/review/25617
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agopacket-mq: Fix a wrong offset+Add value in val_str
Robert Grange [Sun, 4 Feb 2018 23:09:47 +0000 (00:09 +0100)]
packet-mq: Fix a wrong offset+Add value in val_str

fixed an offset error for mqmo in gmo
Added value in comment when defining val_str

Change-Id: Ie29f65f96d2ffb96c0cc0623346432f1f8380168
Reviewed-on: https://code.wireshark.org/review/25604
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agoUpdate couchbase dissector with collections and delete_time DCP
Jim Walker [Mon, 5 Feb 2018 09:30:43 +0000 (09:30 +0000)]
Update couchbase dissector with collections and delete_time DCP

Add support for collection commands
* SET/GET manifest
* DCP changes (mutation/deletion/system_event)

Add support for DCP delete_time, a new format for DCP deletion

Change-Id: Iec2000a40da37dcb1edf665a157dc7ab30d4c9d0
Reviewed-on: https://code.wireshark.org/review/25612
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
6 years agoAmend the comment with some background for the workaround.
Jaap Keuter [Mon, 5 Feb 2018 15:53:23 +0000 (16:53 +0100)]
Amend the comment with some background for the workaround.

The added comment only explains what the cause of the problem is,
and the subsequent workaround, without going into how this could be
properly addressed. Add some lines to add that information.

Change-Id: I74e4df0e0c4b41fe8d52d9abf2d15335d2b327d6
Reviewed-on: https://code.wireshark.org/review/25614
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoAsciiDoc: Convert some comments.
Gerald Combs [Mon, 5 Feb 2018 16:59:45 +0000 (08:59 -0800)]
AsciiDoc: Convert some comments.

Convert some passthrough XML comments left over from the DocBook →
AsciiDoc conversion to AsciiDoc / Asciidoctor comments.

Change-Id: Iaf44bcf0b8a3a383e735b2b4394722cbbb2bdff3
Reviewed-on: https://code.wireshark.org/review/25615
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoUpdate couchbase dissector with new HELLO feature values
Jim Walker [Mon, 5 Feb 2018 09:34:13 +0000 (09:34 +0000)]
Update couchbase dissector with new HELLO feature values

Simply add missing feature values to the existing table

Change-Id: Ie4b0876df1d736af1cd1171a6645df75e2eb8cf2
Reviewed-on: https://code.wireshark.org/review/25611
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoQt: Update recent status via a non-blocking connection.
Gerald Combs [Sat, 3 Feb 2018 17:51:14 +0000 (09:51 -0800)]
Qt: Update recent status via a non-blocking connection.

Connect our recent file status signal using a Qt::QueuedConnection
instead of a Qt::BlockingQueuedConnection. As described at
https://woboq.com/blog/how-qt-signals-slots-work-part3-queuedconnection.html,
QueuedConnection makes a copy of the argument list while
BlockingQueuedConnection passess the list directly.

This fixes what appears to be a false positive reported by
ThreadSanitizer. Cross-thread signals are protected by a QMutex, but
qmutex_mac.cpp in the Qt5 sources uses a Mach semaphore. The
ThreadSanitizer manual says it supports pthread mutexes and compiler
atomic operations but doesn't mention Mach semaphores.

Change-Id: Icb8a63d7d0bdfe985ab8274757043ef45ae4bcde
Reviewed-on: https://code.wireshark.org/review/25576
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoDelete an out-of-date comment.
Guy Harris [Mon, 5 Feb 2018 05:07:12 +0000 (21:07 -0800)]
Delete an out-of-date comment.

Change-Id: Idc86f8fbb401fd0da39ef3b5e7aff04173006b22
Reviewed-on: https://code.wireshark.org/review/25610
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoHave block read routines indicate whether the block should be returned.
Guy Harris [Mon, 5 Feb 2018 04:33:02 +0000 (20:33 -0800)]
Have block read routines indicate whether the block should be returned.

Some blocks should be returned by wtap_read(), others are just processed
internally.  Add a Boolean flag to wtapng_block_t, have the routines
that read particular block types set it appropriately, and have the read
and seek-read routines check that flag rather than checking for the
block types that should be returned.  Pass a pointer to the
wtapng_block_t to packet type plugin read routines, rather than passing
it some members of the wtapng_block_t.

This means that 1) for new block types, we don't have to update any
tests and 2) plugin handlers for block types can indicate whether they
processed the block internally and the caller shouldn't see it or 2) the
block should be provided to the caller.

Bug: 14388
Change-Id: Iccc2031a277f55c7fa8b4f692c776b482b792b4f
Reviewed-on: https://code.wireshark.org/review/25609
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agopcapng_read_block() should just return a Boolean.
Guy Harris [Mon, 5 Feb 2018 03:28:41 +0000 (19:28 -0800)]
pcapng_read_block() should just return a Boolean.

It either returns "OK" or "fail", so we might as well make it a Boolean.

While we're at it, in pcapng_open(), handle EOF/short read and "invalid
file" errors when trying to read the first block differently; for the
first of those, we don't need to free *err_info, and this may be a bit
safer in case *err_info didn't happen to be set to NULL somewhere along
the line.

Change-Id: If8135624e3efb7838dceeb28e30e5c8c4b064786
Reviewed-on: https://code.wireshark.org/review/25608
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agopcapng_read_section_header_block() should just return a Boolean.
Guy Harris [Mon, 5 Feb 2018 03:13:06 +0000 (19:13 -0800)]
pcapng_read_section_header_block() should just return a Boolean.

It either returns "OK" or "fail", so we might as well make it a Boolean,
just as is the case with read routines for other block types.

Update some comments while we're at it.

Change-Id: I40b378d4e3c3cfb96687298b22a6f8f9f78d9240
Reviewed-on: https://code.wireshark.org/review/25607
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoMore AsciiDoc → Asciidoctor updates.
Gerald Combs [Sun, 4 Feb 2018 23:15:02 +0000 (15:15 -0800)]
More AsciiDoc → Asciidoctor updates.

Switch from AsciiDoc's smart quotes markup to the quotes themselves. Use
double curly quotes in place of singles.

Switch from XML entities to their direct equivalents where we can.
Switch from hex entities to decimal entities where we can't or it's not
convenient. (Asciidoctor PDF doesn't yet handle hex entities).

Change-Id: Iaf5ec33249e1c91b3d50b5d96251763243b72836
Reviewed-on: https://code.wireshark.org/review/25606
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agovalid_but_empty_file is a Boolean, so declare it as such.
Guy Harris [Sun, 4 Feb 2018 23:18:23 +0000 (15:18 -0800)]
valid_but_empty_file is a Boolean, so declare it as such.

If it's either going to be -1 or 1, and any value > 0 is "valid but
empty", that's just a Boolean, with -1 corresponding to false and 1
corresponding to true.  Make it so.

Change-Id: Ib7418fe7573b5d2cd1e2ef5de601c0262c8d9de1
Reviewed-on: https://code.wireshark.org/review/25605
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoCheck for read errors by checking for PCAPNG_BLOCK_ERROR.
Guy Harris [Sun, 4 Feb 2018 23:00:55 +0000 (15:00 -0800)]
Check for read errors by checking for PCAPNG_BLOCK_ERROR.

Check for "is an error" rather than "isn't OK".

Change-Id: Ib8f4ac44f70d71ff44658801e01807344032dd60
Reviewed-on: https://code.wireshark.org/review/25603
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoDon't treat short reads as errors when checking the file type.
Guy Harris [Sun, 4 Feb 2018 22:53:58 +0000 (14:53 -0800)]
Don't treat short reads as errors when checking the file type.

A short read isn't a clear error when you don't have a magic number and
are doing "does this look somewhat like a file of this type" test, it's
probably an indication that it's *not* a file of that type.

Change-Id: Iab2f32e7d169a777c50a36958eeb4e82a3809227
Reviewed-on: https://code.wireshark.org/review/25602
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoDocs: Make our AsciiDoc markup more compatible with AsciiDoctor.
Gerald Combs [Sun, 4 Feb 2018 19:39:56 +0000 (11:39 -0800)]
Docs: Make our AsciiDoc markup more compatible with AsciiDoctor.

Start using markup that is preferred by Asciidoctor but compatible with
both generators.

Add a missing "cpp" attribute and set a couple of Asciidoctor-specific
compatibility attributes.

Change-Id: Iff4c31362e4493b97a85f46db2c39b18c336536f
Reviewed-on: https://code.wireshark.org/review/25600
Reviewed-by: Gerald Combs <gerald@wireshark.org>