93620 Commits

Author SHA1 Message Date
Martin Mathieson
abc9adb069 ORAN FH CUS: Fix some issues with LAA section 2024-11-30 12:02:21 +00:00
Martin Mathieson
eed88666ab PTP: Fix pointer dereferences from previous commit 2024-11-30 09:38:18 +00:00
Danny Tsai
1300ada841 Adds consistent treatment for GAD ellipse orientation 2024-11-30 08:10:48 +00:00
Guy Harris
9a24ae406e More help output cleanup, making the output more alike.
Note that the -B argument is in units of MiB.

Put --update-interval in a "Capture display" section for TShark, as it
affects how the output is displayed (printed).  Don't duplicate it for
Wireshark, and put it at the end of the list.

--only-protocols takes a list of protocol, not a single protocol; make
the Wireshark output match the TShark output.
2024-11-29 22:45:44 +00:00
Martin Mathieson
9d90886858 eCPRI: Some updates for Message type 5 2024-11-29 22:32:38 +00:00
Ignacy Gawędzki
585af99604 Add missing packet-ipv6.h to DISSECTOR_PUBLIC_HEADERS
In commit 1c0f9cd3aef81ce76360af4d094b450e34b1e251, inclusion of
packet-ipv6.h was added to several installed files, but the file
itself is not installed.

Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr>
2024-11-29 20:50:49 +00:00
Gerald Combs
9e3c26f227 checkAPIs: snprintf updates
Make snprintf+strlen an error, and add a check for complex uses of
snprintf.
2024-11-29 18:54:46 +00:00
Guy Harris
ec09e664a0 Document --update-interval capture option better in help messages.
Wireshark supports it as well, so add it to ui/commandline.c.

Also, note that the number specified is in units of milliseoncds.
2024-11-29 00:05:00 -08:00
Guy Harris
413ad57730 commandline: use g_get_prgname() in error messages.
For the main GUI application for a given application favor, the
lower-cased version of the application flavor name happens to be the
same as the name of the application as a command, but don't rely on
that.
2024-11-28 23:07:03 -08:00
Guy Harris
55ddbd3101 Use g_get_prgname() to get the program name.
Have programs set the program name, at the beginning of main(), with
g_set_prgname().  That lets other code call g_get_prgname() to get the
program name.

This lets us replace a bunch of xxx_cmdarg_err() and
xxx_cmdarg_err_cont() routines with common code, as they differ only in
the command name printed in error message, and the common routine can
use g_get_prgname().

This also means that ws_log_init() doesn't need to be passed the
program name; it can juse use g_get_prgname().  The same applies to
extcap_log_init(), which calls ws_log_init().

While we're at it, have a common routine for extcaps to use ws_logv() to
log warnings, replacing some other xxx_cmdarg_err() and
xxx_cmdarg_err_cont() routines.

Use g_get_prgname() in ws_getopt.c; this means that you don't run the
risk of a pathname, rather than a command name, show up in the error
message.
2024-11-29 05:29:56 +00:00
Martin Mathieson
ca8c20821d More checking ett entries are registered 2024-11-28 23:55:29 +00:00
John Thacker
5459d6a091 UDP Multicast Stream: Use UDP datagram length for bandwidth
When determining how many bytes are transferred on UDP multicast
streams, use the UDP datagram length instead of the frame length
from the frame that sent the tap. The latter isn't correct when
there's IP fragmentation, because only the last fragment's frame
length gets counted without knowing all the frames that were used
to reassemble the current IP packet.

This method ignores overhead at layers before UDP; some users might
wish that at least the IP header if not the link layer frame header
also be accounted for. Counting the link layer frame header is more
difficult because of tunneling and encapsulations like DVB-S2 Baseband
Frames that can contain more than one IP packet. Consistently handling
the same multicast being captured with different link layers (e.g. a
Linux "cooked capture" over the "any" device vs a standard Ethernet
link layer) is also difficult.

Also switch total bytes for the entire stream to a 64 bit integer.

Fix #20253
2024-11-28 20:00:46 +00:00
Dr. Lars Völker
41922e0e0f PTP: PTPv2 Analysis should not match minor version
This patch allows to selection matching behavior.

Closes: #19967
2024-11-28 17:38:19 +01:00
John Thacker
63aa7af20c ftypes: Unify some of the "compatible types" handling
The ftypes are divided into equivalence classes of compatible types.
Multiple fields can be registered to the same abbrevitation so long
as all the fields have the same type. The handling is inconsistent
and scattered, however.

README.dissector gives a list of the types and one set of classes.
proto.c has an implementation, used only when hf conflict check is
turned on when compiling.
ftypes.c has an implementation, used in Lua for registering ProtoFields.
The most consequential version is in the DFilter semantic check, which
determines whether a filter is considered valid at all based on which
fields can be compared. It also determines the type to use when
converting various literal tokens to fvalues. (Note that this does
not always work properly, both for arithmetic operation with multiple
operands, and for fields that multiple compatible types registered,
but where one type is more restrictive in what literals it accepts.)
None of these are quite the same.

Have proto.c's hf conflict check use the same function in ftypes.c
used by Lua registration. Add some types to that function so that
it splits the difference between README.dissector and the dfilter
semcheck version. (The differences are with the time types and
whether the OID group is part of the BYTES group.) Add some
comments to the implementations where they differ. Move FT_AX25
in the README to the STRING group, as already done in the dfilter
semcheck as part of commit 92d958ad45a500d8074c7ca9f393eb41619a5df7.
2024-11-28 13:18:53 +00:00
John Thacker
447e387749 UDP Multicast Stream: Fix a bunch of leaks
Actually free the large buffers when resetting the tap.

Only shallow copy addresses when looking up the temporary key.
When creating a permanent new stream entry, then do a full copy.

Free addresses when we're done with them. Use copy_address_wmem
for NULL scoped memory as well, just to remind of the need to free them.
2024-11-28 11:59:20 +00:00
Stig Bjørlykke
1833edb5e7 nas_eps: Fix a TLV PDU type
Also fix TLV PDU type for "UE coarse location information UE coarse
location information" in nas_emm_sec_mode_comp().
2024-11-28 08:34:43 +01:00
Miklos Marton
9f9f39a28b epan/isobus-vt: parse 4 bytes for the value of the Change Attribute command 2024-11-28 07:14:44 +00:00
Jim Borden
8b88592147 Update file packet-blip.c 2024-11-28 06:15:46 +00:00
Darius Davis
6611c02d30 Remove two trivial extraneous comments.
One was rendered nonsensical with the C99 conversion (commit
c8e41384e94); The other adds no value and its appropriateness is
questionable.
2024-11-28 14:57:32 +10:00
John Thacker
1827d55967 dfilter: FT_GUID is not a bytes type
FT_GUID is not a bytes type, and is not compatible with the FT_BYTES
family. This has been the case since 923855bb20845f55472dfe8e62b7b43660f2f63b
in order to support both big and little endian GUIDs.

This prevents:
[GLib CRITICAL] -- g_bytes_compare: assertion 'bytes2 != NULL' failed
(and always returning "equals") when comparing a member of the bytes
equivalence class on the left hand side to a FT_GUID on the right hand
side of a filter comparison (e.g. eth.addr == smb2.client_guid), and
when the FT_GUID is on the left side, doing a memcmp with type-punning
of the byte type to a e_guid_t.

Also, use guid_cmp from "epan/guid-utils.h" to compare the e_guid_t
structs element by element instead of using memcmp.
2024-11-27 20:24:28 -05:00
Gerald Combs
039b587fdc wsutil: Add an application flavor API
Remove the configuration namespace routines and macros in
filesystem.[ch] with an application flavor API defined and implemented
in application_flavor.[ch].
2024-11-27 22:21:43 +00:00
Gerald Combs
2d19d6432b Move .well-known to the repository root
[skip ci]
2024-11-27 13:07:49 -08:00
Gerald Combs
de4e84f086 Add .well-known/funding-manifest-urls
https://floss.fund/funding-manifest/

[skip ci]
2024-11-27 12:39:12 -08:00
Eugène Adell
45c8bf0794 Qt: Window Scaling Bytes fixed for RAW SEQ numbers 2024-11-27 19:25:56 +00:00
Stig Bjørlykke
deaa5fd994 wsutil: Add Locale prefix to LC_TYPE
Add "Locale:" prefix to LC_TYPE to better align values.
2024-11-27 15:21:19 +00:00
John Thacker
3787caf581 asn2wrs: Don't use implicit -1 choice tags in value strings
When parsing a CHOICE type with untagged choices that are themselves
CHOICEs (and implicit tagging instead of AUTOMATIC tagging), we
set the tag as a special value of -1 so that dissect_ber_choice()
will know to try various choices at the next level.

(This is an internal tag value not something encoded in the packet.
The tag as actually encoded is from the type ultimately chosen,
and should be unique once all the choice levels are traversed,
see ITU-T X.680 29.3 and the examples in 29.9.)

We add to the tree an item that represents which choice was taken;
rather than adding a single item that reflects the ultimate choice
we add items for each level of choice. Those items get value strings -
the value string values can either be directly from the tags used in
the CHOICE, or can be assigned incremently from 0 enumerating the
choices. We shouldn't use these special tag numbers of -1 in a value
string for the choice; we should always fall back to assigning values
for each choice enumerated from 0.

Most of the time our existing checks catch this either at least one
of the tags will be something other than a CHOICE, and thus will have a
different tag class, or AUTOMATIC tagging is used.) However, if all the
choices of a CHOICE are themselves a CHOICE and IMPLICIT tagging is used
the current checks don't catch it.

IPAddress from GPRSCDR is such a type. This change causes
iPBinaryAddress to have a value of 0 and iPTextRepresentedAddress to
have a value of 1, instead of both having a value of -1 (4294967295),
eliminating a large number of warnings of the form:

 [Epan WARNING] epan/proto.c:9249 -- tmp_fld_check_assert(): Field 'iPAddress' (gprscdr.iPAddress) has a conflicting entry in its value_string: 4294967295 is at indices 0 (iPBinaryAddress) and 1 (iPTextRepresentedAddress)

when ENABLE_CHECK_FILTER is defined (as in the Clang + Code Checks job)

This allows unique filtering on gpsrcdr.iPAddress and other fields using
that ChoiceType, like gprscdr.ggsnAddress.
2024-11-27 09:47:13 -05:00
Stig Bjørlykke
7206964cd2 nas_eps: Fix a TLV id
Fix TLV id for "UE coarse location information UE coarse
location information" in nas_emm_sec_mode_comp().
2024-11-27 12:59:59 +01:00
John Thacker
c37673799f Qt: Use SI prefixed units for TCP Stream Graph axes
Use QCPAxisTickerSi to show SI-prefixed units on the TCP Stream
Graph axes, as appropriate for each graph. (Sequence numbers could
be no units or units of bytes; Bytes was used already so it's used
here.)

Fix #20197
2024-11-27 07:06:16 +00:00
Gerald Combs
cecca236df ACP133: Fixup our conformance file
Fix

    ../../../../../epan/dissectors/asn1/acp133/acp133.cnf:23: UserWarning: Too few parameters. At least 1 parameters are required
      ##.CLASS OBJECT-CLASS
    ../../../../../epan/dissectors/asn1/acp133/acp133.cnf:29: UserWarning: Too few parameters. At least 1 parameters are required
      ##.END
    ../../../../../epan/dissectors/asn1/acp133/acp133.cnf:31: UserWarning: Too few parameters. At least 1 parameters are required
      ##.CLASS ATTRIBUTE
    ../../../../../epan/dissectors/asn1/acp133/acp133.cnf:42: UserWarning: Too few parameters. At least 1 parameters are required
      ##.END
2024-11-27 07:00:21 +00:00
Darius Davis
378e32a3a3 FAQ: Minor cleanups; Remove Yahoo Messenger content.
The Yahoo Messenger service has been defunct since August 2016
(according to Wikipedia), so it seems unnecessary to describe a Yahoo
Messenger protocol oddity in the FAQs.

Genus names are conventionally shown with an initial capital letter; I
guess this rule extends to mascot shark "species". :-)

Fix an incorrect reference which resulted from the movement of the
Ethereal naming discussion to the end of the document.

Remove a stray backtick.
2024-11-27 06:56:03 +00:00
Darius Davis
5f35b6be27 fuzzshark: Fix epan_dissect_run args.
Commit 2d34c48c changed the buffer argument to epan_dissect_run from a
"tvbuff_t *tvb" to a "const uint8_t *data".  This broke fuzzshark's
functionality without breaking its build under clang (which suppresses
"-Werror").  The resulting fuzzshark binaries would run and use a lot
of CPU while providing zero coverage.

Adjust fuzzshark to suit the changed prototype.  fuzzshark once again
achieves meaningful coverage.
2024-11-27 04:40:16 +00:00
Stephen Donnelly
3603225c51 erf-interface-id-fix Fix erf_interface_id_from_flags()
The erf_interface_id_from_flags() macro has an operator precedence error such that the mask is shifted before the comparison.

This causes the returned interface_id value to be incorrect on most trace files.

Fix adds brackets for operation order.
2024-11-27 15:41:15 +13:00
Martin Mathieson
67757085e7 Fix some more warnings from check_typed_item_calls.py 2024-11-26 23:24:44 +00:00
Jeffrey Goff
7b4aaa1735 Update Aruba GRE protocol values for three radio access points 2024-11-26 22:45:48 +00:00
John Thacker
d3dcb91574 dfilter: Fix Windows build
MSVC, after optimizing a function parameter to being unused, will then
warn about it, and if warnings are errors, will error out. Mark a
parameter used in an assert that can be optimized out as maybe-unused.
2024-11-26 17:17:50 -05:00
Darius Davis
1eef8dada6 Replace some g_strdup_printf with g_strdup.
When there are no substitutions being made, g_strdup_printf is
unnecessary.  Replace all such calls with g_strdup.
2024-11-26 17:14:10 +00:00
Martin Mathieson
a38a6cb4b9 ORAN FH CUS: Add/fix some Section type 4 details 2024-11-26 15:11:21 +00:00
John Thacker
08c0b9ea1f dfilter + ftypes: Add a "cast to double" function
Add support for converting to double to the integer, time, and IEEE
11073 floating point formats. Add a display filter function that
explicitly converts fields to these types, so that the result can
be used for further calculations and, e.g., put in a column.

Also add a float function

Fix #20219

(There might be value in having more implicit conversions, but that's
a bigger task.)
2024-11-26 13:35:16 +00:00
WFA-achuang
b007587c2c ieee80211: Add new fields in EHT operation and capabilities element 2024-11-26 10:11:02 +00:00
WFA-achuang
4d5a24abba ieee80211: Add new fields in Ext MLD Capa and Oper 2024-11-26 10:11:02 +00:00
Guy Harris
38ada3d860 cllog: distinguish between two file errors.
There's "the length field isn't a valid number" and there's "the length
field is a valid number but it's too large"; report them differently, so
it's obvious which one was encountered.
2024-11-26 01:07:55 -08:00
Darius Davis
9a1005cd4f cllog: Avoid a stack read overrun.
If parseFieldLength received a length of greater than 8 and parseFieldData was
not subsequently called, the memcpy at the end of cllog_read_common could read
beyond the end of the eight-byte buffer in logEntry.data on the stack.  This
condition could arise if the column header in a malicious input file stipulated
that the Length field appeared _after_ the Data field, or perhaps if the Data
field was absent.

The result would most likely be just some garbage data from the stack appearing
in the packet contents, but there's a chance it might also cause a crash if
length is large enough to read beyond the top of stack.

Clean up a related magic number "8" and an unnecessary loop counter.

Ping #19937
2024-11-26 07:58:32 +00:00
Tamas Regos
d32485ca49 Adding GSMTAP LTE RRC Channel name mapping 2024-11-26 07:56:56 +00:00
Darius Davis
5ff9024202 cllog: Add a file-format decoding test.
Added a trivial CL2000 capture file format sample, as obtained from:

    https://canlogger.csselectronics.com/clx000-docs/cl2000/log/index.html

The cllog parser is modified to recognize the "Logger type" name in
that sample capture, which differs slightly from that already known to
the parser ("CL2000" versus "CANLogger2000").  Corresponding changes
are made for the CL1000 capture file, also available on the above
website -- but not added here because it provides no additional
coverage beyond the "Logger type" value, and for CL3000 just for the
sake of consistency.

Add a python testcase to read the added file.

Additional testing with two further sample captures available from
https://canlogger.csselectronics.com/clx000-intro/log-file-tools/
revealed a defect which caused file parsing to terminate as soon as
any packet was shorter than 8 bytes; Fix it by accepting NUL to
terminate the packet (in addition to CR/LF).
2024-11-25 23:56:45 +00:00
Timo Warns
5ca7d39aaa GNSS: add dissector for SBAS L1 MT9
Add dissector for SBAS L1 MT9 (ranging function message)
2024-11-25 23:53:55 +00:00
John Thacker
c607060b91 dfilter: Extra value_string checking and comments
It's possible to register multiple fields to the same abbreviation.
We don't actually enforce field compatibility, but even if we did,
FT_FRAMENUM is considered compatible with other integer fields.
So it's theoretically possible to register a integer field with a
value string to the same abbreviation as a FT_FRAMENUM with a non-NULL
strings - FT_FRAMENUM overloads that field to store ft_framenum_type,
and treating it as a value_string *will* crash. (I don't believe
we have any such fields currently.)

Add a couple other comments regarding treatment of value strings -
we shouldn't actually optimize tests against strings that represent
value strings in cases where multiple fields are registered to the
same abbreviation and don't share exactly the same value string.
(See #19111 for a specific example.)
2024-11-25 23:51:06 +00:00
Gerald Combs
78a57e0389 docs: Add an initial Stratoshark man page 2024-11-25 23:44:55 +00:00
Chuck Craft
217871ec89 Qt: give lua menus a home in Stratoshark 2024-11-25 23:40:22 +00:00
Martin Mathieson
0bacb9ce3b Fix some item lengths 2024-11-25 22:40:26 +00:00
John Thacker
425a80d209 uat: Verify that a field is valid
Actually verify protocol field names for the Uat PT_TXTMOD_PROTO_FIELD
type, to keep from writing invalid entries to the field, and properly
show bad values.

The only current user of this is the I/O Graph UAT
2024-11-25 22:28:16 +00:00