Commit Graph

82999 Commits

Author SHA1 Message Date
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
John Thacker 2df6ab0906 ieee80211: BASE_HEX and BASE_CUSTOM are mutually exclusive 2021-12-12 17:09:34 -05:00
John Thacker 9a054d7837 IEEE80211: Remove ENC_NA from string encoding
With the recent commit changing the pre commit check, need
this to make a different change.
2021-12-12 21:41:35 +00:00
John Thacker a68be23b7e proto: Don't crash on adding 64 bit BASE_CUSTOM column
Similar to elsewhere, in proto_custom_set don't call hf_try_val[64]_to_str
if BASE_CUSTOM is set, even if hfinfo->strings is non-null. Fix #17762.
2021-12-12 21:22:57 +00:00
Oscar Gonzalez de Dios e29c6691d0 PCEP: As per RFC 8408, RP object can have optional TLVs.
The decoding of TLVs in RP object is added
2021-12-12 19:45:22 +00:00
Gerald Combs a6cffab3a1 [Automatic update for 2021-12-12]
Update manuf, services enterprise numbers, translations, and other items.
2021-12-12 17:54:42 +00:00
John Thacker 69641adfca doc: Add lbmr_* -z stats to tshark manual
Add some more undocumented -z statistics. Ping #8353.
2021-12-12 14:21:15 +00:00
João Valverde f52611de89 Remove obsolete macro HFI_DECLS 2021-12-12 13:24:51 +00:00
João Valverde b332c3dd0b Netlink netfilter: Fix a pre-commit check
epan/dissectors/packet-netlink-netfilter.c:  FT_UINT32:        proto_tree_add_item(tree, hf_nfq_hwaddr_addr, tvb, offset, addrlen, [[ENC_BIG_ENDIAN]-->[ENC_NA]]);

(These messages are wrong, this field is FT_ETHER, not FT_UINT32).
2021-12-12 13:24:51 +00:00
João Valverde 47651506bf Netlink psample: Fix a pre-commit check
epan/dissectors/packet-netlink-psample.c (15 (of 15) fields)
netlink.psample.cmd doesn't match PROTOABBREV of netlink-psample
netlink.psample.attr_type doesn't match PROTOABBREV of netlink-psample
netlink.psample.iifindex doesn't match PROTOABBREV of netlink-psample
netlink.psample.oifindex doesn't match PROTOABBREV of netlink-psample
netlink.psample.origsize doesn't match PROTOABBREV of netlink-psample
netlink.psample.sample_group doesn't match PROTOABBREV of netlink-psample
netlink.psample.group_seq_num doesn't match PROTOABBREV of netlink-psample
netlink.psample.sample_rate doesn't match PROTOABBREV of netlink-psample
netlink.psample.tunnel doesn't match PROTOABBREV of netlink-psample
netlink.psample.group_refcount doesn't match PROTOABBREV of netlink-psample
netlink.psample.out_tc doesn't match PROTOABBREV of netlink-psample
netlink.psample.out_tc_occ doesn't match PROTOABBREV of netlink-psample
netlink.psample.latency doesn't match PROTOABBREV of netlink-psample
netlink.psample.timestamp doesn't match PROTOABBREV of netlink-psample
netlink.psample.proto doesn't match PROTOABBREV of netlink-psample
2021-12-12 13:24:51 +00:00
João Valverde 6ec429622c fix-encoding-args.pl: Strings ftypes don't need "ENC_NA" 2021-12-12 13:24:44 +00:00
João Valverde 04d25fb64c fix-encoding-args.pl: Remove dead code 2021-12-12 13:12:56 +00:00
João Valverde cace66d45d The macro 'va_copy' is C99, use that 2021-12-12 11:56:17 +00:00
João Valverde 7cffcfa835 dfilter: Remove a default switch case 2021-12-12 10:16:27 +00:00
Роман Донченко a027211ea2 jpeg: Implement dissection for Exif-specific IFDs 2021-12-12 07:29:31 +00:00
Роман Донченко e5e2974546 jpeg: Don't create an unnecessary dummy tree item
Exif does not define the order of elements in the Exif data, so if there's
empty space in front of IFD #0, it might be used for other IFDs or standalone
values.

As such, don't create a dummy tree item covering that space.
2021-12-12 07:29:31 +00:00
Moshe Kaplan 7567432ec4 Add remaining header files to Doxygen
Add @file markers for remaining
header files so that Doxygen will
generate documentation for them.
2021-12-12 03:56:35 +00:00