Commit Graph

83015 Commits

Author SHA1 Message Date
João Valverde b054f9aee6 ASN1: Convert I/O from GLib to stdio.h 2021-12-17 19:34:54 +00:00
João Valverde 64e8a2817e Add wsutil/glib-compat.h to wireshark.h
We are already adding glib.h, we should include glib-compat.h
as well in the base environment.
2021-12-17 19:34:54 +00:00
João Valverde 689976477a Add inttypes.h to wireshark.h
For convenience, having to add this header constantly is annoying
and kind of pointless, now that we are relying more on stdio.h.
2021-12-17 19:34:54 +00:00
Gerald Combs 271ab568b0 GitLab CI: Enable ccache in the "No options" job. 2021-12-17 18:53:53 +00:00
Gerald Combs f877e26b31 GitLab CI: Add back a missing variable. 2021-12-17 08:49:02 -08:00
Martin Mathieson 834312cb62 DCT2000: For ipprim frames, show header even when no payload dissector 2021-12-17 16:37:22 +00:00
John Thacker b4054d3879 text_import: Time delta between packets without timestamp
The "Import from Hex Dump" time delta for packets without a timestamp
was changed to be a nanosecond, but the time resolution for the file
created by import_text_dialog is the default, microseconds. Until
that is configurable, the time tick used needs to be microseconds like
it was before.

Clean up the code so that it's a little more consistent about when
and how the extra time tick is added, namely:
1. If there is no time format passed in.
2. If time format conversion for the packet fails for any reason.

We don't add an extra delta in other situations, e.g. if packets just
happen to have the same valid time value.

Fix #15562.
2021-12-17 13:37:29 +00:00
John Thacker 5f5f03f0e8 text_import: Fix spelling and grammar 2021-12-17 12:55:52 +00:00
Gerald Combs 07c4059277 GitLab CI+Qt+Docs: CMAKE_PREFIX_PATH updates.
Qt's documentation recommends using CMAKE_PREFIX_PATH to designate your
Qt installation prefix: https://doc.qt.io/qt-5/cmake-get-started.html.
Do so in GitLab's CI and update the Developer's Guide.
2021-12-16 18:47:18 -08:00
Gerald Combs 7d88f1e2b1 GitLab CI: More Windows environment updates.
Use Visual Studio's CMake in the MR build. Use CMAKE_PREFIX_PATH as
recommended by https://doc.qt.io/qt-5/cmake-get-started.html
2021-12-16 17:00:02 -08:00
Gerald Combs 476bf62494 GitLab CI: Remove a no-longer-needed build.
Remove the -DENABLE_PCAP=OFF build from the "macOS Arm Package" job.
It's no longer needed since we now have a "No options" job.
2021-12-16 22:51:47 +00:00
Dario Lombardo 1f7c4eff30
ci: add no options job.
Fix: #17786.
2021-12-16 22:54:21 +01:00
João Valverde 9ebeb39395 CMake: Be stricter about MSVC requirements 2021-12-16 12:19:22 +00:00
João Valverde 5bba669579 Remove some lingering uses of g_assert()
Also replace some incorrect uses of g_assert_true().

  g_assert_true -> g_assert -> ws_assert
2021-12-16 10:19:45 +00:00
Jaap Keuter 9539f4e1d6 MMDBR: Don't pretend to be a multithreaded writer 2021-12-16 09:28:54 +00:00
Antoine Gardiol 4248e5b665 5co-legacy: New FiveCo Legacy dissector 2021-12-16 09:13:37 +00:00
Brian Sipos a8b4bffab5 TCPCL: Display extension names from dissectors
Dissector names allow extension items to be given standard text names.
This also uses a protocol-in-name-only to avoid the frame.protocols field from containing ":tcpcl:tcpcl:tcpcl:..." for each extension dissection.
2021-12-16 05:13:52 +00:00
João Valverde 06e6f7d922 Docs: First pass to update README.developer to C11
Update to reflect the transition from C99 to C11. Remove obsolete
comments and recommendations. Add a bit about transitioning to C
fixed width types.

Related to #17768.
2021-12-16 04:59:04 +00:00
Gerald Combs 606bc27777 GitLab CI: Update our Windows environments.
Use Visual Studio's CMake where we can.
2021-12-15 18:51:20 -08:00
John Thacker a74fabf73f text_import: Parse entire timestamp from hex dumps
_parse_time, which uses g_strlcpy, expects that end_field points
to the position after the end of the field (such as the \0.)
text_import_regex handles this correctly, but when importing from
hex dumps the last character of the timestamp was being cut off,
which makes a big difference when fractional seconds are not used.
2021-12-16 00:07:08 +00:00
João Valverde 9d97b8e361 JSON: Remove unnecessary hfindex lookup 2021-12-15 20:49:51 +00:00
Gerald Combs c324696504 CMake: Update a Windows SDK version check.
C11 support requires a newer Windows SDK. Add version checks and
workarounds as needed. Remove a redundant CMAKE_C_COMPILER_ID check. Add
a description of C5105 to match our other warning adjustments.
2021-12-15 10:54:02 -08:00
João Valverde 81de22e81a wslog: 'struct timespec' is C11, use that 2021-12-15 15:00:59 +00:00
João Valverde fe30cf2f8a wsutil: Add portability wrapper for clock_gettime(CLOCK_REALTIME) 2021-12-15 15:00:59 +00:00
João Valverde e877460a9e Revert "The function timespec_get() is C17 so assume we have it"
This reverts commit 8b15d0e641.
2021-12-15 15:00:59 +00:00
John Thacker 67a4e70382 wiretap: have dummy IDBs set OPT_IDB_TSRESOL if needed
In wtap_dump_init_dumper(), when constructing a dummy IDB for files
that don't have one, if the tsprecision value is anything other than
the default, then the OPT_IDB_TSRESOL option also needs to be set.
Without it, for a pcapng the timestamps will be written according to the
tsprecision and time_units_per_second values, but when it is read,
the values will be interpreted incorrectly.

It would probably be better if the consistency of these values were enforced.
2021-12-15 14:04:58 +00:00
Martin Mathieson bf15343241 Fix some spelling errors 2021-12-15 12:28:16 +00:00
João Valverde 663c1655b4 CMake: Use CMAKE_C_STANDARD to require C11
Related to #17768.
2021-12-15 10:41:45 +00:00
João Valverde 5623e60375 Revert "CMake: Change our configuration to enable C17"
This reverts commit 0781007df4.
2021-12-15 10:39:29 +00:00
John Thacker 85a8de25a4 blf: Set OPT_IDB_TSRESOL
In addition to setting tsprecision and time_units_per_second, add
the OPT_IDB_TSRESOL option as well, because pcapng expects that to
be set if tsprecision is anything other than the default.
2021-12-15 07:22:51 +00:00
Richard Sharpe 2b2c81a551 ieee80211-radiotap: Fix a problem with S1G 0-length PPDUS.
The code was not advancing the offset correctly and mis-dissecting NDP
frames.
2021-12-15 07:06:33 +00:00
João Valverde fa41e2244c wmem: Optimize wmem_strdup_vprintf()
Because we already have the length of the output string after
calling vsnprintf(), we should avoid calling wmem_strdup(), which
will ignore that and recompute the length.

Increase the buffer size to a value that seems reasonable to
minimize the chance of a second call to vsnprintf().
2021-12-15 06:48:24 +00:00
Joakim Karlsson b46bdd77fc JSON: add handling of 3GPP NAS-5G IEs 2021-12-15 06:33:40 +00:00
AndersBroman d4e5f72fe2 RTCP: fixed a possible sigsegv 2021-12-15 06:32:29 +00:00
AndersBroman 1f91d4c9d2 RTCP: Make it possible to do decode as SRTCP 2021-12-14 19:31:47 +00:00
João Valverde cf3cb3a695 wslog: Avoid logging any output to stdout
For historical reasons our logging inherited from GLib the logging of
some levels to stdout. Namely levels "info" and "debug" (to which we
added "noisy").

However this practice is discouraged because it mixes debug output
with application output for CLI tools and breaks many common usage
scenarios, like using tshark in pipes.

This change flips the logic on wslog to make logging to stderr the
default behavior.

Extcap subprocess have a hidden dependency on stdout so add that.

Some GUI users may also have a dependency on stdout. Because
GUI tools are unlikely to depend on stdout for programatic output
add another exception for wireshark GUI, to preserve backward
compatibility.
2021-12-14 12:05:41 +00:00
João Valverde 77b6bca387 Convert wmem I/O to use stdio.h 2021-12-14 11:23:05 +00:00
João Valverde 8b15d0e641 The function timespec_get() is C17 so assume we have it 2021-12-14 11:23:05 +00:00
João Valverde 0781007df4 CMake: Change our configuration to enable C17
For now it only includes MSVC, GCC and clang.

Related to #17768.
2021-12-14 11:23:05 +00:00
Martin Mathieson b76a2b7a23 O-RAN FH CUS: add some comments around u-plane dissection 2021-12-14 10:54:26 +00:00
Chuck Craft 4e92b7c762 win/cmake: missing rc files to set icon and copyright
Closes #17761
2021-12-14 05:45:12 +00:00
John Thacker 9338aec867 BER: Fix typo swap in error message 2021-12-13 19:48:31 -05:00
João Valverde fb0e1a4907 regex: Remove requirement for ssize_t
The type ssize_t is not available on Windows. Because this is
used in the public API we must provide a definition for it.
To avoid having to add a header to fix this use a size_t in
the API instead, and assign SIZE_MAX to represent a null
terminated string.
2021-12-13 23:57:32 +00:00
Guy Harris ff7a5c87e9 macos-setup.sh: don't build libxml2 with Python.
At least on Monterey, with Xcode 13.1, the linker whines that we weren't
granted the Sacred and Holy Right to link with the Python 2.7 framework.
As far as I know, we have no need to use that framework, so configure it
out.
2021-12-13 14:41:13 -08:00
Federico Di Pierro 41bfc91124 dissectors: re-generated sysdig events using provided tool.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2021-12-13 14:30:30 +00:00
Federico Di Pierro 6b1657d85d tools: updated generate-sysdig-event python script.
Point it to fetch files from falcosecurity/libs repo.
Moreover, add support for blank spaces in param names.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2021-12-13 14:30:30 +00:00
Federico Di Pierro c22b8bcb5f dissectors: various fixes to sysdig packet dissector.
Mainly:
* added 3 new procexit event params
* avoid sigsegv when sysdig event has
a number of params that is
greater of the wireshark one.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2021-12-13 14:30:30 +00:00
Moshe Kaplan 6ecc6a2ab4 epan/addr_and_mask.h: Document functions
Document functions in epan/addr_and_mask.h
so doxygen documentation is generated for them.
2021-12-13 12:42:04 +00:00
Richard Sharpe 4916bc024e ieee802-radiotap: Fix a silly issue with the S1G radiotap dissector.
The dissector was not correctly handling the Tag and Length.
2021-12-13 09:33:14 +00:00
João Valverde f5f8d9ebb6 dfilter: Fix token associativity
TEST_EQ and TEST_NE are unused. Replace by the correct values
and add missing token to string representations.
2021-12-13 01:24:18 +00:00