Commit Graph

198 Commits

Author SHA1 Message Date
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 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 9b13c4352d epan: Add SMI version 2021-05-25 20:10:37 +01: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
Guy Harris ca99a821b4 Fix the way we get high-resolution time.
If we're not on Windows, use clock_gettime(CLOCK_REALTIME) *if* we have
it; otherwise, fall back on gettimeofday().

(Note: neither Linux, nor macOS, nor Windows necessarily "have"
particular APIs; particular *versions* of Linux distributions
(kernel+libc) have them, particular *versions* of macOS have them, and
particular *versions* of Windows+MSVC have them.

And Linux, Windows and macOS aren't the only platforms on which we run.)

Fixes #17101.
2020-12-20 13:31:57 -08: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
Guy Harris 9296677472 extcap: assume we're using libssh 0.6 or later.
We require 0.6 or later in CMakeLists.txt, and both ssh_version() and
LIBSSH_VERSION having to be fed to SSH_STRINGIFY() date back before 0.5,
so just assume ssh_version() is available and LIBSSH_VERSION has to be
fed to SSH_STRINGIFY().

Change-Id: I4f62a720424383f88e0410cad07dbe67d0c69297
Reviewed-on: https://code.wireshark.org/review/37881
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-16 09:26:43 +00:00
Guy Harris a1d2d18cb8 extcap: get the libssh version string from the libssh.h header.
Thanks, libssh developers, for making it so straightforward!

This means we don't need to construct it in the CMake module that finds
libssh.

Change-Id: I6c173bf7c0671dfdfac423a7d01ecced7b69e851
Reviewed-on: https://code.wireshark.org/review/37878
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-16 08:18:58 +00:00
Guy Harris dccc382b4f Show the version of libssh being used, if possible.
If we have ssh_version(), then ssh_version(0) will return a string for
the version being used.

Change-Id: I0717f6d4d5c3fa04aa7938dc6bc0d4c8abfa95fd
Reviewed-on: https://code.wireshark.org/review/37875
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-15 23:43:22 +00:00
Dario Lombardo f793923a12 extcap: add libssh version info to sshdump and ciscodump.
Change-Id: I1e13cc3471e37514a0dd181abd4938607a057ec6
Reviewed-on: https://code.wireshark.org/review/37870
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-15 18:59:10 +00:00
Roland Knall 5a7b949398 CMake: Remove unnecessary defines
Remove #defines not needed in any part of the sourcecode

Change-Id: I042ed4ae5750c07e3316b9a18516359213cf7998
Reviewed-on: https://code.wireshark.org/review/37438
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2020-06-10 15:38:13 +00:00
Stefan Metzmacher 738e73a50e packet-kerberos: add support for decrypting KRB5 FAST messages
Currently this is only available for MIT Kerberos, but it
should be possible to implement the same using
krb5_crypto_fx_cf2() from Heimdal.

Change-Id: Ic3327dfde770f9345485bf97e2ac6045b909b64e
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/36472
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-26 11:42:42 +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
Guy Harris 0c889d6f5c Require at least libpcap 0.8/WinPcap 3.1.
2004 called, they want their libpcap/WinPcap back.

RHEL 6 initially shipped with libpcap 1.0; even old Enterprise(TM)
versions of OSes ship with something shinier than 0.7.x these days.

This lets us get rid of a bunch of #ifdefs and workaround code for
missing APIs.

Change-Id: I862cb027418b0a0c0f45a26979acea82f93f833b
Reviewed-on: https://code.wireshark.org/review/36383
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-03-13 00:05:07 +00:00
Guy Harris f77c677f18 Fix some places where we forgot to mention Npcap.
Mostly comments, but a few messages.

Change-Id: Iff7380eb15f064bf6a3078e131c70987e36bca44
Reviewed-on: https://code.wireshark.org/review/36381
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-03-12 18:59:44 +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
Gerald Combs c227279d33 packet-kerberos: try to fix the build on macOS 10.14
/usr/lib/libkrb5.dylib doesn't have krb5_pac_verify().

This hopefully fixes the build problem introduced by commit
d9aab840a7

Change-Id: Ib354a59cbc20c6bf97ddc029d8b042d4aea6dae9
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/35713
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-10 02:44:38 +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 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
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
Piotr Smolinski ad94c4d459 Kafka: include zstd compression in Kafka message batches
Change-Id: I1d06486ccf7b174ee9aa621fa3d8acb8b3673777
Reviewed-on: https://code.wireshark.org/review/34222
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-20 13:50:45 +00:00
Roland Knall 390071ed0b Qt: Import Profile information
Allow easy import of profiles. Profiles must be stored inside
a zip file, with no additional hierarchy.

Change-Id: I0ae77460c20ef6b3e447906e671b0cefa6b9b032
Reviewed-on: https://code.wireshark.org/review/33881
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
2019-07-17 18:25:11 +00:00
João Valverde 186f985793 CMake: Check for and use system SpeexDSP library
Change-Id: I8443379d23a2946dd21c12e5e0bd5464ab73ca25
Reviewed-on: https://code.wireshark.org/review/31857
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>
2019-05-02 21:12:01 +00:00
Dániel Bakai 9ce60b173b Add brotli decompression support for HTTP and HTTP2 dissectors.
Change-Id: I9c09f55673187f6fee723fcd72798fb6b9958b03
Reviewed-on: https://code.wireshark.org/review/32745
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-22 15:24:46 +00:00
Anders Broman 101fed9420 Cmake: Make it possible to check on HAVE_STRUCT_STAT_ST_BLKSIZE.
Change-Id: Id84adc85c1fbdef8e39240f55128cdec4ee9ca2f
Reviewed-on: https://code.wireshark.org/review/31324
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-10 12:34:41 +00:00
Gerald Combs aedf6fe1c5 macOS: Fix our plugin path.
In CMake we only used PROJECT_RELEASE_VERSION to construct our plugin
path, so rename it to PLUGIN_PATH_ID. Use a dash to separate version
numbers on macOS in order to allow code signing and a period elsewhere.

In the C code we only used VERSION_RELEASE to construct our plugin path,
so rename it to PLUGIN_PATH_ID.

Change-Id: I02abc591d7857269e8d47b414b61df4b28a25f2d
Reviewed-on: https://code.wireshark.org/review/32013
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-13 23:55:10 +00:00
João Valverde a3991874eb CMake: Replace PACKAGELIST magic
This is more explicit and easier to read with slightly better locality
while using less code.

Also less awkward when the package doesn't fit the narrow package list
expectations.

The ws_find_package() macro doesn't include all the status messages. The
choice was to rely on standard find_package() and feature_summary() output
and be less verbose.

Avoid polluting the CLI build interface. Per target include paths and
macro definitions are preferred.

Because this patch intentionally removes the global CMAKE_*_FLAGS
and include_directories() usage in favor of target properties, some
untested build configurations may inadvertently break because of
missing ${PACKAGE}_INCLUDE_DIRS or ${PACKAGE}_DEFINITIONS. This
required a manual review of dependencies that might have been
incomplete.

${PACKAGE_VAR}_LINK_FLAGS seems to be unused.

Changing the CMake Qt code to use more modern CMake component syntax
is left as future work.

Change-Id: I3ed75252189a6e05a23ed6e619088f519cd7ed78
Reviewed-on: https://code.wireshark.org/review/31496
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-20 11:50:10 +00:00
Peter Wu ac58eafa32 Add support for RSA decryption using PKCS #11 tokens
Add support for loading RSA private key files from PKCS #11 tokens,
identified by PKCS #11 URIs. Add a new 'pkcs11_libs' UAT which can
dynamically load PKCS #11 provider libraries that are not found by
p11-kit.

The configuration GUI will need additional code to discover available
PKCS #11 tokens and will be added later.

This feature requires GnuTLS 3.4 with PKCS #11 support, so Windows,
macOS via Homebrew, Ubuntu 16.04, Debian Stretch. Not supported: RHEL7.
Currently macOS via official packages disables PKCS #11 support, so that
will also not work.

Change-Id: I20646bfd69c6bd13c8c2d27cb65c164a4b0b7a66
Reviewed-on: https://code.wireshark.org/review/30855
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-12-29 10:40:16 +00:00
João Valverde 6bc9a88ee8 Remove a stale FIXME
While at it prefer to use add_definitions() instead of config.h. This
puts all definitions in the same place and limits the scope to the
respective wsutil API.

Change-Id: Idc30914220b876865e0ae47709e6f17eb9b0fc2c
Reviewed-on: https://code.wireshark.org/review/30782
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
2018-11-25 01:42:31 +00:00
Peter Wu 811d5f7fac Drop JSON-GLib completely
JSON-GLib was added in v2.9.0rc0-201-g511c2e166a, but is no longer
necessary since we have a home-grown JSON dumper (wsutil/json_dumper.h).
Remove the remaining traces and additionally remove GObject from
FindGLIB2.cmake since it was only added for JSON-GLib.

Change-Id: If9dfd2c60cec130f98109d100bdb6618bde06ba0
Reviewed-on: https://code.wireshark.org/review/30733
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20 05:04:11 +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
Guy Harris 5d8a5fb866 If we have fseek/ftell variants with 64-bit offsets, use them.
Or, at least, use them in the libwiretap file-writing code; we can
change other places to use them as appropriate.

Change-Id: I63af2267a22a158ee23f3359b043913dac0e285b
Reviewed-on: https://code.wireshark.org/review/28783
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-20 23:13:08 +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
Guy Harris 15cfc41e94 Don't use dladdr() to get a pathname for the current executable().
Change-Id: I24ad11a659c2cb936f873339dc2b36ac9944280a
Reviewed-on: https://code.wireshark.org/review/27359
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-05 08:06:35 +00:00
Guy Harris 41445d0e97 Use dlget() and dlgetname() to get the executable path name on HP-UX.
That leaves only AIX (and, if we're looking at dead UN*Xes, IRIX and
Tru64 UNIX) as platforms on which we can't fetch that.

Change-Id: If7a6a425aba30e1abf82ecc66f6c28dc532a227c
Reviewed-on: https://code.wireshark.org/review/27358
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-05 06:40:19 +00:00
Guy Harris f447aa7dd7 On Solaris, check for getexecname in CMake.
We expect it to be checked for in wsutil/filesystem.c, so we should
check for it.  It's a Solarisism, so check for it only on Solaris.

Change-Id: I09104c17d2ec91c74862b63e735c32a9d188f2a6
Reviewed-on: https://code.wireshark.org/review/27351
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-05-05 06:01:05 +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 80256442af More PortAudio removal.
Change-Id: Ib56212e09d41fc76494d8186c77541302700104c
Reviewed-on: https://code.wireshark.org/review/26952
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-04-15 16:49:53 +00:00
Joerg Mayer 0d31ec328f Check for HAVE_LZ4FRAME_H in the LZ4 detection process and use it
Change-Id: I919621b8c4c809eb181d563251eeb099b767ad82
Reviewed-on: https://code.wireshark.org/review/26940
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-15 05:34:08 +00:00
Guy Harris d12a41b17a Include alloca.h if we have it.
Bug: 14552
Change-Id: I799691f7f33ca56748ed4e51d7d548f37769837b
Reviewed-on: https://code.wireshark.org/review/26611
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-03-23 22:39:07 +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
Gerald Combs 0874b8bac6 Remove popcount in favor of ws_count_ones.
Remove our popcount implementation in favor of ws_count_ones, which
is our other popcount implementation. This required updating and
running process-x11-xcb.pl.

Change-Id: I8634c55242113b338c5b0173837c35f98b148b4f
Reviewed-on: https://code.wireshark.org/review/26454
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-13 17:18:01 +00:00
Gerald Combs 2519115695 Remove some unused or hard-coded header checks.
Remove some unused checks and code found using

grep -o 'HAVE_[A-Z0-9_]*' ConfigureChecks.cmake | sort -u \
| while read have_h ; do echo = $have_h ; git --no-pager grep -cl $have_h ; done

Change-Id: I86bfcfdc4f60d9d7de87017a7bb00f833a79bd2c
Reviewed-on: https://code.wireshark.org/review/26451
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-03-12 22:11:32 +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 59b0d22ec0 Windows: Update target version info
Set the API target level to Win7, along with installer changes
to match.

Change-Id: Icd93964eadf93018c56218e3efdfed10b9f8959a
Reviewed-on: https://code.wireshark.org/review/26218
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2018-03-02 10:53:29 +00:00
Guy Harris af0f49e80d Use pcapng as the name of the file format.
At one point, I remember a discussion resulting in the official name of
the next-generation replacement for pcap format being changed to
"pcapng", with no hyphen.

Make Wireshark reflect that.

Change-Id: Ie66fb13a0fe3a8682143106dab601952e9154e2a
Reviewed-on: https://code.wireshark.org/review/25214
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-01-09 00:38:51 +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
Gerald Combs d0d1eaadf0 Win32: Add checks for _WIN32_WINNT and NTDDI_VERSION.
Check to see if we're the source of truth for _WIN32_WINNT and
NTDDI_VERSION in config.h and emit a compiler error if we aren't.

Rearrange the #includes in ui/qt/data_printer.cpp so that config.h is
included first. This fixes the following:

   136>C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\config.h(411): warning C4005: 'NTDDI_VERSION': macro redefinition (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp) [C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\ui\qt\qtui.vcxproj]
         C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\sdkddkver.h(223): note: see previous definition of 'NTDDI_VERSION' (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp)
   136>C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\config.h(412): warning C4005: '_WIN32_WINNT': macro redefinition (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp) [C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\cmbuild\ui\qt\qtui.vcxproj]
         C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\shared\sdkddkver.h(213): note: see previous definition of '_WIN32_WINNT' (compiling source file C:\buildbot\wireshark\wireshark-master-64\windows-2016-x64\build\ui\qt\utils\data_printer.cpp)

Change-Id: I90886cb9450463d768d6529ccd678ca11508cde2
Reviewed-on: https://code.wireshark.org/review/24744
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-10 07:50:14 +00:00