Commit Graph

34 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
Evan Huus eda26f9e5f wmem: convert more asn1 dissectors to pinfo->pool
We prefer pinfo->pool over the global wmem_packet_scope() now. Convert a
few more asn1 dissectors. After this commit, just three asn1 dissectors
remain.
2021-08-19 15:07:44 +00:00
Evan Huus d09fb571fe asn1: convert most dissectors to pinfo->pool
Part 2/2 as the commits were too big for CI.

Largely find/replace, with a few manual tweaks. Then regenerate the asn1
dissector sources and make sure everything still builds. There are a
handful of cases I skipped as too complex, but this covers most of the
asn1 dissectors.
2021-07-26 14:00:09 -04:00
João Valverde dcc02b1003 dissectors: Replace g_log() with ws_log() 2021-06-16 12:50:28 +00:00
Anders Broman c523356c3b Fix duplicated filter namecated fileter names 2021-01-11 19:20:10 +00:00
Peter Wu 0145bd0ce5 asn1: fix -Wmisleading-indentation warnings with Clang 10
A lot of auto-generated ASN.1 dissectors have broken identation and
Clang 10 started warning about them for the first time. Fix these by
using 2 spaces as indentation instead of 2, none, or tabs.

Change-Id: Ia91668596c2f5000954d2265c39cc5dba18e44a7
Reviewed-on: https://code.wireshark.org/review/36368
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-11 04:18:46 +00:00
Darien Spencer e4094aeac6 NBAP: Actually set max mac-d pdu size flag
This completes the commit at: 2bd79c8208

Change-Id: I439ba64a248a66094c575a2629a5344c716f0f5c
Reviewed-on: https://code.wireshark.org/review/36015
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-02-03 13:21:34 +00:00
Roman Koshelev e57b37137d Compilation fixes when CMAKE_BUILD_TYPE = MinSizeRel (-Os flag).
Compiler - gcc 8.3.0
These are mostly errors 'may be used uninitialized in this function'

Change-Id: I6a8f7172c99024fd449570937b030e37c0ea5c3d
Reviewed-on: https://code.wireshark.org/review/35746
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-01-11 20:46:52 +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
Dario Lombardo 433464a2a5 nbap: add sanity checks when accessing arrays via num_items.
Bug: 14685
Change-Id: I32eacbe21e60ea151700920792b1b1bd5b6bb9c1
Reviewed-on: https://code.wireshark.org/review/32369
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-10 06:55:26 +00:00
Darien Spencer 2bd79c8208 NBAP: Change E-DCH type choosing condition
Change-Id: If6f07db858c92cd82ff2049c631606a00aba13dc
Reviewed-on: https://code.wireshark.org/review/29742
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-19 13:48:41 +00:00
Darien Spencer 0001152616 NBAP: Support IB_SG_DATA Encoding Variant 2
The code was decoding IB_SG_DATA according to Encoding Variant 1.
Added parsing of the second variant and a preference to let the user choose
between the two.

Bug: 15054
Change-Id: I45efcb84c48d599b46037488792dbc5dad97ebd1
Reviewed-on: https://code.wireshark.org/review/29018
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-16 19:31:10 +00:00
Darien Spencer 79a024337d NBAP: Use PINFO_FD_VISITED macro
Change-Id: I1436a8840f5b771583876b988f94e43363f7984a
Reviewed-on: https://code.wireshark.org/review/27982
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-04 05:10:23 +00:00
Darien Spencer cd2d3dd645 NBAP: Fix style issues in .cnf
Removed empty lines and fixed indentations

Change-Id: I583110e87f4fcf76af66d3ed4c3907bf2caba327
Reviewed-on: https://code.wireshark.org/review/27774
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-24 11:59:06 +00:00
Darien Spencer 5ccac2b65a NBAP: Simplify private data API
Explicit getters/setters seems excessive and become
unmaintainable when the private data struct gets big, like in NBAP

Change-Id: I54d6eea327f1b393d9f80aafcbdd75080e10d50d
Reviewed-on: https://code.wireshark.org/review/27749
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-05-23 17:50:56 +00:00
Pascal Quantin cde7cc54a3 NBAP: avoid linking a DCH-ID to itself
Otherwise it can create an infinite loop, leading to a buffer overflow.
Also add explicit cheks on the buffer usage and set its maximum size to
128 instead of 32 per ASN.1 description.

Bug: 14471
Change-Id: I805f4ce09347bc35143b010b4a558a0d090c0159
Reviewed-on: https://code.wireshark.org/review/26259
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>
2018-03-05 01:55:03 +00:00
Pascal Quantin 47726eafe5 NBAP: check that DCH ID was initialized before using it
Bug: 14443
Change-Id: I184ed60d09576c00133c74b4376b2cb7106e5f80
Reviewed-on: https://code.wireshark.org/review/25874
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-02-18 14:49:12 +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
Pascal Quantin 27b571e62f NBAP: copy address in pinfo->pool
They are copied in structures using pinfo lifetime. Let's use the same scope.

Bug: 14416
Change-Id: I5f8ee6fff49d63584a246936f551db1803ff9816
Reviewed-on: https://code.wireshark.org/review/25748
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>
2018-02-12 11:16:18 +00:00
Peter Hamilton 78ed5f34f5 NBAP: Always map NB-CC to CRNC-CC
Now maps for all channels and not only E-DCH

Change-Id: I51099e887830e5142b58fd624775d395e354b012
Reviewed-on: https://code.wireshark.org/review/24572
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-11-26 08:48:57 +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 1f9990b765 NBAP: Refactor information storing per-packet
Migrating from static variables to a single struct for
information 'carried' between different field in a NBAP packet.

Bug: 13879
Bug: 13712
Change-Id: Ie35619d64c4b9a3d5459d528788f74f952e75c11
Reviewed-on: https://code.wireshark.org/review/22902
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-08-29 03:51:16 +00:00
Darien Spencer a08e998ca2 NBAP: Replaced a comment
Edited a comment to explain the usage of the 'hs-dsch physical layer category' field

Change-Id: I400eabd764818bbc39ab1128500b8700647175e3
Reviewed-on: https://code.wireshark.org/review/23218
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-08-26 12:37:26 +00:00
Piotr Tulpan bb470c9067 NBAP: improve conversation management
Keeps the address of the newly opened channels in the CTCH-SetupRqst message
to match them with the addresses sent in the Respone message to get exatch
match of the conversation.

Change-Id: I445e08480ddd178f65979b9fbc91c6031e206a61
Reviewed-on: https://code.wireshark.org/review/22271
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-07-04 17:06:12 +00:00
DarienSpencer65 249ce2f183 NBAP: Create E-DCH channel info
Adding missing creation and insertion of the E-DCH channel
info the the FP conversation info struct

Change-Id: Ic7dfb5b9579133ff84b2fc4fff73a3560055dcca
Reviewed-on: https://code.wireshark.org/review/21742
Reviewed-by: S. Shapira <sswsdev@gmail.com>
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-05-24 14:38:38 +00:00
sswsdev 6abff3174b UMTS FP: Refactored FP Conversation Info struct
Moved some fields which are only relevant to HS-DSCH / E-DCH  channel into appropriate 'channel specific' structs.
Also renamed "dchs_in_flow_list" to  "dch_ids_in_flow_list"

Change-Id: I7bdeb74c7b1eda0872c0243f0e5f229df2691866
Reviewed-on: https://code.wireshark.org/review/21707
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-05-20 16:32:00 +00:00
sswsdev f16bc10dd3 UMTS FP: Track Paging Indications in PCH
The dissector now carries the 'Paging Indication Bitmap' between subsequent PCH frames.
The reason for this is any frame containing the bitmap 'wakes up' users to read the subsequence frame. This feature allows us to see which paging groups were called for each frame.
Also refactored some Paging Indication related fields in the umts convoersation object and tree items.

Change-Id: I5e55e916ec31b60bc93238b397e07a1260906736
Reviewed-on: https://code.wireshark.org/review/21686
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-18 04:52:11 +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
Pascal Quantin 2861b38153 NBAP: fix malformed packet error when having a single byte BindingID
The tvb length must be checked before trying to read 2 bytes

Bug: 13577
Change-Id: I8ba8320b3a0a96239e52a36bc09bb6b41e65a657
Reviewed-on: https://code.wireshark.org/review/20991
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>
2017-04-10 12:58:28 +00:00
S. Shapira 319de13b89 Handle NSAP IPv4 addresses in NBAP's TransportLayerAddress field which aren't padded to 20 bytes (= max NSAP address length, expected by NSAP dissector).
Bug: 13399
Change-Id: Ife0b3bbaf851e821dbfde15610eee69e9e7a6e62
Reviewed-on: https://code.wireshark.org/review/20069
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-02-14 13:39:22 +00:00
Michael Mann 9c9fd67d8b packet-nbap.c: Convert some g_ APIs to wmem.
Change-Id: I480dd5c533b53cc90e483f42e974c5f3e660e305
Reviewed-on: https://code.wireshark.org/review/16548
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-20 06:00:35 +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