aboutsummaryrefslogtreecommitdiffstats
path: root/cmakeconfig.h.in
AgeCommit message (Collapse)AuthorFilesLines
2023-02-06Add a #define HAVE_MSYSTEM and use itJoão Valverde1-0/+3
In certain situations using __MINGW64__ is not correct. We want to have the condition apply using MinGW-w64 but also using MSYS2, which the __MINGW64__ condition alone does not capture. Add a HAVE_MSYSTEM C define and use it where appropriate.
2023-02-06Remove wspcap.h and use config.h insteadJoão Valverde1-0/+49
Forcing the use of a dedicated header to replace pcap.h is unnecessary code and mental overhead in this case. We can use config.h instead for the same purpose of defining a macro symbol before including pcap.h.
2023-01-16MSYS2: Add Lua 5.1 support and fix test suite failuresJoão Valverde1-0/+3
2023-01-14CMake+Windows: Try to prevent symbol redefinitions againJoão Valverde1-0/+16
2022-12-16Windows: Use SpeexDSP binary packageJoão Valverde1-3/+0
Remove bundled code and use vcpkg binary library instead.
2022-08-05Windows: Don't define or check for WIN32.Gerald Combs1-5/+0
_WIN32 is defined by the compiler, and is arguably a more reliable test that WIN32. Switch to checking for _WIN32 in a couple of places in the code. Remove a WIN32 definition from config.h. It was added for the WinPcap developer pack but we no longer use that.
2022-07-06Rename Logwolf to LograyGerald Combs1-1/+1
Switch to the name "Logray" for the log analyzer. Rays are biological cousins of sharks and more people like the name "Logray" in a completely unscientific survey here. Apologies for any inconvenience this might cause.
2022-06-17ui: Add Logwolf software updates.Gerald Combs1-1/+4
Set Logwolf information in the Appcast URL template as needed.
2021-12-27wsutil/inet_addr: Refactor to use C99/POSIX typesJoão Valverde1-0/+3
Rewrite ws_inet_pton{4,6} and ws_inet_ntop{4,6} without GLib types. Check for strerrorname_np() and use that is available, to simplify error handling. Add some minimal tests.
2021-12-27CMake: Remove duplicate definition in config.hJoão Valverde1-3/+0
2021-12-21Add a ws_posix_compat.h headerJoão Valverde1-4/+0
Currently used to define ssize_t on platforms that lack it. Fix some Windows build errors caused by moving the definition into a separate header. Fix some narrowing warnings on Windows x64 from changing the definition of ssize_t from long int to int64_t. The casts in dumpcap are ugly but necessary. The whole code needs to be rewritten for portability, or the warnings disabled.
2021-12-18wmem: Use vasprintf()João Valverde1-0/+3
Use vasprintf(3) if available to optimize wmem_stdup_printf().
2021-12-15wsutil: Add portability wrapper for clock_gettime(CLOCK_REALTIME)João Valverde1-0/+3
2021-11-28Move two functions from epan to wsutil/str_utilJoão Valverde1-0/+6
Move epan_memmem() and epan_strcasestr() to wsutil/str_util. Rename to ws_memmem() and ws_strcasestr(). Add compile time check for a system implementation and use that if available. We invoke those functions using a wrapper to avoid exposing _GNU_SOURCE outside of the implementation.
2021-11-24Readd feature to make QtXMultimedia optional againJoerg Mayer1-1/+1
In order to be able to defer solving all Qt6 API differences at once I tried to reactivate the QT_MULTIMEDIA_LIB feature. I managed to fix most problems but one problem remains in both Qt5 and Qt6 builds. Without Qt[56]Multimedia, the following error exceeds my non-existing C++ knowledge: jmayer/work/wireshark/git/ui/qt/rtp_player_dialog.cpp:154:18: error: out-of-line definition of 'RtpPlayerDialog' does not match any declaration in 'RtpPlayerDialog' RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf, bool capture_running) : ^~~~~~~~~~~~~~~
2021-11-22Remove last remnants of Qt5MacExtrasJoerg Mayer1-3/+0
MacExtras has been both obsoleted by Qt5 and unused by Wireshark code. https://doc.qt.io/qt-5/qtmac-obsolete.html
2021-11-15regex: Prefer C99/POSIX typesJoão Valverde1-3/+7
Replace 'gssize' with 'ssize_t'. Add a CMake configure check for ssize_t. Fix missing "config.h" includes.
2021-11-14Make PCRE2 a required dependencyJoão Valverde1-1/+1
2021-11-14dfilter: Add support for PCRE2João Valverde1-0/+7
PCRE2 is the future of PCRE. The only advantage of GRegex is that it comes bundled with GLib, which is not an advantage at all. PCRE2 is widely available, the GRegex abstractions layer are not a good fit and abstract things that don't need abstracting or that we could handle better ourselves, there are open bugs (#12997) and maintenance is spotty at best. GRegex comes with many of the problems of bundled code, aggravated by the fact that it completely falls outside of our control.
2021-10-22Add new global header wireshark.h with guidelineJoão Valverde1-1/+0
Remove ws_diag_control.h from config.h because that was a workaround for the lack of a public global header. Fix the resultant build errors.
2021-09-23Add compatibility fix for Minizip dependencyJoão Valverde1-0/+3
2021-09-21MinGW-w64: Add guards for MSVC macro definitionsJoão Valverde1-4/+3
Add a comment too.
2021-09-21CMake: Move UNICODE defines to command lineJoão Valverde1-3/+0
For consistency's sake, I have not had any build errors that can be attributed to this.
2021-09-21MinGW-w64: No need to define 'ssize_t'João Valverde1-4/+6
This will trigger a collision on MinGW-w64. Define this instead for Microsoft's compiler. We should probably have a compile time check instead.
2021-09-20CMake: Fix macro redefinition of Windows API versioningJoão Valverde1-17/+0
2021-09-17CMake: Remove cmakedefine HAVE_ALLOCA_HJoão Valverde1-3/+0
Commit 8df2a73594fbcc812f4ea22a72ab7a79bfb63dc3 removed this configuration check but didn't remove the corresponding config.h macro.
2021-09-17Use the musl in-tree getopt_long() everywhereJoão Valverde1-6/+0
Besides the obvious limitation of being unavailable on Windows, the standard is vague about getopt() and getopt_long() has many non-portable pitfalls and buggy implementations, that increase the maintainance cost a lot. Also the GNU libc code currently in the tree is not suited for embedding and is unmaintainable. Own maintainership for getopt_long() and use the musl implementation everywhere. This way we don't need to worry if optreset is available, or if the $OPERATING_SYSTEM version behaves in subtly different ways. The API is under the Wireshark namespace to avoid conflicts with system headers. Side-note, the Mingw-w64 9.0 getopt_long() implementation is buggy with opterr and known to crash. In my experience it's a headache to use the embedded getopt implementation if the system provides one.
2021-07-23CMake: Remove some unused definitionsJoão Valverde1-19/+1
2021-07-19CMake: Don't define NEED_STRPTIME.Gerald Combs1-2/+0
We haven't needed it since 5bfc21cf9e.
2021-07-15CMake: Remove no-longer-used checks.Gerald Combs1-18/+0
The following commits removed code that required the following defines, so remove them: c0711693ab HAVE_GETOPT_H (Partial; still required by CMake) 2925fb0850 HAVE_MKSTEMPS 0c889d6f5c HAVE_SYS_IOCTL_H 0c889d6f5c HAVE_SYS_SOCKIO_H 0c889d6f5c HAVE_STRUCT_SOCKADDR_SA_LEN 9c5049a80b HAVE_STRUCT_STAT_ST_FLAGS
2021-07-15CMake: Don't bother checking for fcntl.h or floorl.Gerald Combs1-6/+0
fcntl.h appears to be available on all of our supported platforms, including Windows. We've also been including it without HAVE_FCNTL_H guards in a few places (e.g. sshdump.c) without any issues for some time. floorl is part of C99.
2021-07-15packet-kerberos: implement PAC Ticket checksum verificationStefan Metzmacher1-0/+6
We use some private functions from MIT kerberos: - krb5_free_enc_tkt_part() - decode_krb5_enc_tkt_part() - encode_krb5_enc_tkt_part() but we already do that for krb5int_c_mandatory_cksumtype(), which is newer than the above functions. We use all of them only under HAVE_KRB5_PAC_VERIFY, so we don't seem to need additional configure tests. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2021-06-17Replace usage of GLogLevel flags everywhereJoão Valverde1-1/+1
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-11Refactor our logging and extend the wslog APIJoão Valverde1-0/+1
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-05-25epan: Add SMI versionJoão Valverde1-0/+3
2021-03-22Replace the Large File Support CMake stuff.Guy Harris1-6/+0
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.
2020-12-20Fix the way we get high-resolution time.Guy Harris1-0/+3
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-10-03RTP: opus playbackLin Sun1-0/+3
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-07-16extcap: assume we're using libssh 0.6 or later.Guy Harris1-3/+0
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-16extcap: get the libssh version string from the libssh.h header.Guy Harris1-1/+0
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-15Show the version of libssh being used, if possible.Guy Harris1-0/+3
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-15extcap: add libssh version info to sshdump and ciscodump.Dario Lombardo1-0/+1
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-06-10CMake: Remove unnecessary definesRoland Knall1-15/+0
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-05-26packet-kerberos: add support for decrypting KRB5 FAST messagesStefan Metzmacher1-0/+3
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-04-06CMake: remove ENABLE_PCAP_NG_DEFAULT optionPeter Wu1-3/+0
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-03-13Require at least libpcap 0.8/WinPcap 3.1.Guy Harris1-34/+0
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-12Fix some places where we forgot to mention Npcap.Guy Harris1-1/+1
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-01-20RTP: decode iLBC payloadJirka Novak1-0/+3
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-10packet-kerberos: try to fix the build on macOS 10.14Gerald Combs1-0/+3
/usr/lib/libkrb5.dylib doesn't have krb5_pac_verify(). This hopefully fixes the build problem introduced by commit d9aab840a75ededc286b8e9894e5af7ce6298bbc 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>
2019-11-23Add c-ares to the required library list.Gerald Combs1-3/+0
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>