Commit Graph

70219 Commits

Author SHA1 Message Date
Guy Harris 1f5f63f8ef 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>
2018-02-09 00:29:51 +00:00
Dylan Ulis e4c5efafb7 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>
2018-02-08 23:41:12 +00:00
Dylan Ulis 60c5ec67f8 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>
2018-02-08 23:39:50 +00:00
Alexis La Goutte 41812f2d68 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>
2018-02-08 21:38:18 +00:00
Dario Lombardo 55c68ee69c 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>
2018-02-08 19:29:45 +00:00
Dario Lombardo fc082fa2a9 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>
2018-02-08 19:29:02 +00:00
Guy Harris 1a9c364198 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>
2018-02-08 18:29:37 +00:00
Alexis La Goutte 544f7a26da 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>
2018-02-08 17:08:39 +00:00
Alexis La Goutte 1d6ce5af72 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>
2018-02-08 16:17:07 +00:00
Dario Lombardo 16b07fa6bc 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>
2018-02-08 16:15:42 +00:00
Dario Lombardo ec2d31049f 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>
2018-02-08 16:15:31 +00:00
Dario Lombardo 8cd389e161 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>
2018-02-08 14:57:36 +00:00
Dario Lombardo bfd2dbcf25 tools: remove garbage from licensecheck.pl.
Change-Id: I9a0e00c9e033618ee2ced94dadf1a98640e0d914
Reviewed-on: https://code.wireshark.org/review/25684
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-02-08 13:37:17 +00:00
Dario Lombardo f814c40ad3 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>
2018-02-08 11:45:50 +00:00
Dario Lombardo 8eed71f539 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>
2018-02-08 11:44:58 +00:00
Stig Bjørlykke a2265f73b5 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>
2018-02-08 09:54:16 +00:00
Stig Bjørlykke a56d9ba30e 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>
2018-02-08 09:54:09 +00:00
Moshe Kaplan 58d5baf3c0 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>
2018-02-08 05:36:28 +00:00
Guy Harris 0f721985f1 Get rid of unneeded #includes.
Change-Id: Ica457e3fb2a6e2318ca1e03fb7b2569c7d8e6aba
Reviewed-on: https://code.wireshark.org/review/25679
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08 03:31:04 +00:00
Guy Harris 390e80ee58 Fix white space.
Change-Id: I90047f070f42991a67da5215b6eda60f70d7945f
Reviewed-on: https://code.wireshark.org/review/25678
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-08 03:28:13 +00:00
Guy Harris a0e76588bb 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>
2018-02-08 03:26:54 +00:00
Guy Harris e5ac9e4cf0 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>
2018-02-08 03:15:59 +00:00
Guy Harris 18bbdb478e 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>
2018-02-07 22:51:49 +00:00
Guy Harris 600b84f4c1 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>
2018-02-07 22:21:03 +00:00
Gerald Combs 62fc862bc6 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>
2018-02-07 22:12:32 +00:00
Guy Harris 32923b94a1 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>
2018-02-07 22:08:32 +00:00
Gerald Combs c0a0003824 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>
2018-02-07 21:33:35 +00:00
Gerald Combs 8ae0467e61 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>
2018-02-07 19:55:34 +00:00
Pascal Quantin 80a1dd7029 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>
2018-02-07 18:31:17 +00:00
Stig Bjørlykke 22824478d1 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>
2018-02-07 14:03:44 +00:00
Stig Bjørlykke 28960d79cc 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>
2018-02-07 09:22:53 +00:00
Guy Harris 7ee8ead85c 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>
2018-02-07 09:12:10 +00:00
Guy Harris 40a533abe1 Move summary.[ch] to libui.
Change-Id: I49f1eeb4fc3a90e436da116577a7d0c5ba982eee
Reviewed-on: https://code.wireshark.org/review/25657
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-07 08:29:52 +00:00
Dario Lombardo 908e25d5aa 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>
2018-02-07 06:29:48 +00:00
Matej Tkac 782054c2d5 [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>
2018-02-07 05:58:34 +00:00
Moshe Kaplan cd8c73a355 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>
2018-02-07 05:37:51 +00:00
Dario Lombardo 71844ed50a wsutil: use SPDX identifiers.
Change-Id: I4863416ddc425b9138ffa47621eee823db9e7fda
Reviewed-on: https://code.wireshark.org/review/25557
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-07 05:34:22 +00:00
Dario Lombardo c1f37d25c3 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>
2018-02-07 05:33:17 +00:00
Pascal Quantin 0fdbc5e247 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>
2018-02-07 05:26:23 +00:00
Dario Lombardo c4a6016be2 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>
2018-02-07 05:24:04 +00:00
Richard Sharpe 9beab2d89f 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>
2018-02-07 05:22:42 +00:00
Moshe Kaplan b13678fd37 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>
2018-02-07 05:21:20 +00:00
Michael Mann 32ce1fd3dd 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>
2018-02-07 05:19:36 +00:00
Michael Mann f4f44caa35 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>
2018-02-07 03:16:42 +00:00
Guy Harris f29bafff46 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>
2018-02-07 03:10:34 +00:00
Justin Dailey fa76cd57ff 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>
2018-02-07 00:01:08 +00:00
Gerald Combs c061522765 2.5.0 → 2.5.1.
Change-Id: I185a3f359acfe5dfd06c0b7f5fff3b6586be1ff9
Reviewed-on: https://code.wireshark.org/review/25647
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-06 23:55:46 +00:00
Gerald Combs 59e4311fad Temporarily revert "Fix typo in DTN dissector"
This will be restored after the 2.5.0 release is complete.

This reverts commit 61cc769169.

Change-Id: I0b7d2435fe010070aaced5f395c75a1cd65b3f83
Reviewed-on: https://code.wireshark.org/review/25645
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-06 20:55:28 +00:00
Justin Dailey 61cc769169 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>
2018-02-06 20:49:49 +00:00
Gerald Combs 5df9b1d5d7 Build 2.5.0.
Change-Id: I8be543c87d289b616b92ab178458382c93580f12
Reviewed-on: https://code.wireshark.org/review/25644
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-06 20:37:41 +00:00