diff options
author | S. Shapira <sswsdev@gmail.com> | 2017-05-04 18:09:42 +0300 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-05-07 21:01:05 +0000 |
commit | 163d66099d7ef338c475f63e56b242957c9103c7 (patch) | |
tree | 6852282c8dab4c47062bb10d6bc872f5765aff68 /epan/dissectors/asn1/rrc | |
parent | 0419add8a1c94c2db976e2ce4ff0cdabbd85f5e7 (diff) |
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>
Diffstat (limited to 'epan/dissectors/asn1/rrc')
-rw-r--r-- | epan/dissectors/asn1/rrc/packet-rrc-template.c | 9 | ||||
-rw-r--r-- | epan/dissectors/asn1/rrc/packet-rrc-template.h | 1 | ||||
-rw-r--r-- | epan/dissectors/asn1/rrc/rrc.cnf | 10 |
3 files changed, 7 insertions, 13 deletions
diff --git a/epan/dissectors/asn1/rrc/packet-rrc-template.c b/epan/dissectors/asn1/rrc/packet-rrc-template.c index 13e78a0e03..2af4f2b1a3 100644 --- a/epan/dissectors/asn1/rrc/packet-rrc-template.c +++ b/epan/dissectors/asn1/rrc/packet-rrc-template.c @@ -43,6 +43,7 @@ #include "packet-per.h" #include "packet-rrc.h" #include "packet-gsm_a_common.h" +#include "packet-nbap.h" #include "packet-umts_fp.h" #ifdef _MSC_VER @@ -60,7 +61,6 @@ extern int proto_fp; /*Handler to FP*/ GTree * hsdsch_muxed_flows = NULL; GTree * rrc_ciph_inf = NULL; -GTree * rrc_scrambling_code_urnti = NULL; static int msg_type _U_; /*****************************************************************************/ @@ -351,12 +351,6 @@ rrc_init(void) { NULL, /* data pointer, optional */ NULL, rrc_free_value); - - /*Initialize Scrambling code to U-RNTI dictionary*/ - rrc_scrambling_code_urnti = g_tree_new_full(rrc_key_cmp, - NULL, - NULL, - NULL); } static void @@ -364,7 +358,6 @@ rrc_cleanup(void) { /*Cleanup*/ g_tree_destroy(hsdsch_muxed_flows); g_tree_destroy(rrc_ciph_inf); - g_tree_destroy(rrc_scrambling_code_urnti); } /*--- proto_register_rrc -------------------------------------------*/ diff --git a/epan/dissectors/asn1/rrc/packet-rrc-template.h b/epan/dissectors/asn1/rrc/packet-rrc-template.h index 437e835859..6ae2b0661d 100644 --- a/epan/dissectors/asn1/rrc/packet-rrc-template.h +++ b/epan/dissectors/asn1/rrc/packet-rrc-template.h @@ -60,6 +60,5 @@ typedef struct rrc_ciph_info_ extern GTree * hsdsch_muxed_flows; extern GTree * rrc_ciph_inf; -extern GTree * rrc_scrambling_code_urnti; #endif /* PACKET_RRC_H */ diff --git a/epan/dissectors/asn1/rrc/rrc.cnf b/epan/dissectors/asn1/rrc/rrc.cnf index 796a63b4be..d444fcbbc8 100644 --- a/epan/dissectors/asn1/rrc/rrc.cnf +++ b/epan/dissectors/asn1/rrc/rrc.cnf @@ -393,16 +393,18 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me %(DEFAULT_BODY)s #.FN_BODY RRCConnectionSetup - guint32 scrambling_code, new_u_rnti; + guint32 scrambling_code, new_u_rnti, crnc_context; col_append_str(actx->pinfo->cinfo, COL_INFO, "RRCConnectionSetup"); %(DEFAULT_BODY)s /* Mapping the U-RNTI assigned to the user to its Uplink Scrambling Code*/ scrambling_code = private_data_get_scrambling_code(actx); new_u_rnti = private_data_get_new_u_rnti(actx); if (new_u_rnti != 0 && scrambling_code != 0 && !actx->pinfo->fd->flags.visited) { - /* Check if a U-RNTI is already mapped to this scrambling code */ - if ((guint32 *)g_tree_lookup(rrc_scrambling_code_urnti, GUINT_TO_POINTER(scrambling_code)) == NULL) { - g_tree_insert(rrc_scrambling_code_urnti, GUINT_TO_POINTER(scrambling_code), GUINT_TO_POINTER(new_u_rnti)); + /* Looking for the C-RNC Context mapped to this Scrambling Code */ + crnc_context = GPOINTER_TO_UINT(wmem_tree_lookup32(nbap_scrambling_code_crncc_map,scrambling_code)); + if (crnc_context != 0) { + /* Mapping the U-RNTI found in this message to the C-RNC context*/ + wmem_tree_insert32(nbap_crncc_urnti_map,crnc_context,GUINT_TO_POINTER(new_u_rnti)); } } |