Commit Graph

253 Commits

Author SHA1 Message Date
Jeremy Kerr baf7a3c493 Add MCTP control protocol dissector
This change adds a very basic dissector for the MCTP control protocol -
just the header fields, leaving the raw payload data.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
Jeremy Kerr e1cbe02cce Add Management Component Transport Protocol (MCTP) dissector
This change adds a protocol dissector for the Management Component
Transport Protocol (MCTP). This is a failry simple datagram-based
protocol for messaging between components within a single platform,
typically over I2C, serial or PCIe.

This dissector just implements the header fields, and sequence-number
based message reassembly. Inner protocols will be added as follow-up
changes.

Linux has support for AF_MCTP data, so decode from the MCTP SLL ltype.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
2022-11-15 09:05:05 +00:00
Martin Gallo 59fdaa7d07 SAPEnqueue: Added SAP Enqueue Server as main dissector 2022-11-14 20:35:17 +00:00
Martin Gallo 384bf49591 SAPHDB: Added SAP HDB as main dissector 2022-11-11 13:10:00 +00:00
Martin Gallo 0562fe46f6 SAPIGS: Added SAP IGS as main dissector 2022-11-06 14:27:25 +00:00
João Valverde 0853ddd1cb dfilter: Add support for raw (bytes) addressing mode
This adds new syntax to read a field from the tree as bytes, instead
of the actual type. This is a useful extension for example to match
matformed strings that contain unicode replacement characters. In
this case it is not possible to match the raw value of the malformed
string field. This extension fills this need and is generic enough
that it should be useful in many other situations.

The syntax used is to prefix the field name with "@". The following
artificial example tests if the HTTP user agent contains a particular
invalid UTF-8 sequence:

    @http.user_agent == "Mozill\xAA"

Where simply using "http.user_agent" won't work because the invalid byte
sequence will have been replaced with U+FFFD.

Considering the following programs:

    $ dftest '_ws.ftypes.string == "ABC"'
    Filter: _ws.ftypes.string == "ABC"

    Syntax tree:
     0 TEST_ANY_EQ:
       1 FIELD(_ws.ftypes.string <FT_STRING>)
       1 FVALUE("ABC" <FT_STRING>)

    Instructions:
    00000 READ_TREE		_ws.ftypes.string <FT_STRING> -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_EQ		reg#0 == "ABC" <FT_STRING>
    00003 RETURN

    $ dftest '@_ws.ftypes.string == "ABC"'
    Filter: @_ws.ftypes.string == "ABC"

    Syntax tree:
     0 TEST_ANY_EQ:
       1 FIELD(_ws.ftypes.string <RAW>)
       1 FVALUE(41:42:43 <FT_BYTES>)

    Instructions:
    00000 READ_TREE		@_ws.ftypes.string <FT_BYTES> -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_EQ		reg#0 == 41:42:43 <FT_BYTES>
    00003 RETURN

In the second case the field has a "raw" type, that equates directly to
FT_BYTES, and the field value is read from the protocol raw data.
2022-10-31 21:02:39 +00:00
Gtker 1fa99c5f0d woww: Update release-notes.adoc with more information 2022-10-25 19:08:09 +00:00
Gtker 15a7cfc943 Add WOWW to docbook/release-notes.adoc
As requested
https://gitlab.com/wireshark/wireshark/-/merge_requests/8356#note_1122847782
2022-10-25 19:08:09 +00:00
Martin Gallo fc052615a6 SAPNI: Added SAP NI as main dissector 2022-10-16 19:59:59 +00:00
João Valverde 995096df70 JSON: Add preference to enable "unescaping" strings 2022-10-15 12:10:19 +01:00
João Valverde 14f5121c4a dfilter: Remove problematic <...> literal syntax
The <...> syntax for literals, intended to be as generic as
possible, unintentionally introduced an ambiguity with the
relational expression "a < b or a > c".

Literals are values like numbers, bytes, IPv6 addresses or, one
could imagine, UNC paths for example, if an FT_UNC type were to
be added in the future.

We could use a new unique symbol like @...@ but the <...>
syntax is very recent and may not be necessary with ":xxx" so
just remove it.

A byte array can be explicitly declared by prefixing with a colon. It
is not as generic but the main ambiguity that this new syntax attempted
to solve is bytes vs protocol names. We don't want to introduce a new
reserved symbol for now, until other requirements if any are more clear.

Fixes #18418.
2022-10-08 09:51:49 +00:00
j.novak@netsystem.cz 2c56c0bad6 RTP Player: Fix: Only silence played on Windows with Qt 6.x 2022-10-08 09:30:52 +00:00
Gerald Combs 0046163269 Docs: Update the release notes. 2022-10-04 19:44:46 +00:00
Pascal Quantin 5fa60f079e Windows: upgrade Npcap to 1.71 2022-08-25 18:01:11 +00:00
João Valverde b33210750c CMake+etc: Enable Qt6 by default for Unix builds
Linux builds were left behind on the Qt transition, presumably because
our Ubuntu CI image does not support Qt6.

Enable Qt6 by default and explicitly disable it for slower or more
conservative Linux distros.

Drop experimental status for Qt6, because we are using it to build
official Windows and macOS releases.
2022-08-22 09:08:06 +00:00
Gerald Combs 0b068f3b06 Docs: Add a SharkFest link to the release notes. 2022-08-17 17:04:57 +00:00
Gerald Combs b679f22a54 Docs: Clean up the release notes. 2022-08-16 14:08:08 -07:00
João Valverde 80f16015e2 epan: Refactor floating point display types
Remove the redundant BASE_FLOAT field display type. The name
BASE_FLOAT is meaningless and the value aliased to BASE_NONE.

Require BASE_NONE instead of BASE_FLOAT (corresponding to
the printf() %g format).

Add new float display types using BASE_DEC, BASE_HEX and BASE_EXP
corresponfing to %f, %a and %e respectively.

Add support for BASE_CUSTOM with floats.
2022-08-02 13:16:46 +00:00
Ferry Huberts 059c3b7924 Locamation Interface Module dissector: add support for IM2R0 2022-07-30 10:33:43 +00:00
Gerald Combs 05eee7f71c Version: 3.7.2 → 3.7.3rc0.
[skip ci]
2022-07-28 14:15:16 -07:00
Gerald Combs 0304e827d1 Build: 3.7.2.
[skip ci]
2022-07-28 12:05:42 -07:00
Gerald Combs 2a6d74f280 Docbook: Update the release notes. 2022-07-28 18:27:12 +00:00
Jirka Novak 1e53e49a54 ciscodump: Added support for IOS XE and ASA
Changes:
- The tool now recognizes which software is running on a device - IOS, IOS XE
  or ASA. Based on it, it uses correct sequence of commands to setup
  capture, read captured packets and clear the capture.
- The tool reads packets on the fly so you don't have to wait till
  --remote-count of packets is reached.
- The tool reads timestamps from capture on the device for IOS and ASA (on
  IOS-XE, there is no timestamp in dump).
- Except Windows platform the tool handles early stop of capture on the device
  and clear of capture buffer on the device (it finish the capture).
- There are special interface names to allow the tool to generate
  specific capture types.
- Documentation updated.

Closes #17672.
2022-07-22 15:55:28 +00:00
Roland Knall 5991a75d78 ReleasNotes: Add minimum version requirements
Adding an explanation on minimum required versions to the release
notes, as well as bumping c-ares to version 1.14.0

The previous minimum (1.5.0) has been released in 2008. The new
version has been choosen to correlate with those distros, that
also provide a minimum version of Qt5 higher than 5.9, as 5.9
is no longer supported in the main branch
2022-07-21 12:37:17 +00:00
Ferry Huberts 0a42b0976b Locamation Interface Module dissector for IM1
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
2022-07-20 06:25:51 +00:00
Roland Knall 7935734d61 ReleaseNotes: add maxminddb improvement
Add note about the improvement for maxminddb

[skip ci]
2022-07-16 15:38:59 +00:00
João Valverde 4c975b770e dfilter: Improve compatibility of integer types
Before:

$ dftest '_ws.ftypes.int64 == _ws.ftypes.int8'
Filter: _ws.ftypes.int64 == _ws.ftypes.int8
dftest: _ws.ftypes.int64 and _ws.ftypes.int8 are not of compatible types.
	_ws.ftypes.int64 == _ws.ftypes.int8
	                    ^~~~~~~~~~~~~~~

After:

$ dftest '_ws.ftypes.int64 == _ws.ftypes.int8'
Filter: _ws.ftypes.int64 == _ws.ftypes.int8

Syntax tree:
 0 TEST_ANY_EQ:
   1 FIELD(_ws.ftypes.int64 <FT_INT64>)
   1 FIELD(_ws.ftypes.int8 <FT_INT8>)

Instructions:
00000 READ_TREE		_ws.ftypes.int64 <FT_INT64> -> reg#0
00001 IF_FALSE_GOTO	5
00002 READ_TREE		_ws.ftypes.int8 <FT_INT8> -> reg#1
00003 IF_FALSE_GOTO	5
00004 ANY_EQ		reg#0 === reg#1
00005 RETURN
2022-07-14 20:12:30 +00:00
João Valverde a877f2d5f3 dfilter: Allow existence check for slices
Allow checking if a slice exists. The result is true if the
slice has length greater than zero.

The len() function is implemented as a DFVM instruction instead.
The semantics are the same.
2022-07-04 22:45:14 +00:00
Roland Knall 799a033080 ReleaseNotes: Correct some spellings and wordings
Fixes #18161

[skip ci]
2022-06-29 10:19:20 +02:00
Gerald Combs 5ee0b97c96 Build: 3.7.1
[skip ci]
2022-06-27 10:05:04 -07:00
João Valverde aaff0d21ae dfilter: Add layer support for references
This adds support for using the layers filter
with field references.

Before:
    $ dftest 'ip.src != ${ip.src#2}'
    dftest: invalid character in macro name

After:
    $ dftest 'ip.src != ${ip.src#2}'
    Filter: ip.src != ${ip.src#2}

    Syntax tree:
     0 TEST_ALL_NE:
       1 FIELD(ip.src <FT_IPv4>)
       1 REFERENCE(ip.src#[2:1] <FT_IPv4>)

    Instructions:
    00000 READ_TREE		ip.src <FT_IPv4> -> reg#0
    00001 IF_FALSE_GOTO	5
    00002 READ_REFERENCE_R	${ip.src <FT_IPv4>} #[2:1] -> reg#1
    00003 IF_FALSE_GOTO	5
    00004 ALL_NE		reg#0 != reg#1
    00005 RETURN

This requires adding another level of complexity to references.
When loading references we need to copy the 'proto_layer_num'
and add the logic to filter on that.

The "layer" sttype is removed and replace by a new
field sttype with support for a range. This is a nice
cleanup for the semantic check and general simplification.
The grammar is better too with this design.

Range sttype is renamed to slice for clarity.
2022-06-25 14:57:40 +01:00
João Valverde e9e6431d7b dfilter: Change boolean string representation
Use "True" or "TRUE" instead of "true" and remove case insensivity.
Same for false. This should serve to differentiate booleans a bit
more from protocol names, which should be using lower-case.
2022-06-25 13:02:34 +01:00
Gerald Combs 3d52693eaa Qt+docs: Capitalize JSON.
JSON is an abbreviation and should be displayed in all caps.
https://www.json.org/json-en.html
2022-06-21 17:24:27 +00:00
João Valverde 354e0d7edf dfilter: Add support for unicode escape sequences
Add support for entering unicode codepoints as \uNNNN or \uNNNNNNNN
for strings and charconsts (following the C standard).
2022-06-21 16:54:16 +01:00
João Valverde 47348ae598 dfilter: Add support for literal strings with null bytes
Before:
    Filter: frame matches "abc\x00def"
    dftest: \x00 (NUL byte) cannot be used with a regular string.
    	frame matches "abc\x00def"
    	                  ^~~~
    Filter: _ws.ftypes.string == "a string with a \0 byte"
    dftest: \0 (NUL byte) cannot be used with a regular string.
    	_ws.ftypes.string == "a string with a \0 byte"
    	                                      ^~

After:
    Filter: frame matches "abc\x00def"

    Syntax tree:
     0 TEST_MATCHES:
       1 FIELD(frame)
       1 PCRE(abc\0def)

    Instructions:
    00000 READ_TREE		frame -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_MATCHES	reg#0 matches abc\0def
    00003 RETURN

    Filter: _ws.ftypes.string == "a string with a \0 byte"

    Syntax tree:
     0 TEST_ANY_EQ:
       1 FIELD(_ws.ftypes.string)
       1 FVALUE("a string with a \0 byte" <FT_STRING>)

    Instructions:
    00000 READ_TREE		_ws.ftypes.string -> reg#0
    00001 IF_FALSE_GOTO	3
    00002 ANY_EQ		reg#0 == "a string with a \0 byte" <FT_STRING>
    00003 RETURN

Fixes issue #16156.
2022-06-21 15:10:08 +00:00
Roland Knall 847795d381 Qt: Add stream number to conversations
Adding the stream id to UDP/TCP conversations and allowing
filtering on those values as well.

Fixes: #14184
2022-06-21 10:01:18 +02:00
Roland Knall 2b4878d452 Qt: Hide columns for traffic tree
Allow columns to be hidden for the traffic tree dialogs
Conversations and Endpoints and store the information profile
specific
2022-06-19 16:39:35 +02:00
Gerald Combs efe8dc051c Prefs: Change the default UI layout to type "2".
Make the default UI layout "packet list on top, packet detail and bytes
side by side". This is more space efficient on modern displays and is
the first thing I change when using the default profile.
2022-06-18 12:36:18 +00:00
Roland Knall c5aa352ad4 docbook: Adapt releasenotes for openSafety and AT_NUMERIC
[skip ci]
2022-06-17 13:57:12 +02:00
Chuck Craft d008708552 editcap/mergecap: swap 'v'|'V' options to match other CLI utilities
Closes #18134
2022-06-16 02:13:50 +00:00
Gerald Combs 572e6b0c10 Docs: Add some protocols to the release notes. 2022-06-15 11:49:40 -07:00
Chuck Craft 208cf56b75 ip: ip.flags field are 3 high bits not full byte
See https://ask.wireshark.org/question/27546/0x01-flag-on-last-of-fragmented-packets/
2022-06-14 20:28:17 +00:00
Roland Knall a4f25e5115 Qt: Redesign TrafficTree Dialogs UI
The new UI should better group functionality and as well as better
showing which taps are available and can be used.
2022-06-14 09:36:30 +00:00
Roland Knall 0cfe7a0d56 Qt: Better sorting for traffic dialogs
Allow the traffic columns to automatically sort on secondary columns if
applicable. e.g. the address and port column for TCP and UDP, or the
secondary address for conversations
2022-06-13 13:50:50 +02:00
Roland Knall bcb8558be2 Docs: Update release notes
Add note about the change for tap_packet_cb

[skip ci]
2022-06-10 21:05:47 +02:00
Gerald Combs d047a18e83 Docs: Update the release notes.
Rearrange and update a few items.

[skip ci]
2022-06-10 10:53:04 -07:00
Roland Knall cbed7f8013 docbook: Add Releasenotes for traffic column 2022-06-10 16:31:52 +02:00
Roland Knall b06c1c451c Qt: Make TrafficTable detachable
Allow the endpoint and conversation dialogs to have detachable
tabs. At the same time move the tree functionality to a subclass
to better be able to handle the context menu when detached.

Right now, still a lot of tree stuff is in the tabwidget, but
could be moved to the tree for the future
2022-06-04 21:28:05 +02:00
Roland Knall 9edf06383a Qt: Move most Contextmenu stuff to TrafficTree
Create a new class, which handles the context menu stuff for
the traffic data, as well as remove unnecessary signals used
by the sub-dialogs.
2022-06-04 15:57:02 +02:00
João Valverde 8ff24c2b6e Lua: Add lrexlib-pcre2 Lua regex bindings
Add the de facto standard Lua regex API to Wireshark. Upstream
code is copied verbatim and the module opened in the "rex" table.
This is just a user convenience and developer quality of life improvement
over the GRegex Lua API because it has always been possible to
load lrexlib-pcre2 as a Lua module from Wireshark.
2022-05-26 10:09:13 +00:00