Commit Graph

84035 Commits

Author SHA1 Message Date
João Valverde 09696f1762 Try to fix a narrowing warning
"C:\Development\wsbuild64\Wireshark.sln" (default target) (1) ->
"C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj.metaproj" (default target) (18) ->
"C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj" (default target) (108) ->
       (ClCompile target) ->
C:/Development/wireshark/epan/dfilter/scanner.l(463,54): warning C4267: '+=': conversion from 'size_t' to 'int
       ', possible loss of data [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
C:/Development/wireshark/epan/dfilter/scanner.l(463,54): warning C4267:         state->location.col_start += sta
       te->location.col_len; [C:\Development\wsbuild64\epan\dfilter\dfilter.vcxproj]
C:/Development/wireshark/epan/dfilter/scanner.l(463,54): warning C4267:
                           ^ (compiling source file C:\Development\wsbuild64\epan\dfilter\scanner.c) [C:\Development\ws
       build64\epan\dfilter\dfilter.vcxproj]
2022-04-11 22:23:13 +01:00
João Valverde 2f02cd6e19 dfilter: Handle missing error location more gracefully
If we don't have an offset, don't print anything with underline.

Also it can underline filters using macros correctly now.

$ tshark -Y 'ip and ${private_ipv4:ip.sr}' -r /dev/null
tshark: Left side of "==" expression must be a field or function, not "ip.sr".
    ip and ip.sr == 192.168.0.0/16 or ip.sr == 172.16.0.0/12 or ip.sr == 10.0.0.0/8
           ^~~~~
2022-04-11 21:03:06 +00:00
Yu Gao ceef8aa8ee fix the indent 2022-04-11 19:39:11 +00:00
João Valverde 24443fa33a tshark: Add underline to dfilter errors
$ tshark -Y 'frame.number == 123foobar and ip' -r /dev/null
tshark: "123foobar" is not a valid number.
    frame.number == 123foobar and ip
                    ^~~~~~~~~
2022-04-11 19:25:37 +00:00
Gerald Combs fb3bdffaba Logwolf: Remove a bunch of packet-specific menu items.
Remove the following statistics and utility menu items and dialogs:

- 29West / lbmr
- ANCP
- BACnet / BACapp
- Credentials
- DCCP
- DNS
- Firewall rules
- HART-IP
- HPFEEDS
- HTTP
- HTTP2
- QUIC
- RSerPool
- SOME/IP
- Sametime
- Service response time
- TCP
- UDP
- UDP Multicast
2022-04-11 19:10:01 +00:00
Gerald Combs 3b8ea97731 Debian: Add missing symbols. 2022-04-11 11:41:17 -07:00
Gerald Combs 4b556d6bc6 Qt+epan: Get log conversation filters working.
In conversation_filter.h, add a separate log_conv_filter_list. Use it in
register_log_conversation_filter and add conversation_filter_from_log.
It looks like we no longer use find_conversation_filter externally, so
remove it from the API.
2022-04-11 17:26:50 +00:00
Gerald Combs 58e31a2e77 Qt: Try to fix missing translations.
After splitting MainWindow into WiresharkMainWindow and
LogwolfMainWindow, a bunch of translations were marked "vanished". Do
the following in an attempt to restore them:

$ grep -c vanished ui/qt/*.ts
ui/qt/wireshark_de.ts:534
ui/qt/wireshark_en.ts:7
ui/qt/wireshark_es.ts:407
ui/qt/wireshark_fr.ts:367
ui/qt/wireshark_it.ts:534
ui/qt/wireshark_ja_JP.ts:534
ui/qt/wireshark_pl.ts:414
ui/qt/wireshark_ru.ts:513
ui/qt/wireshark_sv.ts:526
ui/qt/wireshark_tr_TR.ts:534
ui/qt/wireshark_uk.ts:264
ui/qt/wireshark_zh_CN.ts:455

$ git checkout 1c9538624f^ -- ui/qt/*.ts

$ sed -i -e 's,<name>MainWindow</name>,<name>WiresharkMainWindow</name>,g' ui/qt/*.ts

[ comment out `tx pull -f` in tools/update-tx ]

$ ./tools/update-tx -n

$ grep -c vanished ui/qt/*.ts
ui/qt/wireshark_de.ts:7
ui/qt/wireshark_en.ts:7
ui/qt/wireshark_es.ts:0
ui/qt/wireshark_fr.ts:5
ui/qt/wireshark_it.ts:7
ui/qt/wireshark_ja_JP.ts:7
ui/qt/wireshark_pl.ts:6
ui/qt/wireshark_ru.ts:7
ui/qt/wireshark_sv.ts:7
ui/qt/wireshark_tr_TR.ts:7
ui/qt/wireshark_uk.ts:2
ui/qt/wireshark_zh_CN.ts:6

$ ./tools update-tx

[ uncomment `tx pull -f` in tools/update-tx ]
2022-04-11 17:01:17 +00:00
Gerald Combs bd6ee4479f Tools: Make the Debian and RPM setup scripts more strict.
We use debian-setup.sh and rpm-setup.sh to build the containers in
https://gitlab.com/wireshark/wireshark-containers/. Make sure they fail
with a nonzero exit status, otherwise we might end up with an invalid
container image.

Make sure OPTIONS is defined in all of the setup scripts that use it.
2022-04-10 16:05:42 -07:00
Dylan Ulis 3890d822ba macOS Homebrew: Install PCRE2 2022-04-10 22:09:55 +00:00
Gerald Combs 1c9538624f [Automatic update for 2022-04-10]
Update manuf, services enterprise numbers, translations, and other items.
2022-04-10 19:23:47 +00:00
João Valverde 4d9470e7dd dfilter: Add location tracking to scanner and use it to report errors
Add location tracking as a column offset and length from offset
to the scanner. Our input is a single line only so we don't need
to track line offset.

Record that information in the syntax tree. Return the error location
in dfilter_compile(). Use it in dftest to mark the location of the
error in the filter string. Later it would be nice to use the location
in the GUI as well.

$ dftest "ip.proto == aaaaaa and tcp.port == 123"
Filter: ip.proto == aaaaaa and tcp.port == 123
dftest: "aaaaaa" cannot be found among the possible values for ip.proto.
	ip.proto == aaaaaa and tcp.port == 123
	            ^~~~~~
2022-04-10 10:09:51 +01:00
João Valverde da19379eb5 dfilter: Create the syntax node in the scanner and pass that
Revert to passing a syntax node from the lexical scanner to the grammar
parser. Using a union is not having a discernible advantage and requires
duplicating a lot of properties of syntax nodes.
2022-04-10 09:54:03 +01:00
Matthias Ringwald d23fec2116 bluetooth: show packet status in info column 2022-04-09 22:57:34 +02:00
Matthias Ringwald 50de7dd6ca bluetooth: show SCO packet type in col_protocol 2022-04-09 19:10:44 +02:00
João Valverde fb9a176587 dfilter: Allow grouping arithmetical expressions with { }
This removes the limitation of having only two terms in an
arithmetic expression and allows setting the precedence using
curly braces (like any basic calculator).

Our grammar currently does not allow grouping arithmetic expressions
using parenthesis, because boolean expressions and arithmetic
expressions are different and parenthesis are used with the former.
2022-04-08 23:12:04 +01:00
Gerald Combs 73770c61b4 Qt: Add a null pointer check.
Don't assume the main window has an SCTP menu.
2022-04-08 19:57:13 +00:00
Chuck Craft b52437ba28 WSUG/tshark: protocol summary and output with "-e" 2022-04-08 19:40:43 +00:00
Gerald Combs b5fef40379 Git: Fix our debian ignore.
We create a top-level symlink to packaging/debian in GitLab CI, so only
ignore that.
2022-04-08 19:24:18 +00:00
Chuck Craft 6e9b19dcb0 Qt: only Show/Export Packet Bytes when field is selected and has_packet_bytes
This will also exclude generated [] and Lua added fields.
2022-04-08 18:47:42 +00:00
Pascal Quantin b7ba126644 F1AP: upgrade dissector to v16.9.0 2022-04-08 16:41:20 +00:00
Pascal Quantin ab71cb51ff XnAP: id-TargetNodeID is a protocol IE 2022-04-08 16:11:40 +00:00
Pascal Quantin 894762b654 X2AP: fix a typo 2022-04-08 15:42:00 +00:00
Pascal Quantin 82f268789c E1AP: upgrade dissector to v16.9.0 2022-04-08 17:12:15 +02:00
Pascal Quantin 3bf9bc6326 XnAP: upgrade dissector to v16.9.0 2022-04-08 16:45:15 +02:00
Pascal Quantin c9353fdece NGAP: upgrade dissector to v16.9.0 2022-04-08 14:16:59 +00:00
Pascal Quantin 4b42dcf3c0 X2AP: upgrade dissector to v16.9.0 2022-04-08 13:46:58 +00:00
Pascal Quantin e101aa6e78 S1AP: upgrade dissector to v16.9.0 2022-04-08 15:22:29 +02:00
John Thacker f0f0f05060 editcap: Document use of stdin and stdout
Editcap accepts '-' for stdin or stdout, document that. Also change
an incorrect statement that claims that the '-v' flag writes to
standard output; it writes to standard error.
2022-04-07 20:57:08 -04:00
Gerald Combs 37ccc2b0e5 GitLab CI: Build Logwolf in the Code Checks + Clang Warnings job. 2022-04-07 23:46:20 +00:00
Gerald Combs c5da4f661a Logwolf: Fix building on Windows.
Add a couple of missing resource files. Fix a couple of paths.
2022-04-07 23:28:54 +00:00
Roman Schmitz 545553e203 Update tools/macos-setup-brew.sh 2022-04-07 23:27:08 +00:00
Chuck Craft 0c316ec1a9 NSIS/Wix: missing preferences file for Bluetooth profile 2022-04-07 22:09:02 +00:00
Gerald Combs 54553de59d wsutil: Use a separate "extlog" directory for Logwolf extcaps.
If we're running in the Logwolf configuration namespace, look for
extcaps in a directory named "extlog". This paves the way for adding
log-specific capture utilities.
2022-04-07 21:41:36 +00:00
Joel Colledge ddbafcd9ba DRBD: Add support for dissecting DRBD on InfiniBand
InfiniBand and RDMA over Converged Ethernet (RoCE) are handled by the
infiniband dissector. Register DRBD as a dissector for infiniband
payloads.

Not yet implemented:
* Dissection of data payloads. For P_DATA and similar packets, the data
  payload is transmitted over multiple packets. Only the first packet
  containing the DRBD header is dissected.
* Dissection of the InfiniBand Immediate Data. DRBD uses this for
  sequence numbers and for indicating which stream the packet belongs
  to.
* Any attempt to associate packets into conversations. This could be
  achieved when the connection packets have been captured, but would be
  very difficult otherwise.
* An association with infiniband.cm.req.serviceid.dport. When using
  RoCE, this is the port that the user specifies for the connection, so
  it would be useful to associate it with the DRBD conversation and show
  it. Otherwise it is tricky to identify DRBD connections.
2022-04-07 19:13:14 +00:00
Thomas Jansen aac695d62e icmpv6: Fix dissection of PREF64 option for shorter prefixes
RFC 8781 shows in section 4 that the prefix field of the PREF64 option
header is always 96 bits (or 12 bytes), regardless of the prefix length
code that only specifies which parts of the prefix are significant. The
option itself thus always has a fixed length. Even if they are not used
in the significant part of the prefix itself, the unused bits are still
part of the prefix field of the PREF64 option and the offset must be
adapted accordingly.

The previous implementation would fail to correctly parse any PREF64
option with a PLC other than 0 (i.e. the full 96 bits) due to the unused
remaining bits in the option not being consumed.

Closes #18033.
2022-04-07 09:09:36 +00:00
Stig Bjørlykke bcb992c4fb nas_eps: Fix typo in function name
Fix typo in dissect_nas_eps_esm_msg().
2022-04-07 07:13:00 +00:00
Richard Sharpe 34f8420d1e ieee80211: Correct the dissection of the 802.11ax Capabilities device class.
The numbers were reversed.

Closes #18030
2022-04-06 18:31:50 -07:00
Matthias Ringwald c3c94ff4fd Bluetooth: print event code for unknown HCI events 2022-04-06 23:35:33 +00:00
João Valverde cc5726b63f dfilter: Remove leading colon special meaning
Instead of saying a leading colon will make any token a literal
value, say it is part of the syntax of bytes arrays. This is
useful to write bytes without a separator, and other potentially
ambiguous formats.

The restriction in meaning to bytes and simple numeric values
should make the rules for handling a leading colon (specifically
ommiting it or not) saner without much loss of functionality.
2022-04-07 00:16:07 +01:00
João Valverde 0313cd02bc dfilter: Fix RHS bias for literal values
Fixes a3b76138f0.
2022-04-06 23:46:22 +01:00
João Valverde 7429832db4 Fix a log message 2022-04-06 23:42:04 +01:00
Jaap Keuter 8d646c1657 DHCPv6: Fix interpretation of user class data length fields
Closes #18032
2022-04-06 19:11:58 +00:00
Jorge Mora d681da2534 IWARP_DDP_RDMAP: add MPA error codes given by RFC6581 2022-04-06 18:55:55 +00:00
Jorge Mora c59315c45a IWARP_DDP_RDMAP: add MPA error codes given by RFC5044
Add error type name mapping for the LLP (Lower Layer Protocol).
Add error code name mapping for the MPA Error type.
2022-04-06 18:55:55 +00:00
Jorge Mora 6630bee851 IWARP_DDP_RDMAP: fix error codes for RDMA layer
Display the error code name only if it is not an RDMA Local
Catastrophic error type.
2022-04-06 18:55:55 +00:00
Jorge Mora d4cfae1b72 IWARP_DDP_RDMAP: change Terminate header bits to set-notset 2022-04-06 18:55:54 +00:00
Jorge Mora 72b44d13ea IWARP_DDP_RDMAP: fix Terminate opcode tree hierarchy
The Terminate Control tree should be under the Terminate tree.
2022-04-06 18:55:54 +00:00
Jorge Mora 63c1b032c8 IWARP_DDP_RDMAP: fix Terminate layer name mapping 2022-04-06 18:55:54 +00:00
João Valverde c30a417528 dflter: Add test 2022-04-06 18:37:23 +01:00