Commit Graph

90552 Commits

Author SHA1 Message Date
Martin Mathieson 80ced3ccb5 ERF: ignore a non-contigous mask 2024-02-02 12:11:10 +00:00
Pau Espin ad5439e064 gsup: PDP Address IE: Update naming and improve dissecting
This IE has been recently renamed in GSUP protocol spec [1] and main
implementation (libosmocore) [2] from "PDP Type" to "PDP Address",
update it here too.
While at it, properly dissect the type_org, type_nr and address buffers.

[1] 602fabc6d5
[2] 74ee02420a
2024-02-02 07:26:51 +00:00
John Thacker 546d8763e9 GTPv2: Handle EPS Security Context long EAR data
Similar to the UMTS MM Context, when the Extended Access
Restriction Data length is greater than 1, handle the length
but indicate that we don't dissect it yet.

Also fix two of the UMTS MM Context expert infos being added to
the wrong tree.

Fix #19630
2024-02-02 07:20:33 +00:00
John Thacker b69943609a extcap: Fix some leaks of argument settings 2024-02-02 07:19:28 +00:00
Stephen Donnelly 15c4bccee1 Updated to use new PI_RECEIVE and PI_INTERFACE extert Info categories 2024-02-02 07:18:00 +00:00
Stephen Donnelly 1e0e261b23 Separate ERF Expert Info fields
Separate out distinct expert info fields
Remove obsolete if(tree) tests
2024-02-02 07:18:00 +00:00
Stephen Donnelly 5e74e92934 ERF Interface Id Extension
Move common #defines to erf_record.h
Add macro for erf_interface_id_from_flags()
Fix duplicate proto fields
Replace int with gboolean
2024-02-02 07:18:00 +00:00
Stephen Donnelly adfa18fe50 Endace ERF Interface Id extension
The Endace ERF format has extended the 'Interface Id' from 2 bits (interface 0-3) to 3 bits (interface 0-7).
The Interface Id high order bit is not adjacent in the flags field.

Extend wtap handling for ERF records.
Extend epan dissection and display of ERF format.
The existing erf.flags.cap field is retained and extended to 0-7.
A new erf.flags.if_raw field is added for the unformatted value.

Note proto_tree_add_split_bits_item_ret_val() cannot be used here because it only supports input from the tvb and not from a non-tvb value.
2024-02-02 07:18:00 +00:00
Darius Davis bf79e63b1d const-ify enum introspection data.
This moves 15 kBytes of data to a read-only data section.
2024-02-02 15:43:15 +10:00
Darius Davis 0db3d8e012 const-ify proto/handoff/tap registration data.
This moves 54 kBytes of data to a read-only data section.
2024-02-02 12:23:15 +10:00
John Thacker 7f7650b945 wslua: Allow UInt64 to be passed as value to a boolean field
Allow a UInt64 to be passed as the value for a boolean field,
to support passing in a value to a boolean field that has a
64-bit bitmask.

Fix #19552
2024-02-02 02:01:13 +00:00
Guy Harris 8a14ae6304 Add some new expert info groups.
PI_RECEIVE is for indications from the process of receiving packets,
such as CRC errors, short/long frame indications, etc..

PI_INTERFACE is for indications from an interface (other than receive
indications), such as out-of-buffrs indications, hardware errors,
changes in link speed, etc..

See !14177 for some discussion of this.
2024-02-02 00:40:43 +00:00
Gerald Combs bfa4a36313 FAQ: Fix our Wireshark Foundation URLs
[skip ci]
2024-02-01 13:57:00 -08:00
Gerald Combs f3b0bf4a7e Sysdig event: Dissect parameters only when we have some 2024-02-01 12:42:39 -08:00
Gerald Combs c8a2abdcf0 NSIS: Miscellaneous Logray fixes
[skip ci]
2024-02-01 09:48:11 -08:00
Martin Mathieson 3d49e841a6 check_dissector: check spelling of comments for chosen dissector 2024-02-01 16:44:57 +00:00
Sektor van Skijlen 7bbaba61c0 SRT: Added handling for more handshake extensions 2024-02-01 14:22:03 +00:00
John Thacker 1ad0cd4580 tshark: process async DNS queue during the first pass
In the first pass of two-pass wireshark, where we can do
asynchronous DNS lookups, make sure to actually take the
requests off the queue and process them, instead of waiting
until the end of the first pass.

Use a mutex to protect taking requests off the queue, just in
case.

Related to #19629.
2024-02-01 07:19:31 -05:00
John Thacker 132847b6a4 epan: Pass in a 64 bit integer to proto_tree_add_boolean functions
Some of the functions in proto.c when handling a FT_BOOLEAN field
allow it to be part of a 64 bit unsigned integer with a 64 bit
bitmask. Other functions do not. Some of the functions start out
allowing a 64 bit bitmask and then switch to casting the value to
a 32 bit unsigned integer (but others don't.) Consistently allow
a boolean to be extracted using a 64 bit bitmask by changing the
various proto_tree_add_boolean functions to allow a 64 bit unsigned
integer value parameter.

There was only one function adding a boolean that already took
a 64 bit value, proto_tree_add_boolean_bits_format_value64, a
counterpart of proto_tree_add_boolean_bits_format_value. It was
never used anywhere and not WS_DLL_PUBLIC, so it is safe to remove
in favor of having the latter take a uint64_t.

Note that _proto_tree_add_bits_format_value, as a comment says:
"does not receive an actual value but a dimensionless pointer to that value.
For this reason, the type of the header field is examined in order to determine
what kind of value we should read from this address.
The caller of this function must make sure that for the specific header field
type the address of a compatible value is provided."

Both proto_tree_add_boolean_bits_format_value and
proto_tree_add_boolean_bits_format_value64 called that function, one
passing a pointer to a guint32 as a void*, the other passing a
pointer to a guint64. In both cases it was cast to a guint32*, which
was less than ideal in the value64 case. Fix that.

This is related to #19552, as it is necessary in order to add support
for passing a UInt64 value to a boolean field (as oppposed to extracting
it directly from the tvb.)
2024-02-01 09:18:14 +00:00
Filip Thyssen e476661bde DOCSIS: Common MultiPart handling for MMM v5 and up 2024-02-01 09:16:13 +00:00
Filip Thyssen ee1afcfe61 DOCSIS: Hardware Friendly Resource Block Assignment (DOCSIS 4.0) 2024-02-01 09:16:13 +00:00
Filip Thyssen 90e94555aa DOCSIS: MAC Frame Control Type 0b01 becomes Special Use MAC Header (DOCSIS 4.0) 2024-02-01 09:16:13 +00:00
John Thacker 91e3b39918 addr_resolv: Wait for pending lookups when switching to synchronous mode
When switching to synchronous external host name lookups (e.g., upon
starting the second pass of a two-pass tshark command), if there are
any in-flight requests, wait for them to return.

This avoids a problem where on the second pass, synchronous lookups
aren't performed but instead immediately report failure (because
according to our cache the request has already been made; in the GUI,
the answer would be updated later.)

It makes tshark two-pass performance faster than one-pass, so long as
the host name lookups are queued in the first pass (e.g., by offering
a display filter like "-Y ip.addr".)

A nice enhancement later would be to ensure that any external host name
lookups that will be needed in the second pass are done asynchronously
in the first pass. Even the overkill of doing the dissection with a visible
tree is likely better performance than waiting for many synchronous
lookups.

Fix #19629.
2024-02-01 09:13:24 +00:00
Gerald Combs 8a54995b1c wsutil+tools: Version info updates
Define VCS_NUM_COMMITS and VCS_COMMIT_ID in vcs_version.h. Use them to
return the Logray version in get_lr_vcs_version_info and use that where
appropriate. Rename VCSVERSION to VCS_VERSION.
2024-02-01 09:12:38 +00:00
Pascal Quantin ee90fb0f41 GTP: improve dissection of PDU session container 2024-02-01 09:09:41 +00:00
Gerald Combs 2a67af62fe NSIS: Ship Logray's profiles with Logray
[skip ci]
2024-01-31 18:01:54 -08:00
Gerald Combs 80bf3025af osx-app.sh: Sign plugins with .so extensions
[skip ci]
2024-01-31 16:40:39 -08:00
Gerald Combs c66700d7dc Windows: Upgrade libssh to 1.10.6plus
"plus" means that we built from libssh commit 6f1b1e76bb38b, which
includes 1.10.6 plus an IPv6 address parsing fix.
2024-01-31 14:32:27 -08:00
Martin Mathieson 8cea8e7120 Fix more spellings - mostly comments 2024-01-31 22:14:22 +00:00
Gerald Combs f4e71562d0 NSIS: Fixup the Logray installer
Merge the uninstall sections into logray.nsi, similar to wireshark.nsi.
Make a bunch of sections hidden + mandatory. Fix some miscellaneous
issues.
2024-01-31 21:46:34 +00:00
Gerald Combs 868b38040b Logray: Use the name "Logray" in more places 2024-01-31 13:15:14 -08:00
Dr. Lars Völker 6cc1ff055a ASAM CMP: Fix Vendor Data limit and missing UDP Encapsulation
Vendor Data for the Status Message CM and the Status Message Interface
are not required to have a multiple of 2 as length.

Also ASAM CMP UDP encapsulation was missing.

Closes: #19626
2024-01-31 18:58:54 +00:00
Gerald Combs d053622cea Falco bridge: Allocate our tap data 2024-01-31 09:50:36 -08:00
John Thacker 5b6454aacf RTP: Add the extended timestamp to the tree
As a generated field, as already done with extended sequence no
2024-01-31 08:26:33 -05:00
Joakim Karlsson 575d285554 WSUG: update Service Response Time support list 2024-01-31 10:57:41 +00:00
Joakim Karlsson bf5ec983ab pfcp: small spelling correction 2024-01-31 10:55:13 +00:00
Martin Mathieson 9eec8a12eb Fix some spelling errors 2024-01-31 10:46:38 +00:00
Giovanni Musto 3d63241756 BLF: Fix handling of 0-length log containers 2024-01-31 07:16:49 +00:00
John Thacker 0032e25a8a RTP Analysis: Use extended timestamp in statinfo
The RTP dissector already calculates an extended timestamp
that takes into account wrapping and passes it to the taps.
Just use that in the analysis stats instead of redoing the
extended timestamp calculation.

(The calculation currently in the analysis has some slight
issues about when to use a absolute difference versus a
signed difference, and what to cast the 32 bit timestamps to.)

Fix #19622. Tested and works with the various edges cases
in !4853 and #16330 and others.
2024-01-31 03:22:35 +00:00
Gerald Combs ab73082708 CMake: Fix our falcodump symlink 2024-01-30 16:54:29 -08:00
Gerald Combs 3588090b2a Falco bridge+falcodump: Various fixes
Fix building with Visual C++ and recent versions of falco-libs.
2024-01-31 00:03:48 +00:00
Gerald Combs 574fc0e1a6 Qt: Use "Logray" in the about box when appropriate
Remove some unneeded includes as well.
2024-01-30 11:14:34 -08:00
Martin Mathieson f241cd6208 SANE: Improve the way opcode is remembered for resps 2024-01-30 16:41:51 +00:00
John Thacker 28e9035eec MATE: Update examples
Fix the distributed examples to use the "new" style configuration,
as shown in the WSUG and Wiki. Fix the FTP example in the WSUG,
as it's missing the Match keyword

Related to #12118.
Fix #16940
2024-01-30 16:05:15 +00:00
John Thacker 81d094d47f RTMPT: Convert to ws_log system
Use the ws_log system instead of a special #define for RTMPT.
If Wireshark isn't compiled for the Debug target, the compiler
will optimize away all these calls.

Ping #19519
2024-01-30 08:43:54 -05:00
zhilei zhang 24669a5ab4 ISAKMP: add parse auth_method and proto for China IPSec VPN specification
China IPSec VPN specification use value 10 for auth_method and value 128 for pyload type
2024-01-30 12:55:56 +00:00
John Thacker 4e987dc451 epan: Remove layers when a dissector consumes no bytes via fragmentation
We remove layers when a dissector rejects a packet and returns 0.
When a dissector handles desegmentation, it can accept a packet
(return a non zero length) but actually consume zero bytes by
setting desegment_len to a different value and desegment_offset to 0.
That indicates that no bytes were actually consumed because a
future segment is needed.

In such a case, nothing should be added to the tree anyway. On the
next pass the dissector shouldn't be called again (or should have
the same behavior again). The layer needs to be removed on the first
pass in case there are additional PDUs still to be processed in the
frame, so that those PDUs get the same layer number on the first
pass that they'll get in subsequent passes, which affects reassembly
and other various file scoped structures that use the layer number.

Fix #19609
2024-01-30 10:31:01 +00:00
John Thacker dc66792430 epan: When exporting as C arrays, don't end a line with backslash
If the last hex character in a line of a packet is 0x5c (ASCII '\'),
we have to make sure that doesn't end the line, because a backslash-newline
gets treated as a spliced line in C (and that happens in syntax
translation in a very early phase, before comment removal).

We can't just add whitespace (even though §5.1.2.2 of the C standard
says we could), because gcc (and clang) helpfully assume that a
backslash with only whitespace before a newline is probably programmer
error and treats it as a continuation while warning about it:
https://gcc.gnu.org/onlinedocs/gcc/Escaped-Newlines.html#Escaped-Newlines

Surround the text with `|` because that's what hexdump(1) does, though
really most anything that isn't whitespace would do.

Fix #19615
2024-01-30 10:29:34 +00:00
John Thacker 4ec5c7f78f MATE: Handle fields that are in different data sources
In addition to the start and end offset locations, store a pointer to
the data source tvb in each mate_range. The start and end offsets
are only relevant within a data source.

If a field has a data source different from one of the protocol,
transport protocol, or payload ranges, search in the tree for the
ancestor nodes of the field, and see if an ancestor is located within
one of the ranges.

In order to workaround #17877 (non-visible items can't change length
after being added to the tree, which affects most protocols), set
the tree as visible similar to done with a number of Lua postdissectors
that need all fields. Unfortunately this is overkill that hurts
performance.

Fix #19619
2024-01-30 10:28:32 +00:00
John Thacker f33439ea03 epan: Don't fake child nodes of visible proto items
If a field_info is visible, we don't fake the representation and
allow the representation and length to be set after construction.
Therefore, when trying to add a child item to a tree item that has
a visible field_info, we can't fake the child node and return the
current tree node.

If we do, we can't distinguish between an attempt to set the length
or representation of the current tree item, and an attempt to set
the length or representation of the faked child (or its descendent)
because they'd both have the same node.

Since we need the lengths of protocol items for the proto hierarchy
stats (and many protocols are added with length "to the end of the
frame" and then fixed later), if we're not faking protocols, don't
set a protocol field info to hidden even if the tree is not visible.

There are probably still some issues related to the use of
proto_item_get_parent[_nth]. We might have to avoid faking nodes for
any lineal descendent of an item whose representation we need.

Related to #19619 (fixes some handling of MATE ranges),
related to #19573 (fixes getting the representation of certain items that
are also subtrees and have children that set their representation), and
fixes the Protocol Hierarchy stats issue in #17877.
2024-01-30 10:27:35 +00:00