Commit Graph

39 Commits

Author SHA1 Message Date
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
DarienSpencer65 61e1da8e86 UMTS RLC: Support no-op encryption (UEA0) 2022-08-11 06:43:37 +00:00
João Valverde 19dcb725b6 epan: Remove STR_ASCII and STR_UNICODE
These display bases work to replace unprintable characters so the
name is a misnomer. In addition they are the same option and this
display behaviour is not something that is configurable.

This does not affect encodings because all our internal text strings
need to be valid UTF-8 and the source encoding is specified using
ENC_*.

Remove the assertion for valid UTF-8 in proto.c because
tvb_get_*_string() must return a valid UTF-8 string, always, and we
don't need to assert that, it is expensive.
2021-12-03 04:35:56 +00:00
João Valverde dcc02b1003 dissectors: Replace g_log() with ws_log() 2021-06-16 12:50:28 +00:00
Pascal Quantin 12ab24019f RRC: add preference to put NAS in the root tree 2021-02-10 13:29:33 +00:00
Moshe Kaplan 969c1c0271 packet-rrc: allocate correct type of object
When creating a `flowd_p`, instead of allocating
space for a `gint`, allocate space for a `guint`,
which is the actual type of object used. Also,
switch from `g_malloc` to `g_new`.
2020-12-27 14:11:37 +00:00
Darien Spencer 36fdc570f5 RRC: Add System Information Block type to info column
Add block type to information column and also
add fences for blocks container messages
(SysInfoUpdateRequest in NBAP, SysInfo-BCH in RRC)

Change-Id: I2a49229f74438cadc67603b6209d4a8d72cfd017
Reviewed-on: https://code.wireshark.org/review/34785
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-10-18 07:35:55 +00:00
Darien Spencer 10edd0749a RRC: Partial SIB dissection in BCCH-BCH messages
Support detection and dissection of 'complete sib
short' payloads which include the entire SIB in a
single RRC message.

Change-Id: Ie216a394e8f858edad5f3b4b4a0f818986216085
Reviewed-on: https://code.wireshark.org/review/34585
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-09-23 20:17:05 +00:00
Pascal Quantin 7d874e2d3c RRC: do not use a freed wmem_strbuf structure
Bug: 16067
Change-Id: Id67445d1769ff60560ac52ba03736055892fd029
Reviewed-on: https://code.wireshark.org/review/34590
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-09-22 12:19:30 +00:00
Darien Spencer 6d150bdf62 RRC: Reconstruct MCC-MNC pairs in PLMN-IdentityWithOptionalMCC element
In this patch when a 'PLMN-IdentityWithOptionalMCC'
field is found where MCC is missing but a MCC was seen previously
in the packet, the last MCC will be used for E.212 dissection.

Change-Id: I6bda9540f63acc693751606c1f99d6aa9539bd98
Reviewed-on: https://code.wireshark.org/review/33925
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-09-17 07:56:27 +00:00
Darien Spencer d22db568a0 RRC: Remove duplicate dissection of algorithm cap bitmaps
This commit is effectively reverting  I88ddc2aec6805a77fcb3f3d547efda4d513ec919
The dissection logic is now generated into the dissector
following the changes I2f4258e2f4fd11c26bdc101e1375d0b5708610b7
and Iec2cb22e61e235a749c7d0f976bae8ad52e6c08f

Change-Id: I871c2b00d7a72103da83d6e64091886a8e2b12ed
Reviewed-on: https://code.wireshark.org/review/33923
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-07-13 13:43:29 +00:00
Pascal Quantin 24ef409900 ETSI CAT: add dissection of Network Measurement Results
Bug: 15665
Change-Id: Iaff2432bf87d1c9d237709b651005518c89bff18
Reviewed-on: https://code.wireshark.org/review/32707
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04 10:59:12 +00:00
Gerald Combs 8d3ac3af86 epan: Convert our PROTO_ITEM_ macros to inline functions.
Convert our various PROTO_ITEM_ macros to inline functions and document
them.

Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c
Reviewed-on: https://code.wireshark.org/review/32706
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04 04:03:38 +00:00
Martin Mathieson d3c583aa67 Add protocol filter for exported parts of 3G and LTE RRC.
Change-Id: Ib5ed8eaecafe9f07eec2ee10f0f2684d81dec1b7
Reviewed-on: https://code.wireshark.org/review/32085
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2019-02-18 12:39:07 +00:00
Darien Spencer f6e3ed7e87 RRC: Use PINFO_FD_VISITED macro
Change-Id: Ica32ffc5f150451dba42a531d1661df4325b5c02
Reviewed-on: https://code.wireshark.org/review/27983
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-06-04 06:55:15 +00:00
Darien Spencer 2a9886bf09 RRC: Make the U-RNTI field filterable
U-RNTI is defined in ASN.1 as a 'SEQUENCE' of 2 numbers. this update
adds the U-RNTI field to the tree as a UINT32 with the value of the
numbers combined so it could be filtered.

Change-Id: I31e9f39a257aaf98c36eebb2cb7c33eb156a0e9f
Reviewed-on: https://code.wireshark.org/review/27566
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-05-17 21:22:13 +00:00
Pascal Quantin 74f7374e9f RRC: upgrade dissector to v15.2.0
Change-Id: I874466e05bbc1ff11c286078b482de2f27eccf8b
Reviewed-on: https://code.wireshark.org/review/26851
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-04-10 12:12:04 +00:00
Dario Lombardo b8101ed9a9 rrc: move allocation within if statement.
Change-Id: I2282a834560ef81a4f974e80fd6a0286e83a5461
Reviewed-on: https://code.wireshark.org/review/26143
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-28 12:03:07 +00:00
Nick James 2cf6517ec0 NBAP: Fix and enhance SIB parsing
1. Parsing of complete-sib-short was wrong - did not consider the 8 bits of length in the begining
2. Added re-assembly logic for SIBs segmented into first/subsequent/last payloads

Change-Id: I2c4aab2cace795c3e47a22921a34efc4ee26a25f
Reviewed-on: https://code.wireshark.org/review/25598
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-13 06:17:26 +00:00
Nick James 9295535220 RRC: Fix direction values
Values were swapped: uplink is 0, downlink is 1.

Change-Id: I30dbb6d89ea832741c3ce4a319be1cb261b1565b
Reviewed-on: https://code.wireshark.org/review/25143
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-01-06 12:16:25 +00:00
Nick James 5f0f2d610f RRC: Spot more UE transitions
Adding support for URNTI mapping when UE is moving from PCH/FACH to DCH

Change-Id: Iad67d7a88aac619171886cf35285e03d848146ae
Reviewed-on: https://code.wireshark.org/review/24963
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-25 08:42:28 +00:00
Darien Spencer 1683dd11e7 RRC: Improve C-RNTI resolving
Now also trying to resolve C-RNTIs in FACH from the global RNTIs map

Change-Id: If9ce5b73d6855271c15001fd73d8acaaaf9d1864
Reviewed-on: https://code.wireshark.org/review/24665
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-30 23:49:51 +00:00
Pascal Quantin a6d0ffca86 RRC: reset strbuf pointer after its use
While we are at it, let's add a partial dissection of
PLMN-IdentityWithOptionalMCC-r6 IE.

Bug: 14248
Change-Id: I20b76bc74c248914db21629f8ce77799fccb1612
Reviewed-on: https://code.wireshark.org/review/24661
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-30 12:17:48 +00:00
Gerald Combs ec0ffc043f RRC: Fixup wmem_strbuf usage.
Instead of calling wmem_strbuf_finalize, which frees the strbuf
structure and makes it unsuitable for reuse, call wmem_strdup +
wmem_strbuf_truncate. This fixes a heap-use-after-free.

Bug: 14248
Change-Id: I498e10ed9f9afa7fa72b607eb43f68c710de777e
Reviewed-on: https://code.wireshark.org/review/24650
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-11-30 00:15:39 +00:00
Darien Spencer 848cd4e291 rrc: fixed incorrect constants
The macinf->content field should be compared to MAC_CONTENT_* and not MAC_*

Change-Id: I0dee7855938095c5d1c53f4db13003b90cf7ba91
Reviewed-on: https://code.wireshark.org/review/24460
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-17 11:29:30 +00:00
Michael Mann abfb644117 Add conversation endpoint type
For the moment this mirrors the port_type enumeration (PT_XXX), but the
intent is to move away from using "port types", eliminating most (if not
all)

Added conversation_pt_to_endpoint_type() so that conversations deal with the
correct enumeration.  This is for dissector that use pinfo->ptype as input
to conversation APIs.  Explicit use of port types are converted to using
ENDPOINT_XXX type.

Change-Id: Ia0bf553a3943b702c921f185407e03ce93ebf0ef
Reviewed-on: https://code.wireshark.org/review/24166
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-29 16:53:57 +00:00
Darien Spencer 6aba76666d rrc: Dissect algorithm capabilities
asn2wrs created fields for several BITSTRING bits but does not actually uses them. This changeset calls them for the umts ciphering/integrity algorithms and gsm algorithms

Change-Id: I88ddc2aec6805a77fcb3f3d547efda4d513ec919
Reviewed-on: https://code.wireshark.org/review/23899
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-10-15 19:23:38 +00:00
Pascal Quantin e77d4dffff RRC: check wmem_strbuf_t pointer before using it
Digit field is also ussed by other fields than PLMN-Identity and
IMSI-GSM-MAP

Bug: 14069
Change-Id: Ic8cf4dc148fecf24e28ef1be21c3968d46e4b456
Reviewed-on: https://code.wireshark.org/review/23590
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-09-17 20:01:34 +00:00
Darien Spencer 875a46d1b5 UMTS RRC: Call E.212 Dissector
Calling E.212 dissector for MCC-MNC pairs/IMSIs found in RRC messages

Change-Id: I1cbb4fe552323b65c761cdf7a721e8b93f297106
Reviewed-on: https://code.wireshark.org/review/23520
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-09-15 20:39:34 +00:00
Darien Spencer bdf10a239f UMTS RLC: Mark ciphered frames
- Updated RRC dissector to always collect ciphering sequence numbers
from Security Mode Command/ Security Mode Complete
- Updated RLC dissector to seek the collected info when deciding if
the frame is ciphered

Change-Id: I44bc61736968ef9f420782048e15ba27d6c6267f
Reviewed-on: https://code.wireshark.org/review/23132
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-09-13 19:24:20 +00:00
Darien Spencer 0dada943c0 RLC: Renamed U-RNTI to UE ID
The 'U-RNTI' field in RLC Info struct is both used in the code and shown in the UI as a generic unique 'UE ID' (not specificly U-RNTI, although sometimes it is)
This commit renames the field to fit it's usage.

Change-Id: Ib42b8ed5192fe60c9a164d6d225634be53708c66
Reviewed-on: https://code.wireshark.org/review/22225
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-06-19 23:50:23 +00:00
Darien Spencer 31ffb58eb0 [UMTS RLC] Rename proto variable
To match the recently renamed file name.

Change-Id: Id784b955ec96a52a5f380d415094dce81e1774d5
Reviewed-on: https://code.wireshark.org/review/22222
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-06-19 13:43:20 +00:00
S. Shapira 900695547b UMTS Iub: Resolve U-RNTI for C-RNTI
This commit includes logic used to store pairs of C-RNTIs and U-RNTIs based on allocations in RRC and logic to retrive those when encountering C-RNTIs in the MAC header for DCCH over FACH/RACH.

Change-Id: I629ab061b7a73416e5730a980480b81a1aaade11
Reviewed-on: https://code.wireshark.org/review/21607
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-12 19:42:20 +00:00
S. Shapira 163d66099d UMTS Iub: Refactored U-RNTI resolving logic for dedicated channels
Instead of mapping Scrambling codes to U-RNTIs, now mapping CRNC communication context IDs to U-RNTIs.

Change-Id: Id81b7764d2941b742f21094dac391f8658061a80
Reviewed-on: https://code.wireshark.org/review/21495
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-07 21:01:05 +00:00
sswsdev 2e6cb9dbab UMTS Iub: Added U-RNTI resolving logic for UEs on DCH
The goal is to figure out the U-RNTI for UEs in DCH to
preserve a single continous RLC session when the UE moves to FACH
(Since the UE ID in FACH is derived from the identity found in the
MAC layer, which is sometimes the U-RNTI)
UMTS RRC dissector now defines a single 'umts rrc private data'
structure as the way to access the actx->private_data field

Change-Id: Id0ffcbcdf0a8babe533915855909e250852e46cf
Reviewed-on: https://code.wireshark.org/review/21087
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2017-04-20 20:19:46 +00:00
S. Shapira ea0f0939bb [UMTS RRC] Added dissection of "Cell Identity"
According to TS 25.401 / 6.1.5 Cell Identifier

Change-Id: I74996e76328f536dec0d34aa8229a1074ed47187
Reviewed-on: https://code.wireshark.org/review/20709
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-27 04:09:22 +00:00
Pascal Quantin 152e245804 proto_tree_add_item_ret_(u)int/proto_tree_add_bitmask_with_flags_ret_uint64: return real value
Apply mask and bit shift on the returned value.

Change-Id: I00aebc854756f01a25199a259d6d5252abea4349
Reviewed-on: https://code.wireshark.org/review/17958
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-28 06:07:01 +00:00
Pascal Quantin 8a89f66fb0 RRC: upgrade dissector to v13.2.0
Change-Id: Id2f7b90549057accf23b040cafcee738a2c0d9ee
Reviewed-on: https://code.wireshark.org/review/14800
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-04 00:16:54 +00:00
João Valverde 54a520d4a1 Move /asn1 to /epan/dissectors
Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9
Reviewed-on: https://code.wireshark.org/review/14388
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: João Valverde <j@v6e.pt>
2016-03-13 21:30:24 +00:00