Commit Graph

1166 Commits

Author SHA1 Message Date
Gerald Combs 2c62e2eb3f CMake: Set Qt autogen properties for Wireshark.
It looks like multi-configuration generators (notably MSBuild) need
Qt autogen properties set on the wireshark target as well as qtui. Do
so unconditionally in both cases. (We were doing so conditionally for
qtui before.)
2021-05-14 07:55:25 +00:00
Gerald Combs 826e03c9f4 CMake: Apply AUTO{MOC,UIC,RCC} more selectively.
Set CMAKE_AUTO{MOC,UIC,RCC} if we're running CMake 3.20.0 or 3.20.1 in
order to work around CMake issue 22085, otherwise set the AUTOMOC,
AUTOUIC, and AUTORCC properties for the qtui target. The latter is
preferred since it keeps us from running Qt's meta-object, user
interface, or resource compilers on code outside of ui/qt. Ping #17314.
2021-05-06 19:14:15 -07:00
Gerald Combs 2549e51ee4 Remove unneeded c-ares checks.
C-ares has been mandatory since 451a241e50. Remove some checks that are
no longer needed.

Rename OPTIONAL_DLLS to THIRD_PARTY_DLLS and OPTIONAL_PDBS to
THIRD_PARTY_PDBS in CMakeLists.txt, which is more accurate.
2021-04-27 05:36:49 +00:00
Pascal Quantin c713fb3b7d Windows: move ENABLE_VLD to CMakeOptions.txt 2021-04-26 21:37:06 +02:00
Roland Knall 2448f6da57 BCG729: Fix url
Apparently the website was reworked and the link has to be changed
2021-04-26 08:41:17 +02:00
Peter Wu 785657d9b8 CMake: fix macOS build when Qt5 and Qt6 are both installed
When both qt (qt@6) and qt5 are installed via Homebrew, the build fails:

    FAILED: ui/qt/CMakeFiles/qtui.dir/qtui_autogen/mocs_compilation.cpp.o
    ...
    In file included from ui/qt/qtui_autogen/mocs_compilation.cpp:2:
    In file included from ui/qt/qtui_autogen/EWIEGA46WW/moc_about_dialog.cpp:10:
    In file included from ui/qt/qtui_autogen/EWIEGA46WW/../../../../../repos/wireshark/ui/qt/about_dialog.h:15:
    In file included from /Users/pwu/repos/wireshark/ui/qt/models/astringlist_list_model.h:15:
    In file included from /usr/local/opt/qt5/lib/QtCore.framework/Headers/QAbstractTableModel:1:
    In file included from /usr/local/opt/qt5/lib/QtCore.framework/Headers/qabstractitemmodel.h:43:
    In file included from /usr/local/include/QtCore/qvariant.h:43:
    In file included from /usr/local/include/QtCore/qatomic.h:41:
    /usr/local/include/QtCore/qglobal.h:667:26: error: no template named 'enable_if_t' in namespace 'std'; did you mean 'enable_if'?
             typename = std::enable_if_t<std::is_arithmetic_v<T> && std::is_arithmetic_v<U> &&
                        ~~~~~^

That qvariant.h header is from Qt 6 which is backwards incompatible:

    /usr/local/include/QtCore -> ../Cellar/qt/6.0.2/include/QtCore

It appears that `<qt5 prefix>/include` must be explicitly included as
the default Qt5 include directories does not cover this:

    $ find /usr/local -lname '*include/QtCore' -ls
    ... /usr/local/include/QtCore -> ../Cellar/qt/6.0.2/include/QtCore
    $ find /usr/local -name qvariant.h -ls
    ... /usr/local/Cellar/qt@5/5.15.2/lib/QtCore.framework/Versions/5/Headers/qvariant.h
    ... /usr/local/Cellar/qt/6.0.2/lib/QtCore.framework/Versions/A/Headers/qvariant.h
    $ find /usr/local -name QtCore -lname '*Headers' -ls
    ... /usr/local/Cellar/qt@5/5.15.2/include/QtCore -> ../lib/QtCore.framework/Headers
    ... /usr/local/Cellar/qt/6.0.2/include/QtCore -> ../lib/QtCore.framework/Headers
    $ ls -la /usr/local/opt/qt5
    ... /usr/local/opt/qt5 -> ../Cellar/qt@5/5.15.2
2021-04-21 20:30:53 +00:00
Gerald Combs 8af90fcf47 CMake: Pass /diagnostics:caret to Visual C++.
Pass /diagnostics:caret to Visual C++ so in order to bring us in line
with Clang and gcc.
2021-04-14 21:30:45 +00:00
Gerald Combs 1dc50f7433 CMake+CI: Colorize our compiler output.
As described at

https://medium.com/@alasher/colored-c-compiler-output-with-ninja-clang-gcc-10bfe7f2b949

both Clang and gcc generate colorized output when they detect a
terminal, but not for piped output, which is the case when using Ninja.
Add an ENABLE_COMPILER_COLOR_DIAGNOSTICS CMake option, and set it to
"ON" when we're using Ninja.

In the merge-req:ubuntu-gcc-ctest and merge-req:ubuntu-clang-other-tests
GitLab CI jobs, generate colorized HTML report artifacts using
ansi2html.
2021-04-14 12:42:00 -07:00
Tomasz Moń 4bd5830cda CMake: Add ENABLE_VLD option for MSVC
Calling cmake with -DENABLE_VLD=ON when building with Visual Studio,
results in debug configuration being linked to Visual Leak Detector.
By default, Visual Leak Detector outputs the leak summary to Visual
Studio debug window. When ENABLE_VLD is active, VLD is linked to all
wireshark libraries and executables.
2021-04-10 21:53:59 +00:00
Guy Harris 52030fdca7 Try not disabling designated initializer overides.
Sometimes initializing the same field twice indicates a bug, so see
whether we can leave it enabled and suppress the warning in cases where
it's probably not a bug (too bad GCC didn't let you specify a default
initializer with, for example:

	int foo[16] = {
		[] = 17,
		[12] = 34
	};

which would mean we wouldn't have to suppress that warning in
ui/text_import.c).

Note also that not all compilers that can produce this warning call the
option "-Woverride-init".
2021-04-02 16:30:26 -07:00
Gerald Combs a80ea46ff7 CMake: Enable AUTO{MOC,UIC,RCC} according to our CMake version.
As noted in be2b0fc810, we need to set CMAKE_AUTO* before searching for
Qt packages when using 3.20.0 and later. However, this fails if we're
using CMake 3.9.6 or earlier. Set CMAKE_AUTO* where needed depending on
our CMake version.

Ping #17314.
2021-03-31 20:02:18 +00:00
João Valverde 7fee50274f Merge the caputils/ and capchild/ directories
The distinction between the different kinds of capture utility
may not warrant a special subfolfer for each, and sometimes the
distinction is not be clear or some functions could stradle
multiple "categories" (like capture_ifinfo.[ch]).

Simplify by having only a generic 'capture' subfolder. The
separate CMake libraries are kept as a way to reuse object code
efficiently.
2021-03-29 06:08:02 +01:00
João Valverde 22cf2cb345 CMake: Set CMake Policy CMP0071 to NEW
This policy says: "Since version 3.10, CMake processes regular and GENERATED
source files in AUTOMOC and AUTOUIC. In earlier CMake versions, only regular
source files were processed. GENERATED source files were ignored silently."

We are currently running AUTOMOC/RCC/UIC on too many files unnecessarily and
that should be improved. CMake 3.20 introduced some changes related with this
that broke the build (issue #17314) and need further investigation.

Meanwhile setting this policy to NEW shouldn't break anything and silences
some noisy CMake warnings.
2021-03-29 01:33:39 +01:00
Gerald Combs be2b0fc810 CMake: Enable AUTO{MOC,UIC,RCC} earlier.
Enable CMAKE_AUTOMOC, CMAKE_AUTOUIC, and CMAKE_AUTORCC before searching
for Qt packages. This is apparently required for CMake 3.20.0 and later.
Fixes #17314.
2021-03-26 20:48:22 +00:00
Paul Weiß 8c1b29a597 Regex based textfile import
Modularized the parser backend slightly to have the needed hooks
Modified the timestamp format slightly to enable arbitrary postion for
second fractions
Added a regex based seeking parser for textfiles as frontend alternative
to text_import_scanner.l
Regex is using the GLib implementation
Supported frame-data formats are bin, hex, oct and base64
Regex based importing UI
Fixed Meory-leak in ImportTextDialog::exec()
A new tab was added to the text_import ui to accomodate the new fields
Hints are available and styled accordingly
2021-03-26 06:44:25 +00:00
Guy Harris 3f556a6e76 Do the LFS checks before processing any subdirectories.
That's necessary in order to make sure that the required -D flags show
up when building code from all subdirectories.
2021-03-22 19:13:34 -07:00
Guy Harris 0cc59d38ab Replace the Large File Support CMake stuff.
The existing stuff doesn't appear to work (I tried it on 32-bit Ubuntu
18.04, and it did *not* add any flags to the compilation, as it appeared
not to conclude that they were necessary, even though they were).

Pull in the stuff from libpcap, which *does* appear to work.  (it does
so in my 32-bit Ubuntu testing).

This should fix #17301.

While we're at it, fix cppcheck.sh so that it doesn't attempt to run
cppcheck on files that have been deleted.
2021-03-22 12:11:26 +00:00
João Valverde 2d7b68aa09 Replace g_assert() with g_assert_true() for testing
g_assert_true() is always enabled, unlike g_assert().

Bump minimum GLib 2 required version to 2.38.
2021-03-05 14:54:58 +00:00
Thomas Dreibholz 2e7f2ffb7a
Added "Follow DCCP stream" feature.
This pull request includes:
* The "Follow DCCP stream" feature.
* Updated docbook documentation for the "Follow DCCP stream" feature.
* Test for the feature.
* Corresponding packet trace for the test.
2021-02-22 12:48:46 +01:00
Thomas Dreibholz dc3e92f638
Added NetPerfMeter test suite. 2021-02-21 18:23:48 +01:00
Gerald Combs abf9e027fc Require Qt 5.6 or later.
Increase the minimum required version of Qt from 5.3 to 5.6. The various
Linux distribution versions that shipped with earlier Qt versions (RHEL
6, Fedora 23, openSUSE 13.2, Debian jessie, Ubuntu 16.04) have either
reached end of support or will do so soon.

The official Qt 5.6 releases for macOS require 10.8, so make that the
minimum macOS version.

Remove a bunch of no-longer-needed version checks.
2021-02-19 13:49:10 -08:00
Gerald Combs 4fd5224ecf CMake: Use target_include_directores more.
The include_directories documentation at
https://cmake.org/cmake/help/latest/command/include_directories.html
says:

"Note: Prefer the target_include_directories() command to add include
 directories to individual targets and optionally propagate/export them
 to dependents."

Switch from include_directories to target_include_directories in a bunch
of places.

Add "SYSTEM" to the remaining external include_directories calls in
order to minimize our compiler warning blast radius.
2021-02-18 06:34:46 +00:00
Guy Harris 3ad7f90a96 CMake, GitLab CI: forcibly unset CMAKE_VERBOSE_MAKEFILE if requested.
Forcibly unset the cached version of CMAKE_VERBOSE_MAKEFILE if the
FORCE_CMAKE_NINJA_NON_VERBOSE environment variable is set, to make
*extra* sure that we don't do a verbose build.
2021-02-16 13:23:46 -08:00
Gerald Combs fa15eb8f5d CMake: Add a note about setting CAExcludePath.
Visual Studio's code analyzer lets you avoid analyzing external headers
using CAExcludePath. Add a note suggesting that we might want to do this
using the VS_USER_PROPS CMake property, but that for now we're using an
environment variable in the builder config.
2021-02-16 11:04:35 -08:00
Guy Harris 9ffb0f27c8 GitHub CI, CMake: override the definition of cmake_build.
Overriding the definition of the rpmbuild macro cmake_build on the
command line, so that it doesn't include the string "--verbose", should
prevent cmake --build from being run with --verbose, and thus prevent it
from running Ninja with the -v flag, and thus prevent a bunch of extra
noisy output from being produced for every build command, and thus
prevent the build log from hitting GitLab's 4MB limit.

Unlike piping the output of "ninja rpm-package" to sed, this means that
the exit status of "ninja rpm-package", rather than the exit status of
sed, is tested.
2021-02-16 09:00:12 +00:00
Guy Harris 2e9303b7b2 GitLab CI: use sed to strip out -W and -f options from output.
Filter out the -W and -f options from the output of "ninja rpm-package",
to try to cut down the verbosity.

Do that instead of passing --quiet to rpmbuild, so we get command
progress messages, just without the extra junk.
2021-02-15 14:31:14 -08:00
Guy Harris 0ed0ab665f CMake: the argument to rpmbuild to quiet it is --quiet, not -q. 2021-02-15 12:56:31 -08:00
Guy Harris 4b22f71f76 CMake, .gitlab-ci.yml: try to cut down the output for Fedora RPM builds.
If the FORCE_CMAKE_NINJA_QUIET environment variable is set, have the
top-level CMakeLists.txt add the -q flag to the arguments to rpmbuild.
That appears to reduce the amount of output.

Set that environment varible in the rpm-fedora build.
2021-02-15 02:21:12 -08:00
Guy Harris c0711693ab Enable -Wredundant-decls.
Add it to the default list of checks, and fix some errors it causes.
(Sadly, it doesn't work in CLang.)
2021-02-14 14:43:42 -08:00
Gerald Combs bb48a9da99 CMake: Fixup rpmbuild verbosity.
546dc0270c made things too quiet. Pass '-v' to rpmbuild if
CMAKE_VERBOSE_MAKEFILE is set. Don't pass '--quiet'.
2021-01-22 18:57:23 +00:00
Gerald Combs 546dc0270c CMake: Make the rpmbuild output quiet by default.
If CMAKE_VERBOSE_MAKEFILE is false (the default), pass `--quiet` to
rpmbuild.
2021-01-10 15:10:10 +00:00
Dario Lombardo e0f1c67970 cmake: make rpm-package dependent from dist target. 2021-01-07 19:03:36 +00:00
John Thacker fbd3fb3138 GnuTLS: Bump minimum version to 3.3.0
Every supported distribution has at least the 3.3 branch of GnuTLS
(stable branch starting in April 2014). That branch was maintained
for bug-fixes until July 2018, so some distributions (e.g. RHEL7,
SUSE Enterprise 12) are still on it, keeping us from requiring 3.4 yet.
Also clarify a comment about when the Mac OS build of gnutls started
being compiled with pkcs11 support.
2021-01-02 19:00:51 +00:00
John Thacker 5c936174c6 libgcrypt: Bump version number to 1.5.0
With RHEL/CentOS 6 EOL and already unsupported by Wireshark, there's no
reason to keep the minimum version of libgcrypt below 1.5.0 (which was
released 9.5 years ago). Version 1.6.0 is a big improvement in functionality,
but RHEL/CentOS 7 is stuck on 1.5.3 (As an aside, GCRYPT_VERSION_NUMBER
wasn't defined until 1.5.1, so this change will make us actually use the
libgcrypt AES-WRAP handling on 1.5.0)
2021-01-01 12:24:42 +00:00
Dario Lombardo e017fd5a04 cmake: fix comment in rpm-build target. 2020-12-22 18:34:52 +00:00
Gerald Combs 2c303c725f CMake: macOS version updates.
Set MIN_MACOS_VERSION to 10.14 if we're building with Qt 6.0 or later.
Print both our deployment target and our base SDK at configure time.
2020-12-20 19:50:25 +00:00
Gerald Combs b63692e327 GitLab CI: Disable LTO on Windows
`cmake -DENABLE_LTO=off ..` builds more quickly here, so add it to
merge-req:windows.

Fix a typo.
2020-12-13 01:31:09 +00:00
Peter Eszlari 42a09ad02e Linux: rename metadata according to spec
https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html

https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s02.html#desktop-file-id
2020-12-10 18:11:12 +00:00
Pascal Quantin 86e23155fe Windows: upgrade libssh to 0.9.5
Closes #17065
2020-12-09 22:35:25 +00:00
Odysseus Yang 2a5b34d8b0 MBIM: Update dissector to support DLT_ETW
New link type DLT_ETW is added for write and read Event Trace on Windows.
This change updates MBIM dissector to decode a MBIM message from
a DLT_ETW packet.
2020-12-02 09:05:11 +00:00
John Thacker fe1f947540 macOS: Enable PKCS #11 support when building with macos-setup.sh
Enable PKCS #11 support in macOS builds with macos-setup.sh (already
supported on macOS via Homebrew and on all other OSes with GnuTLS 3.4
or greater) by installing p11-kit (and its dependency libtasn1) and
building nettle and GnuTLS against it.
2020-12-02 07:55:42 +00:00
Gerald Combs 3a42bf0de2 Windows: Upgrade brotli, libmaxminddb, lz4, and snappy.
Upgrade brotli to 1.0.9, libmaxminddb to 1.4.3, lz4 to 1.9.2, and snappy
to 1.1.8.
2020-12-01 08:32:44 +00:00
Gerald Combs f21cd2e23f wiretap: Convert ascend.y to Lemon.
Convert wiretap/ascend.y.in from Bison/YACC to Lemon and rename it to
wiretap/ascend_parser.lemon. Tighten up some of our scanning and
parsing. Make the indentation in it and related files consistent. Aside
from the recent IPv4 fragment offset changes, this produces identical
output to the 3.4 branch for the Ascend trace files I have here.

Remove the comment about supporting other commands. Another timeline
might have an Ascend that successfully pivoted to DSL or 15625B+1D
gigabit ISDN, but this one has neither.

This was our last/only Bison/YACC file, so remove Bison/YACC as a
development and packaging dependency and remove references to it from
the documentation.
2020-11-30 08:15:43 +00:00
John Thacker 15d315c2ae GLib: Bump requirement 2.32 -> 2.36 2020-11-25 06:25:38 +00:00
Gerald Combs 21e1056058 CMake: Don't restrict ENABLE_CCACHE.
Don't restrict ENABLE_CCACHE, but print a warning for non-gcc and
non-clang compilers. Fixes #16960.
2020-11-01 10:15:04 +00:00
Gerald Combs 4653955957 Version: 3.3.0 → 3.5.0. 2020-10-22 19:15:42 +00:00
Gerald Combs 4a8b6da58f CMake+macOS: Explicitly create the extra package directory.
Create Wireshark.app/Contents/Resources/Extras, which is needed by the
Makefile generator.
2020-10-16 13:39:17 -07:00
Lin Sun 6136c719da RTP: opus playback
It's possible to play opus payload with libopus (https://opus-codec.org/).
Closes #16882.

Helped-by: Pascal Quantin <pascal.quantin@gmail.com>
Signed-off-by: Lin Sun <lin.sun@zoom.us>
Signed-off-by: Yuanzhi Li <ryanlee@mail.ustc.edu.cn>
2020-10-03 21:15:09 +00:00
Gerald Combs 4a82dd165b Version: 3.3.1 → 3.3.2. 2020-10-01 12:18:35 -07:00
Gerald Combs 586121fad4 Shellcheck fixes.
Note that ChmodBPF requires a newer version of shellcheck. Fix an issue
found after upgrading to 0.7.1.
2020-09-21 22:09:13 +00:00