Commit Graph

44147 Commits

Author SHA1 Message Date
João Valverde a566076839 epan: Move time display types to field_display_e
This makes it easier to understand the code, avoids conflicts
and ugly and unnecessary casts.

The field display enum has evolved over time from integer types
to a type generic parameter.
2021-12-27 22:31:31 +00:00
João Valverde a0f1ffec71 epan: Remove obsolete header "garrayfix.h" 2021-12-27 21:16:05 +00:00
João Valverde 318bbfce60 EditorConfig: Fix proto.h 2021-12-27 20:29:50 +00:00
João Valverde 0d5bfd44a8 Use a wrapper function to call strptime()
Encapsulate the feature requirements for strptime() in a
portability wrapper.

Use _GNU_SOURCE to expose strptime. It should be enough on glibc
without the side-effect of selecting a particular SUS version,
which we don't need and might hide other definitions.
2021-12-27 14:07:32 +00:00
Joakim Karlsson 1339d30de3 pfcp: Update to 3GPP TS 29.244 V17.3.0 2021-12-27 10:56:17 +01:00
Gerald Combs a3df9fe13f [Automatic update for 2021-12-26]
Update manuf, services enterprise numbers, translations, and other items.

Asterix failed.
2021-12-26 18:40:31 +00:00
Guy Harris b3215d99ca rfc7468: don't use for (;;) for tvb_find_line_end() loops.
If you're past the end of the tvbuff, tvb_find_line_end() will, when
reassembly is not being done, return a zero-length line without
advancing next_offset, so, unless you check for being past the end of
the tvbuff, you'll loop forever.

Fixes #17801.
2021-12-25 22:22:31 -08:00
Odysseus Yang 6d1be225c6 MBIM: dissect the commands of MBIM extended version 4.0
MBIM_CID_MS_DEVICE_CAPS_V2
MBIM_CID_MS_REGISTRATION_PARAMS
MBIM_CID_PACKET_SERVICE
MBIM_CID_MS_NETWORK_PARAMS
MBIM_CID_MS_UE_POLICY
MBIM_CID_CONNECT
MBIM_CID_MS_PROVISIONED_CONTEXT_V2
MBIM_CID_SUBSCRIBER_READY_STATUS
2021-12-24 09:00:57 +00:00
Jaap Keuter f151e1b0c2 Refactor VARINT handling 2021-12-23 14:27:30 +00:00
Jaap Keuter 1b5acc8d57 Replace ENC_VARIANT_MASK by ENC_VARINT_MASK 2021-12-22 20:14:31 +00:00
Roman Volkov 3b59cb018c mpeg-descriptor: Add support for official DVB 8K HEVC streams 2021-12-22 19:35:18 +00:00
João Valverde d8b7d1f821 dfilter: Add aliases "any_eq" and "all_ne" 2021-12-22 14:32:32 +00:00
João Valverde 8b23dd3a3c dfilter: Add an "all equal" operator
To complete the set of equality operators add an "all equal"
operator that matches a frame if all fields match the condition.

The symbol chosen for "all_eq" is "===".
2021-12-22 14:32:32 +00:00
Moshe Kaplan 69d54d6f8e Corrects repeated words throughout the code.
Repeated words were found with:
egrep "(\b[a-zA-Z]+) +\1\b" . -Ir
and then manually reviewed.
Non-displayed strings (e.g., in comments)
were also corrected, to ease future review.
2021-12-22 11:01:11 +00:00
Jaap Keuter 6fa56bca0c Remove remnants of bygone GTK era 2021-12-22 06:02:10 +00:00
Jaap Keuter 2d7c888a70 MySQL: Replace illegal internal proto tree API use 2021-12-22 05:04:42 +00:00
John Thacker bfbf8dfa23 IEC101/104: 101 Fixed frame len depends on address length
The PDU length for IEC101 Fixed Length frames depends on the
global address length setting. Fix #17775.
2021-12-21 09:39:28 -05:00
Georg Sauthoff e273006a1d Add ETI/EOBI order flow/market data dissectors
The Enhanced Trading Interface (ETI) protocol and the Enhanced
Order Book Interface (EOBI) protocol are used by a few European
exchanges such as Eurex, Xetra and Börse Frankfurt.

Basically, a trader uses ETI to communicate with a matching
engine (over TCP), e.g. to add a new order, modify an existing
one, etc. while the matching engine also publicizes the current
state of the order book via EOBI over multicast UDP feeds.

ETI actually consists of two variants, i.e. ETI for derivatives
markets (such as Eurex) and ETI for cash markets (such as Xetra).
A common convention is to abbreviate them as ETI (for
derivatives) and XTI (for cash).

These protocols share the same encoding, i.e. messages start with
a length and a tag field and most messages and fields are fixed
size. See also
https://github.com/gsauthof/python-eti#protocol-introduction for
some more details.

The protocol specifications are openly available (cf.
https://github.com/gsauthof/python-eti#protocol-descriptions for
direct links) in human and machine-readable (XML) formats.

The Wireshark ETI/XTI/EOBI dissectors are code-generated by
`eti2wireshark.py`
(https://github.com/gsauthof/python-eti/blob/master/eti2wireshark.py)
which is GPL licensed. See also
https://github.com/gsauthof/python-eti#wireshark-protocol-dissectors
for usage examples and related work.
2021-12-21 08:10:43 +00:00
João Valverde 5ce2ae2804 Clean up some printf() format strings 2021-12-21 02:15:46 +00:00
João Valverde 36d5aad962 wsutil: Split ws_regex_matches() into two functions
Split ws_regex_matches() into two functions with better semantics
and remove the WS_REGEX_ZERO_TERMINATED symbol.

ws_regex_matches() matches zero terminated strings.

ws_regex_matches_length() matches a string length in code units.
2021-12-21 00:40:02 +00:00
Alexis La Goutte 457ce59bfa mbim: Fix warnings by Cang Analyzer 2021-12-20 06:51:53 +00:00
Alexis La Goutte 3d81fd5027 mka: Fix warnings by Cang Analyzer
packet-mka.c:569:7: warning: Value stored to 'offset2' is never read [deadcode.DeadStores]
2021-12-20 06:51:53 +00:00
Gerald Combs e56c00e12f [Automatic update for 2021-12-19]
Update manuf, services enterprise numbers, translations, and other items.
2021-12-20 06:22:21 +00:00
João Valverde ce1dc88173 Fix stdio.h conversions to use the scanf macros 2021-12-19 23:49:55 +00:00
João Valverde dec5590b5b Fix errors found by fix-encoding-args.pl 2021-12-19 22:55:37 +00:00
João Valverde 80c9b56e7a ERSPAN Marker: Fix a pre-commit check
epan/dissectors/packet-cisco-marker.c (13 (of 13) fields)
cisco_erspan_marker.prop_header doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.header doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.version doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.type doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.ssid doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.granularity doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.utc_offset doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.timestamp doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.utc_sec doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.utc_usec doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.sequence_number doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.reserved doesn't match PROTOABBREV of cisco-marker
cisco_erspan_marker.tail doesn't match PROTOABBREV of cisco-marker
2021-12-19 22:55:36 +00:00
João Valverde ca2a8e69a9 Fix a pre-commit check
epan/dissectors/packet-lwm2mtlv.c:  FT_STRING:        proto_tree_add_item(tlv_tree, hf_lwm2mtlv_value_string, tvb, valueOffset, element->length_of_value, [[ENC_UTF_8|ENC_NA]-->[ENC_UTF_8]]);
2021-12-19 21:47:31 +00:00
João Valverde 0ccd69e530 Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
2021-12-19 21:21:58 +00:00
João Valverde 92b4e3277c Fix dissector -Wrestrict warnings
[31/254] Building C object epan/dissectors/CMakeFiles/dissectors.dir/packet-bssgp.c.o
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-bssgp.c: In function ‘de_bssgp_cell_id’:
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-bssgp.c:859:9: warning: ‘snprintf’ argument 4 overlaps destination object ‘add_string’ [-Wrestrict]
  859 |         snprintf(add_string, string_len, "%s, CI %u", add_string, ci);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-bssgp.c: In function ‘de_bssgp_rim_routing_inf’:
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-bssgp.c:2313:17: warning: ‘snprintf’ argument 4 overlaps destination object ‘add_string’ [-Wrestrict]
 2313 |                 snprintf(add_string, string_len, " %s, RNC-ID %u", add_string, rnc_id);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-bssgp.c: In function ‘de_bssgp_rnc_identifier’:
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-bssgp.c:2767:9: warning: ‘snprintf’ argument 4 overlaps destination object ‘add_string’ [-Wrestrict]
 2767 |         snprintf(add_string, string_len, " %s, RNC-ID %u", add_string, rnc_id);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[85/254] Building C object epan/dissectors/CMakeFiles/dissectors.dir/packet-gsm_a_bssmap.c.o
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-gsm_a_bssmap.c: In function ‘be_cell_id_type’:
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-gsm_a_bssmap.c:1842:21: warning: ‘snprintf’ argument 4 overlaps destination object ‘add_string’ [-Wrestrict]
 1842 |                     snprintf(add_string, string_len, "%s/RNC-ID (%u)", add_string, value);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-gsm_a_bssmap.c:1869:17: warning: ‘snprintf’ argument 4 overlaps destination object ‘add_string’ [-Wrestrict]
 1869 |                 snprintf(add_string, string_len, "%s/CI (%u)", add_string, value);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[137/254] Building C object epan/dissectors/CMakeFiles/dissectors.dir/packet-mswsp.c.o
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-mswsp.c: In function ‘get_name_from_fullpropspec’:
/home/jpv/code/wireshark/wireshark/epan/dissectors/packet-mswsp.c:2975:25: warning: ‘snprintf’ argument 4 overlaps destination object ‘dest’ [-Wrestrict]
 2975 |                         snprintf(dest, bufsize, "%s <INVALID>", dest);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-12-19 20:25:58 +00:00
João Valverde 22ee2764a7 Replace g_snprintf() with snprintf() (dissectors)
Use macros from inttypes.h with format strings.
2021-12-19 20:25:11 +00:00
João Valverde c5a19582e4 epan: Convert to use stdio.h from GLib
Replace:
    g_snprintf() -> snprintf()
    g_vsnprintf() -> vsnprintf()
    g_strdup_printf() -> ws_strdup_printf()
    g_strdup_vprintf() -> ws_strdup_vprintf()

This is more portable, user-friendly and faster on platforms
where GLib does not like the native I/O.

Adjust the format string to use macros from intypes.h.
2021-12-19 19:29:53 +00:00
Martin Mathieson 3b675f0fc1 5co-legacy: fix a filter string 2021-12-19 17:39:02 +00:00
João Valverde f75b79a59d Move wmem string utility functions to wsutil 2021-12-19 10:47:50 +00:00
Martin Mathieson 62a747bae3 file-jpeg: Fix value in vals_ifd_tags_exif[] 2021-12-18 11:43:03 +00:00
Joel Colledge f4123939d1 DRBD: Tidy up choice of display base for fields
When the dissector was added, BASE_HEX_DEC was used by default for many
fields. This is often not the most appropriate display format. The
biggest change is that all fields referring to sizes in bytes now
consistently use BASE_DEC_HEX.
2021-12-18 07:06:52 +00:00
Joel Colledge 217228eece DRBD: Decode two-phase commit payloads
This part of the DRBD protocol requires some state to correctly decode.
So we use a conversation to associate the packets. This conversation
stores a map of the two-phase commit data required for decoding later
packets.
2021-12-18 07:06:52 +00:00
Joel Colledge 4a28f5704f DRBD: Use CF_FUNC with BASE_CUSTOM
This is apparently necessary to prevent compilations warnings in certain
build environments.
2021-12-18 07:06:52 +00:00
Joel Colledge 583169ce06 DRBD: Add implicit data sizes as fields
Packets such as P_DATA do not have a dedicated field containing the size
of the data. It is simply the amount of extra data in the packet. It is
useful to be able to show or filter by this value, so add it as a
separate field.

Also combine the "blksize" and "size" fields, since they have the same
meaning.

Finally, remove some duplicates of the function decode_payload_data.
2021-12-18 07:06:52 +00:00
Joel Colledge 34f5c2c344 DRBD: Decode barrier numbers and block IDs little-endian
These values are opaque handles as far as the protocol is concerned.
They are sent from some node A to B, and then back from B to A. For node
B they have no meaning other than as a handle. However, on node A they
do have meaning, so it is useful to be able to interpret them. In
practice, they are usually little-endian encoded, so decode them
accordingly.
2021-12-18 07:06:52 +00:00
Antoine Gardiol e4cd4f92f8 5co-legacy: Fix dissector unique hash computing
*** CID 1495425:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT) in packet-5co-legacy.c: 765 in fiveco_hash()
2021-12-18 06:29:41 +00:00
Pau Espin de3359fe3e IuUP: Use proto_tree_add_checksum() to show CRC Header
Use standarized API to show checksum information. This also does the
checksum validation and shows computed CRC if found incorrect, etc.
2021-12-17 23:47:06 +00:00
Pau Espin f81a64e2bf IuUP: Fix CRC Header checks
All the packets coming from a known working source (nano3g femtocell)
where being shown as containing wrong CRC Header in Wireshark.

pcap file: https://osmocom.org/attachments/download/4744/3g_call_23112021.pcapng
2021-12-17 23:47:06 +00:00
João Valverde b054f9aee6 ASN1: Convert I/O from GLib to stdio.h 2021-12-17 19:34:54 +00:00
Martin Mathieson 834312cb62 DCT2000: For ipprim frames, show header even when no payload dissector 2021-12-17 16:37:22 +00:00
João Valverde 5bba669579 Remove some lingering uses of g_assert()
Also replace some incorrect uses of g_assert_true().

  g_assert_true -> g_assert -> ws_assert
2021-12-16 10:19:45 +00:00
Jaap Keuter 9539f4e1d6 MMDBR: Don't pretend to be a multithreaded writer 2021-12-16 09:28:54 +00:00
Antoine Gardiol 4248e5b665 5co-legacy: New FiveCo Legacy dissector 2021-12-16 09:13:37 +00:00
Brian Sipos a8b4bffab5 TCPCL: Display extension names from dissectors
Dissector names allow extension items to be given standard text names.
This also uses a protocol-in-name-only to avoid the frame.protocols field from containing ":tcpcl:tcpcl:tcpcl:..." for each extension dissection.
2021-12-16 05:13:52 +00:00
João Valverde 9d97b8e361 JSON: Remove unnecessary hfindex lookup 2021-12-15 20:49:51 +00:00
Martin Mathieson bf15343241 Fix some spelling errors 2021-12-15 12:28:16 +00:00