aboutsummaryrefslogtreecommitdiffstats
path: root/cmakeconfig.h.in
AgeCommit message (Collapse)AuthorFilesLines
2024-01-05Windows: Update our minimum versionGerald Combs1-3/+3
Update our minimum Windows version in various places, including the NSIS and WiX installers. Fixes #19569
2023-12-14Remove version component from plugin pathJoão Valverde1-1/+2
Remove the major.minor version from the plugin path, i.e: lib/plugins/X.Y/{epan,wiretap,codecs} and use an unversioned path: lib/plugins/{epan,wiretap,codecs} Introduce a new naming policy for plugins that requires name.so.ABI_VERSION. This is a simplified filesystem layoutfor plugins some important benefits such as: * improves compatibility between Wireshark versions, because a plugin that wasn't recompiled will be automatically picked up, but only if it has a compatible ABI version in the file name. * does not clash with Apple guidelines * simpler for users to understand and apply * just overall simpler and easier to maintain, removes a lot of complexity from CMake code It does impose more requirements on the plugin naming scheme but this should be handled completely transparently by the build system. It would also be possible to add support for unversioned *.so file extensions at the same time, although in ths case it is not possible to support multiple Wireshark ABI versions with only *.so, of course. This wasn't done here but it may or may not be a useful enhancement in the future. Follow-up to 90b16b40921b737aadf9186685d866fd80e37ee6.
2023-10-27wsutil: Add a memrchr implementationJohn Thacker1-0/+3
Use the system memrchr if found, otherwise use a very basic non optimized implementation
2023-10-12wsutil: Do not use built in strcasestrJohn Thacker1-3/+0
System implementations of strcasestr are locale dependent; even though we always force to a UTF-8 locale, the Turkic languages produce a different result, as the upper case of i is U+0130, Latin Capital Letter I With Dot Above, and the lower case of I is is U+0131, Latin Small Letter Dotless i. For the purposes of dissectors we want the locale-independent ASCII search. (There may be exceptions in some user-facing GUI code.) FreeBSD, NetBSD, and macOS (but not OpenBSD currently) provide strcasestr_l, which could be used with the NULL (C) locale to produce the desired result.
2023-09-20CMake: Remove an unneeded definitionGerald Combs1-5/+0
We've required PCRE2 since b9f2e4b7fa.
2023-09-11Add a routine to format an nstime as an ISO 8601-style date/time.Guy Harris1-0/+3
This replaces code in both absolute_time_string(), in capinfos, and set_abs_ymd_time(), in libwireshark. Like absolute_time_string(), it reports, in the formatted string, an error if the seconds value in the nstime can't be converted to a struct tm (looking at *you*, Visual Studio C library), Have that routine handle all time precision values from 0 (seconds) to 9 (nanoseconds). Add a ws_gmtime_r(), matching ws_localtime_r(), for use by that routine.
2023-09-05CMake: Add missing configure check for timegm()João Valverde1-0/+3
We have code that conditionally uses timegm() in time_util.c, but no configure check for it. Fix that.
2023-09-03Build with NetBSD's strptime()João Valverde1-0/+3
Replace our strptime code, which is from gnulib, with the simpler and better NetBSD implementation. This changes the ws_strptime() stub to unconditionally use the internal implementation. Previously it would use the system implementation of available. This is still possible but is opt-in, i.e., code should add the necessary #ifdefs and assume responsability for handling non-portable formats or providing limited functionality on some platforms. Text import allows the user to specify the strptime() format freely, so in that case it makes sense to use the system's implementation, and pass the responsability for understanding the implementation and the supported specifiers to the user. Only fall back to our implementation if the system libc lacks a strptime().
2023-09-03Add portability wrapper for localtime_r()João Valverde1-0/+6
2023-08-30Adding HTTP/3 dissection to Wireshark.Anders Broman1-0/+3
This is a copy of MR #9330 all code and credit to Omer Shapira.
2023-05-26Fix missing config.h definitionsJoão Valverde1-0/+6
Fixes 8dc5d2d3486af6c00baa90704335769fe4a2e1c3.
2023-03-23dumpcap: LeakSanitizer issuesJohn Thacker1-0/+3
If AddressSanitizer is enabled, we build dumpcap with it, which can be useful for catching issues - at least when run standalone. Disable it when running in capture child mode, and ensure that the sanitizers don't change dumpcap's exit code, since capture/capture_sync uses the exitcode value and doesn't expect the sanitizer values. Also disable LSan if prctl(PR_GET_DUMPABLE) is 2 on Linux, since that means that the process will fail to run LSan and die with a fatal error in the attempt due to not being able to ptrace. It cannot be disabled through the normal method of using environment variables since not being dumpable also means that /proc/self/environ isn't readable. (LSan is able to deal with a dumpable value of 0, temporarily setting it to 1, but not 2, because it's not allowed to set it back to 2, due to CVE-2006-2451.) Fix #18907
2023-03-21Add AMR codec supportHarald Welte1-0/+3
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.