metze/wireshark/wip.git
5 years agoReplace ancient notes about modifying libpcap with a link to a newer doc.
Guy Harris [Sun, 6 Jan 2019 03:06:10 +0000 (19:06 -0800)]
Replace ancient notes about modifying libpcap with a link to a newer doc.

Instead of giving horribly out-of-date instructions on how to add a new
module to libpcap, just point to the document that I started whipping up
earlier today (it definitely needs work - it's incomplete - but I'll be
getting back to it).

While we're at it, update the notes on adding support for new LINKTYPE_
values to libwiretap, and note that it's only necessary if you had to
add a new DLT_ *and* there isn't already a WTAP_ENCAP_ value that would
correspond to that DLT_.

Change-Id: I3882d0a57b29e98f73c074317bc6df7458fcc677
Reviewed-on: https://code.wireshark.org/review/31397
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoAdd a coloring rule for system events.
Gerald Combs [Fri, 4 Jan 2019 17:08:37 +0000 (09:08 -0800)]
Add a coloring rule for system events.

Add a coloring rule for sdjournal and sysdig events.

Change-Id: I92f0bea238a9f0242d4790c58867144f0e256097
Reviewed-on: https://code.wireshark.org/review/31369
Reviewed-by: Michael Mann <mmann78@netscape.net>
5 years agodoc: remove wrong trailing slash.
Dario Lombardo [Sat, 5 Jan 2019 22:22:50 +0000 (23:22 +0100)]
doc: remove wrong trailing slash.

Change-Id: If6bcf2ce9754453cfff434dde67b682761b37231
Reviewed-on: https://code.wireshark.org/review/31394
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years ago ATM: add new dissector table
Andrii Vladyka [Sat, 5 Jan 2019 18:26:01 +0000 (10:26 -0800)]
 ATM: add new dissector table

 The new table takes unit ((VPI << 16) | VCI) to allow ATM cell payload dissection depending on VPI+VCI combination

Change-Id: I8f958f904749363cafe0046424c3c2bf6a1a5c96
Reviewed-on: https://code.wireshark.org/review/31381
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoRemove comment whose meaning is unclear at best.
Guy Harris [Sat, 5 Jan 2019 21:35:08 +0000 (13:35 -0800)]
Remove comment whose meaning is unclear at best.

What is is it saying we shouldn't be doing?

Change-Id: Iad26687f3f3f482af09760255fef7189ed71a3ae
Reviewed-on: https://code.wireshark.org/review/31391
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agotravis: remove asciidoctor
Peter Wu [Sat, 5 Jan 2019 11:41:55 +0000 (12:41 +0100)]
travis: remove asciidoctor

It is already installed in debian-setup.sh. brew setup does not install
it, but as no documentation is built it should not matter.

Change-Id: I0cfa343d1c837ebba3b020a6586fb4dd0ae57f9b
Reviewed-on: https://code.wireshark.org/review/31387
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotravis: remove obsolete sudo key
Peter Wu [Sat, 5 Jan 2019 11:29:46 +0000 (12:29 +0100)]
travis: remove obsolete sudo key

Container-based builds have been removed, sudo is always available now:
https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration

Change-Id: Id7cbcf0e406f4c7199f5fd7a3848023e78249a92
Reviewed-on: https://code.wireshark.org/review/31386
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoNTP: Adding missing commands of ntpdc mode 7
Uli Heilmeier [Sat, 5 Jan 2019 07:48:00 +0000 (08:48 +0100)]
NTP: Adding missing commands of ntpdc mode 7

Used documentation of bug report.

Bug: 15272
Change-Id: I83871b7458c36df711502bc6aa954a8c3c53604d
Reviewed-on: https://code.wireshark.org/review/31385
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agordp: Parse the CS_MONITOR flags.
Mariusz Zaborski [Sat, 5 Jan 2019 19:17:14 +0000 (20:17 +0100)]
rdp: Parse the CS_MONITOR flags.

The CS_MONITOR package have also a flags fields wich is not used. [1]
This fix parsing the CS_MONITOR package.

[1] https://msdn.microsoft.com/en-us/library/dd305336.aspx

Change-Id: I99eea5abe95d4654aed8dc0d0e137c845aaba3aa
Reviewed-on: https://code.wireshark.org/review/31389
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoPass a structure including an atm_phdr to dissect_atm_pw_oam_cell().
Guy Harris [Sat, 5 Jan 2019 07:39:38 +0000 (23:39 -0800)]
Pass a structure including an atm_phdr to dissect_atm_pw_oam_cell().

This will allow the VPI and VCI to be handed to
dissect_atm_cell_payload() in
https://code.wireshark.org/review/c/31381/.

That structure also needs to include the enable_fill_columns_by_atm_dissector
flag; we remove that from the pwatm_private_data_t, which is now private
to the ATM pseudo-wire dissector, and put it in the new structure.

Change-Id: I88f4a9f4b3c4c1c94914311bb883ea38e10ca4b4
Reviewed-on: https://code.wireshark.org/review/31384
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoWSDG: update testing section to cover use of pytest
Peter Wu [Thu, 3 Jan 2019 23:36:41 +0000 (00:36 +0100)]
WSDG: update testing section to cover use of pytest

Remove traces of the "config" module, it was removed. Add a new section
on using pytest.

Change-Id: I763fc53359157f5fcb04198ed98e2d7f7a2c7220
Reviewed-on: https://code.wireshark.org/review/31372
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotest: enable parallelism by default for pytest
Peter Wu [Fri, 4 Jan 2019 18:47:53 +0000 (19:47 +0100)]
test: enable parallelism by default for pytest

Consistent with tools like "ninja", enable parallelism by default. It
can be disabled again with `pytest -n0`.

This makes pytest-xdist a dependency when pytest is used as test runner.
This does not affect the unittest-based test runnet (test/test.py).

Change-Id: I4dc905f097c57a869aa39487b15361502b431616
Reviewed-on: https://code.wireshark.org/review/31371
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agopytest.ini: declare minimum version requirement
Peter Wu [Fri, 4 Jan 2019 19:06:45 +0000 (20:06 +0100)]
pytest.ini: declare minimum version requirement

pytest 3.0.0 (2016-08-18) or newer is required due to the use of the
yield keyword in fixtures and the use of getfixturevalue. Do not bother
supporting older versions, install newer versions via pip instead.

Change-Id: I35ae787e2abcc706c19251d29a7d5b8513079c15
Reviewed-on: https://code.wireshark.org/review/31373
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotest: allow running pytest without specifying the tests directory
Peter Wu [Thu, 3 Jan 2019 22:43:56 +0000 (23:43 +0100)]
test: allow running pytest without specifying the tests directory

This allows `pytest` to be executed from the top-level source or build
directory (or any other directory below).

Change-Id: Ib7af2ea2aaf01319d6839d2dc67228fbb5a7bc34
Reviewed-on: https://code.wireshark.org/review/31370
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agomaxmind_db: Close our pipe FDs inside a lock.
Gerald Combs [Fri, 4 Jan 2019 21:24:10 +0000 (13:24 -0800)]
maxmind_db: Close our pipe FDs inside a lock.

Lock our pipe mutex before closing its file descriptors. This should
hopefully fix some infrequent crashes that I'm seeing on my Windows 7 VM.

Add a note about GRWLock behavior on Windows which doesn't appear to be
related to this issue, but which is nevertheless important.

Ping-Bug: 14701
Change-Id: I32e66a24258264fa65a907f319755594f90c0177
Reviewed-on: https://code.wireshark.org/review/31375
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoadd encoding windows 1251, cp855, cp866
kanidef [Thu, 3 Jan 2019 07:07:02 +0000 (10:07 +0300)]
add encoding windows 1251, cp855, cp866

Change-Id: I0e8507cf63d89942167ca579ef304bc3d679346e
Reviewed-on: https://code.wireshark.org/review/31316
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoFinish migrating to Asciidoctor's modern syntax.
Gerald Combs [Fri, 4 Jan 2019 20:00:59 +0000 (12:00 -0800)]
Finish migrating to Asciidoctor's modern syntax.

Finish migrating the User's and Developer's guides to modern syntax.
Remove :compat-mode: from attributes.asciidoc.

Change-Id: I1232676c6ef4c3638253d070dcbae6d3c1ead284
Reviewed-on: https://code.wireshark.org/review/31374
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agodebian: add dh-python to debian deps.
Dario Lombardo [Thu, 3 Jan 2019 11:01:34 +0000 (12:01 +0100)]
debian: add dh-python to debian deps.

Basic Ubuntu installation lacks it.

Change-Id: I208952d15bd32a7813c20625fe94656fb71ae824
Reviewed-on: https://code.wireshark.org/review/31322
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
5 years agotest: assume binaries in $PWD\run\RelWithDebInfo by default
Peter Wu [Thu, 3 Jan 2019 19:17:00 +0000 (20:17 +0100)]
test: assume binaries in $PWD\run\RelWithDebInfo by default

Avoid the need to set `pytest --program-path` in the common case.

Change-Id: I3b237e47eee741decb62a74b733110040aa26673
Reviewed-on: https://code.wireshark.org/review/31348
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoextcap: fix --extcap-version argument to include the version
Peter Wu [Fri, 4 Jan 2019 12:39:03 +0000 (13:39 +0100)]
extcap: fix --extcap-version argument to include the version

Change-Id: I727864ae0a210fea2dc90624102b793f5a98e395
Fixes: v2.9.0rc0-2648-g9ae02a5918 ("extcap: run --extcap-config in parallel to reduce startup time")
Reviewed-on: https://code.wireshark.org/review/31367
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agocommit-msg: accept commit messages with backslashes
Peter Wu [Fri, 4 Jan 2019 13:27:57 +0000 (14:27 +0100)]
commit-msg: accept commit messages with backslashes

Dash (/bin/sh on Ubuntu) treats backslashes specially in an echo
command. This could fail the validate-commit.py script when '\r' or '\n'
occur anywhere in a commit message.

Change-Id: Icec2c1e8ad1b365b4326ecc6ba9667ac64866fdd
Reviewed-on: https://code.wireshark.org/review/31368
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agowsutil: fix code according to clang-tidy.
Dario Lombardo [Fri, 4 Jan 2019 13:12:04 +0000 (14:12 +0100)]
wsutil: fix code according to clang-tidy.

Change-Id: I7b4caed147c5813d7c9737c551b8bf1a7be48929
Reviewed-on: https://code.wireshark.org/review/31361
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agowiretap: fix code according to clang-tidy.
Dario Lombardo [Fri, 4 Jan 2019 13:12:45 +0000 (14:12 +0100)]
wiretap: fix code according to clang-tidy.

Change-Id: I7f539968e9dce3a49112b7aeaa052b8cdb7501a6
Reviewed-on: https://code.wireshark.org/review/31364
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQt: Add "Show in Finder/Folder" for plugins.
Stig Bjørlykke [Sun, 30 Dec 2018 19:30:56 +0000 (20:30 +0100)]
Qt: Add "Show in Finder/Folder" for plugins.

Add a menu item for "Show in Finder/Folder" for plugins in cases where
Wireshark loads plugins from other folders than is listed in "Folders".

Change-Id: I8cc42d9992d885f1ca37f5769d7292bed1584f4b
Reviewed-on: https://code.wireshark.org/review/31270
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agows_mempbrk_sse42: use same var names.
Dario Lombardo [Fri, 4 Jan 2019 08:48:20 +0000 (09:48 +0100)]
ws_mempbrk_sse42: use same var names.

Found by clang-tidy.

Change-Id: I2f89c6860d591c5c1563b9ca01306bb3d9e5e42c
Reviewed-on: https://code.wireshark.org/review/31359
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agows_pipe: use same var name.
Dario Lombardo [Fri, 4 Jan 2019 08:47:45 +0000 (09:47 +0100)]
ws_pipe: use same var name.

Found by clang-tidy.

Change-Id: I0d324faf494f6b68275d6ff600304f716529778b
Reviewed-on: https://code.wireshark.org/review/31358
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoxtea: use same var name.
Dario Lombardo [Fri, 4 Jan 2019 08:40:52 +0000 (09:40 +0100)]
xtea: use same var name.

Found by clang-tidy.

Change-Id: I5afce9464536cbbaf8f7f84b165d2ef56e166c2e
Reviewed-on: https://code.wireshark.org/review/31357
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoCRC6: Fixed CRC lookup table and functions
Ross [Thu, 3 Jan 2019 22:19:59 +0000 (14:19 -0800)]
CRC6: Fixed CRC lookup table and functions

* Generated code and 256-element lookup table with pycrc
* Combined 2 crc6 functions which both have same poly 0x6f and lookup table
* Using the example file from the bug report,

    $ tshark -r ~/Downloads/M1_header_crc.pcapng -V | grep "Calculated CRC"
    1101 00.. = Header CRC: 0x34 [Calculated CRC 0x34]

Header and Calculated CRC are now both 0x34 (correct value)

* pycrc settings for generation:
    $ python pycrc.py --reflect-in False \
                      --reflect-out False \
                      --xor-in 0 \
                      --xor-out 0 \
                      --algorithm table-driven
                      --width 6 \
                      --poly 0x2f

* To manually check 3GPP protocol header CRCs, use above command with flag

    --check-hexstring=<HEADER HEX>

Bug: 14875
Change-Id: I283f52fcae10b2f92f107df6988629d49d692428
Reviewed-on: https://code.wireshark.org/review/31356
Reviewed-by: Ross Jacobs <rossbjacobs@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoepan: remove return from functions returning void.
Dario Lombardo [Thu, 3 Jan 2019 16:45:02 +0000 (17:45 +0100)]
epan: remove return from functions returning void.

Found by clang-tidy.

Change-Id: Ibedfec5e5d3eca7c2e65319b7ecb4dcbe974b88b
Reviewed-on: https://code.wireshark.org/review/31337
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWSDG: Add a note about Npcap licensing.
Gerald Combs [Thu, 3 Jan 2019 22:05:27 +0000 (14:05 -0800)]
WSDG: Add a note about Npcap licensing.

Expand the Npcap text. Make it clear that you might need to purchase a
license to redistribute Npcap.

Change-Id: I9340ed2d363e66443797478c59859ce10d648aff
Reviewed-on: https://code.wireshark.org/review/31351
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWSDG: Stop recommending DDD.
Gerald Combs [Thu, 3 Jan 2019 22:21:59 +0000 (14:21 -0800)]
WSDG: Stop recommending DDD.

Drop mentions of DDD in favor of Qt Creator, CLion, and Eclipse. From
looking at https://sourceware.org/gdb/wiki/GDB%20Front%20Ends I'm
guessing that those have superseded DDD, as nice at it is/was.

Change-Id: I445a909ab8c8aa73c90f868d6b0958bb8faf62d6
Reviewed-on: https://code.wireshark.org/review/31353
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotest/dissectorstest: assert that text2pcap and tshark runs
Peter Wu [Thu, 3 Jan 2019 21:58:28 +0000 (22:58 +0100)]
test/dissectorstest: assert that text2pcap and tshark runs

Fail early if these commands fail.

Change-Id: I6ba6cfa4b0b68c7282b79204b4f2bfedfefa4326
Reviewed-on: https://code.wireshark.org/review/31352
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agotest: split SubprocessTestCase.run into setUp/tearDown
Peter Wu [Thu, 3 Jan 2019 18:07:40 +0000 (19:07 +0100)]
test: split SubprocessTestCase.run into setUp/tearDown

The run method is not invoked when running in debug mode (for example,
with `pytest --pdb`) and would result in spurious errors due to "log_fd"
being None. Split the method to resolve this incompatibility.

Note that with `pytest --pdb`, the tearDown method is not called when
exceptions occur, see https://docs.pytest.org/en/latest/unittest.html

Change-Id: I4b66c03d5b050b53311ec64021fe17dc91bb48dd
Reviewed-on: https://code.wireshark.org/review/31339
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoRemove a no-longer-needed DIAG_OFF/DIAG_ON pair.
Guy Harris [Thu, 3 Jan 2019 23:43:30 +0000 (15:43 -0800)]
Remove a no-longer-needed DIAG_OFF/DIAG_ON pair.

If you're not casting anything, you're not casting away qualifiers, so
there's no need to disable warnings about casting away constness.

Change-Id: Ib6bb75a8683ce129078a09df385159c13d2cf306
Reviewed-on: https://code.wireshark.org/review/31355
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agodoc/README.display_filter: Fix typo: asser -> assert
Jim Young [Thu, 3 Jan 2019 23:36:04 +0000 (18:36 -0500)]
doc/README.display_filter: Fix typo: asser -> assert

Change-Id: If49baf3e2b4e01f4ca4ea85415a3a291f8c04c92
Reviewed-on: https://code.wireshark.org/review/31354
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoepan: remove redundant casts.
Dario Lombardo [Thu, 3 Jan 2019 16:53:42 +0000 (17:53 +0100)]
epan: remove redundant casts.

Found by clang-tidy.

Change-Id: Iaf6cf84c33b03ddfcd39a333b49f4987002afa56
Reviewed-on: https://code.wireshark.org/review/31338
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agofile: remove redundant cast.
Dario Lombardo [Thu, 3 Jan 2019 16:41:49 +0000 (17:41 +0100)]
file: remove redundant cast.

Found by clang-tidy.

Change-Id: I58c11e09ed89e99457635dd843311ce3cf3c6bae
Reviewed-on: https://code.wireshark.org/review/31334
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agosharkd: remove redundant cast.
Dario Lombardo [Thu, 3 Jan 2019 16:42:36 +0000 (17:42 +0100)]
sharkd: remove redundant cast.

Found by clang-tidy.

Change-Id: Ie02a77ffc17050743de216594d40faa65e1dabc2
Reviewed-on: https://code.wireshark.org/review/31336
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoextcap: remove redundant casts.
Dario Lombardo [Thu, 3 Jan 2019 16:38:03 +0000 (17:38 +0100)]
extcap: remove redundant casts.

Found by clang-tidy.

Change-Id: Icd4a72d840092ce9c5e18e3d16a94b785b4521dc
Reviewed-on: https://code.wireshark.org/review/31333
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agorawshark: remove redundant cast.
Dario Lombardo [Thu, 3 Jan 2019 16:42:21 +0000 (17:42 +0100)]
rawshark: remove redundant cast.

Found by clang-tidy.

Change-Id: I50912055e0230173af3a6b008fafb12144b02f8d
Reviewed-on: https://code.wireshark.org/review/31335
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoPut a period at the end of a sentence.
Guy Harris [Thu, 3 Jan 2019 22:01:08 +0000 (14:01 -0800)]
Put a period at the end of a sentence.

Change-Id: Ifad6b9a09bc052d687cefe3ccda8c07ad765abda
Reviewed-on: https://code.wireshark.org/review/31350
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoSlight fixup for where the capture code lives.
Guy Harris [Thu, 3 Jan 2019 21:56:15 +0000 (13:56 -0800)]
Slight fixup for where the capture code lives.

The full explanation is a bit more complicated - we'd have to mention
the dumpcap/*shark split, and the code on both sides of the split.

Change-Id: I43f8fc3c589bdf900e20714b55a3b4f544879bc2
Reviewed-on: https://code.wireshark.org/review/31349
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoWSDG: Miscellaneous updates and fixes.
Gerald Combs [Thu, 3 Jan 2019 20:01:19 +0000 (12:01 -0800)]
WSDG: Miscellaneous updates and fixes.

Update the Windows CRT text to mention the Universal CRT.

Replace references to WinPcap with Npcap.

Update the Qt LTS text.

Add a WiX / .msi section

Use curly quotes.

Use the {cpp} attribute so that the "++" in "C++" doesn't trigger
monospace formatting.

Make the various "Unix" and "Windows" subsection title names uniform.
Give them the "discrete" attribute so that they don't clutter up the
TOC.

Title-case section titles.

Remove the reference to m4. As far as I can tell we don't require it.

Change-Id: I73f851adae640f77205781d6c4962002c2d53f49
Reviewed-on: https://code.wireshark.org/review/31343
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agotest: print command output for dfiltertest failures
Peter Wu [Thu, 3 Jan 2019 18:28:44 +0000 (19:28 +0100)]
test: print command output for dfiltertest failures

The buildbot detects random errors on Windows. Log some more details in
order to understand the problem better.

Change-Id: I903457894985273a63b8907b6784a2897cd93d93
Reviewed-on: https://code.wireshark.org/review/31340
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoAvoid definition collisions for INVALID_SOCKET.
Guy Harris [Thu, 3 Jan 2019 20:21:19 +0000 (12:21 -0800)]
Avoid definition collisions for INVALID_SOCKET.

Newer versions of libpcap define it (due to the somewhat infelicitous
API for "active mode" remote capture, which returns a socket); don't
define it ourselves if it's already defined.

Change-Id: I620576620fd2708ebd503da696e17b472bc20472
Reviewed-on: https://code.wireshark.org/review/31344
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoFix indentation.
Guy Harris [Thu, 3 Jan 2019 19:39:54 +0000 (11:39 -0800)]
Fix indentation.

Change-Id: I60d9b7b5dce04dae560a68feb329041c0374c241
Reviewed-on: https://code.wireshark.org/review/31342
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agotshark: remove redundant casts.
Dario Lombardo [Thu, 3 Jan 2019 16:16:35 +0000 (17:16 +0100)]
tshark: remove redundant casts.

Found by clang-tidy.

Change-Id: I7fe1c3219758d8daf411d094e2df17916f2eb57b
Reviewed-on: https://code.wireshark.org/review/31330
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agocapture_sync: use the same var name as in other places.
Dario Lombardo [Thu, 3 Jan 2019 15:53:01 +0000 (16:53 +0100)]
capture_sync: use the same var name as in other places.

error_message -> error_msg.

Change-Id: Ie1bc1b72800dc6c93e481cfffa202d5bd0743b5c
Reviewed-on: https://code.wireshark.org/review/31329
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agodoc: update README.display_filter for new test location
Peter Wu [Thu, 3 Jan 2019 19:14:09 +0000 (20:14 +0100)]
doc: update README.display_filter for new test location

Change-Id: I29bb00dbec43692d940ef6f389743af56dfd6995
Reviewed-on: https://code.wireshark.org/review/31341
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agorelease-notes: document TLS and library changes
Peter Wu [Thu, 3 Jan 2019 15:00:08 +0000 (16:00 +0100)]
release-notes: document TLS and library changes

Change-Id: I3af4cb96a6c87205cdd6c85c27977366cb77291f
Reviewed-on: https://code.wireshark.org/review/31327
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
5 years agoepan: use json_dumper for json outputs.
Dario Lombardo [Mon, 10 Dec 2018 12:44:03 +0000 (13:44 +0100)]
epan: use json_dumper for json outputs.

They include -Tjson, -Tjsonraw, -Tek.

Change-Id: Ib3d700482ce5c29727c3f778cc3c46a1bf7756c4
Reviewed-on: https://code.wireshark.org/review/31000
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agojson_dumper: make json_dumper_bad fatal.
Dario Lombardo [Wed, 2 Jan 2019 22:59:41 +0000 (23:59 +0100)]
json_dumper: make json_dumper_bad fatal.

A call to this function means a programming error. g_error makes it
fatal and terminates the program, making the debug easier.

Change-Id: I5c9e82507482733b4d450ed6c3a9fc17fb0fcdca
Reviewed-on: https://code.wireshark.org/review/31310
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoGeoNetworking cleanup and minor corrections
Christophe GUERBER [Thu, 3 Jan 2019 12:33:49 +0000 (13:33 +0100)]
GeoNetworking cleanup and minor corrections

Removes obsoleted dissector tables, cleanup comments, correct elevation
display and intx display.

Change-Id: I7224bede0cecbbd5cab91630193e17a7e12615b1
Reviewed-on: https://code.wireshark.org/review/31323
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agodebian: update symbols.
Dario Lombardo [Thu, 3 Jan 2019 12:17:39 +0000 (13:17 +0100)]
debian: update symbols.

Change-Id: I550dd3b6bdf29cb8c5a80ba8d08b29ffbe3246cd
Reviewed-on: https://code.wireshark.org/review/31321
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoieee80211: print the RU Allocation in decimal
Emmanuel Grumbach [Thu, 3 Jan 2019 06:33:06 +0000 (08:33 +0200)]
ieee80211: print the RU Allocation in decimal

The RU Allocation is really a decimal number and the
standard uses it as a decimal number. It is not a bitmap.
Print it in decimal.

Change-Id: I2f8ff9798aa1af855ad3c8b0a26704282fe18189
Reviewed-on: https://code.wireshark.org/review/31315
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoknsxip: fix header
Alexis La Goutte [Thu, 3 Jan 2019 08:33:58 +0000 (08:33 +0000)]
knsxip: fix header

it is no longer Ethereal (=> Wireshark)

Change-Id: I2a59aa0ec4e18b05612bbce6ede18db9ae350e49
Reviewed-on: https://code.wireshark.org/review/31317
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agogeonw: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Thu, 3 Jan 2019 09:53:25 +0000 (09:53 +0000)]
geonw: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Ib1e26cc20ad30889a56455bcf529ba404f14506f
Reviewed-on: https://code.wireshark.org/review/31320
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoknxip: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Alexis La Goutte [Thu, 3 Jan 2019 08:59:42 +0000 (08:59 +0000)]
knxip: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang

Change-Id: Ifa64a819d50b730eae4a5c2447b502580a871f16
Reviewed-on: https://code.wireshark.org/review/31318
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdd dissector for Great Britain Companion Specification (GBCS)
Kenneth Soerensen [Sat, 22 Dec 2018 15:08:32 +0000 (16:08 +0100)]
Add dissector for Great Britain Companion Specification (GBCS)

The Smart Metering Equipment Technical Specifications (SMETS) requires
that Gas Smart Metering Equipment (GSME), and Electricity Smart
Metering Equipment (ESME) including variants, meet the requirements
described in the Great Britain Companion Specification (GBCS).

GBCS messages are end-to-end and contains ZigBee, DLMS or ASN.1
formatted payloads. The GBCS messages are transported via IPor via
the ZigBee Tunneling cluster.

https://smartenergycodecompany.co.uk/document-download-centre/download-info/gbcs-v2-1/

Bug: 15381
Change-Id: I28ca9831fc266a6abd310db103306b98786e63f9
Reviewed-on: https://code.wireshark.org/review/31168
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Martin Boye Petersen <martinboyepetersen@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoCouchbase: Fixup a shadow variable.
Gerald Combs [Thu, 3 Jan 2019 01:00:22 +0000 (17:00 -0800)]
Couchbase: Fixup a shadow variable.

Rename index to byte_idx.

Change-Id: I49d09d6db71d5db9e1c65f2abadc1413b3ccb7ec
Reviewed-on: https://code.wireshark.org/review/31313
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWindows: use lua-unicode as built with VS 2017
Peter Wu [Wed, 2 Jan 2019 17:17:58 +0000 (18:17 +0100)]
Windows: use lua-unicode as built with VS 2017

These binaries were built by AppVeyor using VS 2017 (MSVC 19.16.27025.1)
and replaces locally built binaries using VS 2015 (MSVC 19.0.24215.1).
I believe that these are the same as both of them use VCRUNTIME140.dll
and import the same symbols. Using a newer compiler should however
remove any doubt of compatibility with VS 2017 and should address
concerns from Anders and Graham.

These files are actually the "msvc2017_*.zip" files from
https://github.com/Lekensteyn/lua-unicode/releases/tag/5.2.4-release1

Change-Id: Ib3fdf4678267fa10c0729f98ae0ce3153ac278a4
Reviewed-on: https://code.wireshark.org/review/31307
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDon't fall out of the loop on a write error.
Guy Harris [Wed, 2 Jan 2019 23:55:51 +0000 (15:55 -0800)]
Don't fall out of the loop on a write error.

Doing so means we'd close the FD, but we've already closed it.

Addresses Coverity CID 1442274.

Change-Id: I5aab1bd4b82e9ac0901bcdbc1ddb6b16eec30573
Reviewed-on: https://code.wireshark.org/review/31312
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years ago6lowpan: don't try to use (new) TVB that wasn't created.
Jeff Morriss [Wed, 2 Jan 2019 21:45:05 +0000 (16:45 -0500)]
6lowpan: don't try to use (new) TVB that wasn't created.

If the IPHC TVB wasn't created then bail out of dissection before trying
to use it.

Bug: 15217
Change-Id: I6e297590cdf86e13b0185f75f1d409888f2498d8
Reviewed-on: https://code.wireshark.org/review/31308
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
5 years agotools: fix trailing messages.
Dario Lombardo [Wed, 2 Jan 2019 22:11:24 +0000 (23:11 +0100)]
tools: fix trailing messages.

Change-Id: If4f213daaa27f51b1659939244945d9fdddc7772
Reviewed-on: https://code.wireshark.org/review/31309
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agoIEEE1609.2: Allow Service Specific Permissions dissection
Christophe GUERBER [Wed, 2 Jan 2019 15:15:33 +0000 (16:15 +0100)]
IEEE1609.2: Allow Service Specific Permissions dissection

IEEE1609 and GeoNetworking secured packets containing certificate
contain Service Specific Permission items that was not dissected.

This patch allows dissection of SSP both in IEEE1609dot2 dissector and
in the geonetworking dissector.

It also provides SSP dissectors for ETSI DEN and CA basic services.

Change-Id: Ic5efe403f7c4337c7e51a4eab9a9d674d2fe1cf6
Reviewed-on: https://code.wireshark.org/review/31303
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agocli_main: remove real_main from stack traces for non-Windows
Peter Wu [Wed, 26 Dec 2018 17:10:12 +0000 (18:10 +0100)]
cli_main: remove real_main from stack traces for non-Windows

Restore the "main" name since that is used everywhere else except for
Windows. On Windows, "main" is renamed via a macro to avoid a conflict
with "wmain" and to allow it to be called in cli_main.c.

For those wondering, GUI applications (such as Qt) have a different
entry point, namely WinMain. In Qt5, src/winmain/qtmain_win.cpp defines
WinMain, but seems to convert its arguments from Unicode to CP_ACP
(ASCII). It might not support UTF-8, but I did not verify this.

Change-Id: I93fa59324eb2ef95a305b08fc5ba34d49cc73bf0
Reviewed-on: https://code.wireshark.org/review/31208
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agonas5gs: Add dissection of QoS flow descriptions.
Anders Broman [Wed, 2 Jan 2019 10:38:48 +0000 (11:38 +0100)]
nas5gs: Add dissection of QoS flow descriptions.

While there renumber according to latest spec. and fix some indentation.

Change-Id: Ib9b4590d72c3124ffcb96fd719a9a19cadb4c494
Reviewed-on: https://code.wireshark.org/review/31300
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoDiameter: Add 3GPP avp name="eDRX-Related-RAT" code="1705"
Anders Broman [Wed, 2 Jan 2019 09:04:03 +0000 (10:04 +0100)]
Diameter: Add 3GPP avp name="eDRX-Related-RAT" code="1705"

Change-Id: Ib95113f12831eed298c28998e4e6106bb4df8019
Reviewed-on: https://code.wireshark.org/review/31299
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoUpdates and bugfixes of ASTERIX I062
Atli Guðmundsson [Thu, 27 Dec 2018 03:11:40 +0000 (03:11 +0000)]
Updates and bugfixes of ASTERIX I062

I062 v1.18 updates (now the default)
- Updated I062/380#10.STAT, new enum values  (6 & 7)
- Added asterix.062/080.SFC
- Added asterix.062/080.IDD
- Added asterix.062/080.IEC
I062 v1.17 updates
- Added asterix.062/060.V
- Added asterix.062/060.G
I062 bugfixes:
- Fixed I062 Capitalisation inconsistencies
- Fixed I062/080.FPLT, incorrect value mask
- Fixed I062/080.SDS, incorrect value mask
- Fixed I062/110#1.M5, incorrect name (was I062/110#1.MD5)
- Fixed I062/110#4, incorrect abbreviation (was asterix.062_11_04)
- Fixed I062/110#4, missing spare bit
- Fixed I062/110#4.RES, incorrect value mask
- Fixed I062/110#6, incorrect abbreviation (was asterix.062_11_06)
- Fixed I062/136.MFL, incorrect abbreviation (was asterix.062_136_ALT)
- Fixed I062/245.STI, was missing
- Fixed I062/245, did not display anything
- Fixed I062/290, incorrect abbreviation, (was asterix.062_)
- Fixed I062/295#7.MHG, incorrect name (was I062/295#07.MHD)
- Fixed I062/340#4/5, incorrect abbreviations (was asterix.062_340_)
- Fixed I062/380#4, incorrect abbreviation (was asterix.062_380_4)
- Fixed I062/380#4.IAS, incorrect scaling (depends on IM bit)
- Fixed I062/380#6.ALT, incorrect type (was unsigned)
- Fixed I062/380#7.ALT, incorrect type (was unsigned)
- Fixed I062/380#9.NC, incorrect value mask
- Fixed I062/380#9.TD, incorrect field size
- Fixed I062/380#9.TTR, incorrect type (was signed)
- Fixed I062/380#17.TA, incorrect type (was signed)
- Fixed I062/380#19.VUC, incorrect field size
- Fixed I062/390#3, incorrect type (was 32-bit), incorrect value mask
- Fixed I062/390#n, incorrect abbreviations (was asterix.062_nn)
- Fixed I062/500#3.APWLAT, incorrect type (was signed)
- Fixed I062/500#3.APWLON, incorrect type (was signed)
- Fixed I062/500#n, incorrect abbreviations (was asterix.062_nn)
- Fixed I062/510, missing support for slaved trackers
- Fixed I062/510.SUD, incorrect name (was I062/510.SID)
- Fixed I062/510.SUD, incorrect type (was 24-bit), incorrect value mask
- Fixed I062/510.STN, incorrect value mask
- Updated I062/RE.CST.SAC/SIC, now reports as asterix.SAC/SIC
- Updated I062/RE.CSNT.SAC/SIC, now reports as asterix.SAC/SIC

Note: incorrect value masks and field sizes would in most cases
cause an exception when trying to decode those fields.

Change-Id: If6b9662d20619dd30b4fe28907ab0630c6d55e44
Reviewed-on: https://code.wireshark.org/review/31214
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoMake dissect_icmp_extension_structure into a dissector function.
Michael Mann [Tue, 1 Jan 2019 17:45:46 +0000 (12:45 -0500)]
Make dissect_icmp_extension_structure into a dissector function.

That way there isn't a need for packet-icmp-int.h.

Change-Id: Ib523c36ab2fdf6a43ee6ff32dadfcd53e9d9bf14
Reviewed-on: https://code.wireshark.org/review/31290
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agodpaux: Minor improvements
Michael Mann [Tue, 1 Jan 2019 22:07:55 +0000 (17:07 -0500)]
dpaux: Minor improvements

1. Pass dissector data to dpaux dissector directly instead of using p_get_proto_data.
2. Don't assume dissector data will always be present and default to "sink" if
that is the case.
3. tvb_memdup isn't needed for proto_tree_add_bytes
4. Use value_string to save switch cases.
5. Bugfix major/minor version dissection.

Change-Id: I018d923537ce276fda8be1884f5bb3a8b2eef862
Reviewed-on: https://code.wireshark.org/review/31297
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>
5 years agowsutil: fix crash due to corruption of the "small_buffers" array
Peter Wu [Mon, 31 Dec 2018 13:07:32 +0000 (14:07 +0100)]
wsutil: fix crash due to corruption of the "small_buffers" array

Gracefully handle repeated calls of ws_buffer_free on the same buffer to
avoid strange crashes in other new users that allocate a "small" buffer.

The first call to ws_buffer_free would store data pointer in the
'small_buffers' array for reuse and set the pointer to NULL. Result:

    (gdb) p cfile.rec.options_buf
    $2 = {
      data = 0x0,
      allocated = 2048,     // Oops, not modified!
      start = 0,
      first_free = 0
    }

All users of Buffer (including ws_buffer_free) however asssume that
'allocated' reflects the actual size of 'data'. If this is not the case
(if ws_buffer_free is called again), then a data pointer (NULL!) will be
stored and the next ws_buffer_init request for a "small buffer" will
result in unexpected behavior (including crashes).

Fix the issue by clearing the 'allocated' field as well. Add assertions
to catch such issues earlier rather than crashing at random users of
these buffers (such as frame_tvbuff).

Bug: 15263
Change-Id: I0b491c3fccac8c6fddd43779629343d721638ca9
Reviewed-on: https://code.wireshark.org/review/31278
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoNo need to report "some files could not be saved".
Guy Harris [Tue, 1 Jan 2019 22:12:15 +0000 (14:12 -0800)]
No need to report "some files could not be saved".

We've already reported the files that couldn't be saved; no need to tell
the user something they already know by that point.

Change-Id: I8251a46134342df6b40a6324aa76a5237fde7c93
Reviewed-on: https://code.wireshark.org/review/31298
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
5 years agolorawan: fix this condition has identical branches [-Wduplicated-branches]
Alexis La Goutte [Tue, 1 Jan 2019 17:57:03 +0000 (17:57 +0000)]
lorawan: fix this condition has identical branches [-Wduplicated-branches]

Change-Id: I9bf885dcd9b8c15212062f8e6205816521e707c3
Reviewed-on: https://code.wireshark.org/review/31292
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Erik de Jong <erikdejong@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
5 years agoAlways report errors in eo_save_entry().
Guy Harris [Tue, 1 Jan 2019 21:44:07 +0000 (13:44 -0800)]
Always report errors in eo_save_entry().

If a particular save failed, always let the user know.

Change-Id: I618e0ff82813cd4249ab7b1714f9a50e095a1ea8
Reviewed-on: https://code.wireshark.org/review/31296
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoLimit the maximum *file* name length for exported objects.
Guy Harris [Tue, 1 Jan 2019 21:04:44 +0000 (13:04 -0800)]
Limit the maximum *file* name length for exported objects.

Limiting the maximum *path* name length is bogus; if the user wants to
store the file in some directory deep under the root (UN*X) or the root
of the drive (Windows), that's their choice - don't prevent them from
saving in a directory with a path longer than some maximum or limit the
file name based on the length of the path leading up to it.

Limiting the maximum *file* name is presumably to cope with, for
example, HTTP objects with a URL that had a very long query component,
so it makes sense.

Change-Id: Idfc7de8124ee80bdd4950341ff2239834eb9f6f6
Reviewed-on: https://code.wireshark.org/review/31295
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoGet rid of local_eo_save_entry().
Guy Harris [Tue, 1 Jan 2019 19:50:57 +0000 (11:50 -0800)]
Get rid of local_eo_save_entry().

Have eo_save_entry() use the report_ routines to report errors, so they
pop up a dialog in Wireshark and print an error message in command-line
programs such as TShark.  Use it instead of local_eo_save_entry().

Change-Id: I689fd880ff2a31486372374560129ee9d9692b1e
Reviewed-on: https://code.wireshark.org/review/31294
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoFixes GeoNetworking secured packets dissection
Christophe GUERBER [Tue, 1 Jan 2019 17:33:05 +0000 (18:33 +0100)]
Fixes GeoNetworking secured packets dissection

Secured packets contain Common and Extended header.

Change-Id: I60b5ed35811c19c9596bd142c1315b341d760968
Reviewed-on: https://code.wireshark.org/review/31238
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoUse dissector table to dissect content of ieee1609
Christophe GUERBER [Sun, 30 Dec 2018 14:40:29 +0000 (15:40 +0100)]
Use dissector table to dissect content of ieee1609

For unsecured and signed data, the dissector uses a dissector table to
determine the next dissector. It uses the psId field to index the table.

In the case no psId is provided inside, the caller can set a default
psid if it is provided beforehand. If none is provided, data are not
dissected.

Change-Id: I6f9d6989cd87dd373a155a5b893c460344a0c857
Reviewed-on: https://code.wireshark.org/review/31237
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoQt: Pluralize "Copy Row(s)"
Stig Bjørlykke [Sun, 30 Dec 2018 19:23:04 +0000 (20:23 +0100)]
Qt: Pluralize "Copy Row(s)"

Properly pluralize "Copy Row(s)" entry in the popup menu.

Change-Id: Ifc4f9c69ab63d2d2594648db3115087ba51a941f
Reviewed-on: https://code.wireshark.org/review/31269
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
5 years agoZ39.50: Eliminate unnecessary header.
Craig Jackson [Tue, 1 Jan 2019 02:30:18 +0000 (21:30 -0500)]
Z39.50: Eliminate unnecessary header.

I decided that packet-z3950.h was unnecessary at this time, but I didn't eliminate all trace of it.

Change-Id: Iaff41e143bac6bf42779de49f7390ac129cef3e1
Reviewed-on: https://code.wireshark.org/review/31288
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
5 years agoFix asn2wrs.py: always add BASE_VAL64_STRING
Christophe GUERBER [Tue, 1 Jan 2019 13:53:41 +0000 (14:53 +0100)]
Fix asn2wrs.py: always add BASE_VAL64_STRING

In some cases (e.g. when a field has a user defined dissection function)
the type reported for this field is a 'virtual' one and the latter is not
contained in selt.type. Consequently, BASE_VAL64_STRING is not set.

Function eth_get_type_attr should return all the attributes of a type and
it seems resonable to expect it to return the BASE_VAL64_STRING. This
will solve the above mentioned error and may solve any possible issue in
other parts that call this function.

Change-Id: Iaee9ce5bd30f2a768cfcecf628df23bf1ed54e55
Reviewed-on: https://code.wireshark.org/review/31287
Reviewed-by: Michael Mann <mmann78@netscape.net>
5 years agoHappy New Year 2019!
Stig Bjørlykke [Tue, 1 Jan 2019 11:57:07 +0000 (12:57 +0100)]
Happy New Year 2019!

Change-Id: Ic140aafdb32e649e88bf3f00bda3cec9404e555a
Reviewed-on: https://code.wireshark.org/review/31284
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
5 years agokrb5: fix parsing of PA-S4U-X509-USER in AS-REQ
Isaac Boukris [Mon, 31 Dec 2018 17:01:17 +0000 (19:01 +0200)]
krb5: fix parsing of PA-S4U-X509-USER in AS-REQ

Per [MS-SFU] 2.2.2 PA_S4U_X509_USER in AS-REQ consists of
the certificate data instead of the corresponding struct.

Also, the subject-certificate field in the struct consists
of the certificate data as well, so let's decode it as such.

Change-Id: I6f03a66eac74b7d42c0893f63cab772d8ddcb803
Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Reviewed-on: https://code.wireshark.org/review/31279
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoAdd a "failed" return for tap packet routines.
Guy Harris [Tue, 1 Jan 2019 03:36:12 +0000 (19:36 -0800)]
Add a "failed" return for tap packet routines.

This allows taps that can fail to report an error and fail; a failed
tap's packet routine won't be called again, so they don't have to keep
track of whether they've failed themselves.

We make the return value from the packet routine an enum.

Don't have a separate type for the per-packet routine for "follow" taps;
they're expected to act like tap packet routines, so just use the type
for tap packet routines.

One tap packet routine returned -1; that's not a valid return value, and
wasn't one before this change (the return value was a boolean), so
presume the intent was "don't redraw".

Another tap routine's early return, without doing any work, returned
TRUE; this is presumably an error (no work done, no need to redraw), so
presumably it should be "don't redraw".

Clean up some white space while we're at it.

Change-Id: Ia7d2b717b2cace4b13c2b886e699aa4d79cc82c8
Reviewed-on: https://code.wireshark.org/review/31283
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoMove some command-line-oriented routines from wsutil to ui.
Guy Harris [Tue, 1 Jan 2019 00:55:23 +0000 (16:55 -0800)]
Move some command-line-oriented routines from wsutil to ui.

cmdarg_err() is for reporting errors for command-line programs and
command-line errors in GUI programs; it's not something for any of the
Wireshark libraries to use.

The various routines for parsing numerical command-line arguments are
not for general use, they're just for use when parsing arguments.

Change-Id: I100bd4a55ab8ee4497f41d9651b0c5670e6c1e7f
Reviewed-on: https://code.wireshark.org/review/31281
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoAdd some new symbols.
Guy Harris [Tue, 1 Jan 2019 01:37:26 +0000 (17:37 -0800)]
Add some new symbols.

Change-Id: I1652b4357ca93913696a89a9254e4bfe9c2484b7
Reviewed-on: https://code.wireshark.org/review/31282
Reviewed-by: Guy Harris <guy@alum.mit.edu>
5 years agoWSDG: Update the find and goto images and descriptions.
Gerald Combs [Mon, 31 Dec 2018 16:36:22 +0000 (08:36 -0800)]
WSDG: Update the find and goto images and descriptions.

Change-Id: I3e8fcc3b2c940e241d4c38c2b03d4ec44bcd319e
Reviewed-on: https://code.wireshark.org/review/31280
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoExport ITS-AppId/psId names from IEEE1609
Christophe GUERBER [Sat, 29 Dec 2018 14:17:41 +0000 (15:17 +0100)]
Export ITS-AppId/psId names from IEEE1609

PsId and ITS-AID are defined in several documents and listed in
ieee1609.12. Put these definitions in ieee1609.2 ASN1 definition and
export it so that GeoNetworking and wsmp dissectors may use it.

Change-Id: Ia3ac181a4c9092b555decb3ee7c5e78adcece5c0
Reviewed-on: https://code.wireshark.org/review/31236
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoCESoETH: Add dissection of MEF 8 CES over Ethernet
Jaap Keuter [Fri, 28 Dec 2018 20:45:41 +0000 (21:45 +0100)]
CESoETH: Add dissection of MEF 8 CES over Ethernet

Add dissection of Metro Ethernet Forum specification of Implementation
Agreement for the Emulation of PDH Circuits over Metro Ethernet
Networks [MEF 8]. This includes the introduction of a RTP shim header
dissection function, as is not uncommon in PW and CES services.

Signed-off-by: Jaap Keuter <jaap.keuter@aimvalley.nl>
Change-Id: I6de81007ce11793cd5352fadadd80d3f6f45ae0d
Reviewed-on: https://code.wireshark.org/review/31239
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
5 years agoAccept v1 of GeoNetworking and improve item tree
Christophe GUERBER [Sun, 30 Dec 2018 14:07:41 +0000 (15:07 +0100)]
Accept v1 of GeoNetworking and improve item tree

Accept version value 1 for geonetworking, dissect last 4 bytes of SHB
and traffic class as per EN 302 636-4.

Change-Id: I254e48f888aae063d2f4b5178c2e0eadc839f8ea
Reviewed-on: https://code.wireshark.org/review/31245
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoImprove capture-on-pipe error messages.
Guy Harris [Mon, 31 Dec 2018 04:39:10 +0000 (20:39 -0800)]
Improve capture-on-pipe error messages.

Add "Please report this to us" and "Please report this to whoever wrote
the program that's writing to the pipe" secondary error messages.  Use
the latter for most of the errors, as the most likely cause is that the
program writing to the pipe is messing up somehow.

If we don't recoginze the first 4 bytes of the file, say "Data written
to the pipe is neither in a supported pcap format nor in pcapng
format." - it's not necessarily a pcap file.

Speak of "pcap" rather than "libpcap" format - it's not completely tied
to libpcap (although two of the libraries not called "libpcap" that read
it are basically libpcap+a Windows driver+a library for the Windows
driver, at this point), and the suffix generally used it ".pcap".

Change-Id: Ifb5518af5cade788294c93a7ac416893f57f6bc8
Reviewed-on: https://code.wireshark.org/review/31273
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWSDG: Update packet list and popup images and descriptions.
Gerald Combs [Sun, 30 Dec 2018 20:29:41 +0000 (12:29 -0800)]
WSDG: Update packet list and popup images and descriptions.

Update the images and descriptions for the packet list, column header
popup, packet list popup, and packet detail popups.

Add images and descriptions for the byte view popup.

Use title case in more places.

Change-Id: Icf3af426c97c6e7cf97dee377c20039b7b8791ce
Reviewed-on: https://code.wireshark.org/review/31271
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoasn2wrs.py: use BASE_VAL64_STRING and val64_string
Christophe GUERBER [Sun, 30 Dec 2018 16:02:37 +0000 (17:02 +0100)]
asn2wrs.py: use BASE_VAL64_STRING and val64_string

When UINT64 contains value strings, in addition to using VALS64 to give
the list of names, the type of the structure has to be val64_string and
the display parameter has to be ORed with BASE_VAL64_STRING.

Change-Id: I0a619c91027df1eaae8209ada816f45b85d6431d
Reviewed-on: https://code.wireshark.org/review/31268
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoCMake: clean up FindGNUTLS.cmake
Peter Wu [Sun, 30 Dec 2018 16:13:47 +0000 (17:13 +0100)]
CMake: clean up FindGNUTLS.cmake

Use consistent capitalization and whitespace. Remove library names from
find_library that are unsuitable. No functional change intended.

Change-Id: Ic40516542777d768b6eef656fe5c0a0af143fb7e
Reviewed-on: https://code.wireshark.org/review/31264
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoWindows: Upgrade GnuTLS to 1.6.3
Peter Wu [Sat, 15 Dec 2018 17:45:53 +0000 (18:45 +0100)]
Windows: Upgrade GnuTLS to 1.6.3

Upgrade to GnuTLS 3.6.3-1, using MinGW binaries from Fedora 29 packages:

    mingw64-gnutls-3.6.3-1.fc29.noarch.rpm
    mingw64-gcc-8.2.0-3.fc29.x86_64.rpm
    mingw64-gmp-6.1.2-4.fc29.noarch.rpm
    mingw64-nettle-3.4-2.fc29.noarch.rpm
    mingw64-p11-kit-0.23.7-5.fc29.noarch.rpm
    mingw64-libffi-3.1-4.fc29.noarch.rpm
    mingw64-libtasn1-4.13-3.fc29.noarch.rpm
    mingw64-winpthreads-5.0.4-2.fc29.noarch.rpm

This includes libgcc_s_seh-1.dll (64-bit, new) and libgcc_s_sjlj-1.dll
(32-bit, previously included with glib2).

Built with
https://git.lekensteyn.nl/peter/wireshark-notes/tree/windows-libs/make-gnutls-libs-zip.sh?id=b86878e458d5d7deb21218ce6598b98af4ed7ec2

The main motivation is improved PKCS #11 support:
- 3.6.0: fix potential compatibility issue with SafeNet HSMs
  https://gitlab.com/gnutls/gnutls/merge_requests/398/
- 3.6.2: gnutls_pkcs11_token_get_flags now forwards token info.
- 3.6.3: new APIs for low-level PKCS #11 token or object operations.

Change-Id: I235774e3b27f3426cb74d3d9c0ab593d06870e89
Reviewed-on: https://code.wireshark.org/review/31128
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoSMPP: General improvements
Michael Mann [Sat, 29 Dec 2018 21:50:46 +0000 (16:50 -0500)]
SMPP: General improvements

1. Use proto_tree_add_item (and friends) instead of a protocol specific
wrapper for integer types
2. Create #defines for command IDs and properly sort them in the their value_string
3. Improve heuristics for command specific parameters to reduce false positives
4. Use length value in TLV for strings
5. Remove "sub tvb" creation.  The tvb passed into the pdu should be used.
6. Use proto_tree_add_bitmask_list and proto_tree_add_bitmask_list_value where applicable
7. Allow empty fields for vendor-specific TLVs.
8. Treat version fields as FT_UINT8 and use format with BASE_CUSTOM
9. Condense all command response codes to a single range_string.

Bug: 5206
Bug: 15267
Change-Id: I49751d287af1ebb9e27ae7463c08f4724ee60c07
Reviewed-on: https://code.wireshark.org/review/31267
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoKNET: Validate the length field before claiming packet
Michael Mann [Sun, 30 Dec 2018 16:37:13 +0000 (11:37 -0500)]
KNET: Validate the length field before claiming packet

Heuristic is weak, but length of packet should be non-zero.

Change-Id: I68d6d85092c84d5d421731be3ada008fe7a5b06f
Reviewed-on: https://code.wireshark.org/review/31266
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>
5 years agoGSM over IP: Require a valid message type for dissection.
Michael Mann [Sun, 30 Dec 2018 16:19:13 +0000 (11:19 -0500)]
GSM over IP: Require a valid message type for dissection.

Protects against some false positives because by default GSM over IP
claims some "frequently used" ports.

Change-Id: I94736ecef8ac1422bb330a364a3f77edd9a52a2b
Reviewed-on: https://code.wireshark.org/review/31265
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
5 years agoUpdate the comment again.
Guy Harris [Mon, 31 Dec 2018 07:47:09 +0000 (23:47 -0800)]
Update the comment again.

The third URL works, but let's go https: for it.  The other two don't.

Line-wrap another part of the comment while we're at it.

Change-Id: I744770c859b317ace2a71e82f86e2419b6d7ef2b
Reviewed-on: https://code.wireshark.org/review/31276
Reviewed-by: Guy Harris <guy@alum.mit.edu>