Commit Graph

1130 Commits

Author SHA1 Message Date
Guy Harris 86af1d6707 e2ap: fix a compiler warning due to a strange maxofRICrequestID value.
The minimum and maximum length arguments to
dissect_per_constrained_set_of() are currently both ints.

According to O-RAN.WG3.E2AP-v02.03, section 9.3.7 "Constant
definitions", maxofRICrequestID is 1024, not 2^32-1; however, we were
specifying it as 2^32-1 (4294967295).

2^32-1 won't fit into an int, and Apple clang version 14.0.0
(clang-1400.0.29.102) warns about that:

    ./asn1/e2ap/e2ap.cnf:647:54: error: implicit conversion from 'long' to 'int' changes value from 4294967295 to -1 [-Werror,-Wconstant-conversion]
                                                      1, maxofRICrequestID, FALSE);
                                                         ^~~~~~~~~~~~~~~~~
    ./asn1/e2ap/packet-e2ap-val.h:7:40: note: expanded from macro 'maxofRICrequestID'
    #define maxofRICrequestID              4294967295
                                           ^~~~~~~~~~

The handling of MIN and MAX should be done with separate "minimum is
MIN" and "maximum is MAX" flags, and we might want either to have
asn2wrs.py reject attempts to have constraints with integer minimum and
maximum values outside the range [-2^31, 2^31-1], make the types for
sizes unsigned, or allow 64-bit constraints (and still limit the
constraint values, so we don't have to dive down a bignum rathole).

But, for now, we just change maxofRICrequestID to match what the 2022-10
version of the spec, 2.03, appears to say.

(I can't find the 2.01 version online, so I don't know whether it was
1024 in 2.01, or if it was changed in 2.02 or 2.03.)
2022-10-27 23:57:51 -07:00
Martin Mathieson d46e7f90f2 E2AP 2.01 2022-10-27 20:26:11 +00:00
AndersBroman 5c53de8f47 X2AP: Make it possible to dissct private IEs 2022-10-22 21:40:23 +02:00
AndersBroman 533eb735e3 Camel: Dissect TimeAndTimezone
Closes #18485
2022-10-21 14:05:03 +00:00
Stig Bjørlykke cac6a8452b h248: Add missing dot in H.248 protocol name
Add the missing dot in H.248 protocol name and dissector table.

Closes #18513
2022-10-20 13:20:01 +00:00
João Valverde bd0102fc64 LDAP: Validate DNS name string encoding 2022-10-20 12:03:52 +00:00
Joakim Karlsson 0f46eef597 gtpv2: Update to 3GPP TS 29.274 V18.0.0 2022-10-06 21:19:49 +00:00
Joakim Karlsson de0a1f2626 gprscdr: Update to 3GPP TS 32.298 V17.4.0
Only documentation changes
2022-10-06 16:00:22 +00:00
Pascal Quantin 4dcafcf976 NR RRC: upgrade dissector to v17.2.0 2022-10-05 08:50:43 +02:00
Pascal Quantin 1ef5af31ce LTE RRC: upgrade dissector to v17.2.0 2022-10-04 17:34:17 +00:00
Pascal Quantin 34eebaeb10 LPP: upgrade dissector to v17.2.0 2022-10-04 14:59:37 +00:00
Pascal Quantin 6a0a153226 NR RRC: register a dissector by name for Reconfiguration Complete
Closes #18406
2022-10-04 14:57:55 +00:00
Pascal Quantin 567b759ae2 E1AP: upgrade dissector to v17.2.0 2022-09-26 15:33:55 +02:00
Pascal Quantin 71e11142d1 XnAP: upgrade dissector to v17.2.0 2022-09-26 15:12:37 +02:00
Pascal Quantin 4b095e3f9b X2AP: upgrade dissector to v17.2.0 2022-09-26 12:54:05 +00:00
Pascal Quantin 61fcfc0b0b NGAP: upgrade dissector to v17.2.0 2022-09-26 14:16:27 +02:00
Pascal Quantin e9318bdee3 S1AP: upgrade dissector to v17.2.0 2022-09-25 19:41:41 +02:00
Pascal Quantin 60b6fb4484 E1AP: upgrade dissector to v17.1.0 2022-09-13 17:26:32 +02:00
Guy Harris e5951765d8 Dissector names are not protocol names.
A given protocol's packet format may depend, for example, on which
lower-level protocol is transporting the protocol in question.  For
example, protocols that run atop both byte-stream protocols such as TCP
and TLS, and packet-oriented protocols such as UDP or DTLS, might begin
the packet with a length when running atop a byte-stream protocol, to
indicate where this packet ends and the next packet begins in the byte
stream, but not do so when running atop a packet-oriented protocol.

Dissectors can handle this in various ways:

For example, the dissector could attempt to determine the protocol over
which the packet was transported.

Unfortunately, many of those mechanisms do so by fetching data from the
packet_info structure, and many items in that structure act as global
variables, so that, for example, if there are two two PDUs for protocol
A inside a TCP segment, and the first protocol for PDU A contains a PDU
for protocol B, and protocol B's dissector, or a dissector it calls,
modifies the information in the packet_info structure so that it no
longer indicates that the parent protocol is TCP, the second PDU for
protocol A might not be correctly dissected.

Another such mechanism is to query the previous element in the layers
structure of the packet_info structure, which is a list of protocol IDs.

Unfortunately, that is not a list of earlier protocols in the protocol
stack, it's a list of earlier protocols in the dissection, which means
that, in the above example, when the second PDU for protocol A is
dissected, the list is {...,TCP,A,B,...,A}, which means that the
previous element in the list is not TCP, so, again, the second PDU for
protocol A will not be correctly dissected.

An alternative is to have multiple dissectors for the same protocol,
with the part of the protocol that's independent of the protocol
transporting the PDU being dissected by common code.  Protocol B might
have an "over a byte-stream transport" dissector and an "over a packet
transport" dissector, with the first dissector being registered for use
over TCP and TLS and the other dissector being registered for use over
packet protocols.  This mechanism, unlike the other mechanisms, is not
dependent on information in the packet_info structure that might be
affected by dissectors other than the one for the protocol that
transports protocol B.

Furthermore, in a LINKTYPE_WIRESHARK_UPPER_PDU pcap or pcapng packet for
protocol B, there might not be any information to indicate the protocol
that transports protocol B, so there would have to be separate
dissectors for protocol B, with separate names, so that a tag giving the
protocol name would differ for B-over-byte-stream and B-over-packets.

So:

We rename EXP_PDU_TAG_PROTO_NAME and EXP_PDU_TAG_HEUR_PROTO_NAME to
EXP_PDU_TAG_DISSECTOR_NAME and EXP_PDU_TAG_HEUR_DISSECTOR_NAME, to
emphasize that they are *not* protocol names, they are dissector names
(which has always been the case - if there's a protocol with that name,
but no dissector with that name, Wireshark will not be able to handle
the packet, as it will try to look up a dissector given that name and
fail).

We fix that exported PDU dissector to refer to those tags as dissector
names, not protocol names.

We update documentation to refer to them as DISSECTOR_NAME tags, not
PROTO_NAME tags.  (If there is any documentation for this outside the
Wireshark source, it should be updated as well.)

We add comments for calls to dissector_handle_get_dissector_name() where
the dissector name is shown to the user, to indicate that it might be
that the protocol name should be used.

We update the TLS and DTLS dissectors to show the encapsulated protocol
as the string returned by dissector_handle_get_long_name(); as the
default is "Application Data", it appeaers that a descriptive name,
rather than a short API name, should be used.  (We continue to use the
dissector name in debugging messages, to indicate which dissector was
called.)
2022-09-10 22:37:11 -07:00
Anders Broman 625b422edf Try to fix clang tvb_memeql-warnings 2022-09-07 14:07:47 +02:00
Guy Harris 8195bdd340 Rename a bunch of things with "conversation".
A conversation in Wireshark might have two endpoints or might have no
endpoints; few if any have one endpoint.  Distinguish between
conversations and endpoints.
2022-08-25 20:02:20 -07:00
David Perry d0c8efe889 Use `register_dissector()` for more protocols 2022-08-19 22:53:58 +00:00
Pascal Quantin 653c4d3e91 XnAP: upgrade dissector to v17.1.0 2022-08-16 01:33:00 +00:00
Pascal Quantin 938cc05d20 NGAP: add NTN related restricted RATs 2022-08-14 18:00:53 +00:00
Pascal Quantin 8291dc23f3 RRC: upgrade dissector to v17.1.0 2022-08-13 17:35:21 +00:00
Pascal Quantin d982338177 NGAP: upgrade dissector to v17.1.1 2022-08-12 19:15:16 +00:00
Pascal Quantin cf17011c53 S1AP: add support for NTN NB-IoT TACs 2022-08-12 20:47:41 +02:00
Pascal Quantin 7d1f5939ae X2AP: upgrade dissector to v17.1.0 2022-08-12 16:44:14 +02:00
Pascal Quantin a9ea071b83 S1AP: upgrade dissector to v17.1.0 2022-08-12 15:23:48 +02:00
DarienSpencer65 61e1da8e86 UMTS RLC: Support no-op encryption (UEA0) 2022-08-11 06:43:37 +00:00
Pascal Quantin af558f672b NR RRC: upgrade dissector to v17.1.0 2022-08-10 18:05:01 +02:00
Pascal Quantin f1140dbc9c LPP: upgrade dissector to v17.1.0 2022-08-10 14:16:18 +02:00
Pascal Quantin dc03586983 LTE RRC: upgrade dissector to v17.1.0 2022-08-10 12:58:20 +02:00
John Thacker 203cd2cba9 prefs: More cleanup, auto prefs
Remove callback function from pref registrations for dissectors that
don't need a callback. In other dissectors, move registration that
only needs to be done once inside the check for initialization,
avoiding some console messages when preferences are changed
("Duplicate dissectors (anonymous) and (anonymous) for protocol...")
and the like.

Add a couple auto preferences for dissectors missed in previous waves.

Ping #14319
2022-08-09 06:21:05 +00:00
John Thacker 2347345eec prefs: More port prefs to auto prefs with ranges
Move the rest of the SCTP port preferences to auto prefs
with ranges. Ping #14319.
2022-08-06 18:51:07 -04:00
John Thacker 057436ff81 Prefs: Convert some SCTP port preferences to auto prefs
Convert SCTP port preferences in dissectors starting m-z.
Preferences that were already the name of the table can just
be removed from the dissector and they will migrate. Preferences
with a different name are added to deprecated_port_prefs in
epan/prefs.c (Since that function handles them there is no
need to mark them as obsolete.)

Also change a few TCP and UDP single ports reigstered with
preferences and callbacks that used the sample dissector as
a template.

Uses more auto preferences, makes more port preferences ranges,
and reduces the number of preference callbacks. Ping #14319
2022-08-06 00:17:14 -04:00
Uli Heilmeier 0a6eae4df1 X509if: Increase MAX_RDN_STR_LEN to 128
Fixes: #18183
2022-07-11 15:07:09 +00:00
João Valverde 229dad6a75 X509IF: Fix duplicate filter name
Fixes #18155.
2022-06-24 21:10:45 +00:00
Roland Knall 2cf938cfa8 tap: Adding flags for tap_packet
This allows flags to be passed by the registering listener
to the collection of information
2022-06-10 05:46:15 +00:00
Stig Bjørlykke 604cb2a7a3 t38: Use correct conversation_new() options
Fix conversation_new() options after they was changed/improved
in commit 709593ee.
2022-06-07 22:09:28 +00:00
Joakim Karlsson 7a59f8a22c gprscdr: Update to 3GPP TS 32.298 V17.2.0
Only documentation changes, no new c file is generated
2022-05-25 13:56:21 +02:00
Dario Lombardo 7cbb6e9a76 dissectors: init memory before use.
CID: 52571445-27
2022-04-19 20:45:24 +00:00
Martin Mathieson 58821b50b5 PDCP-NR: changes to make security keys work better 2022-04-19 15:13:51 +00:00
Pascal Quantin 43828765c3 NR RRC: upgrade dissector to v16.8.0 2022-04-19 12:39:03 +02:00
Pascal Quantin 58af12cac7 LTE RRC: upgrade dissector to v16.8.0 2022-04-19 09:22:58 +00:00
Pascal Quantin 5c7c723feb LPP: upgrade dissector to v16.8.0 2022-04-19 10:05:41 +02:00
Pascal Quantin 50ada3d65c NGAP: workaround a gcc 10.2.1 compilation issue
Fixes #17858
2022-04-13 16:58:54 +02:00
Anders Broman 096947337e PER:Add function to add "PER encoded lable" to the tree. 2022-04-12 08:33:36 +02: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