Commit Graph

42518 Commits

Author SHA1 Message Date
Ranjeet Kumar Singh ebf670692a Protobuf: Allow all protobuf fields to have a plugin dissector 2021-03-24 21:39:01 +00:00
ranjetsih 11f933b446 Protobuf: Provide an option to add plugin subdissectore for fields of all types
As of now a plugin subdissector can register itself for byte or string type only.
This change adds an option to allow a plugin to register a subdissector for any protbuf field.
this subdissector will be able to dissect a protobuf field on top of the existing dissector for that field.
2021-03-24 21:39:01 +00:00
ranjetsih 387ebc955f Protobuf: Provide an option to add plugin subdissectore for fields of all types
As of now a plugin subdissector can register itself for byte or string type only.
This change adds an option to allow a plugin to register a subdissector for any protbuf field.
this subdissector will be able to dissect a protobuf field on top of the existing dissector for that field.
2021-03-24 21:39:01 +00:00
Caleb Chiu 4b1dad3f2e USB HID: Removed codes of repeated dissection
For class-specified HID request with data fragment, the original codes perform repeated dissection.
For example, the SET REPORT REQUEST 21 09 02 02 03 00 02 00 02 00 would be dissected as:
Setup Data
    bmRequestType: 0x21
        0... .... = Direction: Host-to-device
        .01. .... = Type: Class (0x1)
        ...0 0001 = Recipient: Interface (0x01)
    bRequest: SET_REPORT (0x09)
    wValue: 0x0202
        ReportID: 2
        ReportType: Output (2)
    wIndex: 3
    wLength: 2
    bRequest: 9
    wValue: 0x0202
    wIndex: 3 (0x0003)
    wLength: 2
    Data Fragment: 0200

And dissected as below after the codes removed:
Setup Data
    bmRequestType: 0x21
        0... .... = Direction: Host-to-device
        .01. .... = Type: Class (0x1)
        ...0 0001 = Recipient: Interface (0x01)
    bRequest: SET_REPORT (0x09)
    wValue: 0x0202
        ReportID: 2
        ReportType: Output (2)
    wIndex: 3
    wLength: 2
    Data Fragment: 0200
2021-03-24 18:46:45 +00:00
Uli Heilmeier 2e6d3b571b LDAP: SASL Buffer doesn't include Length field
SASL Buffer starts after the SASL Buffer Length field. Therefore
we should only mark the bytes without the Length field.

Sample capture can be found in wireshark/wireshark#15128
2021-03-24 08:28:20 +00:00
Uli Heilmeier 337bdf8eb3 DNS: Fix pointer for is_multiple_responses
As discussed in wireshark/wireshark!2497 there is no need
for a pointer to a pointer.
2021-03-23 12:32:42 +01:00
ranjetsih 5177437f30 "GTP: add option to decode T-PDU Data with a plugin dissector"
As of now GTP dissector provides option to decode T-PDU data ether, async, and with some heuristics.

But there is no option present to decode a new protocol with a plugin.

This change adds an option to decode T-PDU data with a plugin, to help develop and test new protocols that are
encapsulated as GTP T-PDU data.
2021-03-23 08:02:43 +00:00
Nardi Ivan e677a909e1 SMB2: fix two memory leaks
* Since c3342930 we don't free anymore the entries in the files hashtables.
The cleanest solution is probably to convert these hashtables into two
wmem_map_t structures and let the wmem core handling any cleanup.

* b0f5b2c174 added supported for chained compression; the uncompressed
tvb must be freed
2021-03-23 07:32:23 +00:00
Joerg Mayer 2af7f913b8 packet-isis-snp.c: Add source-id-circuit to dissection 2021-03-23 08:06:26 +01:00
Guy Harris a7082e33ff psample: fix formatting of 64-bit integers.
guint64 is *not* guaranteed to be an unsigned long int; on an ILP32
platform, it *can't* be a long, as that's only 32 bits.  Use
G_GUINT64_FORMAT to format guint64 values.
2021-03-22 12:59:55 -07:00
Amit Cohen 146578889e packet-netlink-psample: Add dissector for psample netlink packets
The Linux kernel includes a module called psample which sends sampled
packets to user-space over generic netlink.

This patch adds a dissector for these netlink packets.
The dissector is expected to be invoked by the generic netlink dissector and
during its hand off routine it adds an entry in the 'genl.family' dissector
table.

The various netlink attributes are dissected by calling
dissect_netlink_attributes(), in a similar fashion to the rtnetlink and
net_dm dissectors. The sampled packet itself is encoded in the netlink
attribute 'PSAMPLE_ATTR_DATA' and dissected by invoking a dissector from the
'sll.ltype' dissector table based on the packet's protocol which is
encoded in the 'PSAMPLE_ATTR_PROTO' attribute.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
2021-03-22 13:39:36 +00:00
Jirka Novak 3693dd52cc rtp: addedd extended sequence number and timestamp
Extended sequence number added to info structures.
Extended timestamp (from 32 to 64 bit) calculation added and added to
info structures.
Both values simpifies calculations in rest of the code - we don't have
to care about wraparound. Code will be adapted later.
2021-03-22 11:21:15 +01:00
Tomasz Moń 9a3bb60266 IPPUSB: Do not assume every USB traffic is IPPUSB
It is invalid to assume that every unknown and/or vendor specific
traffic is IPPUSB. If a vendor specific class is indeed IPPUSB then
the dissector should be selected based on VID/PID.

The way IPPUSB was registering caused packets from devices without
corresponding dissector in Wireshark (majority of the devices in the
wild) being dissected as IPPUSB and shown as Malformed Packets. For
example the Silicon Labs CP210x UART Bridge was dissected as IPPUSB.
2021-03-22 08:39:19 +00:00
Guy Harris fdbe68e3f0 ftypes: an fvalue_t can no longer have a GRegex.
Now that FT_PCRE is gone, a GRegex is not a valid value for a field.  (A
field can be a *string* field whose value is supposed to be a PCRE, but
that's just FT_STRING/FT_STRINGZ/FT_STRINGZPAD/FT_STRINGZTRUNC, and the
value is the string text.)
2021-03-21 20:53:34 +00:00
Pascal Quantin 09707973a9 NR RRC: use _ instead of - in filter names
Like what asn2wrs.py does
2021-03-21 19:31:53 +00:00
Pascal Quantin c5c6a5a9cc LTE RRC: use _ instead of - in filter names
Like what asn2wrs.py does
2021-03-21 18:46:53 +00:00
Pascal Quantin f6b0ff72e7 XnAP: use _ instead of - in filter names
Like what asn2wrs.py does
2021-03-21 17:52:50 +00:00
Pascal Quantin 9df7492627 S1AP: have a single filter for ENB-UE-S1AP-ID or MME-UE-S1AP-ID fields 2021-03-21 17:28:31 +00:00
Eugene Adell 439ecf98b6 TCP: Obvious Spurious Retransmissions are not always detected
In rare circumstances Spurious Retransmissions are not detected
and the SEQ analysis would instead conclude with a Fast Retransmit
or an Out-Of-Order. As Spurious Retransmissions are more certain
than the latter ones, their respective precedences are changed.
The documentation is updated accordingly. Closes #13863.
2021-03-21 16:56:43 +00:00
Pascal Quantin 51cf733fc6 NGAP: have a single filter for RAN-UE-NGAP-ID or AMF-UE-NGAP-ID fields
Closes #17304

While in the area, replace - by _ in the other renamed filters as this
is what asn2wrs.py does.
2021-03-21 16:39:49 +00:00
Pascal Quantin 048a28e3bc IEEE80211: use G_GUINT64_CONSTANT instead of %ULL
As suggested in doc/README.developer
2021-03-21 17:19:05 +01:00
Pascal Quantin f81572ac09 IEEE80211: remove a shadowed variable 2021-03-21 17:08:43 +01:00
Pascal Quantin 66f35c7130 IEEE80211: squelsh a MSVC warning 2021-03-21 17:05:56 +01:00
Preston Hunt 1abe8cc3ce IEEE 802.11: add FTM ranging NTB-specific
Adds dissection of the non-trigger-based-specific subelement of the FTM
ranging parameters element.
2021-03-21 14:20:39 +00:00
Uli Heilmeier 07fb47111e DNS: IXFR/AXFR queries with multiple responses
IXFR and AXFR queries can have multiple DNS responses. As all responses
belong to one transaction, they have the same transaction ID.

We shouldn't handle them as retransmits.

Fix: wireshark/wireshark#17293
2021-03-21 14:02:27 +00:00
Nardi Ivan 90d9eb2062 TLS: another fix for Google-QUIC-Version Transport Parameters
The TP sent (encrypted) by the server is different from the one sent by
the client.
See: https://quiche.googlesource.com/quiche/+/refs/heads/master/quic/core/crypto/transport_parameters.cc

Fix: 8bcf6783a5
2021-03-21 13:29:29 +00:00
Guy Harris b61fd6d76a dfilter, ftypes: get rid of FT_PCRE.
It's not a valid field type, it's only a hack to support regular
expression matching in packet-matching expressions.

Instead, in the packet-matching code, have a separate syntax tree type
for Perl-compatible regular expressions, and a separate instruction to
load one into a register, and have the "matching" operator for field
types take a GRegex * as the second argument.
2021-03-21 03:27:44 -07:00
Guy Harris ce611792c3 dfilter: clean up indentation. 2021-03-21 02:15:00 -07:00
John Thacker de374722e8 TCP, HTTP: Fix reassembly of odd corner case of HTTP responses
RFC 7230 Section 3.3.3 case 7 allows a (discouraged) behavior
for HTTP responses of desegmenting until connection FIN when the
Content-Length is not given.
(See commit 69e50be150 for details.)

There is an even rarer subcase not currently handled- if the headers
are split aross multiple segments, then we won't know we need to
desegment until FIN until after than the first segment.

In such a case, msp->nxtpdu still needs to get set to some appropriately
large offset, since it didn't happen when processing the first segment.
2021-03-21 08:13:38 +00:00
Thomas Dreibholz a9a476f855
SCTP dissector improvements
* Added a hint when SCTP association indexing is disabled (Closes: #17268)
* Added missing space in labels
2021-03-20 19:54:55 +01:00
João Valverde 9b3afa0278 Rewrite wmem_strbuf_append_vprintf() using vsnprintf() 2021-03-20 14:23:19 +00:00
João Valverde 392299d9ff wmem_test: Replace some assertions with equivalents 2021-03-20 14:23:19 +00:00
Roman-Koshelev b18bb58a95 json: add application/x-ndjson to the media types handled. 2021-03-20 13:54:20 +03:00
Guy Harris be000686de prefs: use g_error() to report certan errors.
Other errors use g_error(); use it for these errors, so the message is
more meaningful.
2021-03-20 01:33:44 -07:00
Guy Harris 9f04392c0f frame, tcp: don't g_assert while in the middle of dissecting.
Use DISSECTOR_ASSERT calls instead, so that *shark doesn't crash, it
just puts a complaint into the protocol tree.
2021-03-20 00:50:07 -07:00
Guy Harris 6ffbbcefa3 libwireshark: don't allow fields of type FT_PCRE to be registered.
It's a fake "field" type, used only for "field" values in
packet-matching expressions to do regular-expression matching.  There is
*no* reason to allow fields of that type.

Don't bother checking the representation type when generating the string
representation of a field value.  If a developer manages to get past all
the tests for FT_PCRE to register and add an instance of that field to
the protocol tree, either 1) the one and only string representation of
an FT_PCRE value is what they want, in which case, whatever, or 2) it's
*not* what they want, in which case, if they file a bug, ask a question
on a mailing list, or ask a question on the Q&A site, we can explain to
them that what they're doing is bogus.
2021-03-20 00:02:51 -07:00
John Thacker 54c30c8336 TCP: Handle sequence number wraparound in multisegment pdus
msp->nxtpdu might wrap around (particularly if DESEGMENT_UNTIL_FIN
is set), so use the wrap around aware sequence number comparisons
when seeing if seq is in the interval [msp->seq, msp->nextpdu).
Note that with wraparound, we have to take the minimum after subtracting
to get the length desired.
2021-03-19 08:25:23 +00:00
Grzegorz Niemirowski d025bdca05 Dissection of Abort packet and characters number in Authorization 2021-03-18 23:58:07 +01:00
Vojtěch Svědiroh 90da092772 MNDP: Add TLV 17 (IPv4 Address) 2021-03-18 10:48:47 +00:00
Nardi Ivan 6cdfc087c5 TLS: add support for brotli-compressed certificates 2021-03-17 20:10:08 +00:00
David Perry 02a4d41c10 Fix typo in packet-exported_pdu.c
The hidden entry for `ipv6.addr` was mistakenly being generated as
`ipv6.src` instead.
2021-03-17 14:48:37 +00:00
Anders Broman f5fb60cfdd GTP: Fix the version check in decode_qos_umts() 2021-03-17 10:34:30 +00:00
Preston Hunt eda6acb63b 802.11: add dissection of FTM Ranging Parameters 2021-03-17 10:18:26 +00:00
ranjetsih 83165d0107 PFCP: Add missing dissection of ipv6 pd address in UE IP Address
Dissection of UE IP Address was incomplete with missing ipv6 pd address field. This is added by this change.
refer https://gitlab.com/wireshark/wireshark/-/issues/17300 for more details of the issue.
2021-03-17 13:49:22 +05:30
Alexis La Goutte eee8476acd tls(-utils): Add value from RFC 8998 2021-03-17 07:23:36 +00:00
Guy Harris 7efb2120bc kerberos: regenerate packet-kerberos.h.
We updated the template; regenerate the header.
2021-03-16 14:57:30 -07:00
Guy Harris 2820156fbd Move still *more* headers outside of extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 13:50:13 -07:00
Pascal Quantin 205e77d404 ISAKMP: Pad Length field is 1 byte long 2021-03-16 15:28:30 +00:00
Mikael Kanstrup d3235c685b ieee80211: Support decrypting Fast BSS Transition with roaming
Support decrypting captures with Fast BSS Transition roaming present
by now also scanning (re)association frames for relevant information
elements and feeding it into the dot11decrypt engine.

Both (re)association request and response frames are scanned to allow
for potentially missing one frame and still be able to derive PTKs
needed for successful decryption.

Closes #17145

Change-Id: I08436582e4f83695dc606ddb92ff442d6258ef9b
2021-03-16 14:36:26 +00:00
Mikael Kanstrup da05e55c74 ieee80211: Display IGTK and GTK subelem key lengths in decimal form 2021-03-16 14:36:26 +00:00
Mikael Kanstrup 49f279a04d ieee80211: Convert proto data type define to an enum
Convert the proto data type defines to an enum to avoid explicitly
have to give each type a value.
2021-03-16 14:36:26 +00:00
Mikael Kanstrup f0dcee3787 ieee80211: Save dot11decrypt proto data only when decryption is enabled 2021-03-16 14:36:26 +00:00
ishaangandhi 37b3295175 ICMP6: Parse RFC 5837 extension structures 2021-03-16 14:16:43 +00:00
Guy Harris 1e1f4e6b5f Move more headers outside extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 02:36:10 -07:00
Guy Harris ce20c00049 Remove unnecessary inclues of wiretap/pcapng.h. 2021-03-15 15:29:40 -07:00
Preston Hunt 89ae76d300 IEEE 802.11: Add Protected FTM Request/Response 2021-03-15 14:53:00 +00:00
Preston Hunt db8be3d200 IEEE 802.11: Refactor FTM Request/Response
Refactor FTM request/response code to prepare for adding protected FTM
request/response. This commit should not change the functionality in any
way.
2021-03-15 14:53:00 +00:00
Richard Sharpe 8252878a45 ieee1905: Fix a filter bitfield that was incorrect.
This was noticed by Peng Yan of the WFA.

Change-Id: I29a601ec7bd03f68bb5ee8ab4ab8f9e343d3bc36
2021-03-15 06:22:00 +00:00
Richard Sharpe 528eb3b3aa ieee80211: Fix a tag_len calculation that was wrong.
Found by the WFA during testing.

Change-Id: I00b017254b2342655c1261cde1dd2023886a6d87
2021-03-14 18:23:26 -07:00
Richard Sharpe fd4c768972 ieee80211: Add the tag val for TAG_INTRA_ACCESS_CAT_PRIO.
This was missed off my earlier merge.

Change-Id: I4fa4258db26344e69bd2d3c82734e2f526065d91
2021-03-14 18:23:25 -07:00
Thomas Sailer b5f2ed34b1 btle: decode new control PDUs and advertising info in 5.2
Decode control PDUs and advertising informationintroduced in
Bluetooth Core v5.2
2021-03-13 16:56:11 +00:00
Preston Hunt 172323a3e1 IEEE 802.11: Add dissection of FTM action trigger values 2021-03-13 14:06:13 +00:00
Martin Mathieson e5916d1fc9 NVME: Fix some spellings 2021-03-13 12:01:11 +00:00
Guy Harris f99bd01cee nvme: don't assume "%lu" is the right format to use for a guint64.
The right format to use is "%" G_GUINT64_FORMAT.  A guint64 might be an
unsigned long or it might be an unsigned long long; do not assume which
one it will be on all platforms.
2021-03-13 03:31:12 -08:00
Valerii Zapodovnikov cc6a45420a VP8: some cosmetics from RFC 7741 2021-03-13 09:36:21 +00:00
Dr. Lars Völker dabf0af6b7 AUTOSAR NM: In default configuration all CAN packets will be dissected
The default value for the CAN-ID Mask is currently 0. If no config is
present, all comparisons would be always true. This leads to all CAN
packets are being dissected by this dissector by default.
This is a huge performance problem and surely not intended.

This patch sets the default of the CAN-ID Mask to 0xffffffff, so that
in the unconfigured case, only the CAN-ID 0 would be dissected.
2021-03-13 08:00:30 +00:00
Constantine Gavrilov 272ff625f5 NVME Identify Controller: decode TNVMCAP, UNVMCAP, RPMBS fields.
Also, undo a3000150a6 changes, per review comments.
2021-03-13 07:18:47 +00:00
Constantine Gavrilov d509e7e872 NVME Identify Controller: decode MTFA, HMPRE, HMMIN fields. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov b7f3a922e0 NVME Identify Controller: decode AVSCC, APSTA, WCTEMP, CCTEMP fields. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov 6b9adc46de NVME Identify Controller: Error Log Page Entries and Number of Power States decoding. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov ded4a94c71 NVME Identify Controller: Firmware Updates and Log Page Attributes decoding. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov e2b444a650 NVME Identify Controller: fix compile with CLANG in strict mode. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov 5d0488cadc Refactor dissect_nvme_identify_ctrl_resp() function.
Since the intention is to add full decoding of the entire page, rewrite the function to use
add_tree_entries() and define decoding structures to avoid repeating the same code for
each decoded block.
2021-03-13 07:18:47 +00:00
Constantine Gavrilov 72443746a8 NVME Identify Controller: decode Optional Admin Command Support. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov d1f5fa2965 NVME Identify Controller: decode NVMe Management Interface 2021-03-13 07:18:47 +00:00
Constantine Gavrilov d277368d26 NVME Identify Controller: decode Command Retry Delay Times 2021-03-13 07:18:47 +00:00
Constantine Gavrilov 23a3f83140 NVME Identify Controller: decode FRU Globally Unique Identifier. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov c88eb867d6 NVME Identify Controller: decode Controller Type 2021-03-13 07:18:47 +00:00
Constantine Gavrilov f7ba8421cf NVME Identify Controller: add Read Recovery Levels decoding. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov 7d20992d8f NVME Identify Controller: add and use add_decode_group(). 2021-03-13 07:18:47 +00:00
Constantine Gavrilov af803b6f01 NVME Identify Controller: Decode Contoller Attributes. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov 04add823a5 NVME Identify Controller: Decode RTD3 fileds. 2021-03-13 07:18:47 +00:00
Constantine Gavrilov 84be51e614 NVME Identify Controller: Decode Optional Asyncrhonous Events Support. 2021-03-13 07:18:46 +00:00
Constantine Gavrilov de0a0a3568 NVME Identify Controller: decode additional fields:
* Firmware revision (FR)
* Recommended Arbitration Burst (RAB)
* IEEE OUI Identifier (IEEE)
* Controller Multi-Path I/O and Namespace Sharing Capabilities (CMIC)
* Print MDTS pages value
* Controller ID (CNTLID)
* Version (VER)
2021-03-13 07:18:46 +00:00
Valerii Zapodovnikov 381207c4e3 RTP: fixed comments, https 2021-03-13 04:05:12 +00:00
Alexis La Goutte 71f4712532 ncsi: Fix warning found by Clang Analyzer
packet-ncsi.c:653:55: warning: Although the value stored to 'offset' is used in the enclosing expression, the value is never actually read from 'offset' [deadcode.DeadStores]
2021-03-12 12:33:52 +00:00
Alexis La Goutte c3687757b9 mbim: Fix warning found by Clang Analyzer
packet-mbim.c:2871:5: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-mbim.c:2976:5: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
packet-mbim.c:4053:9: warning: Value stored to 'offset' is never read [deadcode.DeadStores]
2021-03-12 12:33:52 +00:00
Vahap Emin Ağaoğulları ed2955cf4c PTP: PTPv2 dissection updates
PTPv2 dissection dissected according to IEE Std 802.1AS-2011
This dissection updated according to IEE Std 802.1AS-2020.
2021-03-12 10:42:52 +00:00
ishaangandhi ee64d6362c ICMP: Support MTU in RFC 5837
This commit parses MTU's from interface identification objects when possible. Previously, they were unread.
2021-03-12 08:53:43 +00:00
Nardi Ivan 20a6fea312 EAP: fix a memory leak 2021-03-11 19:52:38 +01:00
Jorge Mora 74d432ecc4 NFS: fix for EXCHANGE_ID SP4_SSV
The hash and encryption algorithms are arrays of OIDs.
2021-03-11 13:07:47 +00:00
Martin Mathieson fa9d8fbc85 VP8: Show details of version field 2021-03-11 10:00:11 +00:00
Valerii Zapodovnikov 584442fd6d VP8 RTP: fixed wrong bit for "show bit" 2021-03-11 09:26:44 +00:00
Guy Harris a52ab28013 pcapng dissection: fix dissection of the if_filter IDB option.
Show the first octet of the option, giving the filter type.

Only display the rest of the option as a string if the type is 0,
meaning it's a libpcap-style filter string.

While we're at it, clean up the dissection of the rest of the options:

* do more proto_tree_add_item_ret_XXX to get the option value;
* don't bother constructing a string for the value if we don't have to;
* use proto_tree_add_item_ret_display_string for string values, so we
know they're printable.
2021-03-11 08:31:07 +00:00
Alexis La Goutte 73de7b1325 NAN(WiFi): Fix wrong variable size
NDPE Attribute is not dissected

Issue (and fix) reported by Darren Chen

Closed #17278
2021-03-11 07:58:45 +00:00
Chuck Craft 63b484c91a Qt: Copy->Value - don't zero pad hex values
Closes #17276
Update test scripts and datafiles for corrected output format.
2021-03-11 07:17:58 +00:00
Preston Hunt 11b7d17951 IEEE 802.11: add PASN authentication algorithm 2021-03-11 06:44:29 +00:00
Ronald Wahl 6210256229 LLDP: Allow organizational specific TLVs without payload
Currently organizational specific TLVs without payload cause an
exception which leads to a 'malformed packet' error. Add a check that
allows correctly parsing those TLVs.
2021-03-11 02:42:33 +01:00
Martin Mathieson 933e7f5eb6 DECT: "tranceiver" -> "transceiver" 2021-03-10 21:21:56 +00:00
Guy Harris dcd3e26a81 several: make the phy reflect the packet modulation.
Use the data rate and channel to determine 11b vs. 11g vs. 11a for:

* Aruba Networks encapsulated remote mirroring;
* Prism headers;
* *Peek remote protocol;
* Network Instruments^W^WViavi Observer;
* *Peek classic format;
* Shomiti Surveyor.

Note why we *don't* need to do that for NetMon captures.
2021-03-10 09:45:26 +00:00
Patrick Große 7b48fb91a0 DECT: Register dissector correctly
Register the DECT dissector correctly using register_dissector so
it can be used as sub-dissector etc.
2021-03-10 09:23:44 +01:00
Guy Harris b185260efb prism: clean up some things.
"CCK" really means "DSSS", whether it uses CCK or not, i.e.  it includes
both the legacy 802.11 DSSS PHY (1 Mb/s and 2 MB/s) and the 802.11b
HR/DSSS PHY (5.5 Mb/s and 11 Mb/s).  Change the text and the name of a
variable to match.

For OFDM, put the modulation type after the rate, as is done for the
text for other modulations.  Put "Rate:" before the rate for all
modulations as well.
2021-03-09 19:02:53 -08:00
Guy Harris 71905c6597 radiotap: fix a comment.
Radiotap doesn't supply a channel number, just a center frequency, so
the latter is what we use to guess the modulation.
2021-03-09 18:25:26 -08:00
Arkady Gilinsky 84e8b8b1f5 oampdu: Fix "Queue Configuration" message parsing
Signed-off-by: Arkady Gilinsky <8351139-ark-g@users.noreply.gitlab.com>
2021-03-09 19:58:35 +00:00
Arkady Gilinsky 1084e72f78 oampdu: Process DPoE GetRequest messages for Link and User Port objects
* Currently GetRequest messages processed only from ONU object itself
   and parsed incorrectly when such a messages originated for Link
   and User Port objects. This commit is fixing this parsing issue.

Signed-off-by: Arkady Gilinsky <8351139-ark-g@users.noreply.gitlab.com>
2021-03-09 19:58:35 +00:00
Martin Mathieson 2753c4c27e Expert info: check group and severity
Add a check for valid group and severity values, and fix violations foud.
2021-03-09 19:14:29 +00:00
Dr. Lars Völker 5d709459c4 TECMP: Adding missing reserved flag to timestamp (BUGFIX)
This patch fixes a bug in the current TECMP dissector that leads to
wrong timestamps, whenever the reserved flag is set to true.

Closes: #17279
2021-03-09 13:32:07 +00:00
Preston Hunt 1dd97bc1ff IEEE 802.11: add az LMR public action frame
Add dissection of Location Measurement Report public action frames.
2021-03-09 11:16:19 +00:00
Guy Harris 6e285df1c2 ppi: make the "phy" reflect the packet modulation.
Do more fixups of the "phy" based on the data rate, so that it reflects
the modulation used for the packet.

Note, in comments, why we're doing this, and that there's no reiable
way, in radiotap, to determine the type of channel on which capturing is
being done, as some packet providers use the channel field to indicate
the channel type and others use it to indicate the modulation.

Only provide the "short preamble" for "11b", as that's now being used to
mean "DSSS modulation" - packets on an 11g channel will be marked as
"11g" if they're OFDM or "11b" if they're DSSS.
2021-03-09 02:55:32 -08:00
John Thacker b3e55ba4b7 MP2T: Detect stuffing bytes after SECTs when PUSI is 0
When the payload_unit_start_indicator is 0, a continued section may be
followed by stuffing bytes. Detect the stuffing bytes based on the SECT
length and handle them in the MPEG2 TS dissector in that case, rather than
handing them to the SECT dissector (which assumes that the incoming tvb
contains only one section and no additional data), similar to how stuffing
bytes are already handled when the PUSI is 1.
2021-03-09 08:24:46 +00:00
Guy Harris 31dc280d25 radiotap, wlancap, wiretap: make the "phy" reflect the packet modulation.
Do more fixups of the "phy" based on the data rate, so that it reflects
the modulation used for the packet.

Note, in comments, why we're doing this, and that there's no reiable
way, in radiotap, to determine the type of channel on which capturing is
being done, as some packet providers use the channel field to indicate
the channel type and others use it to indicate the modulation.

Only provide the "short preamble" for "11b", as that's now being used to
mean "DSSS modulation" - packets on an 11g channel will be marked as
"11g" if they're OFDM or "11b" if they're DSSS.

Make some other cleanups while we're at it.
2021-03-08 18:40:32 -08:00
Anders Broman 1910e416a9 LTE-RRC: Rename some duplicated fields names. 2021-03-08 17:16:44 +00:00
Martin Boye Petersen fd9dcb592a GBCS: User interface alerts does not contain UI code
The user interface code is not part of user interface alerts,
so do not try to dissect it.
This makes the corresponding hf field and value string list unused, so remove those.
2021-03-08 15:40:31 +00:00
Anders Broman 4131019969 proto.c: Use global var insted of environment var
WIRESHARK_ABORT_ON_TOO_MANY_ITEMS
Closes #17275
2021-03-08 15:12:56 +00:00
Pascal Quantin 879a33f158 LTE RRC: add dissection of NAS 5GS PDUs
A ng-eNB connects to a 5GC, not an EPC, and thus transports 5GS NAS PDUs
2021-03-08 13:02:19 +01:00
Grzegorz Niemirowski 23052de590 ZVT: Added dissection of Refund and Reversal packets 2021-03-08 09:04:42 +01:00
João Valverde e240ec3d2d NetPerfMeter: Drop "protocol" from the name 2021-03-07 18:09:10 +00:00
Chuck Craft cdf5f31454 cip: set hf_cip_cm_sc as generated field
Closes #17270
2021-03-06 15:17:23 +00:00
João Valverde cff3a1c08d prefs: Don't clobber env variable G_MESSAGES_DEBUG
Avoid silently overwriting the user's configuration.

Ping #17271.
2021-03-06 12:40:20 +00:00
Martin Mathieson ad143c382b BTLMP: Fix a value_string value 2021-03-05 20:24:08 +00:00
Martin Mathieson ed9d35df92 MBIM: Fix value_string entry
Field 'Mico Mode' (mbim.control.ms_registration_params_info.mico_mode) has a conflicting entry in its value_string: 1 is at indices 1 (Enabled) and 3 (Default)

https://download.microsoft.com/download/8/3/a/83a64106-a1f4-4a03-811f-4dbef2e3bf7a/MBIM extensions for 5G.docx
2021-03-05 18:51:57 +00:00
João Valverde 2d7b68aa09 Replace g_assert() with g_assert_true() for testing
g_assert_true() is always enabled, unlike g_assert().

Bump minimum GLib 2 required version to 2.38.
2021-03-05 14:54:58 +00:00
Martin Mathieson d617f197e8 IEEE80211-Radiotap: Fix a typo 2021-03-05 09:10:21 +00:00
Thomas Dreibholz fadbb0a31b Fix for NetPerfMeter Results message.
Fixed length field decoding in NetPerfMeter Results message:
type is uint16, not uint8.
2021-03-05 07:18:10 +00:00
Guy Harris 25d44cde11 wsutil: rename frequency-utils.[ch] to 802_11-utils.[ch].
It's 802.11-specific, and may include non-frequency/channel-related
items in the future.
2021-03-04 15:41:00 -08:00
Thomas Dreibholz a5757e77a4 Fixed detection of NetPerfMeter data pattern in dissector heuristics. 2021-03-04 20:27:24 +01:00
Alexis La Goutte 5efe21850d IPVS: Fix commit hook warning 2021-03-04 15:12:37 +00:00
Alexis La Goutte aae3c634b4 IPVS: Add COL_INFO with version and number of connection 2021-03-04 15:12:37 +00:00
Alexis La Goutte efae777674 IPVS: Add Payload version 1 2021-03-04 15:12:37 +00:00
Alexis La Goutte efb27fe2e3 IPVS: Add support of Header Version 1
if Count Conns equal 0 it is header version 1 (or after) with version and reserved bytes
2021-03-04 15:12:37 +00:00
Grzegorz Niemirowski bae98a46e9 ZVT: Added dissection of missing fields in Status Information packet
BMPs: trace number, expiry date, card number, card name, additional data,
contract number, authorization attribute
TLVs: card type, receipt parameter, application
2021-03-04 14:14:31 +00:00
John Thacker 1796053491 dvb-data-mpe: Decode MAC address, don't process scrambled data
Use FT_ETHER for the MAC address, unless the scrambling bits are set,
in which case use a FT_BYTES field. Don't put the address in a separate
tvb, so the bytes it is extracted from can be highlighted. Don't decode
the payload if the payload scrambling bits are set. Add value_strings and
expert infos.
2021-03-04 09:53:29 +00:00
Martin Mathieson bd044e5ec0 PDCP-NR: some decryption changes.
- show 'deciphering disabled' context setting in tree
- decrypt DRBs even if don't think have seen securityModeComplete
2021-03-04 08:42:52 +00:00
Preston Hunt 6b6a2f77ad IEEE 802.11: Add constants for az, aj, and aq 2021-03-04 07:31:10 +00:00
João Valverde e536166b38 Fix warnings with GCC and -O3
When building with GCC 10.2.0 and optimization level 3 some new
warnings turn up. Fix them.

./epan/crypt/dot11decrypt_util.c: In function ‘dot11decrypt_derive_pmk_r0’:
../epan/crypt/dot11decrypt_util.c:308:5: error: ‘sha256_res’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  308 |     memcpy(pmk_r0_name, sha256_res, 16);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../epan/crypt/dot11decrypt_util.c: In function ‘dot11decrypt_derive_pmk_r1’:
../epan/crypt/dot11decrypt_util.c:357:5: error: ‘sha256_res’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  357 |     memcpy(pmk_r1_name, sha256_res, 16);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../wiretap/wtap_opttypes.c: In function ‘wtap_block_add_if_filter_option’:
../wiretap/wtap_opttypes.c:782:12: error: ‘*((void *)&filter_dest+8)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  782 |     return filter_dest;
      |            ^~~~~~~~~~~
../wiretap/wtap_opttypes.c: In function ‘wtap_block_set_if_filter_option_value’:
../wiretap/wtap_opttypes.c:782:12: error: ‘*((void *)&filter_dest+8)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  782 |     return filter_dest;
      |            ^~~~~~~~~~~
2021-03-03 15:15:25 +00:00
Martin Mathieson 1e17f3f287 MPEG-DSMCC: Increase size of private data length field.
From tools/check_typed_item_calls.py:
epan/dissectors/packet-mpeg-dsmcc.c:1212 proto_tree_add_item called for hf_dsmcc_dii_private_data_length  -  item type is FT_UINT8 but call has len 2
- add an option to decrypt even if not strictly in-sequence
2021-03-03 08:38:59 +00:00
Martin Mathieson fc6bdbfe71 ORAN: Fix a param name, and some section refs 2021-03-02 22:36:19 +00:00
Thomas Dreibholz eabca2f2b8 Header updates, pointing to up-to-date I-D versions. 2021-03-02 21:35:24 +00:00
Thomas Dreibholz 57300b5008 Moved some more definitions. 2021-03-02 21:35:24 +00:00
Thomas Dreibholz 957ab6370a Removed defines from packet-enrp.c, since they are now already defined in packet-asap+enrp-common.h. 2021-03-02 21:35:24 +00:00
Thomas Dreibholz 80b723dc1b Moved common definitions from packet-asap.c to packet-asap+enrp-common.h. 2021-03-02 21:35:24 +00:00
Grzegorz Niemirowski fb3de6ef04 ZVT: Add receipt parameter dissection 2021-03-02 20:51:35 +00:00
John Thacker 470f94cc3d mpeg-sect: Support Decode As; only register one dissector (MPE) to TID 0x3E
DVB-DATA Multiprotocol Encapsulation (MPE) has the table id 0x3E, which
is conformant to DSM-CC sections with private data, and is by far the
most common "private" implementation. Only register MPE as the default
subdissector for 0x3E, don't register DSM-CC as well. (The order of
registration means that MPE is already the current default, but this
is not reliable.)

Support Decode As for the table ids so that DSM-CC can be used instead if
someone really wants that, and so that some other user private dissector
plugin (on 0x3E or any other user private table_id) can be used.
2021-03-02 06:12:18 +00:00
João Valverde 7f105d3981 CMake: Use CheckAPI's abort/termoutput with dissectors only
I believe this was the original intention, to use these API restricitons
with dissectors only (not that I necessarily agree with that policy either),
and through copy-paste and lack of clear guidelines it spread to other
parts of the build.

Rename the checkAPI groups to make it very clear that this is dissector-only.

This doesn't mean, of course, that good programming practices shouldn't be
followed everywhere. In particular assertions need to be used properly.
Don't use them to catch runtime errors or validate input data.

This commit will be followed by another removing the various ugly hacks
people have been using to get around the checkAPI hammer.
2021-03-01 20:59:39 +00:00
Nardi Ivan 142cfb03ac GQUIC: fix parsing of unknown (but valid) tags
This commit should be a proper fix for the regression reported in #17250
(7fd71536 is a simple workaround). Such regression has been introduced by
b287e716 while fixing the infinite loop reported in #16897.

b287e716, while fixing the infinite loop, broke the decoding of perfectly
valid tags not yet supported by Wireshark.

AFAIK, the root cause of the infinite loop is the overflow of the `offset`
variable. Therefore checking for this overflow should be sufficient to avoid
the loop.
Note that we already check for sensible values for the 'tag_len' variable;
we should update `total_tag_len` accordingly.

Some words about testing: other than correctly handling unknown but valid
tags, it is important that this commit doesn't reintroduce the infinite
loop bug.
Fortunately #16897 provided a POC trace. Unfortunately, if you revert
b287e716, this POC doesn't work anymore in master-3.4 and master branches,
but it still triggers the infinite loop in master-3.2 branch.
Therefore I have been able to manually check that this MR + the
overflow check is enough to avoid the infinite loop bug, at least in master-3.2.

Some traffic with unknown but valid tags is available in e2ee14ae03.
2021-03-01 12:29:35 +01:00
Lin Sun 26b602a7ae [dissector] add dissector for OPUS packet support
*packet-opus.c: dissector for OPUS packet.
2021-03-01 09:11:34 +00:00
Darius Davis a3be7e898c column-utils: Get snprintf prototype from stdio.h.
Commit 73d793788c removed ws_printf.h from
column-utils.c, but left no prototype for snprintf, causing a build failure on
my Debian testing host.  Let's #include <stdio.h> here.
2021-03-01 07:13:12 +00:00
Guy Harris e31bddb16f geonw: fix the column formatting.
1) G_GUINT16_FORMAT produces warnings about mismatched format string
formats and arguments if you use it with a 32-bit value.

2) There's no reason to format into a string buffer and then use
col_append_lstr(); col_append_fstr() suffices.  (In col_append_ports(),
the formatting is done with col_snprint_port(), which attempts to
resolve the port number to a name, but we don't do that here, we just
format it as a number.)
2021-02-28 22:21:33 -08:00
João Valverde 73d793788c Remove and replace obsolete ws_snprintf() definition
Since fe94133f0d ws_snprintf()
and ws_vsnprintf() don't actually do anything anymore.

The return value of ws_[v]snprintf was discarded before,
now it too conforms to C99.
2021-02-28 22:03:42 +00:00
Alexis La Goutte 670fab2ce5 ieee80211: Fix Dead Store found by Clang Analyzer
Value stored to 'offset' is never read
2021-02-28 15:44:15 +00:00