Commit Graph

1054 Commits

Author SHA1 Message Date
Gerald Combs fdecc62c73 CMake: Add a systemd RPM check.
Change-Id: Ib679994f5af129254865daad211913a6b068de12
Reviewed-on: https://code.wireshark.org/review/29968
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>
2018-10-02 04:42:03 +00:00
Gerald Combs f69108b84e Add a systemd Journal Export extcap.
Add an sdjournal extcap, which reads journal entries using the
sd-journal API and dumps them as journal Export Format records.

Change-Id: I17ccfa88ab5d053c16c869cd26e580d84022502e
Reviewed-on: https://code.wireshark.org/review/29479
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>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-01 08:58:13 +00:00
Jeff Morriss 074f8c492c RPM: optionally use ccache to speed up (re)builds.
Installing and enabling ccache makes testing RPM builds (which always do a
complete build) much less painful.

Change-Id: Ie9ab1794614701cdbe261089f81398c2b7d1f027
Reviewed-on: https://code.wireshark.org/review/29812
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: Gerald Combs <gerald@wireshark.org>
2018-09-24 20:41:56 +00:00
Jeff Morriss 4b4c11944c RPM packaging: maxminddb is optional.
Don't require the RPM to include maxminddb if we couldn't find it.  Treat it
like the other optional packages: enable it in the RPM iff we found it.

IOW if cmake ran and will build Wireshark [without maxminddb] you'll also be
able to build an RPM [without maxminddb].

Change-Id: I012b75ae44e9289275b68db2eb804fc45bb0d330
Reviewed-on: https://code.wireshark.org/review/29807
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2018-09-24 15:57:17 +00:00
Guy Harris a6dc0c27fc Don't use -Werror with Apple's llvm-gcc.
Its handling of warnings, and of warnings-treated-as-errors, is horribly
broken; once you've asked for a warning, and have specified -Werror,
there appears to be nothing whatsoever that you can do to keep that
warning from being an error *everywhere* in the code.

Prior to change Ib591a1d6beaa13337d927a446b4d8d5e687ff610, the tests for
warnings were all failing on the macOS buildbot, so *no* warnings were
being requested.

With this change, a warning won't be reported as an error, but at least
it'll be reported.

(We should probably switch to using Clang on the macOS buildbot at some
point; I don't know whether the version of Clang currently on the
buildbot is safe to use, but if we ever run a newer version of Xcode,
which doesn't come with llvm-gcc - which may involve running a newer
version of macOS on the buildbot as well - it's presumably safe, given
that it's the only compiler Apple shipped.)

Change-Id: I677967cb87b91f68f08de546e59abff1dbd6788b
Reviewed-on: https://code.wireshark.org/review/29623
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-12 04:22:33 +00:00
Guy Harris 4bab4b2e0c OK, try to prevent -Wunused-function warnings with llvm-gcc as well.
Change-Id: I53e48eb14d157eacd24322fb978f039e57377ed8
Reviewed-on: https://code.wireshark.org/review/29622
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-12 03:23:12 +00:00
Guy Harris 69a01b650a With llvm-gcc, just don't do -Wshorten-64-to-32.
If you specify -Werror and -Wshorten-64-to-32, there does not appear to
be any way to get llvm-gcc *NOT* to treat those warnings as errors - not
with pragmas, and not even with -Wno-error=shorten-64-to-32.

Change-Id: Ia82df3f548085cca8d187c4b43c02060b87f0542
Reviewed-on: https://code.wireshark.org/review/29620
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-12 01:28:57 +00:00
Guy Harris 2f65fbae4e -Wcomma isn't supported by llvm-gcc, so don't make it a non-error.
Replace a tab in an arguments string with a space while we're at it.

Change-Id: Iee6ce920fbd7a883fb23bc798abb7f965e3757e6
Reviewed-on: https://code.wireshark.org/review/29619
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-12 00:50:55 +00:00
Guy Harris a8024f1dc0 Just spaces between -W arguments.
Ninja, at least, complains about tabs.

Change-Id: I65c3458dadc7096773084864d5e3970d1d9d580d
Reviewed-on: https://code.wireshark.org/review/29618
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 23:15:56 +00:00
Guy Harris 8e0d8acadc WERROR_COMMON_FLAGS isn't a list, so don't treat it as one.
Change-Id: Iea0b39a61fade5ac87ed31efaf8c1c7a90aa4fb7
Reviewed-on: https://code.wireshark.org/review/29617
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 22:11:52 +00:00
Guy Harris b09f27ce0f Add the -Wno-error= flags to the correct variable.
Change-Id: I61896b959da1a7cbdb0faab99b60b57d1c00cbb7
Reviewed-on: https://code.wireshark.org/review/29616
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 21:40:27 +00:00
Guy Harris 87887802ef Put the -Wno-error= options after -Werror.
It appears that -Werror overrides them, at least with llvm-gcc; I guess
the options are evaluated in order.

Change-Id: I0fd9e544a8e191a8950e17e97513912034763645
Reviewed-on: https://code.wireshark.org/review/29615
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 21:11:21 +00:00
Guy Harris 7533398f65 OK, try just suppressing the "-Wunused-function" warning with llvm-gcc.
Was Apple trying to release a game for Mac OS X, somewhat resembling
Whack-A-Mole, when they went into the lab and had Igor help them stitch
together the GCC front end and the LLVM back end?

Change-Id: If08392c3d244a83f50f62b4d7c878ae9a274ec4b
Reviewed-on: https://code.wireshark.org/review/29614
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 20:46:43 +00:00
Guy Harris f7346284ac More selectively prevent warnings from becoming errors.
Always use -Werror if it's supported, even with Apple's llvm-gcc, and
only use -Wno-error= with llvm-gcc.  Use -Wno-error= with all the errors
we get in the buildbot.

Change-Id: I6797f064d2d354f979e24fcb04f592e9313af721
Reviewed-on: https://code.wireshark.org/review/29612
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 19:43:15 +00:00
Guy Harris b7685821c1 Don't use -Werror with llvm-gcc.
Apple's llvm-gcc appears not to support suppressing warnings with
pragmas, so, if we're building on a Mac (we check for APPLE), and we're
not using Clang, we don't turn on -Werror, because we rely on those
pragmas to suppress otherwise-unremovable warnings in order to build
warning-free.

Change-Id: I43bd1ab42918c6ba22643b4a2d4cc3618c25434b
Reviewed-on: https://code.wireshark.org/review/29609
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-11 18:36:11 +00:00
João Valverde 0d123e5a24 CMake: Remove some redundant and overly verbose code
The original reason for having a WARN_FLAGS set of variables has
been lost.

Change-Id: I3eae3cf9d0bad5f3895f6fee59c2c64183c8f244
Reviewed-on: https://code.wireshark.org/review/29526
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-11 05:05:37 +00:00
João Valverde 23c106b86c Fix the build on the OSX buildbot
Change-Id: Ia3efd8d4fb002cffadeb86620eea4bdceb1357b6
Reviewed-on: https://code.wireshark.org/review/29584
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-10 23:07:08 +00:00
João Valverde a93698a4ff Remove the tshark -z compare feature
- It cannot support IPv6.
  - Non-standard use (specifically recommended against in the RFCs)
of the IPv4 fragment ID field.
  - Has a narrow and non-obvious use case, IMO.
  - It is not supported in the Qt GUI.
  - Significant maintenance burden for an obscure feature.

Change-Id: Icaf429269dc42f78c38b8d20001508132499faf8
Reviewed-on: https://code.wireshark.org/review/29239
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-09 23:55:19 +00:00
João Valverde 414e1c19b2 CMake: Use more descriptive name than WS_LD_FLAG_VALID0, 1, etc.
Change-Id: Iacd0696189a6b6988bd62af3bd188d97dc50b787
Reviewed-on: https://code.wireshark.org/review/29523
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-09 22:39:49 +00:00
João Valverde 911f7fed61 CMake: We require version greater than 2.8.9.
Change-Id: Ia092da9b9bc87c75b6b97a117efc7a0e4b58d29c
Reviewed-on: https://code.wireshark.org/review/29509
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-09 17:49:00 +00:00
João Valverde eeb71e75b8 CMake: Remove Qt specific code for warnings
These warnings should already be suppressed for Qt with -isystem.

Change-Id: I9b5640f1b6da9fa8039deb2810eda3d878779c38
Reviewed-on: https://code.wireshark.org/review/29500
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-09 13:21:10 +00:00
João Valverde 642f0c9f1d CMake: Remove unused variable
Change-Id: I05d5ac3112ee3b09d1935dde2073e65d55430946
Reviewed-on: https://code.wireshark.org/review/29501
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-09 06:17:41 +00:00
João Valverde 6ab8d4607a CMake: Add function to test compiler flags
Remove all the duplicate code. Each test result is cached so it
needs an unique variable to store the result.

Change-Id: Ib591a1d6beaa13337d927a446b4d8d5e687ff610
Reviewed-on: https://code.wireshark.org/review/29485
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-09-09 01:52:44 +00:00
Peter Wu d703310749 cmake: optionally require Lua 5.1 or newer
doc/README.wslua reports support for 5.1 and 5.2 only. Even RHEL6 ships
with Lua 5.1, so it makes not sense to maintain support for Lua 5.0.

Change-Id: I34a8084c7fba19d631b90ce5d5a28198be6a7850
Reviewed-on: https://code.wireshark.org/review/29448
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-07 04:02:36 +00:00
Gerald Combs c15ada34b1 Update tools help using a script.
Update docbook/wsug_src/*.txt using tools/update-tools-help.py. This
removes a lot of unwanted behavior that came with updating via a CMake
target.

Change-Id: I0a24f425e9673ef7bd074210d7047654c6755e79
Reviewed-on: https://code.wireshark.org/review/29416
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-05 15:28:43 +00:00
João Valverde 4d6c253ca9 CMake: Add debian package target
Change-Id: I114c861e5537a010d622b31d0c335752b45f3d2e
Reviewed-on: https://code.wireshark.org/review/29360
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-31 05:52:59 +00:00
Peter Wu b55c20a1b1 CMake: fix dmg_package target since CMake 3.12
The Resources directory was removed a while back. Since CMake 3.12, the
copy_directory command will fail when the source directory is missing.
Reported by anta_tw in the #wireshark IRC channel at Freenode.

Change-Id: I4de087dd2833e79a806c8a0c9a28024848e1e03f
Fixes: v2.1.0rc0-2347-g4aa049019a ("OS X: Remove GTK+ packaging.")
Reviewed-on: https://code.wireshark.org/review/29304
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-08-29 23:51:10 +00:00
João Valverde d0b97a420d CMake: Modernize config-file package support
A CMake config-file package provides support for downstreams using
CMake and Wireshark libraries to easily configure the libwireshark
dependency with:
  find_package(Wireshark CONFIG [REQUIRED])
  target_link_libraries(foo epan)

The FindWireshark.cmake file is no longer needed.

See cmake-package(7) for more details on CMake's package system.

Change-Id: Ie8af1d44417a99dd08d37959f7b2ffca88572ec2
Reviewed-on: https://code.wireshark.org/review/29208
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-25 18:07:21 +00:00
João Valverde e75905a583 CMake: Add dumpcap group option to installation
Change-Id: I2718776a908ae5f9c6c475a110f9170b812b392d
Reviewed-on: https://code.wireshark.org/review/29282
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-25 18:06:56 +00:00
João Valverde 5e9d1e4e65 CMake: Change installation path for modules
This is one of the CMake standard paths on Unix and avoids polluting the
$libdir/wireshark folder.

Change-Id: I6e5fd81e95b52e585e92306aca18dfb2426668ca
Reviewed-on: https://code.wireshark.org/review/29255
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-24 14:39:08 +00:00
João Valverde f0b41190eb CMake: Clean up and homogenize plugin dir configuration
Change-Id: If43c7b124afdf6471164675f8a0c55a76e998ea1
Reviewed-on: https://code.wireshark.org/review/29254
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-23 08:33:56 +00:00
João Valverde 7d76d0ce28 Revert "CMake: Clean up plugin dirs"
Broke system (global) binary plugin path.

This reverts commit 450ff674a6.

Change-Id: I5353d2f3acf4450aed243040ef71425a71542a08
Reviewed-on: https://code.wireshark.org/review/29240
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-22 00:49:16 +00:00
João Valverde 450ff674a6 CMake: Clean up plugin dirs
Change-Id: Ie41366205db19b8a9714ad5259c3f958e1e9ee95
Reviewed-on: https://code.wireshark.org/review/29233
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-21 23:06:38 +00:00
João Valverde 65d9c473f0 plugins: Minor interface improvement
Change the plugin compatibility check to make it more convenient to
define and check the major.minor Wireshark version.

Change-Id: I2a6d2a746682c29504311cce5c457e0a852c3daf
Reviewed-on: https://code.wireshark.org/review/29224
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-08-21 19:56:12 +00:00
Stig Bjørlykke f435c36423 CMake: Remove a debug message
Remove what appears to be a debug message from CMake.

Change-Id: If6d12ca07d3c3b5f012a7e7ee530f7db18c813e5
Reviewed-on: https://code.wireshark.org/review/29215
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-21 11:04:01 +00:00
Guy Harris 6409732b77 Include dumpcap amongst the programs built with -Werror.
Change-Id: Ia946b4e99d9ddbbced8cc9515a098ca2ce4931ef
Reviewed-on: https://code.wireshark.org/review/29113
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-12 19:58:49 +00:00
Peter Wu caa8efa0d2 tests: add regression tests for Follow TCP Stream
Verified that the tests failed without the fixes for the linked bugs.
The tests have full statement coverage(*1) for check_follow_fragments
and follow_tcp_tap_listener. For details and Scapy script, see:
https://git.lekensteyn.nl/peter/wireshark-notes/commit/crafted-pkt/badsegments.py?id=4ecf9d858b49e76d8a9c29df01ce1bd523ae6704

 (*1) except for `if (data_length <= data_offset) { data_length = 0; }`

Change-Id: I625536df375272cf6c9116231194c39df1217fae
Ping-Bug: 13700
Ping-Bug: 14944
Reviewed-on: https://code.wireshark.org/review/28618
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 12:11:09 +00:00
Gerald Combs fe94133f0d Remove code specific to older versions of Visual Studio.
Remove -DBUILD_WINDOWS and sections of code that we no longer use.

Bug: 14715
Change-Id: Iae1a950e2f52f4ce45fcf0ae5dea06c1172c3a28
Reviewed-on: https://code.wireshark.org/review/28466
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-26 22:30:50 +00:00
Gerald Combs 2d8e8b9574 CMake: Make the pdb_zip_package target passive.
Remove the pdb_zip_package target's dependency on epan, otherwise we
might end up triggering a build which creates a mismatch.

Change-Id: I1e077e5f119273ee80a89c30f54e29fdb242e082
Reviewed-on: https://code.wireshark.org/review/28457
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-26 18:22:53 +00:00
Gerald Combs 724519d8f9 Fix shellcheck issues in debian-setup.sh.
Change-Id: I54956ea4de5e07f1d2a705f9b77624d6c25511a6
Reviewed-on: https://code.wireshark.org/review/28438
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>
2018-06-26 11:53:14 +00:00
David Kreitschmann 11ba10dd4b Fix build paths for cmake's Xcode project generator on macOS.
Multi-configuration generators (such as Xcode or VS) append the current build configuration to most paths (eg. Debug/Release). Currently this results in inconsistent paths for the application bundle and the included command line tools. This commit sets the correct path information for multi-configuration generators for macOS application bundles. The standard Makefile behaviour is untouched.

One Windows specific configuration was changed, as it was conflicting with these changes. This needs to be checked before merging.

Additionally the wrapper scripts are omitted for Xcode, as the path to the binaries depends on the configuration chosen in Xcode. Therefore it is not viable to create these scripts in the cmake run.

Bug: 11816

Change-Id: Ib43d82eb04600a0e2f2b020afb44b579ffc7a7c9
Reviewed-on: https://code.wireshark.org/review/28291
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-21 03:33:03 +00:00
Gerald Combs 17604f15a1 CMake+macOS: Make sure we're using the right Qt tools.
Qt5CoreConfigExtras.cmake sets Qt5::qmake. Use it to find the
corresponding path to macdeployqt and use those in osx-app.sh.

Change-Id: I2e67f0126e272fc95d40476b9bfc83ab38d73cee
Reviewed-on: https://code.wireshark.org/review/28359
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>
2018-06-21 03:32:27 +00:00
Gerald Combs 293be57265 Test: Add sharkd tests.
Change-Id: I0e5049700ab9285196ce6b4567bd2d034529e763
Reviewed-on: https://code.wireshark.org/review/28327
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>
2018-06-21 03:30:30 +00:00
Gerald Combs ccd2512602 CMake+macOS: Allow the use of ENV{CMAKE_PREFIX_PATH}.
If we find /usr/local/opt/qt5, pass it as a PATHS option to find_package
instead of adding it to the CMAKE_PREFIX_PATH CMake variable. This
allows setting a Qt path via the CMAKE_PREFIX_PATH environment variable.

Change-Id: I5d23fcd092c0ea137482253f3f86c1a6d27f7a5e
Reviewed-on: https://code.wireshark.org/review/28341
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-06-20 09:19:49 +00:00
Gerald Combs d88c5df0cf Test+CMake: Make our test grouping more fine-grained.
Split our tests by suite_*.group_* instead of suite_*. There are quite a
few dfilter tests and this should make them more parallelizable.

Change-Id: I52371409618cda70dc99811e8de1fb1ad9d9a3b6
Reviewed-on: https://code.wireshark.org/review/28329
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-18 19:36:26 +00:00
Joerg Mayer 866ddb1b18 Add -Wextra-semi to (clang) C and C++ flags to make sure the buildbots will find this.
Fix all warnings that come up.

Change-Id: Ib426e79f7c75152589a3c2af153de35ca5d63783
Reviewed-on: https://code.wireshark.org/review/28268
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-06-15 11:17:37 +00:00
João Valverde 722d6b06f6 Rewrite make-{dissectors,taps} in Python
Having these build tools in machine code poses problems when cross-compiling.
The most significant being that we need to find the host and build GLiB
dependencies at compile-time.

There is no noticeable speed difference between the Python and C implementation.

Ping-Bug: 14622
Change-Id: Id13f823c7f4abf51edfa291e703028873748989f
Reviewed-on: https://code.wireshark.org/review/28130
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-06-11 17:01:05 +00:00
Gerald Combs bfb7028ba9 More shellcheck fixes.
Change-Id: Iee9e464b3935d4c8a09fa9954f73496eae33f30f
Reviewed-on: https://code.wireshark.org/review/28092
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-11 16:35:08 +00:00
Gerald Combs f8092f96b3 Qt: Move wireshark-qt.cpp back to ui/qt/main.cpp.
The Qt UI's main module started out as ui/qt/main.cpp but was moved to
the top-level directory in order to appease Autotools. We don't need to
do that any more, so move it back.

Change-Id: Ic5bc0ed5b754e36cc2b9e682f2ca097781233dfd
Reviewed-on: https://code.wireshark.org/review/28090
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>
2018-06-08 03:50:22 +00:00
Gerald Combs 4905983845 More shellcheck checks and fixes.
Remove a libtool check while we're here.

Change-Id: I813add2031480f34ce89f268b541f8939016c2c7
Reviewed-on: https://code.wireshark.org/review/28066
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-06-07 18:11:12 +00:00
Gerald Combs 9031281672 CMake: Get rid of FULL_SO_VERSION
gd2e0724afc moved our library versions into their own variables named
FULL_SO_VERSION. They're no longer used and interfere with
tools/release-update-debian-soversions.sh so remove them.

Fix some shellcheck warnings in release-update-debian-soversions.sh
while we're here.

Bug: 14778
Change-Id: I0eb0bb4ab4c482bdb8a94f8c18aa04c6c83c781b
Reviewed-on: https://code.wireshark.org/review/28068
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>
2018-06-07 04:01:37 +00:00
Peter Wu c82883c1d6 cmake: fix DTD, Diameter and radius dependencies
Ensure that source files are copied whenever these change.

Change-Id: I77e1ebdac3567fe69f5236f4469355a7182ef159
Fixes: v2.5.0rc0-2471-g99b7776d5f ("CMake: Copy multiple data files at a time.")
Reviewed-on: https://code.wireshark.org/review/28057
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-06-06 13:56:40 +00:00
João Valverde 64a2b4101a Move make-taps and make-dissectors to tools/
make-taps and make dissectors are build tools so that is the natural
location for them.

See also 99ec2b58eb68ab8530245dd13485612695ba064a and bug 14622.

Change-Id: I754848ea1c614bfa7121c44d89136ac3cba8a734
Reviewed-on: https://code.wireshark.org/review/27928
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-05-31 13:35:27 +00:00
Martin Kaiser d8c19f8593 CMake: clarify that perl is mandatory
Perl is required for generating version.h. It is therefore a mandatory
requirement for building on both Windows and Unix.

Bug: 14764
Change-Id: I0bc86f5c463148b8070166b677d2ec349c461488
Reviewed-on: https://code.wireshark.org/review/27915
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-31 04:38:05 +00:00
Guy Harris 8f6c3ee8e1 Boost the maximum frame size.
Lemon gets this error on its Parse() function, at least on FreeBSD 11.1
with its version of Clang.

Change-Id: I4fc1674373af5c0016ee953b61066bf6b24b7ad6
Reviewed-on: https://code.wireshark.org/review/27905
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-29 23:58:41 +00:00
Dario Lombardo 25a95709a1 extcap: set EXTCAP_DIR in the root cmake file and propagate it.
The EXTCAP_DIR must be known in the root file to be set in config.h
and it's still needed in extcap/ to install the binaries, hence we
need caching it as well.

Bug: 14724

Change-Id: I58bac7de7a00e06c23fe8c8f1a7e3d299de6a560
Reviewed-on: https://code.wireshark.org/review/27776
Reviewed-by: Mikael Kanstrup <mikael.kanstrup@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-24 13:58:13 +00:00
Joakim Karlsson 790d490249 CMake: remove GIT_BIN_PARAM
Added in adb731c1cd but never worked,
and later corrected in e21da73826.
Correction however gave cygwin user problems with the perl optional parameter
which droped qoutes around the path. But since the orginal commit never worked
as intended in the beginning, it's assume safe to remove.

Change-Id: I825a4e53b257d47601c330b210ac5ffb6870e0d9
Reviewed-on: https://code.wireshark.org/review/27758
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-24 04:15:00 +00:00
João Valverde 03aae2267f CMake: Fix unset VERSION_RELEASE variable in wireshark.pc
Change-Id: I81358833f0527f55312aaab7a3dea68f9b128178
Reviewed-on: https://code.wireshark.org/review/27698
Reviewed-by: João Valverde <j@v6e.pt>
2018-05-22 05:56:10 +00:00
Gerald Combs 2ecf69f773 Test: Be more paranoid about our log output.
Run our CTest tests with PYTHONIOENCODING=UTF-8.

If someone runs our tests manually and their output encoding isn't
UTF-8, print replacement characters instead of failing with an error.

Open our log files with "errors='backslashreplace'" in case their
contents aren't UTF-8.

Change-Id: Ifa4d12c2b5e272cf3903f3e0c6102e4d961562f1
Reviewed-on: https://code.wireshark.org/review/27686
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-21 18:03:42 +00:00
Dario Lombardo 7655e0bad6 cmake: move extcap sections to extcap/CMakeLists.txt.
Change-Id: Ie7d9f6ad3d8b788e0d22e3ce15159fc46f5a93e8
Reviewed-on: https://code.wireshark.org/review/27638
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-19 06:20:47 +00:00
Gerald Combs 4a01a952ed Remove older Visual Studio suport.
Remove conditional checks for Visual Studio 2013 and earlier from
CMakeLists.txt.

Remove the VSVersion flag from win-setup.ps1. We haven't used it in
quite a while.

Change-Id: Iea80f8cd566f4909e1bac2d0a620488255c4d0a7
Reviewed-on: https://code.wireshark.org/review/27607
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>
2018-05-17 04:14:19 +00:00
Guy Harris d08d0a87c5 Eliminate some unneeded header checks.
sys/stat.h and sys/types.h date back to V7 UNIX, so they should be
present on all UN*Xes, and we're assuming they're available on Windows,
so, unless and until we ever support platforms that are neither UN*Xes
nor Windows, we don't need to check for them.

Remove the CMake checks for them, remove the HAVE_ values from
cmakeconfig.h.in, and remove all tests for the HAVE_ values.

Change-Id: I90bb2aab37958553673b03b52f4931d3b304b9d0
Reviewed-on: https://code.wireshark.org/review/27603
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-16 22:03:09 +00:00
Gerald Combs 1feea92ef3 CMake: Skip more header checks on Windows.
Prepopulate our header variables at the top of CMakeLists.txt. Add
HAVE_STDINT_H and HAVE_STDDEF_H.

Change-Id: I78cbe9d6dc3775caad5c565de0100863a9dc8054
Reviewed-on: https://code.wireshark.org/review/27587
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-16 18:41:21 +00:00
Guy Harris 322f163cbd Update a comment.
Change-Id: I0ea38f9d5c0e474cf669857d427310e56d1fb7a6
Reviewed-on: https://code.wireshark.org/review/27582
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-16 17:16:31 +00:00
Peter Wu 4c1690ac47 CMake: require at least CMake 3.5
CMake 3.11 with the Ninja generator started complaining about CMP0058
related to ui/qt/CMakeFiles/qtui_autogen.dir/RCCstock_iconsInfo.cmake
amd other files (AUTORCC). While the policy could be set explicitly,
let's try to modernize the CMake configuration:

- Drop CMP0042, if this gives issues with macOS, then it must be solved
  in a different way using non-deprecated methods.
- Drop CMP0054 and ensure that all if("${foo}") and if(${foo}) are
  converted to if(foo).
- Remove string comparison against "-NOTFOUND", it already evaluates to
  false in an if condition.
- Use CXX_STANDARD/CXX_STANDARD_REQUIRED for Qt 5.7 and newer.
- Assume that copy_if_different can accept multiple sources (CMake 3.5).
- Consistency: Out of the 60 CMake 3.11 FindXxx.cmake files that use
  find_library, 34 contain "XXX_LIBRAR" while 16 contain "Xxx_LIBRAR".
  Let's assume uppercase variables (now custom MaxMindDB include dirs
  are correctly used).

CMake 3.5 was chosen as the next version because of its wide support.
Ubuntu 14.04 ships with cmake3 3.5.1, Debian jessie-backports has 3.6.2,
EPEL for CentOS/RHEL6 includes cmake3 3.6.1 and SLES12 SP2 has 3.5.

Change-Id: I2fa7b94bf8cc78411f414987d17bab3a33dfb360
Reviewed-on: https://code.wireshark.org/review/27444
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-15 10:28:09 +00:00
Joakim Karlsson e21da73826 CMake: fix Git binary parameter
if (${GIT_EXECUTABLE}) never worked, hence the variable GIT_BIN_PARAM never had
any value, and by so never added the Optional git-bin parameter
to make-version.pl

Make-version.pl now handle optional git-bin argument with value.

Change-Id: I089539a3d33455b8de09928b54e0ea39d1aecbb8
Reviewed-on: https://code.wireshark.org/review/27485
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-15 09:06:43 +00:00
Dirk Eibach e0002b0427 extcap: Support for DisplayPort AUX channel monitors
Support for the generic netlink DisplayPort AUX channel monitor kernel driver.

Change-Id: Iab445229ecef082968355f604993292f5f2d8d69
Reviewed-on: https://code.wireshark.org/review/27313
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-05-14 10:44:37 +00:00
Gerald Combs 17190a1ed2 List some removed features in the release notes.
Require Qt 5.2 in CMakeLists.txt. Remove some old Qt 4 checks.

Change-Id: I06814b3776b488d55a0ce1a26aaada43fb5e096c
Reviewed-on: https://code.wireshark.org/review/27446
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-11 16:11:14 +00:00
Gerald Combs f7e879c5cf CMake: Remove FindFreetype.
Remove the FindFreetype module. It was required by the FindGTK2 module,
but it's no longer used.

Change-Id: Id7575d024b5c13b5800989434a994e3a0dcb2b26
Reviewed-on: https://code.wireshark.org/review/27450
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-11 15:19:25 +00:00
Gerald Combs f72481a144 Test: Make sure we run our display filter tests.
Change the test suite list in CMakeLists.txt to a static list. Add a
CTest coverage unit test.

Change-Id: I8459f320a2d0707618d6d56abdfce80274fddd2d
Reviewed-on: https://code.wireshark.org/review/27377
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-06 23:56:41 +00:00
Guy Harris 8db1616ec3 Get rid of more autotoolsisms.
Change-Id: I124732adf3c3da511c206932544b4d533404cfc5
Reviewed-on: https://code.wireshark.org/review/27332
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-04 19:14:34 +00:00
Peter Wu e7cd78d4b3 CMake: check for /Qspectre before using it
The linked blog entry for /Qspectre suggests intention to include
/Qspectre support for VS 2015 Update 3, but this has not happened yet
(at least, not with VS Community 2015 14.0.23107.178).

Change-Id: I001c8fa512457f1edc753b460634f13d2ff0ed7a
Fixes: v2.5.1rc0-611-g0ebcd27377 ("Trust CMake's Visual C++ version detection.")
Reviewed-on: https://code.wireshark.org/review/27225
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-05-02 23:02:46 +00:00
AndersBroman 65c1283d77 rpm-package: Use version.h to generate version string in RPM
Packaging.

Change-Id: I463be4523f789406ff0cb3a1a325d6937db63b3d
Reviewed-on: https://code.wireshark.org/review/27179
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-02 10:44:44 +00:00
Gerald Combs 58da452d22 Test: Remove the Bash test scripts.
They've been replaced by the Python scripts.

Change-Id: I8add9c9ea0a6bdd68b2fa3841977863c0ea9a761
Reviewed-on: https://code.wireshark.org/review/27243
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-02 04:09:26 +00:00
Gerald Combs 9b3be1711f test: Miscellaneous fixups.
In util_slow_dhcp.py, open stdout as O_BINARY on Windows.

Have ctest pass --verbose to test.py.

Call config.canCapture at test time so that we don't inadvertently skip
some tests.

Stringify our dumpcap config check.

Fix our Gcrypt variable.

Change-Id: I884ec23ddfc7c28b79d4a860c6c43c308598e6db
Reviewed-on: https://code.wireshark.org/review/27182
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-27 17:15:19 +00:00
Gerald Combs 0ad4239249 Start porting our test scripts to Python. Add ctest support.
Create Python versions of our various test shell scripts. Add CMake
tests for each suite. Tests can now be run directly via test.py, via the
"test" target, or via ctest, e.g.

  ctest --verbose --jobs 3

Add a testing chapter to the Developer's Guide.

Add a way to disable ctest in dpkg-buildpackage.

Suites completed:
- capture
- clopts
- decryption
- dissection

Remaining suites:
- fileformats
- io
- mergecap
- nameres
- text2pcap
- unittests
- wslua

Change-Id: I8936e05edefc76a86b6a7a5da302e7461bbdda0f
Reviewed-on: https://code.wireshark.org/review/27134
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-26 19:27:19 +00:00
Guy Harris 27a6715242 Put references to autotools in the past tense.
In CMake files, we don't do some checks that our autotools scripts did;
speak of those in the past tense, as the autotools scripts are gone.
(Leave the comments there, to note that we *might* have to reinstate
those tests, although they're for old versions of macOS and GCC.)

In CMake files, we use some #defines because that's what autotools did;
speak of those in the past tense as well.

Change-Id: I594fe8225cf94b5087093febc11f6b0a7e42e7cd
Reviewed-on: https://code.wireshark.org/review/27149
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-25 16:54:34 +00:00
Jakub Zawadzki 4a488919e3 oss-fuzzshark: use install directory for headers. Install missing one.
From compilation log:
  epan/ipv4.h:19:10: fatal error: 'wsutil/inet_ipv4.h' file not found
  tools/oss-fuzzshark/fuzzshark.c:27:10: fatal error: 'version_info.h' file not found

Change-Id: I3e147e014ae398ae07e64aec5a6535a8f9e357a3
Reviewed-on: https://code.wireshark.org/review/27076
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-24 03:49:15 +00:00
Gerald Combs 631fec3e1b CMake: Doxygen and API reference target updates.
The DOXYGEN_* variables which we use to create doxygen.cfg are native
paths and are not compatible with Cygwin. We could try to make them
compatible, but given that we're trying to migrate away from Cygwin set
"DOXYGEN_EXECUTABLE" to "DOXYGEN_EXECUTABLE-NOTFOUND" if "cyg" is anywhere
in its path.

Add the wsar_html* targets to "Docs" and exclude them from Visual Studio's
default build.

Change-Id: Id23a3c43a9f4f1edb2d827bbf36a3a7eb64f0212
Reviewed-on: https://code.wireshark.org/review/27100
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>
2018-04-24 03:45:15 +00:00
Guy Harris 6eecb31030 Fix up handling of the Kerberos package.
On Ubuntu 16.04, and possibly other versions of Ubuntu, and on Debian
and other Debian derivatives, packages for MIT and Heimdal Kerberos can
both be installed at the same time - including developer packages.
Collisions between headers and libraries are handled by putting them in
subdirectories of the system include and library directory and having
their .pc files add -isystem flags to point to the appropriate include
directory and -L flags to point to the appropriate library directory.

CMake's pkg-config support, however, only looks for -I flags, not
-isystem flags, in pkg-config output (using --cflags-only-I), so it
doesn't get the directory in which to look for the headers, and just
uses the results of --libs-only-l to get a list of library names and
does nothing with the results of --libs-only-L, causing it not to look
for libraries in the directory in which to look for the libraries.

We fix this by:

If FindKERBEROS.cmake found Kerberos with pkg-config, have it set
KERBEROS_DEFINITIONS to the "other" compiler flags, which includes the
-isystem flag.

For all packages, adding the <PACKAGE>_DEFINITIONS values to
CMAKE_C_FLAGS and CMAKE_CXX_FLAGS so that they're used when compiling.

If FindKERBEROS.cmake found Kerberos with pkg-config, having it search
for each of the libraries in KERBEROS_LIBRARIES using find_library()
with KERBEROS_LIBDIR and KERBEROS_LIBRARY_DIRS as hints, and
re-assembling the resulting full paths into KERBEROS_LIBRARIES.

Change-Id: Ie18b56b76934f542bd12dc737631c0190026d18a
Reviewed-on: https://code.wireshark.org/review/27071
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-22 03:04:19 +00:00
Joerg Mayer 7853d0e354 Remove a few obsolete references to gtk from checkapi and faq.py
Change-Id: Ice9aec64fddbed94c7be96575c6e1bc800e8ac9e
Reviewed-on: https://code.wireshark.org/review/27067
Petri-Dish: Jörg Mayer <jmayer@loplof.de>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-04-21 23:34:40 +00:00
Guy Harris 37a35312b1 Get rid of unused variable.
Change-Id: I1b51872e5330722c514a553e571b2eeb56fbade7
Reviewed-on: https://code.wireshark.org/review/27063
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-20 21:43:10 +00:00
Peter Wu b887fd4919 CMake: fix build with json-glib with gold linker
JSON-GLIB depends on GObject. To avoid "undefined reference to
'g_object_unref'" with the gold linker, include gobject directly.
As the files are included with the GLib package, adjust FindGLIB2.cmake.

Change-Id: I007d30b89cc07d8746cee6b619832a722f086105
Fixes: v2.9.0rc0-201-g511c2e166a ("tshark: add -G elastic-mapping report.")
Reviewed-on: https://code.wireshark.org/review/27007
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-19 08:08:11 +00:00
Dario Lombardo 511c2e166a tshark: add -G elastic-mapping report.
This option generates an ElasticSearch mapping file as described here:
https://www.elastic.co/blog/analyzing-network-packets-with-wireshark-elasticsearch-and-kibana

It leverages the Glib-json library.

Change-Id: Iff25f991e87d3da07bf06654e353fb785799dde9
Reviewed-on: https://code.wireshark.org/review/26848
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-04-18 08:57:39 +00:00
Gerald Combs 2e63957031 CMake: API reference fixes.
Fixup a dependency and make sure we create the API reference from
scratch.

Change-Id: I832d1772eb8b4f07cab6f04d164cac10c70ab3bb
Reviewed-on: https://code.wireshark.org/review/26990
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-17 17:29:37 +00:00
Gerald Combs ad84eec866 Switch the Doxygen API reference build to CMake.
Switch to a single Doyxgen configuration which was generated using a
recent version of Doxygen and customized to suit our needs. Add
wsar_html and wsar_html_zip targets to CMake. Update some Doxygen markup
and documentation as needed.

Change-Id: Ic8a424b292c35a26f74ae0b53322265683e56e69
Reviewed-on: https://code.wireshark.org/review/26976
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>
2018-04-17 03:46:05 +00:00
Gerald Combs c8cf127375 Add a destination directory flag to git-export-release.
Add a destination directory flag to git-export-release.sh. Use it to
replace the current "dist" target. Use it in the RPM section to avoid a
symlink.

Change-Id: I30ae76b3ab1a995d232e748b79aa37440f90f854
Reviewed-on: https://code.wireshark.org/review/26974
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-17 03:43:38 +00:00
Peter Wu 3a30bc3bb5 RPM: enable rpm target even if git is not available
Change-Id: Ic6a7d656aeb0ae30c5e1cc1d8f12ed5ad43f73d7
Reviewed-on: https://code.wireshark.org/review/26968
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 15:29:43 +00:00
Dario Lombardo 71ddbb69f5 RPM: support building from out-of-tree directories.
When building the RPM from a directory at the same level as the
source (like in mdkir build;cmake ../wireshark;make rpm-package)
we can't rely on the retrieval of the git version. However the
wireshark export dir still have it and we can get it from there.

Change-Id: Id6bcb453ec3a65977fc092c610e99e8dd01f613a
Reviewed-on: https://code.wireshark.org/review/26957
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 08:53:30 +00:00
Roland Knall 9c5049a80b Gtk: Remove source code
Removing all gtk source code, except for main.? which will remain
for the official removal during SFUS18

Change-Id: I4273baf207df1eaaa4b94623cfd10bf74b1fc4a4
Reviewed-on: https://code.wireshark.org/review/26937
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-15 05:45:32 +00:00
Roland Knall d347091da9 Qt: Fix MacOSX menu entries
Remove various menu items added automatically on Mac OS X. The following
menu items have been removed:

- Edit / Start Dictation
- Edit / Emoji & Symbols
- View / Enter Fullscreen Mode
- View / Show Tab Bar - Hide Tab Bar

Bug: 13366
Change-Id: I44deae7ee8ea7a43926820e4f5d0517ece246939
Reviewed-on: https://code.wireshark.org/review/26823
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-04-09 15:44:22 +00:00
Gerald Combs 55f6f6593c CMake: More Qt4 removal.
Remove some Qt major version checks. Remove the ENABLE_QT5 option.

Change-Id: I891bc90956a2ea2cd5a7c50c56d9fcbfc963d6c2
Reviewed-on: https://code.wireshark.org/review/26785
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-09 01:35:28 +00:00
AndersBroman b30e3d4267 glib: Require 2.32 or newer.
Change-Id: Idaf90865d04532912a968fc2e05523aec14c4991
Reviewed-on: https://code.wireshark.org/review/26745
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05 13:31:45 +00:00
AndersBroman 36dc5781ba GTK Cmake: Remove the option to build the GTK UI.
Change-Id: If702717b559a727388d83ce82c0fc2967c662ff0
Reviewed-on: https://code.wireshark.org/review/26747
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-05 13:31:22 +00:00
Anders 9e02a0b65b CMake RPM build: Try to get rid of %globals in favor of %bcond.
Change-Id: I051fb722b0c4161b373f04a79288faa41a61c3cc
Reviewed-on: https://code.wireshark.org/review/26735
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-04 17:02:02 +00:00
Gerald Combs 1dd1b507d1 CMake: Add a note about passing /external to Visual C++.
According to

https://blogs.msdn.microsoft.com/vcblog/2017/12/13/broken-warnings-theory/

/external: will let is ignore warnings in external headers.

Change-Id: Ib3000d7654ffab99a001b225ce6162aab88fc8fa
Reviewed-on: https://code.wireshark.org/review/26734
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-04 16:09:10 +00:00
Guy Harris 29973ebeb6 Pick up some compiler-specific flags from autotools.
Bug: 14554
Change-Id: Idf4585671ad2698bd51f65abadb1b1000ad56445
Reviewed-on: https://code.wireshark.org/review/26716
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-04-02 20:22:29 +00:00
Gerald Combs adb55d8ca4 2.5 → 2.9.
Change-Id: I9a6cd7a510f8ba5310a9cf8a2818903d4c03253f
Reviewed-on: https://code.wireshark.org/review/26712
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-02 19:30:15 +00:00
Guy Harris 35fed45a83 Don't bother with CMAKE_C_STANDARD.
It was introduced in CMake 3.1, so, unless we require CMake 3.1 or
later, we'd have to manually try to enable C99 support on pre-3.1
releases, so we might as well just do it manually all the time - it's
not clear that CMAKE_C_STANDARD does it much better, especially give
that, for example, it wasn't until CMake 3.9 that support for enabling
C99 support in IBM XL C was added.

Change-Id: I51038b90fd3d8ab5050c5da4441765b19db9091b
Reviewed-on: https://code.wireshark.org/review/26648
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2018-03-29 06:16:19 +00:00
Gerald Combs 1cd92c4961 CMake: Add an rpm-package target.
Copy the current wireshark.spec.in and update it for use with CMake.
Remove the Qt4, GTK+2, and GTK+3 options. Add Ninja and mmdbresolve
options.

The rpm-package target builds a tarball using git-export-release.sh and
therefore must be run from a git checkout. The RPM _prefix macro is set
to CMAKE_INSTALL_PREFIX, so you'll probably want to run

cmake -DCMAKE_INSTALL_PREFIX=/usr ...

Change-Id: Ib014494d8858a0059126404cd91528ded5d8a9f6
Reviewed-on: https://code.wireshark.org/review/26579
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-26 14:00:35 +00:00
Pascal Quantin ea59e4c75a Bump micro version to 2
Change-Id: I384db83e3c471cbb371e7af4d488dd03d7761125
Reviewed-on: https://code.wireshark.org/review/26497
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-03-16 13:07:42 +00:00
Gerald Combs 0ebcd27377 Trust CMake's Visual C++ version detection.
We can be reasonably certain that CMake sets CMAKE_C_COMPILER_ID,
MSVC12 and MSVC14 correctly. If we add a compiler flag based on those
variables don't bother passing it through check_c_compiler_flag or
check_cxx_compiler_flag. This speeds up CMake here quite a bit.

Change-Id: I3a681a8a9287b33353030fd37303aa32f04b79a9
Reviewed-on: https://code.wireshark.org/review/26475
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>
2018-03-14 21:49:52 +00:00
Gerald Combs 246f0bc012 Get rid of TestBigEndian and AC_C_BIGENDIAN.
Get rid of CMake's TestBigEndian and Autotools' AC_C_BIGENDIAN checks in
favor of G_BYTE_ORDER. We use G_BYTE_ORDER elsewhere and TestBigEndian
is noticeably slow on Windows.

Change-Id: Idc1326294db9cbee8f6b6b11c2028fc4d19acbf0
Reviewed-on: https://code.wireshark.org/review/26462
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-13 19:09:36 +00:00
Pascal Quantin 4e6d989df4 Add MaxMindDB 1.3.2 library to Windows
Change-Id: I328b6a05cc356be59ac63e80eae55a832bf76a47
Reviewed-on: https://code.wireshark.org/review/26347
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-03-09 11:20:41 +00:00
Gerald Combs 957845f5a4 CMake: Don't bother compiling zlibstatic.
We don't use zlibstatic so exclude it from ALL_BUILD and Wireshrk.sln.

Change-Id: I9656b6f1c35e43cce89c8879f4521f6dc4a5cbdf
Reviewed-on: https://code.wireshark.org/review/26349
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-08 02:20:58 +00:00
Gerald Combs 39a65995cc CMake: Exclude test targets from the default build.
For the Visual Studio generator, setting the EXCLUDE_FROM_ALL property on
a target excludes it from ALL_BUILD.vcxproj, but we additionally need
to set EXCLUDE_FROM_DEFAULT_BUILD to exclude it from Wireshark.sln.
Do so for the test targets.

Change-Id: Icd328f75d4927e5b7bb65b1833da4724f63476b6
Reviewed-on: https://code.wireshark.org/review/26345
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-07 23:27:06 +00:00
Dario Lombardo fe71e26af2 spdx: more licenses converted.
Change-Id: I3861061ec261e63b23621799e020e811ed78a343
Reviewed-on: https://code.wireshark.org/review/26333
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 15:56:44 +00:00
Gerald Combs 2eb6f3b5de CMake: Remove SH from the packate list.
Change-Id: Idafd85df598e0c58fc8252574ce0478b3e1464a9
Reviewed-on: https://code.wireshark.org/review/26278
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06 18:19:57 +00:00
Gerald Combs a1da75c554 Transition from GeoIP Legacy to MaxMindDB.
MaxMind is discontinuing its legacy databases in April in favor of
GeoIP2, which use a newer database format (MaxMind DB). The reference C
library (libmaxminddb) is available under the Apache 2.0 license which
isn't quite compatible with ours.

Add mmdbresolve, a utility that reads IPv4 and IPv6 addresses on stdin
and prints resolved information on stdout. Place it under a liberal
license (MIT) so that we can keep libmaxminddb at arm's length. Add
epan/maxmind_db.[ch], which spawns mmdbresolve and communicates with it
via stdio.

Migrate the preferences and documentation to MaxMindDB.

Change the IPv4 and IPv6 asnum fields to FT_UINT32s. Change the
geographic coordinate fields to FT_DOUBLEs.

Bug: 10658
Change-Id: I24aeed637bea1b41d173270bda413af230f4425f
Reviewed-on: https://code.wireshark.org/review/26214
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-06 18:02:21 +00:00
Graham Bloice 5b079291c4 Windows: Remove support for MSVC older than VS2015
Cleanup the support for older versions of Visual Studio

Change-Id: Ieb97d56e9bff6a5902433e8d99b27276bc7034f7
Reviewed-on: https://code.wireshark.org/review/26247
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>
2018-03-04 08:58:07 +00:00
Gerald Combs f529ab5d0a Remove the endpoint "Map" feature.
Remove the endpoint map and its button from the Qt and GTK+ UIs. It
depends on GeoIP Legacy for coordinate information and those databases
are being deprecated in favor of MaxMind DB. We *could* upgrade the code
to use mmdbresolve, but according to
https://dev.maxmind.com/geoip/geoip2/geolite2/ they're also going to
remove coordinate information from GeoLite2:

"In addition, in 2019, latitude and longitude coordinates in the
 GeoLite2 databases will be removed.* Latitude and longitude coordinates
 will continue to be provided in GeoIP2 databases. Please check back for
 updates."

Change-Id: I43e1593d282a0f1aae897b1f4724117d1496b21e
Reviewed-on: https://code.wireshark.org/review/26229
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-02 21:59:21 +00:00
Gerald Combs 1a0987904f Generalize our process spawning code.
Move the contents of extcap_spawn to ws_pipe. Rename various extcap_*
prefixes to ws_pipe_*. Open stdin when we spawn processes.

Change-Id: I9286295443ee955bb6328b0ed6f945ee0bb2a798
Reviewed-on: https://code.wireshark.org/review/26216
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>
2018-03-02 05:22:20 +00:00
Jaap Keuter 0fb38879af L16_mono: Add L16 monaural codec plugin as functional example
This codec plugin serves a dual purpose.
First it is to add L16 codec suppport to Wireshark.
Second it is an illustration of a basic codec plugin module.

Change-Id: I64394dab3257ae49dece0257b16cd969503918e2
Reviewed-on: https://code.wireshark.org/review/26131
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-28 12:04:29 +00:00
Gerald Combs 32e99b355d CMake: Add more .PDBs to pdb_zip_package.
Add .PDBs under the extcap and plugin directories to the
Wireshark-pdb-xxx.zip package.

Change-Id: Icc003a212f21c02bcf8ccf326b43cfebbf32a9a3
Reviewed-on: https://code.wireshark.org/review/26146
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-27 22:06:54 +00:00
Guy Harris b3bc6dcc02 I don't see a need to treat ipmap.html specially.
It's in the INSTALL_FILES list, and all of those end up being dropped
into the run directory, so there's no need to copy it individually; all
the data files, as enumerated in INSTALL_FILES, are expected to be in
the same directory, whatever it is, and that's what happens to those
files.

Change-Id: I58df330c7d6886c87d91c0e0df73000c028fc312
Reviewed-on: https://code.wireshark.org/review/26088
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-25 00:17:56 +00:00
Guy Harris e3db7c581c I don't think ipmap.html belongs in the same directory as the binaries.
Change-Id: I1a15ec77786f6a141e78c62885343f8cc51c73bf
Reviewed-on: https://code.wireshark.org/review/26059
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-23 19:20:32 +00:00
Guy Harris f4cd45f6fe Treat the text2pcap scanner as clean.
We now disable some warnings on Flex-generated code.

Change-Id: I8ff242dc17e7345e9d5883354e921642cb0118fd
Reviewed-on: https://code.wireshark.org/review/25823
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16 23:26:01 +00:00
Guy Harris feb8f6b14d Make the DOCSIS dissector a built-in dissector.
Stuff that calls it is built in, and stuff it calls is built in, so
there's not much point in having it be a plugin; we already have
examples of plugin dissectors.

Change-Id: I512e0fda62faedb5f03f476fbece2e267e1d644f
Reviewed-on: https://code.wireshark.org/review/25775
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-13 20:15:19 +00:00
Gerald Combs 9cc4a3b967 CMake: Install the HTML guides.
Add a "FileInstall.cmake" module that installs files and directories.
Use it to install the chunked HTML guides.

Install the guides into CMAKE_INSTALL_FULL_DOCDIR. By default this is
/usr/local/share/doc/Wireshark. Define DOC_DIR to match.

Add explicit file and directory permissions to the default install
targets.

Remove the PDF install target.

Bug: 14258
Change-Id: I4712a4047a54627b7520b5bf5f191e0761d19606
Reviewed-on: https://code.wireshark.org/review/25737
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>
2018-02-13 06:18:34 +00:00
Gerald Combs 94a0f7c641 Switch from AsciiDoc to Asciidoctor.
Switch the markup text processor for files in the docbook directory from
AsciiDoc to Asciidoctor. Asciidoctor has several useful features (such
as direct PDF output) and is actively developed. It's written in Ruby
but that dependency can be sidestepped with AsciidoctorJ, a
self-contained bundle that only depends on the JRE.

The current toolchain targets require Python, AsciiDoc, DocBook XML,
DocBook XSL, Java, FOP, xsltproc, lynx, and the HTMLHelp compiler:

HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: AsciiDoc → DocBook XML → xsltproc + DocBook XSL
PDF: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → FOP
HTMLHelp: AsciiDoc → DocBook XML → xsltproc + DocBook XSL → HHC

This change removes the AsciiDoc and FOP requirements and adds either
AsciidoctorJ or Asciidoctor + Ruby:

HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
Chunked HTML: Asciidoctor → DocBook XML → xsltproc + DocBook XSL
PDF: Asciidoctor
HTMLHelp: Asciidoctor → DocBook XML → xsltproc + DocBook XSL → HHC

Ideally we could generate all of these using AsciidoctorJ, Java, and
lynx. Unfortunately we're not there yet.

The release notes depend on several macros (ws-buglink, ws-salink,
cve-idlink, sort-and-group). Add Asciidoctor (Ruby) equivalents.

Remove the BUILD_xxx_GUIDES CMake options and add various output targets
automatically. This means that you have to build the various documentation
targets explicitly.

Change-Id: I31930677a656b99b1c6839bb6c33a13db951eb9a
Reviewed-on: https://code.wireshark.org/review/25668
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-11 18:22:09 +00:00
Gerald Combs 78b7da7716 CMake: Don't shadow PROCESSOR_ARCHITECTURE.
PROCESSOR_ARCHITECTURE is a standard Windows environment variable.
Rename the CMake variable WIRESHARK_TARGET_PROCESSOR_ARCHITECTURE.

Change-Id: I03109d45d6fb5f00742cd43085a9d33d9e5ddf1f
Reviewed-on: https://code.wireshark.org/review/25721
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-10 07:39:42 +00:00
Guy Harris 40a533abe1 Move summary.[ch] to libui.
Change-Id: I49f1eeb4fc3a90e436da116577a7d0c5ba982eee
Reviewed-on: https://code.wireshark.org/review/25657
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-07 08:29:52 +00:00
Gerald Combs c061522765 2.5.0 → 2.5.1.
Change-Id: I185a3f359acfe5dfd06c0b7f5fff3b6586be1ff9
Reviewed-on: https://code.wireshark.org/review/25647
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-06 23:55:46 +00:00
João Valverde ad76b31c3f Don't install test programs (fuzzshark and dftest)
These binaries are not intended for end-users.

Change-Id: I1e1ecd7424bbbe1b2935390e2daf7e3f1089ee28
Reviewed-on: https://code.wireshark.org/review/25594
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-02-04 16:02:51 +00:00
Gerald Combs 6adc7550a8 Note that /guard:cf requires CMake 3.9 or newer.
Change-Id: I775daafdba012deb2eac5cf8d895be55243d9440
Reviewed-on: https://code.wireshark.org/review/25554
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-02 00:14:14 +00:00
Jaap Keuter 27ae22bd25 usbdump: Add usbdump wiretap plugin as functional example
This wiretap plugin serves a dual purpose. One is to add usbdump file
reading capability to wiretap and therefore Wireshark and Tshark.
Second it is an illustration of a basic wiretap plugin module.

Change-Id: Iefbb156ea1bc5d90dabc1753942cdb9e393714ad
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25487
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-30 05:44:38 +00:00
Peter Wu 9be01dc616 Qt 4.8 compatibility fixes
Add missing include headers, define Q_NULLPTR for all Qt objects (to
avoid having to include an ugly compat header), use old signal/slot
syntax (Q_SIGNALS are protected in Qt 4.8), disable Qt 5 log message
handler, etc.

Change-Id: I449beb0b74050fdfb0fc5828d8fb74eedb2b45bf
Reviewed-on: https://code.wireshark.org/review/25469
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-25 17:17:13 +00:00
Gerald Combs 50b4ff6db8 CMake: Create directories one at a time.
Older versions of CMake don't support passing multiple arguments to `-E
make_directory`.

Change-Id: I62f76753a0ec1a96849de3a1131869f08303dbfc
Reviewed-on: https://code.wireshark.org/review/25458
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-24 21:05:44 +00:00
Gerald Combs 7e37a7db55 CMake: Compile and link flag updates.
Add /guard:cf and /Qspectre to the Visual C++ 2015 compile and link flags.

Don't bother trying to pass -Wl,--as-needed or -pie to Visual C++.

Remove some unneeded quotes.

Change-Id: I4d89d61ce9dd579e7cfbcd49df6116810bfb0178
Reviewed-on: https://code.wireshark.org/review/25356
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>
2018-01-24 11:43:56 +00:00
Gerald Combs 99b7776d5f CMake: Copy multiple data files at a time.
Copy the DTD, DIAMETER, RADIUS, and profile files all at once instead of
individually.

Change-Id: I7c75c4a784956b998a82fd627dd17843820096ff
Reviewed-on: https://code.wireshark.org/review/25439
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>
2018-01-24 05:08:27 +00:00
Gerald Combs 064bec8797 CMake: File copy updates.
Switch from `xcopy`-ing single files to `cmake -E copy_if_different`-ing
multiple files on Windows. Add a comment about using copy_if_different
for our data files.

Switch from `cmake -E copy` to `cmake -E copy_if_different` in a couple
of other places.

Change-Id: I6bf72f02a66c46a4440280305479f41ffb4e987a
Reviewed-on: https://code.wireshark.org/review/25402
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-01-21 13:14:52 +00:00
Jaap Keuter 2f759ce7a7 Update paths after dissector plugin move.
With the change in paths of the dissector plugins in the repository some
other paths require adjustment. These are the obvious changes remaining.

Change-Id: Id49ac6aaf1a29d9eb37f4c32226a4597d5e32edd
Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Reviewed-on: https://code.wireshark.org/review/25343
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-16 19:02:28 +00:00
João Valverde 5352ef42f9 plugins: Add source tree subfolder for plugin library
This allows some simplification and makes things more consistent,
particularly for loading plugins from the build dir.

Also fixes the issue reported here:

https://www.wireshark.org/lists/wireshark-dev/201801/msg00061.html

Change-Id: I0d8a000ee679172bccad546a3b0c47a79486f44d
Reviewed-on: https://code.wireshark.org/review/25329
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: João Valverde <j@v6e.pt>
2018-01-16 08:51:37 +00:00
Gerald Combs 777932efc6 make-dissectors depends on copy_cli_dlls.
Have the make-dissectors CMake target explicitly depend on copy_cli_dlls,
otherwise we might try to create dissectors.c before libglib-2.0-0.dll
has been copied into place. It looks like this is what's been causing
our random Windows PD failures.

Change-Id: Ia2445f17abd2c73113ab269ba6c606f48e724d93
Reviewed-on: https://code.wireshark.org/review/25292
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-01-13 00:47:48 +00:00
Dario Lombardo e80b40adbe extcap: remove conditional compilation.
Change-Id: Ia54bba388755cf27a343fe6d69d244bf1ab897f9
Reviewed-on: https://code.wireshark.org/review/25186
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-08 05:50:15 +00:00
Peter Wu f8b67cb931 Rename dissectors.c.in and fix CMake on removals
"dissectors.c.in" is an input file for "make-dissectors" which outputs
"dissectors.c", but does not contain C code. Rename it to
"dissectors.in.txt" instead.

When a dissector is removed from the list, the dissectors.c file was not
properly generated even if CMake was re-run. Fix this by adding an
additional dependency on the input file. autotools likely suffers from
the same problem with removed files, I have not tried to fix that.

Restore's João's original approach using file(GENERATE) to avoid using
configure_file, this requires CMake 2.8.12.

Change-Id: Id07cd8ef502186a90d41b3bb77ed0d9c94845af9
Fixes: v2.5.0rc0-1763-gfe0c2b0485 ("Rewrite make-dissector-reg.py in C")
Reviewed-on: https://code.wireshark.org/review/24659
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2017-12-24 13:30:06 +00:00
Stig Bjørlykke 91f63908df cmake: Remove -Wcomma for C++ when using Qt >= 5.10
The Qt team introduced a lot of "Possible misuse of comma operator here"
warnings in qstring.h and qstringview.h in version 5.10.  Now we need to
fix the Qt source again.

Change-Id: I948ba5a224d4dca1ebb6a758100c064d501c1d4a
Reviewed-on: https://code.wireshark.org/review/24779
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-12-12 14:39:44 +00:00
João Valverde 5fc43fe63a Rewrite make-tap-reg.py in C
Change-Id: Ief5b1fffecc9712c01ff10292c403b7c84a5908a
Reviewed-on: https://code.wireshark.org/review/24756
Reviewed-by: João Valverde <j@v6e.pt>
2017-12-11 02:52:28 +00:00
Guy Harris 797d2f6a87 Move the frame_set stuff back into the capture_file structure.
libwireshark now expects an epan_t to be created with a pointer to a
"packet provider" structure; that structure is opaque within
libwireshark, and a pointer to it is passed to the callbacks that
provide interface names, interface, descriptions, user comments, and
packet time stamps, and that set user comments.  The code that calls
epan_new() is expected to provide those callbacks, and to define the
structure, which can be used by the providers.  If none of the callbacks
need that extra information, the "packet provider" structure can be
null.

Have a "file" packet provider for all the programs that provide packets
from a file.

Change-Id: I4b5709a3dd7b098ebd7d2a7d95bcdd7b5903c1a0
Reviewed-on: https://code.wireshark.org/review/24731
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-12-08 03:32:25 +00:00
Jakub Zawadzki 038aa2a616 Add fuzzshark to cmake/autotools.
Add fuzzshark target to make sure that oss-fuzzshark always build.

Change-Id: I802b679c18023daa1475a54bae722b5e90c72a59
Reviewed-on: https://code.wireshark.org/review/24716
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-12-07 23:26:52 +00:00
Peter Wu 3c6cb2f856 cmake: match include directories with autotools
Match closer the behavior of autotools which does not include epan in
its include paths by default.

Change-Id: I885bc7942490a5674c6ac75f9a8ea221555e3784
Reviewed-on: https://code.wireshark.org/review/24639
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2017-11-29 06:58:22 +00:00
João Valverde 7540ac6938 Move the protocol registration routines back into libwireshark
Follow-up to b695b3e2f7.

Change-Id: I7e36519f2c3806c1205d05437671325080974257
Reviewed-on: https://code.wireshark.org/review/24524
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-21 20:21:50 +00:00
Gerald Combs 0b2ecccd86 Add ThreadSanitizer configure-time options.
Add ENABLE_TSAN and enable-tsan options to CMake and Autotools
respectively which enable ThreadSanitizer, similar to AddressSanitizer
and UndefinedBehaviorSanitizer.

Change-Id: I79adf5c1516b0938f140bbf501c181bf14d7619b
Reviewed-on: https://code.wireshark.org/review/24515
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-11-21 16:55:18 +00:00
João Valverde 5968fc1cae Rename UseMakeDissectorReg.cmake
Change-Id: I2723e7f0309dbe21f23b65818fbea3a7eadf13d4
Reviewed-on: https://code.wireshark.org/review/24514
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-20 21:31:38 +00:00
João Valverde 262a84c384 Fix (and chop) static build option
This sets the scope of the static build option to Wireshark support
libraries only.

Before the patch:

Static plugins don't work with CMake and autotools.

autotools static build is broken, and most likely will always be, as
building Wireshark all-static is difficult and time-consuming.

After the patch:

For CMake Wireshark will be built with static or shared libraries and
dynamic plugins. Everything just works. CMake apparently doesn't want
you building static and shared libraries at the same time.

For autotools Wireshark will be built with shared libraries by default.
--disable-shared and --enable-static options work as usual. Dlopened
plugins are not built if --disable-shared is given to configure (to
disable shared libraries). This is a limitations imposed by libtool.

Tested on Linux. This removes broken support for building plugins
statically.

Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c
Reviewed-on: https://code.wireshark.org/review/24241
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-19 20:16:50 +00:00
Graham Bloice bab9abfb7d CMake: Clean up Windows build
Remove options that aren't supported on Windows
Don't use pkgconfig on Windows

Change-Id: I79718a1c43f56a9ec88f690490931b80b727dd68
Reviewed-on: https://code.wireshark.org/review/24481
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-18 20:58:31 +00:00
João Valverde b695b3e2f7 Begin cleanup of make-dissector-reg.py
Move registration code to a new register.c file so it is readable.
Dissector load points are stored in a generated function pointer
array instead.

Simplify python script somewhat by not interleaving the plugin and
dissector logic.

Change-Id: I5ec21270f4e1550a5c911efa7f0dc4fc7fcb13a5
Reviewed-on: https://code.wireshark.org/review/24474
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-18 14:43:10 +00:00
Graham Bloice c43c58c434 CMake: Make Qt5 packages required if building Qt version
This stops folks failing when they don't have Qt
but are still attempting to build the Qt version.

Change-Id: I31eb9433b25ca9a717cd10bc165f3820ae31687e
Reviewed-on: https://code.wireshark.org/review/24406
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-11-14 16:46:07 +00:00
Guy Harris e38c89d3a7 Link with ZLIB_LIBRARIES if you link with wiretap.
Wiretap may use zlib; if it does, ZLIB_LIBRARIES is set to refer to
zlib.  On UN*X, you may be able to get away with linking a
dynamically-linked shared library with other dynamically-linked shared
libraries and not linking programs linked *with* that shared library
with those other shared libraries, but that may not work on Windows.

We link most programs that use wiretap with ZLIB_LIBRARIES; do so with
androiddump and randpktdump as well.

Bug: 14207
Change-Id: I8e94197e06f5fd0ff8c95aa509dbcc2ff2a44cd4
Reviewed-on: https://code.wireshark.org/review/24389
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-11-12 18:56:33 +00:00
João Valverde 62f705e844 autotools: Try to be clearer about --with-ssl and remove cruft
Change-Id: Iaf8c8a83ead1d6671bb9cadb6add56481ed98aaa
Reviewed-on: https://code.wireshark.org/review/24242
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2017-11-05 10:39:38 +00:00