Commit Graph

90552 Commits

Author SHA1 Message Date
John Thacker 4fb2ef8af8 extcap: Really don't load extcap interfaces if disabled
If the capture.no_extcap preference is set, really don't load the
extcap interfaces. Previously, the extcap interfaces were loaded
before the preference was read, because otherwise the extcap
preferences wouldn't be registered and properly read out of the
configuration file.

Wait until after that preference is read to register the
extcap preferences and then re-read just the extcap module
preferences from the configuration files. Make sure to check
other times when the preference may be changed, such as
switching profiles.

Write extcap prefs to a separate file so that they don't get lost
if the extcap interfaces aren't loaded and the prefs are then
written out. Continue writing them to the main file for backwards
compability.

Related to #15295. Cuts ~100 ms off the loading time of Wireshark
in a normal situation if the capture.no_extcap preference is set,
more if an extcap has some kind of issue that makes it take a long
time to load.
2024-02-18 20:23:39 +00:00
Martin Mathieson 48bb12831b Some spellings 2024-02-18 18:55:29 +00:00
Gerald Combs d7b2445089 [Automatic update for 2024-02-18]
Update manuf, services enterprise numbers, translations, and other items.
2024-02-18 18:14:33 +00:00
Gerald Combs deac878dd5 tools: Don't assume that Homebrew has Lua 5.1
[skip ci]
2024-02-18 10:12:37 -08:00
Darius Davis f91c6bc812 Tools: Use bsearch to look up vendor in pci-ids. 2024-02-18 17:55:56 +00:00
Martin Mathieson a9064a1048 PLDM: don't separately fetch field values - use _ret_uint() instead 2024-02-18 12:49:30 +00:00
Noan Perrot 887767433f VP9: Fix spatial layers label and add generated field 2024-02-18 12:47:18 +00:00
John Thacker a383ce12fb IPSec: Check ESP ICV with Extended Sequence Numbers
Implement checking the ESP ICV when Extended Sequence Numbers are
used. Add some entries to the UAT, with forwards compability, for
the sequence number size, which is transmitted out of band.

Fix #19658
2024-02-18 12:31:19 +00:00
John Thacker 270ad4feeb doc: Mention that Lua 5.3 and later doesn't work in the WSDG.
[skip ci]
2024-02-18 04:20:38 +00:00
Martin Mathieson 165cf06f5c Protobuf: add media type application/x-protobuf 2024-02-17 18:42:05 +00:00
Anders Broman dff1a79961 GTPv2:Use more proto_tree_add_bitmask_list 2024-02-16 20:29:12 +00:00
Gerald Combs b1bd18d826 macOS: Update our app bundle plist info
Remove CFBundleGetInfoString, which is deprecated, in favor of
NSHumanReadableCopyright. Use the same organization name there as we do
in our Windows resource files.

Ping #14407
2024-02-16 19:19:39 +00:00
Tobias Mueller 76cfa03d61 wireshark metainfo: Add a developer name tag 2024-02-16 19:18:05 +00:00
John Thacker e540c8777e Qt: Drop command line options when changing configuration profiles
The solution to #12331 makes command line options that change
preferences be reapplied when reloading Lua plugins.

The command line preference overrides should be either reapplied
or dropped when changing configuration profiles. Doing neither,
as currently, means that they are not reapplied when switching
but are reapplied when subsequently reloading Lua plugins, which
is confusing. Drop them, but we could change that decision.

Make sure that we set the pointer to NULL when freeing so that
we don't double-free.

commandline.h requires cfile.h to get the search direction enum.
2024-02-16 12:37:39 +00:00
Martin Mathieson 8b63b0243c PLDM: change some distracting formatting 2024-02-16 09:47:02 +00:00
John Thacker 456b8af98b doc: extcap_example.py SyntaxWarnings with Python3.12
Escape sequences either need \\ or raw strings, even in
docstrings.
2024-02-15 19:42:58 -05:00
Darius Davis 595359c793 Qt: Implement macOS "Show in Finder" in Cocoa.
Rather than shelling out to "osascript" and telling it to tell Finder to show
the file, we can directly use NSWorkspace's "activateFileViewerSelectingURLs:"
method to launch Finder and highlight the chosen file.  It's less code, runs
faster, and should be much less risky regarding special characters, string
encodings, etc.
2024-02-15 20:30:06 +00:00
RiyaDixit 775fedcef1 Adding PLDM dissector for FRU Specification 2024-02-15 19:02:29 +00:00
John Thacker e49da31a8d epan: Fix copy-paste error
Coverity CID 1592124
2024-02-15 09:36:23 -05:00
John Thacker 1307fa9226 extcap: Update comments about callback
extcap_foreach no longer exists. The extcap_cb_t is used with
extcap_run_one, and when operations are needed on multiple
extcaps they are run in parallel in multiple threads, since each
operations requires spawning a process.

Update the comments to note this, and that the return value is
no longer used.
2024-02-15 09:22:18 -05:00
John Thacker 5ed34995de extcap: Don't add args to a list just to destroy it
Allow cb_preference to take a NULL for the pointer to a list
of arguments. If the pointer is NULL, then free the argument list.
This keeps extcap_load_interface_list from creating a list that
is immediately freed.
2024-02-15 08:57:30 -05:00
Eugène Adell f1d0622b47 IPv6: Implementation of conversations with stream identifiers 2024-02-15 07:04:41 +00:00
Darius Davis 30c0b28f87 Qt: Implement "Show in Folder" using DBus.
On Linux (and presumably other DBus-using Unix-like OSes), right-clicking on a
file on the Welcome page and choosing "Show in Folder" would only ever open the
folder, and would not highlight the chosen file.

Adding DBus support to function desktop_show_in_folder allows for the file
itself to be shown -- subject to support from the user's desktop environment...
2024-02-15 06:59:42 +00:00
John Thacker 99df5f588b prefs: Read the old hidden column preference
Read the old obsolete hidden column preference and apply it.
This will convert it to the new value (and remove it) if preferences
are saved.

Follow up to 41930060b0
2024-02-14 19:27:42 -05:00
Gerald Combs d54031eda9 GitLab CI: Add release notes artifacts 2024-02-14 13:19:08 -08:00
John Thacker 8803d13aec stats_tree: Free the split string array
Fixup 53638f9ccf
2024-02-14 06:34:59 -05:00
John Thacker 49540ec646 columns: Allow any field expression syntax to be used in columns
Allow anything that can be used in a display filter to be used in
columns (with the exception that field references don't work without
a notion of a currently selected frame): display filter functions,
slices, arithmetic calculations, logical tests, raw byte addressing,
the layer modifier, display filter macros, etc., alone or in
combination.

Show the results and generate filters. Note that "resolved" values are
not yet supported. They make conceptual sense for some expressions
(e.g., if the layer modifier only is used) but not for others.
Perhaps resolution could be done as a final step in the filter before
returning values.

It would also be useful to be able to get the expected return type
of an expression, so that the functions for right justifying a column
or sorting numerically could work. Right now the results are treated
as strings even if the return field values are numeric.

Multifield columns (i.e., concatenation of field values) are currently
implemented using the OR operator.For backwards compability, continue to
support that. When a true logical OR would give a different result,
surround the expression in parentheses, which the multifield columns did
not previously support (due to the regex used instead of full filter
grammar parsing.)

Perhaps in the future we should introduce a separate operator for
concatenation, possibly only used in column definitions and nowhere
else.

Update release notes.

Fix #7752. Fix #10154. Fix #15990. Fix #18588. Fix #19076.
Related to #16181 - it's now possibly to define new display filter
functions so that is essentially solved, though I suppose there's
always room for more built-in functions.
2024-02-14 08:11:01 +00:00
Jiří Engelthaler 19904e94ae Modbus: Show register/coil number as generated without link to data
The register and coil numbers are a sequence of numbers starting from
the desired number (first register). This revision will change
the register item to a generated one without a direct link to the data.
2024-02-14 08:08:37 +00:00
Jiří Engelthaler 150e2ed18d Modbus: Decode data in Write function to Value
Decode data in the function Write Single Register/Write Multiple Coils
to Value.
Fix bitmask for boolean value in Read/Write Coils/Inputs.

Closing #19635
2024-02-14 08:08:37 +00:00
Gerald Combs e2862d77d6 DNS: Stats tree updates
Move our categories to the top level. Pin the totals node to the top.
2024-02-14 08:06:29 +00:00
Gerald Combs 53638f9ccf Stats tree: Change our path separator
Change our menu path separator to "//" similar to our filter buttons.
Change the "name" configuration element to "path", since it's a menu
path. Add a separate "title" element. This lets us use names like "Foo
I/O".
2024-02-14 08:05:24 +00:00
Martin Mathieson 28c42e2656 Some more spellings in dissector comments 2024-02-13 22:45:24 +00:00
Mathis Marion b2be437e39 Add EARO status codes from draft-ietf-6lo-multicast-registration-16 2024-02-13 17:17:37 +01:00
Mathis Marion e78684d793 Dissect P-field in Neighbor Discovery EARO option
This field is defined by draft-ietf-6lo-multicast-registration-16, and
is currently used by Wi-SUN.
2024-02-13 16:43:48 +01:00
Mathis Marion efa68ae1d7 Rename nd_opt_earo_flag_val 2024-02-13 16:43:48 +01:00
Joel Colledge 285f9ec650 DRBD: Add support for dissecting the DRBD "lb-tcp" transport
Since DRBD 9.2.6, a load-balancing transport is available for DRBD. This
is called "lb-tcp". Add support for dissecting this format.

This transport is a wrapper around the plain DRBD format. Each lb-tcp
packet contains part of this DRBD stream. The DRBD packets may be broken
across multiple lb-tcp packets. Conversely, one lb-tcp packet may
contain multiple DRBD packets.

One lb-tcp connection consists of multiple TCP streams. We cannot rely
on having all of these streams in the capture. Even when we do, it is
difficult to associate them with each other. Hence we decode each TCP
stream separately and accept that we may not be able to dissect every
DRBD packet fully.

In practice, most lb-tcp payloads do start on a DRBD packet boundary, so
the result is still very usable.
2024-02-13 10:47:51 +00:00
Joel Colledge 1e067dc17d DRBD: Add support for new versions of P_OV_RESULT and other packets 2024-02-13 10:47:51 +00:00
Martin Mathieson f845ce118e check_spelling.py: add globs 2024-02-13 09:31:56 +00:00
Darius Davis cf22e64b21 X11: static-ify the generated dissector.
Many of the generated "const" fields can be made static.  For local variables,
this means that the compiler will no longer emit code to allocate the structure
on the stack and initialize it upon each function entry -- 29 kBytes of code in
total gets removed by this change -- which is surely a performance win when
dissecting this protocol.

Interestingly, libwireshark.so ends up growing overall due to the addition of
52 kBytes of relocation entries to patch up references within the relocatable
read-only data section.  Clearly the generated code was more space-efficient
than the relocation entries...
2024-02-13 08:34:34 +00:00
Darius Davis 83bff589ea X11: update to the latest xcbproto and Mesa.
mesa version 24.0-branchpoint-1188-gc3062e3402f
xcbproto version xcb-proto-1.16.0-2-g1388374

Add GestureClass to the unused structures list.
2024-02-13 08:34:34 +00:00
Darius Davis 556e604e12 X11: Revert part of efcaa68807.
The X11 dissector was manually updated to static-ify some symbols, but this was
done without updating the scripts used to generate that dissector.

Let's temporarily roll back those changes so we can cleanly update the X11
dissector.
2024-02-13 08:34:34 +00:00
Guy Harris 37937ef514 candump: use WTAP_ENCAP_SOCKETCAN, not WTAP_ENCAP_WIRESHARK_UPPER_PDU.
WTAP_ENCAP_SOCKETCAN suffices, and doesn't add a bunch of upper PDU tags
that provide no additional information.

While we're at it, rename candump_write_packet() to
candump_gen_packet(), as it doesn't write anything to a file.
2024-02-12 21:46:30 -08:00
Gerald Combs b7b7a6ce96 macOS: Try to keep launchctl from failing in ChmodBPF
Run `launchctl bootout` prior to running `launchctl bootstrap`. This
should hopefully avoid the error

Bootstrap failed: 5: Input/output error

if we're already bootstrapped and keep the postinstall script from
failing.

Fixes #19527
2024-02-12 19:20:53 -08:00
Guy Harris da3a73d68c busmaster: use g_htonl() rather than g_ntohl().
They do the same thing, but this makes it clear that we're taking a
value in host byte order and converting it to network byte order.
2024-02-12 18:56:59 -08:00
John Thacker 49934c1d14 dfilter: Add a flag to return field values for the tree root
In many grammatical contexts fields are only tested for existence
instead of loading the values into a register, because that's all
that is needed to determine if a filter passes or not. Add a
dfilter option to load the field values from the tree and return
them when a field (including field at a certain protocol layer) is
the root of the filter syntax tree.

This is useful for columns, especially for parsing columns defined
with the layer operator, but it can't completely replace the current
custom column handling because we don't yet return exactly which
hfinfo was present, if more than one has the same abbreviation, and
it's possible for fields with the same abbreviation to have different
strings, and hence different "resolved" values.

$ ./run/dftest -s "@ip.proto#1"
Filter:
 @ip.proto#1

Syntax tree:
 0 FIELD(@ip.proto#[1:1] <FT_BYTES>)

Instructions:
 0000 CHECK_EXISTS_R   ip.proto#[1:1]
 0001 RETURN

$ ./run/dftest -s "@ip.proto#1" --return-vals
Filter:
 @ip.proto#1

Syntax tree:
 0 FIELD(@ip.proto#[1:1] <FT_BYTES>)

Instructions:
 0000 READ_TREE_R      @ip.proto#[1:1]  -> R0
 0001 NO_OP
 0002 RETURN           R0

Related to #18588
2024-02-12 20:39:12 -05:00
Gerald Combs 098462e703 CMake: Fix some version checks
Make sure we check our minimum macOS version when we check our Qt version
so that we don't clobber the value set by CMAKE_OSX_DEPLOYMENT_TARGET.
2024-02-12 17:11:05 -08:00
Guy Harris 38a29e82cc socketcan: the priority/VCID field in the CAN XL header is big-endian.
The joys of dealing with history....
2024-02-12 13:47:51 -08:00
Gerald Combs a018829a36 Falco bridge: Sort our Container I/O totals 2024-02-12 10:47:55 -08:00
Gerald Combs 0e5416efbe Falco bridge: Fix our default container name
Use "host" to match libsinsp.
2024-02-12 08:42:23 -08:00
Martin Mayer fc6255688d OCP.1: Add message size check in loops
Add checks for illegal message lengths which could possibly cause
an infinite loop in malformed packets with message size = 0.
2024-02-12 15:10:47 +00:00