Commit Graph

1326 Commits

Author SHA1 Message Date
João Valverde 59c082c046 Add new global header wireshark.h with guideline
Remove ws_diag_control.h from config.h because that was a workaround
for the lack of a public global header. Fix the resultant build errors.
2021-10-22 06:41:44 +00:00
Gerald Combs 2c3b13834d CMake: Place all of the documentation in the "Documentation" folder. 2021-10-21 00:21:17 +00:00
Gerald Combs 0c4d4f6835 Version: 3.5.1 → 3.7.0
[skip ci]
2021-10-07 14:27:38 -07:00
João Valverde 39036a0a30 dfilter: Add some more syntax tests 2021-10-05 19:19:36 +01:00
Gerald Combs 84ab55cf75 Docs+Packaging: Convert our man pages to Asciidoctor.
Convert doc/*.pod to Asciidoctor. This:

* Means we use the same markup for our man pages, the guides, and
  release notes.
* Lets us add versions to our man pages.
* Gives us more formatting options, e.g. AsciiDoc supports `commands`,
  nested lists and makes it easy to include version information. The
  manpage backend doesn't seem to support tables very well,
  unfortunately.

Convert our CMake configuration to produce *roff and html man pages
using Asciidoctor. Add a "manarg" block macro which makes our synopses
wrap correctly.

Similar to the release notes, guides, and FAQ, if Asciidoctor isn't
found the man pages won't be generated or installed.

Move Asciidoctor to the list of package build dependencies in various
places.

This commit includes the conversion script (pod2adoc.py), which will be
removed later.

Line count sanity check:

Man page         .pod .adoc
androiddump       260  280
asn2deb            93  105
capinfos          401  471
captype            54   55
ciscodump         241  269
dftest             42   42
dpauxmon          153  169
dumpcap           464  534
editcap           528  583
etwdump           136  156
extcap            157  181
idl2deb            91  103
idl2wrs           120  100
mergecap          206  207
mmdbresolve        75   75
randpkt           107  111
randpktdump       158  184
rawshark          558  610
reordercap         76   78
sdjournal         145  157
sshdump           272  302
text2pcap         274  312
tshark           2135 2360
udpdump           133  151
wireshark-filter  486  479
wireshark        2967 3420
2021-10-01 16:42:34 +00:00
João Valverde d6836d103d dfilter: Add test for "deprecated" tokens
Tokens that are (so-called) deprecated produce a warning/hint to
the user in the UI.
2021-09-30 17:26:19 +01:00
Brian Sipos abd0f1183f COSE dissector from dtn-wireshark project 2021-09-29 08:51:13 +00:00
João Valverde 6c5e56f752 Windows: Add preliminary support for MSYS2
If we are using MSYS2 we use those packages to build Wireshark
using MinGW-w64 and disable most or all of our win-setup.ps1 codepaths.

Fix GLib configuration. Disable copying of DLLs with MSYS2.

Some tests in the suite_capture test suite are failing with MSYS
MINGW64. That particular set of tests is way too brittle regarding
file system paths; more work is needed to improve that situation.
2021-09-27 16:45:58 +00:00
João Valverde 1c8752935d CMake: Remove debian package target
This is more likely to hinder than to help, and is not really a good way to
invoke dpkg-buildpackage. It's a crutch that doesn't interact well with ninja,
has a 50/50 chance of giving the right results and will pollute the build
environment.

The Debian package should be built from a tarball instead.
2021-09-27 17:25:45 +01:00
João Valverde b6e80d9a2f CMake: The minizip URL is ancient
Use something a bit more modern instead.
2021-09-24 09:41:57 +00:00
João Valverde fa525649be CMake: Try to set a required try_run() definition in a more idiomatic way
This is applicable to every test (if we had more), not just HAVE_C99_VSNPRINTF.

Could also be a #define but let's go with this for now. This takes
advantage of the stack based design of CMakePushCheckState.
2021-09-22 16:34:37 +00:00
João Valverde 9f9afc0e86 CMake: Remove an unnecessary version check
MINGW implies WIN32 which implies CMake >= 3.13.

Follow-up to 1dad8190b1.
2021-09-22 16:43:09 +01:00
João Valverde 6921f01250 MinGW-w64: Need to use ANSI C stdio
Defining _POSIX enables __USE_MINGW_ANSI_STDIO, this switches the
stdio API from Microsoft to MinGW internal (ANSI C).
2021-09-22 14:37:13 +01:00
João Valverde c4265865c2 MinGW-w64: Fix windeployqt errors
--debug and --release flags are unnecessary and trigger errors.

--pdb not supported and triggers a warning.
2021-09-22 14:28:49 +01:00
João Valverde c4d5eea33e CMake: Target platform for WIN32 needs to be lower case
Capitalization matters here. We are now accepting this value from the
environment so we need to lower case that string.

Add an extra sanity check and status message for target CPU architecture
to help detect mismatches.
2021-09-22 14:21:20 +01:00
João Valverde 1dad8190b1 CMake: Fix minimum version requirements for CentOS 8
target_link_options() requires CMake >= 3.13.
2021-09-22 10:46:20 +00:00
João Valverde 0d6f0a4213 MinGW-w64: Add guards for MSVC macro definitions
Add a comment too.
2021-09-21 14:52:32 +00:00
João Valverde a5a9bb0763 CMake: Move UNICODE defines to command line
For consistency's sake, I have not had any build errors that can
be attributed to this.
2021-09-21 14:52:32 +00:00
João Valverde 6bd1bb4d7c MinGW-w64: Define NOMINMAX for Windows API
This seems relevant to MinGW-w64 from a quick look at the source.
2021-09-21 14:52:32 +00:00
João Valverde b12644b629 MinGW-w64: Need to define WIN32_LEAN_AND_MEAN 2021-09-21 05:56:34 +00:00
João Valverde 50fdfda316 MinGW-w64: Need to link using -municode
Some targets are not using unicode/WinMain (not sure why), so this
really needs to be a per target setting (better anyway).
2021-09-21 05:56:34 +00:00
João Valverde a193aff052 Windows: Don't search for a SpeexDSP package 2021-09-20 20:11:49 +00:00
João Valverde 2c7d22dba2 CMake: Fix macro redefinition of Windows API versioning 2021-09-20 20:11:23 +01:00
João Valverde bb12a187df CMake: Add guards for PLATFORM sanity check
The sanity check is specific for Visual Studio so add those
guards. The PLATFORM variable is not standard for other toolchains.

Add a default "windows target platform" of Win64.

Add error output for win-setup.ps1.
2021-09-20 15:11:52 +01:00
João Valverde c513188f52 CMake: wsetargv.obj is specific to Visual Studio 2021-09-20 13:27:11 +01:00
Gerald Combs 55a67fd66a Tools: Migrate compress-pngs.sh to Python.
Migrate compress-pngs from a Bash script that ran Make to a Python
script, which should be usable on more platforms.

Add Efficient Compression Tool (ect) to the list of compressors.

Add the compressors to the various *-setup.sh scripts, but comment them
out for now.
2021-09-13 11:00:04 -07:00
Nardi Ivan 3cb302f05b HTTP2, QUIC: fix "Follow Stream"
"Follow Stream" functionality assumes that all data in a single packet
belongs to the same stream. That is not true for HTTP2 and QUIC, where
we end up having data from unrelated streams.

Filter out the unwanted data directly in the protocol dissector code with
a custom `tap_handler` (as TCP already does).

Close #16093
2021-09-13 15:13:10 +00:00
John Thacker 6fe68991df wiretap: Add zstd and lz4 as WTAP compression types
This has a few effects on the behavior of wtap_get_compression_type()
and wtap_get_all_compression_type_extensions():

Make capinfos correctly report the compression type (instead of
saying gzip compressed for zstd and lz4 compressed files).

Makes files with the .zstd and .lz4 extension show up in the file
chooser when "Files of type" is set to something other than "All Files",
such as "All Capture Files" or "Wireshark/... pcapng"

Makes the UI not default to gzip compression when saving a file
compressed as zstd or lz4 (write support for zstd and lz4 doesn't
exist yet, and the GUI doesn't have hooks for it anyway, though
this can help as a prerequisite for later support for writing.)

Also replace a couple of assert() with ws_assert().

Update the PURPOSE in CMakeLists for zstd and lz4 to note that they
can be used to read compressed capture files.
2021-09-11 22:37:25 +00:00
Gerald Combs 5893d3cd09 CMake: Fix tests.
Pass $<TARGET_FILE_DIR:wmem_test> to test.py, which should be the path
for all of our built executables, instead of ...:tshark, which is the
path for *some* of our built executables on macOS.
2021-09-01 09:31:07 -07:00
Gerald Combs 4d1357eebe CMake: Get rid of WS_PROGRAM_PATH
Use the $<TARGET_FILE_DIR:tshark> generator expression instead.
2021-09-01 07:16:20 +00:00
Gerald Combs f51b018f87 Version: 3.5.0 → 3.5.1. 2021-08-27 21:40:12 +00:00
Guy Harris ea0f14a6fb cmake: add an "uninstall" target.
Based on the uninstall target I added to libpcap and tcpdump's CMake
files.  cmake_uninstall.cmake.in is BSD-licensed, so I can use it here
and in libpcap/tcpdump without adding any GPL stuff to libpcap/tcpdump.
2021-08-26 00:42:51 -07:00
João Valverde 3467b98eb7 CMake: Make LTO default off, restrict to release build
Link Time Optimizations increases build time a lot so restrict
this optimization to release builds. Follow our build bots and
make this option default off.

Also LTO requires CMake >= 3.9 so make the LTO CMake option
universally conditional on that requirement.
2021-07-26 15:13:38 +00:00
João Valverde c0ae696253 CMake: Remove some unused definitions 2021-07-23 21:23:00 +01:00
Gerald Combs 539ad8a91b CMake: Remove unneeded GLIB2_LIBRARIES.
GLib is part of wsutil's link interface, so we don't need to link to it
explictly.
2021-07-21 10:05:21 +00:00
Gerald Combs 34ef2066e5 CMake: Don't bother checking for fcntl.h or floorl.
fcntl.h appears to be available on all of our supported platforms,
including Windows. We've also been including it without HAVE_FCNTL_H
guards in a few places (e.g. sshdump.c) without any issues for some
time.

floorl is part of C99.
2021-07-15 06:41:05 +00:00
Gerald Combs 9b78a42855 CMake: Fixup qtui's includes.
Add ${MINIZIP_INCLUDE_DIRS} to qtui's includes instead of every
target's. Make more includes SYSTEM PRIVATE.
2021-07-14 17:33:18 -07:00
Gerald Combs 8834b470d0 CMake: Fixup SpanDSP's TIFF includes.
Add TIFF_INCLUDE_DIR to SPANDSP_INCLUDE_DIRS, but only if TIFF has been
found.

Ping #17477.
2021-07-14 09:10:09 -07:00
Gerald Combs ff60fcf92d CMake: Adjust wsutil includes and linking.
Mark wsutil's includes SYSTEM PRIVATE. This exposed a lot of targets
that were indirectly picking up include paths via the wsutil target, so
add direct includes where needed. The G.722 and G.726 codecs were
implicilty including tiffio.h; find it explicitly instead.

Mark some of wsutil's libraries PRIVATE, but leave commonly-used ones
PUBLIC.

Ping #17477.
2021-07-14 03:56:05 +00:00
João Valverde 89acb935bc wsutil: Start adding a test suite 2021-07-11 14:39:13 +00:00
João Valverde ffcfc83ecb Rename version.h to be more descriptive
Version.h is too generic. This is specific to VCSVERSION and that
should be made more obvious and discoverable.
2021-07-09 18:27:41 +00:00
Anders Broman 2270056073 Revert "Wirehark Windows: Harden build with Shadow Stack and EHCONT metadata"
This reverts commit ebb8703a50.
2021-07-05 15:48:48 +02:00
João Valverde 100876337a Move version_info.[ch] to ui/
Version info is an aspect of UI implementation so move it to
a more appropriate place, such as ui/. This also helps declutter
the top-level.

A static library is appropriate to encapsulate the dependencies
as private and it is better supported by CMake than object libraries.

Also version_info.h should not be installed as a public header.
2021-07-04 10:37:49 +00:00
Gerald Combs 0bc39aa2eb Win32: Compile ui/win32 as C++.
We always build the .c files in ui/win32 with Visual C++, so rename
them to .cpp and update CMakeLists.txt to match. Leave the C code mostly
intact for now, but this lets us take advantage of C++ features in the
future if desired.
2021-07-02 08:02:38 +00:00
Moshe Kaplan ebb8703a50 Wirehark Windows: Harden build with Shadow Stack and EHCONT metadata
Compile and link with the /CETCOMPAT and /guard:ehcont flags
on supported versions of Visual Studio
2021-06-28 16:37:11 +00:00
Peter Wu a7ef7ff40d CMake: clear stale MaxMindDB cache entries if needed
On macOS with Homebrew, the version is included with the library path.
On updates, the old MAXMINDDB_LIBRARY is invalidated. However
ws_find_package only checks MaxMindDB_LIBRARY. Windows has a similar
problem. Make sure to clear the stale value such that newer versions can
be found, fixing the build.

Fixes #17069
2021-06-24 22:55:50 +00:00
João Valverde ff9acff6f2 Replace usage of GLogLevel flags everywhere
ws_log_domains.h needs to be included before wslog.h to be used
to define WS_LOG_DOMAIN. Also the definition for enum ws_log_level
needs to be exported for other APIs so move that to ws_log_domains.h
and rename the file to ws_log_defs.h to reflect the new scope.
2021-06-17 12:00:10 +01:00
João Valverde 05ed76d4c0 wslog: Use plain format with "message" level
Try out a simpler format with the default log level.

Don't display process and file/function information with "message"
level (experimental).
2021-06-17 12:00:09 +01:00
João Valverde c025e793dd CMake: Remove -Wc++-compat
Happy days are here again.
2021-06-14 11:47:53 +00:00
João Valverde dc7f0b88bb Refactor our logging and extend the wslog API
Experience has shown that:

  1. The current logging methods are not very reliable or practical.
A logging bitmask makes little sense as the user-facing interface (who
would want debug but not crtical messages for example?); it's
computer-friendly and user-unfriendly. More importantly the console
log level preference is initialized too late in the startup process
to be used for the logging subsystem and that fact raises a number
of annoying and hard-to-fix usability issues.

  2. Coding around G_MESSAGES_DEBUG to comply with our log level mask
and not clobber the user's settings or not create unexpected log misses
is unworkable and generally follows the principle of most surprise.
The fact that G_MESSAGES_DEBUG="all" can leak to other programs using
GLib is also annoying.

  3. The non-structured GLib logging API is very opinionated and lacks
configurability beyond replacing the log handler.

  4. Windows GUI has some special code to attach to a console,
but it would be nice to abstract away the rest under a single
interface.

  5. Using this logger seems to be noticeably faster.

Deprecate the console log level preference and extend our API to
implement a log handler in wsutil/wslog.h to provide easy-to-use,
flexible and dependable logging during all execution phases.

Log levels have a hierarchy, from most verbose to least verbose
(debug to error). When a given level is set everything above that
is also enabled.

The log level can be set with an environment variable or a command
line option (parsed as soon as possible but still later than the
environment). The default log level is "message".

Dissector logging is not included because it is not clear what log
domain they should use. An explosion to thousands of domains is
not desirable and putting everything in a single domain is probably
too coarse and noisy. For now I think it makes sense to let them do
their own thing using g_log_default_handler() and continue using the
G_MESSAGES_DEBUG mechanism with specific domains for each individual
dissector.

In the future a mechanism may be added to selectively enable these
domains at runtime while trying to avoid the problems introduced
by G_MESSAGES_DEBUG.
2021-06-11 09:40:28 +00:00
João Valverde af2a88cd18 CMake: Reverse logic to handle debug code
Only enabling debug code by default with Debug build type
seems overly restrictive; debug output is still conditional
on the log level.
2021-06-10 00:57:49 +01:00
João Valverde 9b13c4352d epan: Add SMI version 2021-05-25 20:10:37 +01:00
João Valverde 6a772ab68c CMake: Rewrite preprocessor definitions again 2021-05-24 19:38:14 +00:00
João Valverde f273c62553 CMake: Enable LTO/IPO support for all platforms 2021-05-24 15:58:16 +00:00
João Valverde d34ade4d9a CMake: Refactor DISABLE_ASSERT option 2021-05-24 01:35:30 +00:00
João Valverde 9ba97d12d6 Add ws_debug() and use it
Replace most instances of ws_debug_printf() except in
epan/dissectors and dissector plugins.

Some replacements use printf(), some use ws_debug(), and
some were removed because they were dead or judged to be
temporary.
2021-05-24 01:13:19 +00:00
Anders Broman f5c05eedc5 Adding more than one protobuff file fails. 2021-05-20 18:37:51 +00:00
João Valverde 8eacd615c8 Disable assertions for release builds
Currently our build generates very many warnings if
G_DISABLE_ASSERT is defined.

Add ws_assert() and ws_assert_not_reached() to incrementally
replace existing assertions and then disable them using
WS_DISABLE_ASSERT.

Assertions are disabled with CMake build type Release.
By default the build type is RelWithDebInfo so the current
behaviour of enabling assertions by default is (for now) preserved.

Add some notes to README.Developer.
2021-05-19 03:52:45 +01:00
Gerald Combs 7b2c0edb74 CMake: Remove a no-longer-needed workaround.
It looks like the setting autogen properties for the wireshark target in
2c62e2eb3f means we don't have to work around CMake issue 22085 any
more.
2021-05-14 13:45:47 -07:00
Graham Bloice f6ad4812a2 Add SparkplugB dissector
Add a dissector for SparkplugB as a heuristic subdissector of MQTT
and which calls protobuf to dissect the messages payload.
2021-05-14 12:11:03 +01:00
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
Gerald Combs 59483604de macOS: Switch ChmodBPF to zsh.
Switch the ChmodBPF script to /bin/zsh since it

- Has known behavior, unlike /bin/sh, which execs whatever
  /private/var/select/sh points to.

- Supports 'read -n 0' and other nice features.

- Is unlikely to be deprecated, since it was made the default shell in
  Catalina[1].

- Exists in older macOS releases, unlike dash[2].

Closes #16826.

[1]https://support.apple.com/en-us/HT208050
[2]https://scriptingosx.com/2020/06/about-bash-zsh-sh-and-dash-in-macos-catalina-and-beyond/
2020-09-18 16:34:24 +00:00
Gerald Combs 573894d870 Version: 3.3.0 → 3.3.1. 2020-09-15 17:29:32 -07:00
Gerald Combs 7ab6440416 Tools: Clean up checkAPI and add ui/qt.
Remove the --check-addtext and --build flags. They were used for
checkAddTextCalls, which was removed in e2735ecfdd.

Add the sources in ui/qt except for qcustomplot.{cpp,h}. Fix issues in
main.cpp, rtp_audio_stream.cpp, and wireshark_zip_helper.cpp.

Rename "index"es in packet-usb-hid.c.
2020-09-05 07:41:29 +00:00
Graham Bloice e6b5bd0976 Build: Add LTO/IPO support
Enable Link Time Optimization, also known as Interprocedural Optimization
if the compiler supports it.

Added a CMake option (ENABLE_LTO), defaulted to ON only on Windows

Change-Id: Iea02b00aac12cc9a62595eeb8ff52382f1c4ddcd
Reviewed-on: https://code.wireshark.org/review/37573
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-04 05:21:01 +00:00
Pascal Quantin 2471ae1e0e CMake: update a comment regarding Libgcrypt requirement for LTE PDCP
Change-Id: Ib8c7d9a1fcee41444588eca94decfe09ee7b3630
Reviewed-on: https://code.wireshark.org/review/37553
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-06-24 07:09:53 +00:00
Peter Wu dc023ad68a CMake: warn for older Libgcrypt version
Libgcrypt enables decryption for so many protocols, be sure to warn
users when their Wireshark build is constrained due to an old version.
Previously a user on Ubuntu 16.04 was surprised that QUIC decryption did
not work even though the "minimum required" version was satisfied:

    Found GCRYPT: /usr/lib/x86_64-linux-gnu/libgcrypt.so (found suitable
    version "1.6.4", minimum required is "1.4.2")

Change-Id: Ief927b8892a6be9f994bdc65619a1236ca2f4fa7
Reviewed-on: https://code.wireshark.org/review/37552
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-24 04:17:10 +00:00
Gerald Combs 029051d7e9 CMake: Add a MIN_MACOS_VERSION check for Qt 5.15.
According to https://doc.qt.io/qt-5/supported-platforms.html, Qt 5.15
supports macOS 10.13 - 10.15.

Change-Id: Iecd9b6f10d6b968ad145d247e934fddec25658f7
Reviewed-on: https://code.wireshark.org/review/37330
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-28 04:59:56 +00:00
Peter Wu ef717da61a CMake: remove ENABLE_PCAP_NG_DEFAULT option
pcapng has been the compile-time default since 2011. If there are any
users who would like to use the libpcap format, then they should use
runtime options instead (e.g. `tshark -P` or `editcap -F pcap`).

Change-Id: I54b70368cdc3ca78bc8617bc488cc687740a1eb9
Reviewed-on: https://code.wireshark.org/review/36721
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-04-06 01:29:37 +00:00
Paul Aurich 378ecc27df CMake: FindGLIB2 depends on FindWSLibrary module
Beginning in Wireshark 3.2, the FindGLIB2 cmake module depends on FindWSLibrary
(see 990e409273), so FindWSLibrary needs to be installed as well, or
attempting to build an out-of-tree plugin fails.

Simple example CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
project(myplugin)
find_package(Wireshark)
LIST(APPEND CMAKE_MODULE_PATH "${Wireshark_LIB_DIR}/wireshark/cmake")
find_package(GLIB2)

Fails:

-- Checking for one of the modules 'glib-2.0'
CMake Error at /usr/local/lib/wireshark/cmake/FindGLIB2.cmake:49 (include):
  include could not find load file:

    FindWSLibrary
Call Stack (most recent call first):
  CMakeLists.txt:5 (find_package)

CMake Error at /usr/local/lib/wireshark/cmake/FindGLIB2.cmake:50 (FindWSLibrary):
  Unknown CMake command "FindWSLibrary".
Call Stack (most recent call first):
  CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred!

Change-Id: Id765d671e74fe15a60add38b95e62536abf60a79
Reviewed-on: https://code.wireshark.org/review/36509
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-03-20 05:14:11 +00:00
Gerald Combs 290ddeeed4 macOS: Make the dmg_package target fail noisily.
Change-Id: I479c9f13b9695d78d47b698a14cda0989724c639
Reviewed-on: https://code.wireshark.org/review/36270
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-03-03 17:22:30 +00:00
Gerald Combs d7bbe384f5 Test+Qt: Add an automatic update check.
Add software_update_info() to the software update module, which returns
the name of our update library if we have one. Use it to add automatic
update information to the compiled information in `wireshark --version`.

Add a "release" test suite, which contains a test for automatic updates.

Ping-Bug: 16381
Change-Id: I867a96bdcfde8be541eca2dc0e84b5000276e7dd
Reviewed-on: https://code.wireshark.org/review/36107
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>
2020-02-15 11:13:25 +00:00
Peter Wu 530e243c09 CMake: look for libcap on Linux only
The feature is Linux-specific, do not suggest an unavailable feature on
macOS and other systems.

Change-Id: If53989749f571ace7397e288e9c06e357d0a96b2
Reviewed-on: https://code.wireshark.org/review/35985
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-01-30 05:51:25 +00:00
Dario Lombardo ec7a84f14e cmake: add libcap package properties.
Change-Id: Ie3ea8a51d6cf200b3815b0046255bf0208240287
Reviewed-on: https://code.wireshark.org/review/35954
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-01-29 22:18:23 +00:00
Jeroen Roovers a5abaa81ad CMake: do not check for Qt5Svg at build time
At runtime, the Qt5Svg library is required for displaying language icons
at Preferences. Without this library, these icons will be invisible.
However this does not require a build-time check, so remove it.

Change-Id: I5aaf0282f941513c5e867d8591ddf1916aa408bc
Reviewed-on: https://code.wireshark.org/review/35856
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 07:50:24 +00:00
Jirka Novak 12a13a6926 RTP: decode iLBC payload
It is possible to decode iLBC payload. It uses libilbc library (https://github.com/TimothyGu/libilbc).

Bug: 16314
Change-Id: Id4cad7ae32305a0e94ef32beb24e07733d7f834e
Reviewed-on: https://code.wireshark.org/review/35686
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-20 07:50:08 +00:00
Jeroen Roovers 7bd57479b6 tfshark: Link against libm
ld: CMakeFiles/tfshark.dir/ui/cli/tap-icmpstat.c.o: undefined reference to
symbol 'sqrt@@GLIBC_2.2.5'

Change-Id: Ifbf49ba00a4246e68c1d3965f0257eca1b4e3ef8
Reviewed-on: https://code.wireshark.org/review/35854
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-01-20 00:25:10 +00:00
Gerald Combs 44b0cb187d Docs: Ensure that the API reference has the proper permissions.
Set our file permissions before building the wsar_html_zip target.

Change-Id: I660bf87891a0c8bbebfd497984617bd1d294bf10
Reviewed-on: https://code.wireshark.org/review/35685
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-07 23:56:28 +00:00
Martin Boye Petersen 46b3753d53 case-sensitive: Fix casing for PCAP and WinSparkle
CMake is unable to find PCAP and WinSparkle under Windows
when using case sensitive folders.

Change-Id: I30ba4073afc6089b08cef3c010b09c257362929b
Reviewed-on: https://code.wireshark.org/review/35505
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>
2020-01-07 12:45:53 +00:00
Gerald Combs 7a09c78f12 NSIS: Don't package .pdb files.
We run `windeployqt ... --pdbs` at build time, which means that we need
to be careful not to include them in the NSIS package. Switch from using
wildcards ("File ...\*") to using separate "File" commands for each file.

Simplify the PDB Zip package command while we're here.

Bug: 16307
Change-Id: Ibd9bcbdfdc216f1f6a067baf711bbc184845143f
Reviewed-on: https://code.wireshark.org/review/35670
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-06 19:50:50 +00:00
Gerald Combs 56a609028f macOS: Explicitly set our package root permissions.
The pkgbuild man page doesn't really discuss file permissions[1], but it
appears that it simply preserves them. Make sure the ChmodBPF and
path_helper roots have the correct permssions before building their
respective installers.

[1] The --ownership flag description mentions chmod but that appears to
be a typo.

Bug: 16284
Change-Id: I5ef277539a5b2015394ae3e722ef4c176f9c243f
Reviewed-on: https://code.wireshark.org/review/35507
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-19 17:42:47 +00:00
Gerald Combs fd6cf89f21 macOS: More ChmodBPF signing updates.
Run osx-extras.sh before building the ChmodBPF installer package.

Change-Id: Iec3f88da86e48b5aac385369c7e68f23babc4c34
Reviewed-on: https://code.wireshark.org/review/35491
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-18 17:35:49 +00:00
Gerald Combs 8dd407d97c macOS: Sign the ChmodBPF script.
Add macosx/osx-extras.sh, which can be used to sign the ChmodBPF script.

Bug: 15782
Change-Id: I9929dd6db067f8bc1097faac28ab9467f5a89a82
Reviewed-on: https://code.wireshark.org/review/35481
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-18 05:32:44 +00:00
Gerald Combs c656affc34 Windows: Get rid of textify.ps1.
We used textify.ps1 to ensure that the .txt files in our Windows
installers would render properly in Notepad if the user double-clicked
on them. Newer versions of Windows have a more sane Notepad, so this is
no longer necessary:

https://devblogs.microsoft.com/commandline/extended-eol-in-notepad/

Copy COPYING, NEWS, README.md, and README.windows once.

Update README.windows.

Change-Id: Ibb8b749725f13e0e49d2a2abe04603d9f2be7960
Reviewed-on: https://code.wireshark.org/review/35470
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-12-17 21:52:54 +00:00
Dario Lombardo f73018eb0c test: add suite_extcaps.
All the shipped extcaps will be tested against:
--help
--extcap-interfaces
--extcap-interface <IFACE> --extcap-dtls
--extcap-interface <IFACE> --extcap-config

Bug: 16268
Change-Id: I7949103940c95c9c23fc5dd3743c15995d3a152d
Reviewed-on: https://code.wireshark.org/review/35409
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-12-17 13:59:17 +00:00
Gerald Combs 14e4759b56 Qt: Bump our minimum Qt version from 5.2. to 5.3.
Change-Id: Id6b39125a56b95b94d6a0bb6436bf7b2d131f924
Reviewed-on: https://code.wireshark.org/review/35385
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>
2019-12-10 08:48:57 +00:00
Gerald Combs 451a241e50 Add c-ares to the required library list.
Although c-ares support was techically optional, it was either on by
default or required in all of our packaging. Go ahead and require it
globally. C-ares is widely available and synchronous name resolution can
easily result in a horrific user experience.

Change-Id: Id67c797316ed6b8a0ab5052e55a43a1b9e2a2464
Reviewed-on: https://code.wireshark.org/review/35188
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-23 22:45:59 +00:00
Gerald Combs beb1fee658 3.1.0 → 3.3.0.
Change-Id: Ia6217b00741f824b1f6805eb406408802dd5b5a8
Reviewed-on: https://code.wireshark.org/review/35167
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-20 23:33:02 +00:00
Gerald Combs ae58402e14 3.1.1 → 3.1.2.
Change-Id: Id89e46103f61392653cfdc60ef16d11123fe0928
Reviewed-on: https://code.wireshark.org/review/35128
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-18 20:12:27 +00:00
Gerald Combs 7cc5f4c45f CMake: Work correctly without Sparkle.
Set or clear SPARKLE_LIBRARIES and SPARKLE_INCLUDE_DIRS in
FindSparkle.cmake, similar to what we do in other modules. Use them
instead of SPARKLE_LIBRARY and SPARKLE_INCLUDE_DIR.

Change-Id: I023c711edd6a44421aadf85413da3207d9b08e64
Reviewed-on: https://code.wireshark.org/review/35097
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 22:34:06 +00:00
Gerald Combs 02057200fd macOS: Add support for automatic updates using Sparkle.
Add support for automatic updates using the Sparkle framework. Add
FindSparkle.cmake and associated CMake plumbing. Add a public key and
other info to Info.plist.in. Add ui/macosx/sparkle_bridge.{h,m}, which
wraps the Sparkle API. Make code that's specific to WinSparkle
Windows-only.

Add Sparkle installation steps to the macos-setup scripts. Sparkle
prints a warning if your bundle is unsigned (which is the case during
development) so disable installing it by default.

Updating here takes a long time. We might be able to fix that by
shipping our DSYMs separately.

Change-Id: I6cc6671db5657dadc514bda6bf6e1c8bbc9468a5
Reviewed-on: https://code.wireshark.org/review/35090
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15 18:39:04 +00:00
Dario Lombardo 1625ed7afe cmake: be verbose when building RPMs.
Change-Id: I622eaa4cbf94b5cb9087b07dc7133a670b9c02a8
Reviewed-on: https://code.wireshark.org/review/35002
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-06 13:57:55 +00:00
Anders Broman 2c5f89ae29 CMake: Add abillity to add custom taps.
Change-Id: I2b6382a3a97117bc40b5433123401c19b31cda82
Reviewed-on: https://code.wireshark.org/review/34802
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-18 10:45:28 +00:00
Gerald Combs 926d5504f7 CMake: Remove some header defines.
It looks like HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H were
required for check_type_size via test_big_endian, but we don't use that
any more.

HAVE_LRINT was used by the GTK+ UI.

Change-Id: I6474c118bac4413791b3613d34d263e38107600a
Reviewed-on: https://code.wireshark.org/review/34754
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-10-10 16:06:33 +00:00
João Valverde 97cb389a35 Revert "CMake: Don't install HTML manuals twice"
This reverts commit f1285fcf06.

NSIS package is broken with this commit.

Change-Id: Ief22a308edad188fa2d5fab79355f19493359fa6
Reviewed-on: https://code.wireshark.org/review/34758
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-10-10 15:58:41 +00:00
João Valverde f1285fcf06 CMake: Don't install HTML manuals twice
HTML docs are installed to both $docdir and $pkgdatadir. Fix that
to install to $docdir only.

Change-Id: I115158585b6df9170d9a01249adbc8548df91f14
Reviewed-on: https://code.wireshark.org/review/34640
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2019-10-09 13:24:58 +00:00
Tomasz Moń c9e897aeb9 CMake: Set wireshark as Visual Studio startup project
Default startup project to wireshark instead of ALL_BUILD.

Change-Id: I4694660eba95cd05012f09aa062d923e6c7500d8
Reviewed-on: https://code.wireshark.org/review/34513
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-03 07:55:14 +00:00
Tomasz Moń 990e409273 CMake: Use glib debug dlls in Windows debug builds
This prevents the mix of debug/release Universal CRT library in a Wireshark.

Bug: 16030
Change-Id: I2961541824caf3bef0a08c72b242427b5406a9bd
Reviewed-on: https://code.wireshark.org/review/34444
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-09-28 10:24:34 +00:00
João Valverde 297e1e6b70 CMake: Set policy CMP0074
Accept foo_ROOT CMake and environment variables to influence
the search path for find_package(foo).
See https://cmake.org/cmake/help/v3.15/policy/CMP0074.html

Change-Id: Ifa70fbc37a9d7a6da15eda4474d08fe45a1724ad
Reviewed-on: https://code.wireshark.org/review/34636
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-09-27 22:48:22 +00:00
João Valverde c565710231 CMake: Warn if dumpcap cannot be built
Change-Id: I4eff2e7b75f3dd896ebd63e50a83f90da6a910b6
Reviewed-on: https://code.wireshark.org/review/34606
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-09-27 22:44:59 +00:00
Gerald Combs af793b19d0 macOS: Sign our .dmg.
Add osx-dmg.sh back and make it a simple wrapper around dmgbuild and
codesign.

Change-Id: I0baa21fd971aa1b06e1a6700881cd7625dffff35
Reviewed-on: https://code.wireshark.org/review/34629
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-09-26 17:52:43 +00:00