diff options
author | sswsdev <sswsdev@gmail.com> | 2017-04-14 13:41:37 +0300 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2017-04-20 20:19:46 +0000 |
commit | 2e6cb9dbab154531b306e472642ff6033f0e341c (patch) | |
tree | 9c78185dc665b9682d1c97895008f1ee60d13d9e | |
parent | 09e787a8fb4a1a04366e57c059c4997abcd9183e (diff) |
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>
-rw-r--r-- | epan/dissectors/asn1/nbap/nbap.cnf | 4 | ||||
-rw-r--r-- | epan/dissectors/asn1/nbap/packet-nbap-template.c | 2 | ||||
-rw-r--r-- | epan/dissectors/asn1/rrc/packet-rrc-template.c | 123 | ||||
-rw-r--r-- | epan/dissectors/asn1/rrc/packet-rrc-template.h | 1 | ||||
-rw-r--r-- | epan/dissectors/asn1/rrc/rrc.cnf | 182 | ||||
-rw-r--r-- | epan/dissectors/packet-nbap.c | 127 | ||||
-rw-r--r-- | epan/dissectors/packet-rlc.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-rrc.c | 461 | ||||
-rw-r--r-- | epan/dissectors/packet-rrc.h | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_fp.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_fp.h | 6 |
11 files changed, 625 insertions, 298 deletions
diff --git a/epan/dissectors/asn1/nbap/nbap.cnf b/epan/dissectors/asn1/nbap/nbap.cnf index 7a418a8fa2..cd39a36456 100644 --- a/epan/dissectors/asn1/nbap/nbap.cnf +++ b/epan/dissectors/asn1/nbap/nbap.cnf @@ -739,6 +739,9 @@ hsdsch_macdflow_ids[num_items-1] = hsdsch_macdflow_id; proto_item_append_text(actx->created_item, " (%%u)",BindingID_port); } +#.FN_BODY UL-ScramblingCodeNumber VAL_PTR = &ul_scrambling_code +%(DEFAULT_BODY)s + #.FN_BODY RACH-ParametersItem-CTCH-SetupRqstFDD address dst_addr, null_addr; conversation_t *conversation; @@ -1190,6 +1193,7 @@ dch_id = 0xFFFFFFFF; umts_fp_conversation_info->ul_frame_number = actx->pinfo->num; copy_address_wmem(wmem_file_scope(), &(umts_fp_conversation_info->crnc_address), &dst_addr); umts_fp_conversation_info->crnc_port = BindingID_port; + umts_fp_conversation_info->scrambling_code = ul_scrambling_code; umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN; /* DCH's in this flow */ diff --git a/epan/dissectors/asn1/nbap/packet-nbap-template.c b/epan/dissectors/asn1/nbap/packet-nbap-template.c index 5ba0528c34..e913f46f28 100644 --- a/epan/dissectors/asn1/nbap/packet-nbap-template.c +++ b/epan/dissectors/asn1/nbap/packet-nbap-template.c @@ -67,6 +67,7 @@ void proto_reg_handoff_nbap(void); static dissector_handle_t fp_handle; static guint32 transportLayerAddress_ipv4; static guint16 BindingID_port; +static guint32 ul_scrambling_code; static guint32 com_context_id; static int cfn; @@ -452,6 +453,7 @@ dissect_nbap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) for (i = 0; i < maxNrOfMACdFlows; i++) { nbap_hsdsch_channel_info[i].entity = hs; } + ul_scrambling_code = 0; return dissect_NBAP_PDU_PDU(tvb, pinfo, nbap_tree, data); } diff --git a/epan/dissectors/asn1/rrc/packet-rrc-template.c b/epan/dissectors/asn1/rrc/packet-rrc-template.c index 57b88e799a..13e78a0e03 100644 --- a/epan/dissectors/asn1/rrc/packet-rrc-template.c +++ b/epan/dissectors/asn1/rrc/packet-rrc-template.c @@ -60,8 +60,107 @@ 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_; +/*****************************************************************************/ +/* Packet private data */ +/* For this dissector, all access to actx->private_data should be made */ +/* through this API, which ensures that they will not overwrite each other!! */ +/*****************************************************************************/ + +enum nas_sys_info_gsm_map { + RRC_NAS_SYS_UNKNOWN, + RRC_NAS_SYS_INFO_CS, + RRC_NAS_SYS_INFO_PS, + RRC_NAS_SYS_INFO_CN_COMMON +}; + +typedef struct umts_rrc_private_data_t +{ + guint32 s_rnc_id; /* The S-RNC ID part of a U-RNTI */ + guint32 s_rnti; /* The S-RNTI part of a U-RNTI */ + guint32 new_u_rnti; + guint32 scrambling_code; + enum nas_sys_info_gsm_map cn_domain; +} umts_rrc_private_data_t; + + +/* Helper function to get or create a struct that will be actx->private_data */ +static umts_rrc_private_data_t* umts_rrc_get_private_data(asn1_ctx_t *actx) +{ + if (actx->private_data != NULL) { + return (umts_rrc_private_data_t*)actx->private_data; + } + else { + umts_rrc_private_data_t* new_struct = wmem_new0(wmem_packet_scope(), umts_rrc_private_data_t); + actx->private_data = new_struct; + return new_struct; + } +} + +static guint32 private_data_get_s_rnc_id(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->s_rnc_id; +} + +static void private_data_set_s_rnc_id(asn1_ctx_t *actx, guint32 s_rnc_id) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->s_rnc_id = s_rnc_id; +} + +static guint32 private_data_get_s_rnti(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->s_rnti; +} + +static void private_data_set_s_rnti(asn1_ctx_t *actx, guint32 s_rnti) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->s_rnti = s_rnti; +} + +static guint32 private_data_get_new_u_rnti(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->new_u_rnti; +} + +static void private_data_set_new_u_rnti(asn1_ctx_t *actx, guint32 new_u_rnti) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->new_u_rnti = new_u_rnti; +} + +static guint32 private_data_get_scrambling_code(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->scrambling_code; +} + +static void private_data_set_scrambling_code(asn1_ctx_t *actx, guint32 scrambling_code) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->scrambling_code = scrambling_code; +} + +static enum nas_sys_info_gsm_map private_data_get_cn_domain(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->cn_domain; +} + +static void private_data_set_cn_domain(asn1_ctx_t *actx, enum nas_sys_info_gsm_map cn_domain) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->cn_domain = cn_domain; +} + +/*****************************************************************************/ + static dissector_handle_t gsm_a_dtap_handle; static dissector_handle_t rrc_ue_radio_access_cap_info_handle=NULL; static dissector_handle_t rrc_pcch_handle=NULL; @@ -74,12 +173,6 @@ static dissector_handle_t lte_rrc_ue_eutra_cap_handle=NULL; static dissector_handle_t lte_rrc_dl_dcch_handle=NULL; static dissector_handle_t gsm_rlcmac_dl_handle=NULL; -enum nas_sys_info_gsm_map { - RRC_NAS_SYS_INFO_CS, - RRC_NAS_SYS_INFO_PS, - RRC_NAS_SYS_INFO_CN_COMMON -}; - /* Forward declarations */ void proto_register_rrc(void); void proto_reg_handoff_rrc(void); @@ -143,15 +236,13 @@ static const true_false_string rrc_eutra_feat_group_ind_4_val = { "UTRA CELL_FACH absolute priority cell reselection for all layers - Not supported" }; static const value_string rrc_ims_info_atgw_trans_det_cont_type[] = { - {0, "ATGW-IPv4-address-and-port"}, - {1, "ATGW-IPv6-address-and-port"}, - {2, "ATGW-not-available"}, - {0, NULL} + {0, "ATGW-IPv4-address-and-port"}, + {1, "ATGW-IPv6-address-and-port"}, + {2, "ATGW-not-available"}, + {0, NULL} }; static int flowd,type; -static int cipher_start_val[2] _U_; - /*Stores how many channels we have detected for a HS-DSCH MAC-flow*/ #define RRC_MAX_NUM_HSDHSCH_MACDFLOW 8 static guint8 num_chans_per_flow[RRC_MAX_NUM_HSDHSCH_MACDFLOW]; @@ -256,11 +347,16 @@ rrc_init(void) { rrc_free_key, rrc_free_value); - /*Initialize structure for muxed flow indication*/ rrc_ciph_inf = g_tree_new_full(rrc_key_cmp, 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 @@ -268,6 +364,7 @@ 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 6ae2b0661d..437e835859 100644 --- a/epan/dissectors/asn1/rrc/packet-rrc-template.h +++ b/epan/dissectors/asn1/rrc/packet-rrc-template.h @@ -60,5 +60,6 @@ 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 f85c7a69cf..796a63b4be 100644 --- a/epan/dissectors/asn1/rrc/rrc.cnf +++ b/epan/dissectors/asn1/rrc/rrc.cnf @@ -393,8 +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; 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)); + } + } #.FN_BODY RRCConnectionSetupComplete col_append_str(actx->pinfo->cinfo, COL_INFO, "RRCConnectionSetupComplete"); @@ -694,59 +704,101 @@ HNBName TYPE=FT_STRING DISPLAY=STR_UNICODE %(DEFAULT_BODY)s actx->created_item = proto_tree_add_item(tree, hf_index, hnbname_tvb, 0, -1, ENC_UTF_8|ENC_NA); -#.FN_BODY CN-DomainIdentity VAL_PTR = &nas_sys_info_gsm_map - guint32 nas_sys_info_gsm_map; +#.FN_BODY CN-DomainIdentity VAL_PTR = &nas_sys_info + guint32 nas_sys_info; %(DEFAULT_BODY)s - col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%%s)", val_to_str_const(nas_sys_info_gsm_map,rrc_CN_DomainIdentity_vals,"Unknown")); - actx->private_data = GUINT_TO_POINTER(nas_sys_info_gsm_map+1); + col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%%s)", val_to_str_const(nas_sys_info,rrc_CN_DomainIdentity_vals,"Unknown")); + nas_sys_info++; /* CS = 0, PS = 1 but the enum defines 0 as Unknown and CS = 1, PS = 2 */ + private_data_set_cn_domain(actx, (enum nas_sys_info_gsm_map) nas_sys_info); #.FN_BODY CN-InformationInfo/cn-CommonGSM-MAP-NAS-SysInfo - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CN_COMMON+1); + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON); %(DEFAULT_BODY)s #.FN_BODY CN-InformationInfo-r6/cn-CommonGSM-MAP-NAS-SysInfo - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CN_COMMON+1); + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON); %(DEFAULT_BODY)s #.FN_BODY CN-InformationInfoFull/cn-CommonGSM-MAP-NAS-SysInfo - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CN_COMMON+1); + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON); %(DEFAULT_BODY)s #.FN_BODY SysInfoType1/cn-CommonGSM-MAP-NAS-SysInfo - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CN_COMMON+1); + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON); %(DEFAULT_BODY)s #.FN_BODY NAS-SystemInformationGSM-MAP VAL_PTR = &nas_sys_info_gsm_map_tvb tvbuff_t *nas_sys_info_gsm_map_tvb = NULL; guint32 length; + enum nas_sys_info_gsm_map cn_domain; proto_tree *subtree; %(DEFAULT_BODY)s length = tvb_reported_length(nas_sys_info_gsm_map_tvb); if (length) { - if (actx->private_data) { - switch (GPOINTER_TO_UINT(actx->private_data)-1) { - case RRC_NAS_SYS_INFO_CN_COMMON: - subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, - ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "CN Common GSM-MAP NAS system information"); - de_cn_common_gsm_map_nas_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); - break; - case RRC_NAS_SYS_INFO_CS: - subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, - ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "CS domain specific system information"); - de_cs_domain_spec_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); - break; - case RRC_NAS_SYS_INFO_PS: - subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, - ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "PS domain specific system information"); - de_ps_domain_spec_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); - break; - default: - break; - } - actx->private_data = NULL; + cn_domain = private_data_get_cn_domain(actx); + switch (cn_domain) { + case RRC_NAS_SYS_INFO_CN_COMMON: + subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, + ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "CN Common GSM-MAP NAS system information"); + de_cn_common_gsm_map_nas_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); + break; + case RRC_NAS_SYS_INFO_CS: + subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, + ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "CS domain specific system information"); + de_cs_domain_spec_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); + break; + case RRC_NAS_SYS_INFO_PS: + subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, + ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "PS domain specific system information"); + de_ps_domain_spec_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); + break; + default: + break; } + private_data_set_cn_domain(actx, RRC_NAS_SYS_UNKNOWN); + } + +#.FN_BODY SRNC-Identity VAL_PTR = &s_rnc_id_tvb + tvbuff_t * s_rnc_id_tvb = NULL; +%(DEFAULT_BODY)s + if (s_rnc_id_tvb) { + private_data_set_s_rnc_id(actx, tvb_get_ntohs(s_rnc_id_tvb, 0) >> 4); + } + +#.FN_BODY S-RNTI VAL_PTR = &s_rnti_tvb + tvbuff_t * s_rnti_tvb = NULL; +%(DEFAULT_BODY)s + if (s_rnti_tvb) { + private_data_set_s_rnti(actx, tvb_get_ntoh24(s_rnti_tvb, 0) >> 4); + } + +#.FN_BODY U-RNTI + private_data_set_s_rnc_id(actx, 0); + private_data_set_s_rnti(actx, 0); + guint32 s_rnc_id; + guint32 s_rnti; + guint32 u_rnti_value; +%(DEFAULT_BODY)s + gboolean is_new_urnti = hf_index != hf_rrc_u_RNTI; /* hf_rrc_u_RNTI is for current U-RNTI, any other hf is for new U-RNTI */ + s_rnc_id = private_data_get_s_rnc_id(actx); + s_rnti = private_data_get_s_rnti(actx); + if(s_rnc_id != 0 && s_rnti != 0) { + u_rnti_value = (s_rnc_id << 20) | s_rnti; + /* We are looking for new allocated U-RNTIs, not previously used ones */ + if (is_new_urnti) { + private_data_set_new_u_rnti(actx, u_rnti_value); + } + /* Adding U-RNTI value to it's tree item */ + proto_item_append_text(actx->created_item,": %%08x", u_rnti_value); } + private_data_set_s_rnc_id(actx, 0); + private_data_set_s_rnti(actx, 0); + +#.FN_BODY UL-ScramblingCode VAL_PTR = &scrambling_code +guint32 scrambling_code; +%(DEFAULT_BODY)s +private_data_set_scrambling_code(actx,scrambling_code); #.FN_BODY CellIdentity VAL_PTR = &cell_id_tvb tvbuff_t * cell_id_tvb = NULL; @@ -855,6 +907,7 @@ HNBName TYPE=FT_STRING DISPLAY=STR_UNICODE rrc_ciphering_info * c_inf; int i; guint32 * start; + enum nas_sys_info_gsm_map cn_domain; %(DEFAULT_BODY)s @@ -866,45 +919,44 @@ HNBName TYPE=FT_STRING DISPLAY=STR_UNICODE return offset; } /*Retrieve the start value for the two ciphering domains*/ - if (actx->private_data) { - switch(GPOINTER_TO_UINT(actx->private_data)-1){ - case RRC_NAS_SYS_INFO_CS: - /* - g_warning("Not implemented"); - */ - break; - case RRC_NAS_SYS_INFO_PS: + cn_domain = private_data_get_cn_domain(actx); + switch(cn_domain){ + case RRC_NAS_SYS_INFO_CS: + /* + g_warning("Not implemented"); + */ + break; + case RRC_NAS_SYS_INFO_PS: + + /*Find the entry for the communication context (taken from FP)*/ + if( (c_inf =(rrc_ciphering_info *)g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){ + c_inf = g_new0(rrc_ciphering_info,1); - /*Find the entry for the communication context (taken from FP)*/ - if( (c_inf =(rrc_ciphering_info *)g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){ - c_inf = g_new0(rrc_ciphering_info,1); - - /*Initiate tree with START_PS values.*/ - if(!c_inf->start_ps) - c_inf->start_ps = g_tree_new_full(rrc_key_cmp, - NULL,rrc_free_key,rrc_free_value); - - /*Clear and initialize seq_no matrix*/ - for(i = 0; i< 31; i++){ - c_inf->seq_no[i][0] = -1; - c_inf->seq_no[i][1] = -1; - } - g_tree_insert(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id), c_inf); + /*Initiate tree with START_PS values.*/ + if(!c_inf->start_ps) + c_inf->start_ps = g_tree_new_full(rrc_key_cmp, + NULL,rrc_free_key,rrc_free_value); + + /*Clear and initialize seq_no matrix*/ + for(i = 0; i< 31; i++){ + c_inf->seq_no[i][0] = -1; + c_inf->seq_no[i][1] = -1; } + g_tree_insert(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id), c_inf); + } - /*Retrieve and store the value*/ - start = g_new(guint32,1); - *start = tvb_get_bits32(start_val,0,20,ENC_BIG_ENDIAN); - if(c_inf && c_inf->start_ps) - /*Insert the value based on current frame num since this might vary over time*/ - g_tree_insert(c_inf->start_ps, GUINT_TO_POINTER(actx->pinfo->num), start); + /*Retrieve and store the value*/ + start = g_new(guint32,1); + *start = tvb_get_bits32(start_val,0,20,ENC_BIG_ENDIAN); + if(c_inf && c_inf->start_ps) + /*Insert the value based on current frame num since this might vary over time*/ + g_tree_insert(c_inf->start_ps, GUINT_TO_POINTER(actx->pinfo->num), start); - break; - default: - break; - } - actx->private_data = NULL; + break; + default: + break; } + private_data_set_cn_domain(actx, RRC_NAS_SYS_UNKNOWN); #.FN_BODY RB-ActivationTimeInfo fp_info *fpinf; @@ -948,11 +1000,11 @@ HNBName TYPE=FT_STRING DISPLAY=STR_UNICODE %(DEFAULT_BODY)s #.FN_BODY UE-SecurityInformation - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CS+1); + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CS); %(DEFAULT_BODY)s #.FN_BODY UE-SecurityInformation2 - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_PS+1); + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_PS); %(DEFAULT_BODY)s #.FN_BODY ReleaseCause VAL_PTR=&value diff --git a/epan/dissectors/packet-nbap.c b/epan/dissectors/packet-nbap.c index ae093b6dad..0d81c00bb7 100644 --- a/epan/dissectors/packet-nbap.c +++ b/epan/dissectors/packet-nbap.c @@ -75,6 +75,7 @@ void proto_reg_handoff_nbap(void); static dissector_handle_t fp_handle; static guint32 transportLayerAddress_ipv4; static guint16 BindingID_port; +static guint32 ul_scrambling_code; static guint32 com_context_id; static int cfn; @@ -1536,7 +1537,7 @@ typedef enum _ProtocolIE_ID_enum { } ProtocolIE_ID_enum; /*--- End of included file: packet-nbap-val.h ---*/ -#line 74 "./asn1/nbap/packet-nbap-template.c" +#line 75 "./asn1/nbap/packet-nbap-template.c" /* Initialize the protocol and registered fields */ static int proto_nbap = -1; @@ -4840,7 +4841,7 @@ static int hf_nbap_RACH_SubChannelNumbers_subCh1 = -1; static int hf_nbap_RACH_SubChannelNumbers_subCh0 = -1; /*--- End of included file: packet-nbap-hf.c ---*/ -#line 82 "./asn1/nbap/packet-nbap-template.c" +#line 83 "./asn1/nbap/packet-nbap-template.c" /* Initialize the subtree pointers */ static int ett_nbap = -1; @@ -6479,7 +6480,7 @@ static gint ett_nbap_UnsuccessfulOutcome = -1; static gint ett_nbap_Outcome = -1; /*--- End of included file: packet-nbap-ett.c ---*/ -#line 90 "./asn1/nbap/packet-nbap-template.c" +#line 91 "./asn1/nbap/packet-nbap-template.c" static expert_field ei_nbap_no_find_comm_context_id = EI_INIT; static expert_field ei_nbap_no_find_port_info = EI_INIT; @@ -8443,8 +8444,12 @@ dissect_nbap_Multicell_EDCH_Transport_Bearer_Mode(tvbuff_t *tvb _U_, int offset static int dissect_nbap_UL_ScramblingCodeNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 743 "./asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, - 0U, 16777215U, NULL, FALSE); + 0U, 16777215U, &ul_scrambling_code, FALSE); + + + return offset; } @@ -10063,7 +10068,7 @@ dissect_nbap_AddorDeleteIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_nbap_CFN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 2167 "./asn1/nbap/nbap.cnf" +#line 2171 "./asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, &cfn, FALSE); @@ -10316,7 +10321,7 @@ dissect_nbap_AvailabilityStatus(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a static int dissect_nbap_HSDSCH_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 2132 "./asn1/nbap/nbap.cnf" +#line 2136 "./asn1/nbap/nbap.cnf" umts_fp_conversation_info_t *umts_fp_conversation_info = NULL; address null_addr; conversation_t *conversation = NULL; @@ -11538,7 +11543,7 @@ dissect_nbap_Common_E_DCH_Resource_Combination_InfoList(tvbuff_t *tvb _U_, int o static int dissect_nbap_Common_MACFlow_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1991 "./asn1/nbap/nbap.cnf" +#line 1995 "./asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, maxNrOfCommonMACFlows_1, &common_macdflow_id, FALSE); @@ -11672,7 +11677,7 @@ dissect_nbap_E_DCH_MACdFlow_Multiplexing_List(tvbuff_t *tvb _U_, int offset _U_, static int dissect_nbap_LogicalChannelID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1645 "./asn1/nbap/nbap.cnf" +#line 1649 "./asn1/nbap/nbap.cnf" /* Set logical channel id for this entry*/ offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 15U, &logical_channel_id, FALSE); @@ -11690,7 +11695,7 @@ dissect_nbap_LogicalChannelID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_nbap_MAC_PDU_SizeExtended(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1747 "./asn1/nbap/nbap.cnf" +#line 1751 "./asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 1504U, NULL, TRUE); @@ -12113,7 +12118,7 @@ static const per_sequence_t CommonMACFlow_Specific_InfoItem_sequence[] = { static int dissect_nbap_CommonMACFlow_Specific_InfoItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1998 "./asn1/nbap/nbap.cnf" +#line 2002 "./asn1/nbap/nbap.cnf" address dst_addr; transportLayerAddress_ipv4 = 0; BindingID_port = 0; @@ -12158,7 +12163,7 @@ dissect_nbap_CommonMACFlow_Specific_InfoList(tvbuff_t *tvb _U_, int offset _U_, static int dissect_nbap_MACdPDU_Size(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1635 "./asn1/nbap/nbap.cnf" +#line 1639 "./asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 5000U, &MACdPDU_Size, TRUE); @@ -13379,7 +13384,7 @@ dissect_nbap_CriticalityDiagnostics(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ static int dissect_nbap_CRNC_CommunicationContextID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 2106 "./asn1/nbap/nbap.cnf" +#line 2110 "./asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 1048575U, &com_context_id, FALSE); @@ -14832,7 +14837,7 @@ dissect_nbap_T_dCH_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p static int dissect_nbap_TransportFormatSet_NrOfTransportBlocks(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1075 "./asn1/nbap/nbap.cnf" +#line 1078 "./asn1/nbap/nbap.cnf" guint32 NrOfTransportBlocks; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -14875,7 +14880,7 @@ guint32 NrOfTransportBlocks; static int dissect_nbap_TransportFormatSet_TransportBlockSize(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1107 "./asn1/nbap/nbap.cnf" +#line 1110 "./asn1/nbap/nbap.cnf" guint32 TransportBlockSize; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -15003,7 +15008,7 @@ static const per_sequence_t TransportFormatSet_DynamicPartList_item_sequence[] = static int dissect_nbap_TransportFormatSet_DynamicPartList_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1071 "./asn1/nbap/nbap.cnf" +#line 1074 "./asn1/nbap/nbap.cnf" num_items++; @@ -15021,7 +15026,7 @@ static const per_sequence_t TransportFormatSet_DynamicPartList_sequence_of[1] = static int dissect_nbap_TransportFormatSet_DynamicPartList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1068 "./asn1/nbap/nbap.cnf" +#line 1071 "./asn1/nbap/nbap.cnf" num_items = 0; @@ -15192,7 +15197,7 @@ dissect_nbap_TransportFormatSet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a static int dissect_nbap_T_ul_TransportFormatSet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1046 "./asn1/nbap/nbap.cnf" +#line 1049 "./asn1/nbap/nbap.cnf" transportFormatSet_type = NBAP_DCH_UL; nbap_dch_chnl_info[dch_id].num_ul_chans = 0; @@ -15206,7 +15211,7 @@ dissect_nbap_T_ul_TransportFormatSet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx static int dissect_nbap_T_dl_TransportFormatSet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1050 "./asn1/nbap/nbap.cnf" +#line 1053 "./asn1/nbap/nbap.cnf" transportFormatSet_type = NBAP_DCH_DL; nbap_dch_chnl_info[dch_id].num_dl_chans = 0; @@ -15256,14 +15261,14 @@ static const per_sequence_t DCH_Specific_FDD_Item_sequence[] = { static int dissect_nbap_DCH_Specific_FDD_Item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1040 "./asn1/nbap/nbap.cnf" +#line 1043 "./asn1/nbap/nbap.cnf" g_num_dch_in_flow++; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_nbap_DCH_Specific_FDD_Item, DCH_Specific_FDD_Item_sequence); -#line 1043 "./asn1/nbap/nbap.cnf" +#line 1046 "./asn1/nbap/nbap.cnf" prev_dch_id = dch_id; @@ -15277,7 +15282,7 @@ static const per_sequence_t DCH_Specific_FDD_InformationList_sequence_of[1] = { static int dissect_nbap_DCH_Specific_FDD_InformationList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1036 "./asn1/nbap/nbap.cnf" +#line 1039 "./asn1/nbap/nbap.cnf" g_num_dch_in_flow = 0; prev_dch_id = 0; @@ -15571,7 +15576,7 @@ dissect_nbap_T_dCH_ID_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ static int dissect_nbap_T_ul_TransportFormatSet_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1054 "./asn1/nbap/nbap.cnf" +#line 1057 "./asn1/nbap/nbap.cnf" transportFormatSet_type = NBAP_DCH_UL; nbap_dch_chnl_info[dch_id].num_ul_chans = 0; @@ -15585,7 +15590,7 @@ dissect_nbap_T_ul_TransportFormatSet_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ static int dissect_nbap_T_dl_TransportFormatSet_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1058 "./asn1/nbap/nbap.cnf" +#line 1061 "./asn1/nbap/nbap.cnf" transportFormatSet_type = NBAP_DCH_DL; nbap_dch_chnl_info[dch_id].num_dl_chans = 0; @@ -15641,7 +15646,7 @@ static const per_sequence_t FDD_DCHs_to_ModifyItem_sequence[] = { static int dissect_nbap_FDD_DCHs_to_ModifyItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1134 "./asn1/nbap/nbap.cnf" +#line 1137 "./asn1/nbap/nbap.cnf" offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_nbap_FDD_DCHs_to_ModifyItem, FDD_DCHs_to_ModifyItem_sequence); @@ -18063,7 +18068,7 @@ dissect_nbap_E_DCH_HARQ_Combining_Capability(tvbuff_t *tvb _U_, int offset _U_, static int dissect_nbap_E_DCH_DDI_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1624 "./asn1/nbap/nbap.cnf" +#line 1628 "./asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 62U, &e_dch_ddi_value, FALSE); @@ -18198,7 +18203,7 @@ static const per_sequence_t E_DCH_LogicalChannelInformationItem_sequence[] = { static int dissect_nbap_E_DCH_LogicalChannelInformationItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1621 "./asn1/nbap/nbap.cnf" +#line 1625 "./asn1/nbap/nbap.cnf" num_items++; @@ -18215,7 +18220,7 @@ static const per_sequence_t E_DCH_LogicalChannelInformation_sequence_of[1] = { static int dissect_nbap_E_DCH_LogicalChannelInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1614 "./asn1/nbap/nbap.cnf" +#line 1618 "./asn1/nbap/nbap.cnf" num_items = 0; offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, @@ -18248,7 +18253,7 @@ static const per_sequence_t E_DCH_MACdFlow_Specific_InfoItem_sequence[] = { static int dissect_nbap_E_DCH_MACdFlow_Specific_InfoItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1371 "./asn1/nbap/nbap.cnf" +#line 1375 "./asn1/nbap/nbap.cnf" umts_fp_conversation_info_t *p_conv_data = NULL; address null_addr; conversation_t *p_conv; @@ -18431,7 +18436,7 @@ static const per_sequence_t E_DCH_LogicalChannelToModifyItem_sequence[] = { static int dissect_nbap_E_DCH_LogicalChannelToModifyItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1609 "./asn1/nbap/nbap.cnf" +#line 1613 "./asn1/nbap/nbap.cnf" offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_nbap_E_DCH_LogicalChannelToModifyItem, E_DCH_LogicalChannelToModifyItem_sequence); @@ -18506,7 +18511,7 @@ static const per_sequence_t E_DCH_MACdFlow_Specific_InfoItem_to_Modify_sequence[ static int dissect_nbap_E_DCH_MACdFlow_Specific_InfoItem_to_Modify(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1517 "./asn1/nbap/nbap.cnf" +#line 1521 "./asn1/nbap/nbap.cnf" guint32 no_ddi_entries, i; address null_addr; nbap_edch_port_info_t *old_info; @@ -18648,7 +18653,7 @@ static const per_sequence_t E_DCH_FDD_Information_to_Modify_sequence[] = { static int dissect_nbap_E_DCH_FDD_Information_to_Modify(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1424 "./asn1/nbap/nbap.cnf" +#line 1428 "./asn1/nbap/nbap.cnf" address dst_addr, null_addr; conversation_t *conversation,*old_conversation = NULL; @@ -23230,7 +23235,7 @@ static const value_string nbap_PICH_Mode_vals[] = { static int dissect_nbap_PICH_Mode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 811 "./asn1/nbap/nbap.cnf" +#line 814 "./asn1/nbap/nbap.cnf" guint32 PICH_Mode = 0; offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 4, &PICH_Mode, TRUE, 0, NULL); @@ -23345,7 +23350,7 @@ static const per_sequence_t HSDSCH_Common_System_InformationFDD_sequence[] = { static int dissect_nbap_HSDSCH_Common_System_InformationFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 2018 "./asn1/nbap/nbap.cnf" +#line 2022 "./asn1/nbap/nbap.cnf" /* * 5.1.6 High Speed Downlink Shared Channels * The Data Transfer procedure is used to transfer a HS-DSCH DATA FRAME (TYPE 1, TYPE 2 [FDD and 1.28Mcps @@ -23506,7 +23511,7 @@ static const per_sequence_t HSDSCH_MACdFlow_Specific_InfoItem_sequence[] = { static int dissect_nbap_HSDSCH_MACdFlow_Specific_InfoItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1725 "./asn1/nbap/nbap.cnf" +#line 1729 "./asn1/nbap/nbap.cnf" address dst_addr; @@ -23609,7 +23614,7 @@ static const value_string nbap_RLC_Mode_vals[] = { static int dissect_nbap_RLC_Mode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1652 "./asn1/nbap/nbap.cnf" +#line 1656 "./asn1/nbap/nbap.cnf" guint32 rlc_mode; offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, @@ -23650,7 +23655,7 @@ static const per_sequence_t PriorityQueue_InfoItem_sequence[] = { static int dissect_nbap_PriorityQueue_InfoItem(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1716 "./asn1/nbap/nbap.cnf" +#line 1720 "./asn1/nbap/nbap.cnf" num_items++; @@ -23684,7 +23689,7 @@ static const per_sequence_t HSDSCH_MACdFlows_Information_sequence[] = { static int dissect_nbap_HSDSCH_MACdFlows_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1676 "./asn1/nbap/nbap.cnf" +#line 1680 "./asn1/nbap/nbap.cnf" int protocol_ie_id; guint32 i; @@ -23728,7 +23733,7 @@ dissect_nbap_HSDSCH_MACdFlows_Information(tvbuff_t *tvb _U_, int offset _U_, asn static int dissect_nbap_T_hSDSCH_Physical_Layer_Category(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1669 "./asn1/nbap/nbap.cnf" +#line 1673 "./asn1/nbap/nbap.cnf" guint32 hsdsch_physical_layer_category; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -23796,7 +23801,7 @@ static const per_sequence_t HSDSCH_FDD_Information_sequence[] = { static int dissect_nbap_HSDSCH_FDD_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1777 "./asn1/nbap/nbap.cnf" +#line 1781 "./asn1/nbap/nbap.cnf" /* * Collect the information about the HSDSCH MACdFlows set up conversation(s) and set the conversation data. */ @@ -23933,7 +23938,7 @@ static const per_sequence_t HSDSCH_MACdFlow_Specific_InfoItem_to_Modify_sequence static int dissect_nbap_HSDSCH_MACdFlow_Specific_InfoItem_to_Modify(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1866 "./asn1/nbap/nbap.cnf" +#line 1870 "./asn1/nbap/nbap.cnf" address dst_addr; transportLayerAddress_ipv4 = 0; BindingID_port = 0; @@ -23991,7 +23996,7 @@ static const per_sequence_t PriorityQueue_InfoItem_to_Add_sequence[] = { static int dissect_nbap_PriorityQueue_InfoItem_to_Add(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1719 "./asn1/nbap/nbap.cnf" +#line 1723 "./asn1/nbap/nbap.cnf" num_items = 1; @@ -24126,7 +24131,7 @@ static const per_sequence_t HSDSCH_Information_to_Modify_sequence[] = { static int dissect_nbap_HSDSCH_Information_to_Modify(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1886 "./asn1/nbap/nbap.cnf" +#line 1890 "./asn1/nbap/nbap.cnf" /* * This is pretty much the same like if we setup a previous flow */ @@ -24248,7 +24253,7 @@ static const value_string nbap_HSDSCH_MACdPDUSizeFormat_vals[] = { static int dissect_nbap_HSDSCH_MACdPDUSizeFormat(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1754 "./asn1/nbap/nbap.cnf" +#line 1758 "./asn1/nbap/nbap.cnf" /* * Removed 10 Aug. 2012, I'm not sure if this was right, it wrongfully * set some packets as type 2 for HSDHCH modified items. @@ -24359,7 +24364,7 @@ static const per_sequence_t HSDSCH_MACdFlow_Specific_InformationResp_Item_sequen static int dissect_nbap_HSDSCH_MACdFlow_Specific_InformationResp_Item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1722 "./asn1/nbap/nbap.cnf" +#line 1726 "./asn1/nbap/nbap.cnf" num_items++; @@ -24775,7 +24780,7 @@ static const per_sequence_t HSDSCH_Paging_System_InformationFDD_sequence[] = { static int dissect_nbap_HSDSCH_Paging_System_InformationFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 2096 "./asn1/nbap/nbap.cnf" +#line 2100 "./asn1/nbap/nbap.cnf" /* g_warning("HS-DSCH Type 3 NOT Implemented!"); */ @@ -24969,7 +24974,7 @@ static const per_sequence_t HSDSCH_MACdFlows_to_Delete_Item_sequence[] = { static int dissect_nbap_HSDSCH_MACdFlows_to_Delete_Item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1713 "./asn1/nbap/nbap.cnf" +#line 1717 "./asn1/nbap/nbap.cnf" num_items++; @@ -24986,7 +24991,7 @@ static const per_sequence_t HSDSCH_MACdFlows_to_Delete_sequence_of[1] = { static int dissect_nbap_HSDSCH_MACdFlows_to_Delete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1708 "./asn1/nbap/nbap.cnf" +#line 1712 "./asn1/nbap/nbap.cnf" num_items = 0; @@ -28088,7 +28093,7 @@ dissect_nbap_NI_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_nbap_NodeB_CommunicationContextID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 2110 "./asn1/nbap/nbap.cnf" +#line 2114 "./asn1/nbap/nbap.cnf" /*Set up and map that maps Node-B ids to CRNC ids, since often you only have one of them present in nbap*/ nbap_com_context_id_t *cur_val; @@ -28653,7 +28658,7 @@ dissect_nbap_RACH_SubChannelNumbers(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ static int dissect_nbap_T_dCH_id(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1140 "./asn1/nbap/nbap.cnf" +#line 1143 "./asn1/nbap/nbap.cnf" offset = dissect_nbap_DCH_ID(tvb, offset, actx, tree, hf_index); @@ -28675,7 +28680,7 @@ static const per_sequence_t RL_Specific_DCH_Info_Item_sequence[] = { static int dissect_nbap_RL_Specific_DCH_Info_Item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1145 "./asn1/nbap/nbap.cnf" +#line 1148 "./asn1/nbap/nbap.cnf" address dst_addr, null_addr; conversation_t *conversation = NULL; umts_fp_conversation_info_t *umts_fp_conversation_info; @@ -28726,6 +28731,7 @@ dch_id = 0xFFFFFFFF; umts_fp_conversation_info->ul_frame_number = actx->pinfo->num; copy_address_wmem(wmem_file_scope(), &(umts_fp_conversation_info->crnc_address), &dst_addr); umts_fp_conversation_info->crnc_port = BindingID_port; + umts_fp_conversation_info->scrambling_code = ul_scrambling_code; umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN; /* DCH's in this flow */ @@ -28819,7 +28825,7 @@ static const per_sequence_t RL_Specific_E_DCH_Information_Item_sequence[] = { static int dissect_nbap_RL_Specific_E_DCH_Information_Item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1259 "./asn1/nbap/nbap.cnf" +#line 1263 "./asn1/nbap/nbap.cnf" address dst_addr, null_addr; conversation_t *conversation; umts_fp_conversation_info_t *umts_fp_conversation_info = NULL; @@ -32386,7 +32392,7 @@ static const per_sequence_t FACH_ParametersItem_CTCH_SetupRqstFDD_sequence[] = { static int dissect_nbap_FACH_ParametersItem_CTCH_SetupRqstFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 943 "./asn1/nbap/nbap.cnf" +#line 946 "./asn1/nbap/nbap.cnf" address dst_addr, null_addr; conversation_t *conversation; @@ -32504,7 +32510,7 @@ dissect_nbap_FACH_ParametersListIE_CTCH_SetupRqstFDD(tvbuff_t *tvb _U_, int offs static int dissect_nbap_T_transportFormatSet(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 1062 "./asn1/nbap/nbap.cnf" +#line 1065 "./asn1/nbap/nbap.cnf" transportFormatSet_type = NBAP_PCH; nbap_dch_chnl_info[commontransportchannelid].num_dl_chans = 0; nbap_dch_chnl_info[commontransportchannelid].num_ul_chans = 0; @@ -32549,7 +32555,7 @@ static const per_sequence_t PCH_ParametersItem_CTCH_SetupRqstFDD_sequence[] = { static int dissect_nbap_PCH_ParametersItem_CTCH_SetupRqstFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 832 "./asn1/nbap/nbap.cnf" +#line 835 "./asn1/nbap/nbap.cnf" address dst_addr, null_addr; conversation_t *conversation; @@ -32696,7 +32702,7 @@ static const per_sequence_t RACH_ParametersItem_CTCH_SetupRqstFDD_sequence[] = { static int dissect_nbap_RACH_ParametersItem_CTCH_SetupRqstFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 743 "./asn1/nbap/nbap.cnf" +#line 746 "./asn1/nbap/nbap.cnf" address dst_addr, null_addr; conversation_t *conversation; umts_fp_conversation_info_t *umts_fp_conversation_info; @@ -41105,7 +41111,7 @@ col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkReconfigurationCommit "); actx->pinfo->link_dir=P2P_DIR_DL; -#line 2159 "./asn1/nbap/nbap.cnf" +#line 2163 "./asn1/nbap/nbap.cnf" /* * Here we need to signal the CFN value, down to FP so * that lowert layers know when a reconfiguration becomes active @@ -55204,7 +55210,7 @@ static int dissect_NULL_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tre /*--- End of included file: packet-nbap-fn.c ---*/ -#line 334 "./asn1/nbap/packet-nbap-template.c" +#line 335 "./asn1/nbap/packet-nbap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { @@ -55326,6 +55332,7 @@ dissect_nbap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) for (i = 0; i < maxNrOfMACdFlows; i++) { nbap_hsdsch_channel_info[i].entity = hs; } + ul_scrambling_code = 0; return dissect_NBAP_PDU_PDU(tvb, pinfo, nbap_tree, data); } @@ -68515,7 +68522,7 @@ void proto_register_nbap(void) NULL, HFILL }}, /*--- End of included file: packet-nbap-hfarr.c ---*/ -#line 480 "./asn1/nbap/packet-nbap-template.c" +#line 482 "./asn1/nbap/packet-nbap-template.c" }; /* List of subtrees */ @@ -70155,7 +70162,7 @@ void proto_register_nbap(void) &ett_nbap_Outcome, /*--- End of included file: packet-nbap-ettarr.c ---*/ -#line 489 "./asn1/nbap/packet-nbap-template.c" +#line 491 "./asn1/nbap/packet-nbap-template.c" }; static ei_register_info ei[] = { @@ -71306,7 +71313,7 @@ proto_reg_handoff_nbap(void) /*--- End of included file: packet-nbap-dis-tab.c ---*/ -#line 543 "./asn1/nbap/packet-nbap-template.c" +#line 545 "./asn1/nbap/packet-nbap-template.c" } diff --git a/epan/dissectors/packet-rlc.c b/epan/dissectors/packet-rlc.c index 138a4702a7..30010c8296 100644 --- a/epan/dissectors/packet-rlc.c +++ b/epan/dissectors/packet-rlc.c @@ -1351,7 +1351,7 @@ add_channel_info(packet_info * pinfo, proto_tree * tree, fp_info * fpinf, rlc_in item = proto_tree_add_item(tree, hf_rlc_channel, NULL, 0, 0, ENC_NA); channel_tree = proto_item_add_subtree(item, ett_rlc_channel); - proto_item_append_text(item, " (rbid: %u, dir: %s, uid: %u)", rlcinf->rbid[fpinf->cur_tb], + proto_item_append_text(item, " (rbid: %u, dir: %s, uid: 0x%08x)", rlcinf->rbid[fpinf->cur_tb], val_to_str_const(pinfo->link_dir, rlc_dir_vals, "Unknown"), rlcinf->urnti[fpinf->cur_tb]); PROTO_ITEM_SET_GENERATED(item); item = proto_tree_add_uint(channel_tree, hf_rlc_channel_rbid, NULL, 0, 0, rlcinf->rbid[fpinf->cur_tb]); @@ -2903,7 +2903,7 @@ proto_register_rlc(void) }, { &hf_rlc_channel_ueid, { "User Equipment ID", "rlc.channel.ueid", - FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL } + FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL } }, { &hf_rlc_sequence_number, { "Sequence Number", "rlc.sequence_number", diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c index d9470ed003..7ab37af00a 100644 --- a/epan/dissectors/packet-rrc.c +++ b/epan/dissectors/packet-rrc.c @@ -68,8 +68,107 @@ 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_; +/*****************************************************************************/ +/* Packet private data */ +/* For this dissector, all access to actx->private_data should be made */ +/* through this API, which ensures that they will not overwrite each other!! */ +/*****************************************************************************/ + +enum nas_sys_info_gsm_map { + RRC_NAS_SYS_UNKNOWN, + RRC_NAS_SYS_INFO_CS, + RRC_NAS_SYS_INFO_PS, + RRC_NAS_SYS_INFO_CN_COMMON +}; + +typedef struct umts_rrc_private_data_t +{ + guint32 s_rnc_id; /* The S-RNC ID part of a U-RNTI */ + guint32 s_rnti; /* The S-RNTI part of a U-RNTI */ + guint32 new_u_rnti; + guint32 scrambling_code; + enum nas_sys_info_gsm_map cn_domain; +} umts_rrc_private_data_t; + + +/* Helper function to get or create a struct that will be actx->private_data */ +static umts_rrc_private_data_t* umts_rrc_get_private_data(asn1_ctx_t *actx) +{ + if (actx->private_data != NULL) { + return (umts_rrc_private_data_t*)actx->private_data; + } + else { + umts_rrc_private_data_t* new_struct = wmem_new0(wmem_packet_scope(), umts_rrc_private_data_t); + actx->private_data = new_struct; + return new_struct; + } +} + +static guint32 private_data_get_s_rnc_id(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->s_rnc_id; +} + +static void private_data_set_s_rnc_id(asn1_ctx_t *actx, guint32 s_rnc_id) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->s_rnc_id = s_rnc_id; +} + +static guint32 private_data_get_s_rnti(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->s_rnti; +} + +static void private_data_set_s_rnti(asn1_ctx_t *actx, guint32 s_rnti) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->s_rnti = s_rnti; +} + +static guint32 private_data_get_new_u_rnti(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->new_u_rnti; +} + +static void private_data_set_new_u_rnti(asn1_ctx_t *actx, guint32 new_u_rnti) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->new_u_rnti = new_u_rnti; +} + +static guint32 private_data_get_scrambling_code(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->scrambling_code; +} + +static void private_data_set_scrambling_code(asn1_ctx_t *actx, guint32 scrambling_code) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->scrambling_code = scrambling_code; +} + +static enum nas_sys_info_gsm_map private_data_get_cn_domain(asn1_ctx_t *actx) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + return private_data->cn_domain; +} + +static void private_data_set_cn_domain(asn1_ctx_t *actx, enum nas_sys_info_gsm_map cn_domain) +{ + umts_rrc_private_data_t *private_data = (umts_rrc_private_data_t*)umts_rrc_get_private_data(actx); + private_data->cn_domain = cn_domain; +} + +/*****************************************************************************/ + static dissector_handle_t gsm_a_dtap_handle; static dissector_handle_t rrc_ue_radio_access_cap_info_handle=NULL; static dissector_handle_t rrc_pcch_handle=NULL; @@ -82,12 +181,6 @@ static dissector_handle_t lte_rrc_ue_eutra_cap_handle=NULL; static dissector_handle_t lte_rrc_dl_dcch_handle=NULL; static dissector_handle_t gsm_rlcmac_dl_handle=NULL; -enum nas_sys_info_gsm_map { - RRC_NAS_SYS_INFO_CS, - RRC_NAS_SYS_INFO_PS, - RRC_NAS_SYS_INFO_CN_COMMON -}; - /* Forward declarations */ void proto_register_rrc(void); void proto_reg_handoff_rrc(void); @@ -300,7 +393,7 @@ static int dissect_SysInfoType22_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tr #define maxWLANs 64 /*--- End of included file: packet-rrc-val.h ---*/ -#line 97 "./asn1/rrc/packet-rrc-template.c" +#line 190 "./asn1/rrc/packet-rrc-template.c" /* Initialize the protocol and registered fields */ int proto_rrc = -1; @@ -11014,7 +11107,7 @@ static int hf_rrc_GsmSecurityCapability_a5_2 = -1; static int hf_rrc_GsmSecurityCapability_a5_1 = -1; /*--- End of included file: packet-rrc-hf.c ---*/ -#line 102 "./asn1/rrc/packet-rrc-template.c" +#line 195 "./asn1/rrc/packet-rrc-template.c" /* Initialize the subtree pointers */ static int ett_rrc = -1; @@ -17836,7 +17929,7 @@ static gint ett_rrc_UE_RadioAccessCapability_r6 = -1; static gint ett_rrc_UL_RFC3095_Context = -1; /*--- End of included file: packet-rrc-ett.c ---*/ -#line 107 "./asn1/rrc/packet-rrc-template.c" +#line 200 "./asn1/rrc/packet-rrc-template.c" static gint ett_rrc_eutraFeatureGroupIndicators = -1; static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1; @@ -17876,15 +17969,13 @@ static const true_false_string rrc_eutra_feat_group_ind_4_val = { "UTRA CELL_FACH absolute priority cell reselection for all layers - Not supported" }; static const value_string rrc_ims_info_atgw_trans_det_cont_type[] = { - {0, "ATGW-IPv4-address-and-port"}, - {1, "ATGW-IPv6-address-and-port"}, - {2, "ATGW-not-available"}, - {0, NULL} + {0, "ATGW-IPv4-address-and-port"}, + {1, "ATGW-IPv6-address-and-port"}, + {2, "ATGW-not-available"}, + {0, NULL} }; static int flowd,type; -static int cipher_start_val[2] _U_; - /*Stores how many channels we have detected for a HS-DSCH MAC-flow*/ #define RRC_MAX_NUM_HSDHSCH_MACDFLOW 8 static guint8 num_chans_per_flow[RRC_MAX_NUM_HSDHSCH_MACDFLOW]; @@ -18169,7 +18260,7 @@ dissect_rrc_ActivationTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 932 "./asn1/rrc/rrc.cnf" +#line 984 "./asn1/rrc/rrc.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 32U, &rbid, FALSE); @@ -18186,7 +18277,7 @@ dissect_rrc_RB_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, static int dissect_rrc_RLC_SequenceNumber(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 938 "./asn1/rrc/rrc.cnf" +#line 990 "./asn1/rrc/rrc.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 4095U, &activation_frame, FALSE); @@ -18206,7 +18297,7 @@ static const per_sequence_t RB_ActivationTimeInfo_sequence[] = { static int dissect_rrc_RB_ActivationTimeInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 910 "./asn1/rrc/rrc.cnf" +#line 962 "./asn1/rrc/rrc.cnf" fp_info *fpinf; rrc_ciphering_info * c_inf; @@ -18269,8 +18360,16 @@ dissect_rrc_CipheringModeInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act static int dissect_rrc_SRNC_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 763 "./asn1/rrc/rrc.cnf" + tvbuff_t * s_rnc_id_tvb = NULL; offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, - 12, 12, FALSE, NULL, NULL); + 12, 12, FALSE, &s_rnc_id_tvb, NULL); + + if (s_rnc_id_tvb) { + private_data_set_s_rnc_id(actx, tvb_get_ntohs(s_rnc_id_tvb, 0) >> 4); + } + + return offset; } @@ -18279,8 +18378,16 @@ dissect_rrc_SRNC_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U static int dissect_rrc_S_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 770 "./asn1/rrc/rrc.cnf" + tvbuff_t * s_rnti_tvb = NULL; offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, - 20, 20, FALSE, NULL, NULL); + 20, 20, FALSE, &s_rnti_tvb, NULL); + + if (s_rnti_tvb) { + private_data_set_s_rnti(actx, tvb_get_ntoh24(s_rnti_tvb, 0) >> 4); + } + + return offset; } @@ -18294,9 +18401,32 @@ static const per_sequence_t U_RNTI_sequence[] = { static int dissect_rrc_U_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 777 "./asn1/rrc/rrc.cnf" + private_data_set_s_rnc_id(actx, 0); + private_data_set_s_rnti(actx, 0); + guint32 s_rnc_id; + guint32 s_rnti; + guint32 u_rnti_value; offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_U_RNTI, U_RNTI_sequence); + gboolean is_new_urnti = hf_index != hf_rrc_u_RNTI; /* hf_rrc_u_RNTI is for current U-RNTI, any other hf is for new U-RNTI */ + s_rnc_id = private_data_get_s_rnc_id(actx); + s_rnti = private_data_get_s_rnti(actx); + if(s_rnc_id != 0 && s_rnti != 0) { + u_rnti_value = (s_rnc_id << 20) | s_rnti; + /* We are looking for new allocated U-RNTIs, not previously used ones */ + if (is_new_urnti) { + private_data_set_new_u_rnti(actx, u_rnti_value); + } + /* Adding U-RNTI value to it's tree item */ + proto_item_append_text(actx->created_item,": %08x", u_rnti_value); + } + private_data_set_s_rnc_id(actx, 0); + private_data_set_s_rnti(actx, 0); + + + return offset; } @@ -18357,9 +18487,10 @@ dissect_rrc_PLMN_Identity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U static int dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 720 "./asn1/rrc/rrc.cnf" +#line 731 "./asn1/rrc/rrc.cnf" tvbuff_t *nas_sys_info_gsm_map_tvb = NULL; guint32 length; + enum nas_sys_info_gsm_map cn_domain; proto_tree *subtree; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -18367,28 +18498,27 @@ dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1 length = tvb_reported_length(nas_sys_info_gsm_map_tvb); if (length) { - if (actx->private_data) { - switch (GPOINTER_TO_UINT(actx->private_data)-1) { - case RRC_NAS_SYS_INFO_CN_COMMON: - subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, - ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "CN Common GSM-MAP NAS system information"); - de_cn_common_gsm_map_nas_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); - break; - case RRC_NAS_SYS_INFO_CS: - subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, - ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "CS domain specific system information"); - de_cs_domain_spec_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); - break; - case RRC_NAS_SYS_INFO_PS: - subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, - ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "PS domain specific system information"); - de_ps_domain_spec_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); - break; - default: - break; - } - actx->private_data = NULL; + cn_domain = private_data_get_cn_domain(actx); + switch (cn_domain) { + case RRC_NAS_SYS_INFO_CN_COMMON: + subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, + ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "CN Common GSM-MAP NAS system information"); + de_cn_common_gsm_map_nas_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); + break; + case RRC_NAS_SYS_INFO_CS: + subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, + ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "CS domain specific system information"); + de_cs_domain_spec_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); + break; + case RRC_NAS_SYS_INFO_PS: + subtree = proto_tree_add_subtree(tree, nas_sys_info_gsm_map_tvb, 0, length, + ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, NULL, "PS domain specific system information"); + de_ps_domain_spec_sys_info(nas_sys_info_gsm_map_tvb, subtree, actx->pinfo, 0, length, NULL, 0); + break; + default: + break; } + private_data_set_cn_domain(actx, RRC_NAS_SYS_UNKNOWN); } @@ -18400,8 +18530,8 @@ dissect_rrc_NAS_SystemInformationGSM_MAP(tvbuff_t *tvb _U_, int offset _U_, asn1 static int dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 704 "./asn1/rrc/rrc.cnf" - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CN_COMMON+1); +#line 715 "./asn1/rrc/rrc.cnf" + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON); offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index); @@ -18420,13 +18550,14 @@ static const value_string rrc_CN_DomainIdentity_vals[] = { static int dissect_rrc_CN_DomainIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 698 "./asn1/rrc/rrc.cnf" - guint32 nas_sys_info_gsm_map; +#line 708 "./asn1/rrc/rrc.cnf" + guint32 nas_sys_info; offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, - 2, &nas_sys_info_gsm_map, FALSE, 0, NULL); + 2, &nas_sys_info, FALSE, 0, NULL); - col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%s)", val_to_str_const(nas_sys_info_gsm_map,rrc_CN_DomainIdentity_vals,"Unknown")); - actx->private_data = GUINT_TO_POINTER(nas_sys_info_gsm_map+1); + col_append_fstr(actx->pinfo->cinfo, COL_INFO, "(%s)", val_to_str_const(nas_sys_info,rrc_CN_DomainIdentity_vals,"Unknown")); + nas_sys_info++; /* CS = 0, PS = 1 but the enum defines 0 as Unknown and CS = 1, PS = 2 */ + private_data_set_cn_domain(actx, (enum nas_sys_info_gsm_map) nas_sys_info); @@ -22078,7 +22209,7 @@ dissect_rrc_SSDT_UL(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro static int dissect_rrc_CellIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 752 "./asn1/rrc/rrc.cnf" +#line 804 "./asn1/rrc/rrc.cnf" tvbuff_t * cell_id_tvb = NULL; proto_item *temp_ti; proto_tree *cell_identity_tree; @@ -22303,7 +22434,7 @@ dissect_rrc_T_r3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_ static int dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 840 "./asn1/rrc/rrc.cnf" +#line 892 "./asn1/rrc/rrc.cnf" tvbuff_t *hrnti_tvb; struct rrc_info *rrcinf; offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, @@ -22312,7 +22443,7 @@ dissect_rrc_H_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot -#line 845 "./asn1/rrc/rrc.cnf" +#line 897 "./asn1/rrc/rrc.cnf" rrcinf = (struct rrc_info *)p_get_proto_data(wmem_file_scope(), actx->pinfo, proto_rrc, 0); if (!rrcinf) { rrcinf = wmem_new0(wmem_file_scope(), struct rrc_info); @@ -22338,8 +22469,8 @@ dissect_rrc_E_RNTI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot static int dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 708 "./asn1/rrc/rrc.cnf" - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CN_COMMON+1); +#line 719 "./asn1/rrc/rrc.cnf" + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON); offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index); @@ -27812,8 +27943,14 @@ dissect_rrc_ScramblingCodeType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_rrc_UL_ScramblingCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 799 "./asn1/rrc/rrc.cnf" +guint32 scrambling_code; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, - 0U, 16777215U, NULL, FALSE); + 0U, 16777215U, &scrambling_code, FALSE); + +private_data_set_scrambling_code(actx,scrambling_code); + + return offset; } @@ -38360,7 +38497,7 @@ dissect_rrc_CellChangeOrderFromUTRAN_r3_IEs(tvbuff_t *tvb _U_, int offset _U_, a static int dissect_rrc_GERAN_SystemInfoBlock(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 569 "./asn1/rrc/rrc.cnf" +#line 579 "./asn1/rrc/rrc.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -45589,7 +45726,7 @@ dissect_rrc_RLC_Info_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, static int dissect_rrc_MAC_d_FlowIdentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 837 "./asn1/rrc/rrc.cnf" +#line 889 "./asn1/rrc/rrc.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 7U, &flowd, FALSE); @@ -45637,7 +45774,7 @@ static const per_choice_t DL_TransportChannelType_r5_choice[] = { static int dissect_rrc_DL_TransportChannelType_r5(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 766 "./asn1/rrc/rrc.cnf" +#line 818 "./asn1/rrc/rrc.cnf" /*Here we try to figure out which HS-DSCH channels are multiplexed*/ guint *flowd_p; guint *cur_val=NULL; @@ -49111,7 +49248,7 @@ static const per_choice_t DL_TransportChannelType_r7_choice[] = { static int dissect_rrc_DL_TransportChannelType_r7(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 801 "./asn1/rrc/rrc.cnf" +#line 853 "./asn1/rrc/rrc.cnf" /*Here we try to figure out which HS-DSCH channels are multiplexed*/ guint *flowd_p; guint *cur_val=NULL; @@ -63044,7 +63181,7 @@ static const per_sequence_t T_single_GSM_Message_r3_sequence[] = { static int dissect_rrc_T_single_GSM_Message_r3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 538 "./asn1/rrc/rrc.cnf" +#line 548 "./asn1/rrc/rrc.cnf" tvbuff_t *gsm_message_tvb=NULL; guint bits_remaining, whole_octets_remaining; @@ -63070,7 +63207,7 @@ dissect_rrc_T_single_GSM_Message_r3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ static int dissect_rrc_GSM_MessageList_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 530 "./asn1/rrc/rrc.cnf" +#line 540 "./asn1/rrc/rrc.cnf" tvbuff_t *gsm_messagelist_tvb=NULL; offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, @@ -63330,7 +63467,7 @@ static const per_sequence_t T_single_GSM_Message_r6_sequence[] = { static int dissect_rrc_T_single_GSM_Message_r6(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 553 "./asn1/rrc/rrc.cnf" +#line 563 "./asn1/rrc/rrc.cnf" tvbuff_t *gsm_message_tvb=NULL; guint bits_remaining, whole_octets_remaining; @@ -88375,7 +88512,7 @@ static const value_string rrc_ReleaseCause_vals[] = { static int dissect_rrc_ReleaseCause(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 959 "./asn1/rrc/rrc.cnf" +#line 1011 "./asn1/rrc/rrc.cnf" guint32 value; offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 8, &value, FALSE, 0, NULL); @@ -89384,7 +89521,7 @@ static const per_choice_t SecurityModeCommand_choice[] = { static int dissect_rrc_SecurityModeCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 408 "./asn1/rrc/rrc.cnf" +#line 418 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "SecurityModeCommand"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_SecurityModeCommand, SecurityModeCommand_choice, @@ -89526,7 +89663,7 @@ static const per_choice_t SignallingConnectionRelease_choice[] = { static int dissect_rrc_SignallingConnectionRelease(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 430 "./asn1/rrc/rrc.cnf" +#line 440 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "SignallingConnectionRelease"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_SignallingConnectionRelease, SignallingConnectionRelease_choice, @@ -91633,7 +91770,7 @@ static const per_choice_t TransportChannelReconfiguration_choice[] = { static int dissect_rrc_TransportChannelReconfiguration(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 450 "./asn1/rrc/rrc.cnf" +#line 460 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportChannelReconfiguration"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_TransportChannelReconfiguration, TransportChannelReconfiguration_choice, @@ -91778,7 +91915,7 @@ static const per_sequence_t TransportFormatCombinationControl_sequence[] = { static int dissect_rrc_TransportFormatCombinationControl(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 462 "./asn1/rrc/rrc.cnf" +#line 472 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportFormatCombinationControl"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_TransportFormatCombinationControl, TransportFormatCombinationControl_sequence); @@ -92211,7 +92348,7 @@ static const per_choice_t UECapabilityEnquiry_choice[] = { static int dissect_rrc_UECapabilityEnquiry(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 470 "./asn1/rrc/rrc.cnf" +#line 480 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UECapabilityEnquiry"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_UECapabilityEnquiry, UECapabilityEnquiry_choice, @@ -92369,7 +92506,7 @@ static const per_choice_t UECapabilityInformationConfirm_choice[] = { static int dissect_rrc_UECapabilityInformationConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 478 "./asn1/rrc/rrc.cnf" +#line 488 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UECapabilityInformationConfirm"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_UECapabilityInformationConfirm, UECapabilityInformationConfirm_choice, @@ -93133,7 +93270,7 @@ static const per_choice_t UplinkPhysicalChannelControl_choice[] = { static int dissect_rrc_UplinkPhysicalChannelControl(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 494 "./asn1/rrc/rrc.cnf" +#line 504 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UplinkPhysicalChannelControl"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_UplinkPhysicalChannelControl, UplinkPhysicalChannelControl_choice, @@ -93476,7 +93613,7 @@ static const per_choice_t URAUpdateConfirm_choice[] = { static int dissect_rrc_URAUpdateConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 502 "./asn1/rrc/rrc.cnf" +#line 512 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "URAUpdateConfirm"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_URAUpdateConfirm, URAUpdateConfirm_choice, @@ -93939,8 +94076,8 @@ dissect_rrc_UE_ConnTimersAndConstants(tvbuff_t *tvb _U_, int offset _U_, asn1_ct static int dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_02(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 712 "./asn1/rrc/rrc.cnf" - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CN_COMMON+1); +#line 723 "./asn1/rrc/rrc.cnf" + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON); offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index); @@ -95824,7 +95961,7 @@ static const per_choice_t UTRANMobilityInformation_choice[] = { static int dissect_rrc_UTRANMobilityInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 510 "./asn1/rrc/rrc.cnf" +#line 520 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UTRANMobilityInformation"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_UTRANMobilityInformation, UTRANMobilityInformation_choice, @@ -96544,7 +96681,7 @@ dissect_rrc_ETWSPrimaryNotificationWithSecurity(tvbuff_t *tvb _U_, int offset _U static int dissect_rrc_T_eutra_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 624 "./asn1/rrc/rrc.cnf" +#line 634 "./asn1/rrc/rrc.cnf" tvbuff_t *eutra_message_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &eutra_message_tvb); @@ -96606,7 +96743,7 @@ dissect_rrc_T_r8_04(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pro static int dissect_rrc_T_ims_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 660 "./asn1/rrc/rrc.cnf" +#line 670 "./asn1/rrc/rrc.cnf" tvbuff_t *imsInformation_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, 1, 32, FALSE, &imsInformation_tvb); @@ -96661,7 +96798,7 @@ dissect_rrc_RSR_VCC_Info(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ static int dissect_rrc_T_eutra_Message_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 630 "./asn1/rrc/rrc.cnf" +#line 640 "./asn1/rrc/rrc.cnf" tvbuff_t *eutra_message_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &eutra_message_tvb); @@ -97027,7 +97164,7 @@ static const per_sequence_t UEInformationRequest_sequence[] = { static int dissect_rrc_UEInformationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 482 "./asn1/rrc/rrc.cnf" +#line 492 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UEInformationRequest"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_UEInformationRequest, UEInformationRequest_sequence); @@ -97796,7 +97933,7 @@ static const per_choice_t DL_DCCH_MessageType_choice[] = { static int dissect_rrc_DL_DCCH_MessageType(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 942 "./asn1/rrc/rrc.cnf" +#line 994 "./asn1/rrc/rrc.cnf" offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_DL_DCCH_MessageType, DL_DCCH_MessageType_choice, &msg_type); @@ -97816,7 +97953,7 @@ static const per_sequence_t DL_DCCH_Message_sequence[] = { static int dissect_rrc_DL_DCCH_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 945 "./asn1/rrc/rrc.cnf" +#line 997 "./asn1/rrc/rrc.cnf" offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_DL_DCCH_Message, DL_DCCH_Message_sequence); @@ -97830,12 +97967,13 @@ dissect_rrc_DL_DCCH_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_rrc_START_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 853 "./asn1/rrc/rrc.cnf" +#line 905 "./asn1/rrc/rrc.cnf" tvbuff_t * start_val; fp_info *fpinf; rrc_ciphering_info * c_inf; int i; guint32 * start; + enum nas_sys_info_gsm_map cn_domain; offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 20, 20, FALSE, &start_val, NULL); @@ -97849,45 +97987,44 @@ dissect_rrc_START_Value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, return offset; } /*Retrieve the start value for the two ciphering domains*/ - if (actx->private_data) { - switch(GPOINTER_TO_UINT(actx->private_data)-1){ - case RRC_NAS_SYS_INFO_CS: - /* - g_warning("Not implemented"); - */ - break; - case RRC_NAS_SYS_INFO_PS: + cn_domain = private_data_get_cn_domain(actx); + switch(cn_domain){ + case RRC_NAS_SYS_INFO_CS: + /* + g_warning("Not implemented"); + */ + break; + case RRC_NAS_SYS_INFO_PS: - /*Find the entry for the communication context (taken from FP)*/ - if( (c_inf =(rrc_ciphering_info *)g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){ - c_inf = g_new0(rrc_ciphering_info,1); - - /*Initiate tree with START_PS values.*/ - if(!c_inf->start_ps) - c_inf->start_ps = g_tree_new_full(rrc_key_cmp, - NULL,rrc_free_key,rrc_free_value); - - /*Clear and initialize seq_no matrix*/ - for(i = 0; i< 31; i++){ - c_inf->seq_no[i][0] = -1; - c_inf->seq_no[i][1] = -1; - } - g_tree_insert(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id), c_inf); + /*Find the entry for the communication context (taken from FP)*/ + if( (c_inf =(rrc_ciphering_info *)g_tree_lookup(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id))) == NULL ){ + c_inf = g_new0(rrc_ciphering_info,1); + + /*Initiate tree with START_PS values.*/ + if(!c_inf->start_ps) + c_inf->start_ps = g_tree_new_full(rrc_key_cmp, + NULL,rrc_free_key,rrc_free_value); + + /*Clear and initialize seq_no matrix*/ + for(i = 0; i< 31; i++){ + c_inf->seq_no[i][0] = -1; + c_inf->seq_no[i][1] = -1; } + g_tree_insert(rrc_ciph_inf, GINT_TO_POINTER(fpinf->com_context_id), c_inf); + } - /*Retrieve and store the value*/ - start = g_new(guint32,1); - *start = tvb_get_bits32(start_val,0,20,ENC_BIG_ENDIAN); - if(c_inf && c_inf->start_ps) - /*Insert the value based on current frame num since this might vary over time*/ - g_tree_insert(c_inf->start_ps, GUINT_TO_POINTER(actx->pinfo->num), start); + /*Retrieve and store the value*/ + start = g_new(guint32,1); + *start = tvb_get_bits32(start_val,0,20,ENC_BIG_ENDIAN); + if(c_inf && c_inf->start_ps) + /*Insert the value based on current frame num since this might vary over time*/ + g_tree_insert(c_inf->start_ps, GUINT_TO_POINTER(actx->pinfo->num), start); - break; - default: - break; - } - actx->private_data = NULL; + break; + default: + break; } + private_data_set_cn_domain(actx, RRC_NAS_SYS_UNKNOWN); @@ -99736,7 +99873,7 @@ dissect_rrc_HandoverFromUtranFailure_v590ext_IEs(tvbuff_t *tvb _U_, int offset _ static int dissect_rrc_T_eutra_Message_02(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 636 "./asn1/rrc/rrc.cnf" +#line 646 "./asn1/rrc/rrc.cnf" tvbuff_t *eutra_message_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &eutra_message_tvb); @@ -107196,7 +107333,7 @@ dissect_rrc_UE_RadioAccessCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx static int dissect_rrc_GSM_Classmark2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 586 "./asn1/rrc/rrc.cnf" +#line 596 "./asn1/rrc/rrc.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -107215,7 +107352,7 @@ dissect_rrc_GSM_Classmark2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_rrc_GSM_Classmark3(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 594 "./asn1/rrc/rrc.cnf" +#line 604 "./asn1/rrc/rrc.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -108729,7 +108866,7 @@ static const per_sequence_t RRCConnectionSetupComplete_sequence[] = { static int dissect_rrc_RRCConnectionSetupComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 400 "./asn1/rrc/rrc.cnf" +#line 410 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "RRCConnectionSetupComplete"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_RRCConnectionSetupComplete, RRCConnectionSetupComplete_sequence); @@ -108910,7 +109047,7 @@ static const per_sequence_t RRCStatus_sequence[] = { static int dissect_rrc_RRCStatus(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 404 "./asn1/rrc/rrc.cnf" +#line 414 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "RRCStatus"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_RRCStatus, RRCStatus_sequence); @@ -108960,7 +109097,7 @@ static const per_sequence_t SecurityModeComplete_sequence[] = { static int dissect_rrc_SecurityModeComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 412 "./asn1/rrc/rrc.cnf" +#line 422 "./asn1/rrc/rrc.cnf" rrc_ciphering_info * c_inf ; fp_info *fpinf ; @@ -109019,7 +109156,7 @@ static const per_sequence_t SecurityModeFailure_sequence[] = { static int dissect_rrc_SecurityModeFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 426 "./asn1/rrc/rrc.cnf" +#line 436 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "SecurityModeFailure"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_SecurityModeFailure, SecurityModeFailure_sequence); @@ -109112,7 +109249,7 @@ static const per_sequence_t SignallingConnectionReleaseIndication_sequence[] = { static int dissect_rrc_SignallingConnectionReleaseIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 434 "./asn1/rrc/rrc.cnf" +#line 444 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "SignallingConnectionReleaseIndication"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_SignallingConnectionReleaseIndication, SignallingConnectionReleaseIndication_sequence); @@ -109210,7 +109347,7 @@ static const per_sequence_t TransportChannelReconfigurationComplete_sequence[] = static int dissect_rrc_TransportChannelReconfigurationComplete(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 454 "./asn1/rrc/rrc.cnf" +#line 464 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportChannelReconfigurationComplete"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_TransportChannelReconfigurationComplete, TransportChannelReconfigurationComplete_sequence); @@ -109259,7 +109396,7 @@ static const per_sequence_t TransportChannelReconfigurationFailure_sequence[] = static int dissect_rrc_TransportChannelReconfigurationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 458 "./asn1/rrc/rrc.cnf" +#line 468 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportChannelReconfigurationFailure"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_TransportChannelReconfigurationFailure, TransportChannelReconfigurationFailure_sequence); @@ -109308,7 +109445,7 @@ static const per_sequence_t TransportFormatCombinationControlFailure_sequence[] static int dissect_rrc_TransportFormatCombinationControlFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 466 "./asn1/rrc/rrc.cnf" +#line 476 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "TransportFormatCombinationControlFailure"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_TransportFormatCombinationControlFailure, TransportFormatCombinationControlFailure_sequence); @@ -109584,7 +109721,7 @@ static const per_sequence_t UECapabilityInformation_sequence[] = { static int dissect_rrc_UECapabilityInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 474 "./asn1/rrc/rrc.cnf" +#line 484 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UECapabilityInformation"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_UECapabilityInformation, UECapabilityInformation_sequence); @@ -109779,7 +109916,7 @@ static const per_sequence_t UplinkDirectTransfer_sequence[] = { static int dissect_rrc_UplinkDirectTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 490 "./asn1/rrc/rrc.cnf" +#line 500 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UplinkDirectTransfer"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_UplinkDirectTransfer, UplinkDirectTransfer_sequence); @@ -109919,7 +110056,7 @@ static const per_sequence_t UTRANMobilityInformationConfirm_sequence[] = { static int dissect_rrc_UTRANMobilityInformationConfirm(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 514 "./asn1/rrc/rrc.cnf" +#line 524 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UTRANMobilityInformationConfirm"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_UTRANMobilityInformationConfirm, UTRANMobilityInformationConfirm_sequence); @@ -109968,7 +110105,7 @@ static const per_sequence_t UTRANMobilityInformationFailure_sequence[] = { static int dissect_rrc_UTRANMobilityInformationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 518 "./asn1/rrc/rrc.cnf" +#line 528 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UTRANMobilityInformationFailure"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_UTRANMobilityInformationFailure, UTRANMobilityInformationFailure_sequence); @@ -111785,7 +111922,7 @@ static const per_sequence_t UEInformationResponse_sequence[] = { static int dissect_rrc_UEInformationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 486 "./asn1/rrc/rrc.cnf" +#line 496 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "UEInformationResponse"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_UEInformationResponse, UEInformationResponse_sequence); @@ -116156,11 +116293,21 @@ static const per_choice_t RRCConnectionSetup_choice[] = { static int dissect_rrc_RRCConnectionSetup(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { #line 396 "./asn1/rrc/rrc.cnf" + guint32 scrambling_code, new_u_rnti; col_append_str(actx->pinfo->cinfo, COL_INFO, "RRCConnectionSetup"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_RRCConnectionSetup, RRCConnectionSetup_choice, NULL); + /* 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)); + } + } @@ -116299,7 +116446,7 @@ static const per_choice_t URAUpdateConfirm_CCCH_choice[] = { static int dissect_rrc_URAUpdateConfirm_CCCH(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 506 "./asn1/rrc/rrc.cnf" +#line 516 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "URAUpdateConfirm-CCCH"); offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_URAUpdateConfirm_CCCH, URAUpdateConfirm_CCCH_choice, @@ -118169,7 +118316,7 @@ static const per_sequence_t URAUpdate_sequence[] = { static int dissect_rrc_URAUpdate(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 498 "./asn1/rrc/rrc.cnf" +#line 508 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "URAUpdate"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_URAUpdate, URAUpdate_sequence); @@ -119650,7 +119797,7 @@ static const per_sequence_t SystemInformation_FACH_sequence[] = { static int dissect_rrc_SystemInformation_FACH(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 442 "./asn1/rrc/rrc.cnf" +#line 452 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "SystemInformation-FACH"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_SystemInformation_FACH, SystemInformation_FACH_sequence); @@ -119756,7 +119903,7 @@ static const per_sequence_t SystemInformationChangeIndication_sequence[] = { static int dissect_rrc_SystemInformationChangeIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 446 "./asn1/rrc/rrc.cnf" +#line 456 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "SystemInformationChangeIndication"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_SystemInformationChangeIndication, SystemInformationChangeIndication_sequence); @@ -119937,7 +120084,7 @@ static const per_sequence_t SystemInformation_BCH_sequence[] = { static int dissect_rrc_SystemInformation_BCH(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 438 "./asn1/rrc/rrc.cnf" +#line 448 "./asn1/rrc/rrc.cnf" col_append_str(actx->pinfo->cinfo, COL_INFO, "SystemInformation-BCH"); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_SystemInformation_BCH, SystemInformation_BCH_sequence); @@ -127374,7 +127521,7 @@ static const per_choice_t HandoverToUTRANCommand_choice[] = { static int dissect_rrc_HandoverToUTRANCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 948 "./asn1/rrc/rrc.cnf" +#line 1000 "./asn1/rrc/rrc.cnf" offset = dissect_per_choice(tvb, offset, actx, tree, hf_index, ett_rrc_HandoverToUTRANCommand, HandoverToUTRANCommand_choice, NULL); @@ -127515,8 +127662,8 @@ static const per_sequence_t UE_SecurityInformation_sequence[] = { static int dissect_rrc_UE_SecurityInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 951 "./asn1/rrc/rrc.cnf" - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CS+1); +#line 1003 "./asn1/rrc/rrc.cnf" + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CS); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_UE_SecurityInformation, UE_SecurityInformation_sequence); @@ -127918,8 +128065,8 @@ static const per_sequence_t UE_SecurityInformation2_sequence[] = { static int dissect_rrc_UE_SecurityInformation2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 955 "./asn1/rrc/rrc.cnf" - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_PS+1); +#line 1007 "./asn1/rrc/rrc.cnf" + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_PS); offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index, ett_rrc_UE_SecurityInformation2, UE_SecurityInformation2_sequence); @@ -134914,7 +135061,7 @@ dissect_rrc_T_supportOfInterRATHOToEUTRATDD(tvbuff_t *tvb _U_, int offset _U_, a static int dissect_rrc_T_eutraFeatureGroupIndicators(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 642 "./asn1/rrc/rrc.cnf" +#line 652 "./asn1/rrc/rrc.cnf" tvbuff_t *eutraFeatureGroupIndicators_tvb=NULL; offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, 4, 4, FALSE, &eutraFeatureGroupIndicators_tvb, NULL); @@ -136454,7 +136601,7 @@ dissect_rrc_T_supportOfInter_RAT_PS_Handover(tvbuff_t *tvb _U_, int offset _U_, static int dissect_rrc_GSM_MS_RadioAccessCapability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 602 "./asn1/rrc/rrc.cnf" +#line 612 "./asn1/rrc/rrc.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -136767,7 +136914,7 @@ dissect_rrc_UE_RadioAccessCapability_v860ext_IEs(tvbuff_t *tvb _U_, int offset _ static int dissect_rrc_T_ue_EUTRA_Capability(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 618 "./asn1/rrc/rrc.cnf" +#line 628 "./asn1/rrc/rrc.cnf" tvbuff_t *ue_eutra_cap_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, NO_BOUND, NO_BOUND, FALSE, &ue_eutra_cap_tvb); @@ -148410,7 +148557,7 @@ dissect_rrc_ExtSIBTypeInfoSchedulingInfo_List3(tvbuff_t *tvb _U_, int offset _U_ static int dissect_rrc_HNBName(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 692 "./asn1/rrc/rrc.cnf" +#line 702 "./asn1/rrc/rrc.cnf" tvbuff_t *hnbname_tvb = NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, -1, @@ -149001,8 +149148,8 @@ dissect_rrc_SIB_ReferenceList2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_rrc_T_cn_CommonGSM_MAP_NAS_SysInfo_03(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 716 "./asn1/rrc/rrc.cnf" - actx->private_data = GUINT_TO_POINTER(RRC_NAS_SYS_INFO_CN_COMMON+1); +#line 727 "./asn1/rrc/rrc.cnf" + private_data_set_cn_domain(actx, RRC_NAS_SYS_INFO_CN_COMMON); offset = dissect_rrc_NAS_SystemInformationGSM_MAP(tvb, offset, actx, tree, hf_index); @@ -154215,7 +154362,7 @@ dissect_rrc_UE_HistoryInformation(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_rrc_T_interRATHandoverInfo(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 610 "./asn1/rrc/rrc.cnf" +#line 620 "./asn1/rrc/rrc.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -159569,7 +159716,7 @@ dissect_rrc_ToTargetRNC_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_rrc_T_dL_DCCHmessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 522 "./asn1/rrc/rrc.cnf" +#line 532 "./asn1/rrc/rrc.cnf" tvbuff_t *dl_dcch_message_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -160401,7 +160548,7 @@ static int dissect_MeasurementReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _ /*--- End of included file: packet-rrc-fn.c ---*/ -#line 198 "./asn1/rrc/packet-rrc-template.c" +#line 289 "./asn1/rrc/packet-rrc-template.c" @@ -160463,11 +160610,16 @@ rrc_init(void) { rrc_free_key, rrc_free_value); - /*Initialize structure for muxed flow indication*/ rrc_ciph_inf = g_tree_new_full(rrc_key_cmp, 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 @@ -160475,6 +160627,7 @@ 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 -------------------------------------------*/ @@ -203300,7 +203453,7 @@ void proto_register_rrc(void) { NULL, HFILL }}, /*--- End of included file: packet-rrc-hfarr.c ---*/ -#line 280 "./asn1/rrc/packet-rrc-template.c" +#line 377 "./asn1/rrc/packet-rrc-template.c" { &hf_test, { "RAB Test", "rrc.RAB.test", FT_UINT8, BASE_DEC, NULL, 0, @@ -210167,7 +210320,7 @@ void proto_register_rrc(void) { &ett_rrc_UL_RFC3095_Context, /*--- End of included file: packet-rrc-ettarr.c ---*/ -#line 330 "./asn1/rrc/packet-rrc-template.c" +#line 427 "./asn1/rrc/packet-rrc-template.c" &ett_rrc_eutraFeatureGroupIndicators, &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, &ett_rrc_ims_info, @@ -210266,7 +210419,7 @@ void proto_register_rrc(void) { /*--- End of included file: packet-rrc-dis-reg.c ---*/ -#line 353 "./asn1/rrc/packet-rrc-template.c" +#line 450 "./asn1/rrc/packet-rrc-template.c" diff --git a/epan/dissectors/packet-rrc.h b/epan/dissectors/packet-rrc.h index bea2ed8f1a..a782f33153 100644 --- a/epan/dissectors/packet-rrc.h +++ b/epan/dissectors/packet-rrc.h @@ -84,5 +84,6 @@ 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/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index b659b54cb0..bac91ad879 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -4838,6 +4838,7 @@ fp_set_per_packet_inf_from_conv(conversation_t *p_conv, rlc_info *rlcinf; guint8 fake_lchid=0; gint *cur_val=NULL; + guint32 user_identity; fpi = wmem_new0(wmem_file_scope(), fp_info); p_add_proto_data(wmem_file_scope(), pinfo, proto_fp, 0, fpi); @@ -5060,7 +5061,16 @@ fp_set_per_packet_inf_from_conv(conversation_t *p_conv, } /*** Set rlc info ***/ - rlcinf->urnti[j+chan] = p_conv_data->com_context_id; + /* Trying to resolve the U-RNTI of the user to be used as RLC 'UE-ID' */ + /* Fallback - The RNC's 'Communication Context' for the user as seen in NBAP messages */ + user_identity = p_conv_data->com_context_id; + if (p_conv_data->scrambling_code != 0) { + guint32 * mapped_urnti = (guint32 *)g_tree_lookup(rrc_scrambling_code_urnti, GUINT_TO_POINTER(p_conv_data->scrambling_code)); + if (mapped_urnti != 0) { + user_identity = GPOINTER_TO_UINT(mapped_urnti); + } + } + rlcinf->urnti[j + chan] = user_identity; rlcinf->li_size[j+chan] = RLC_LI_7BITS; #if 0 /*If this entry exists, SECRUITY_MODE is completed (signled by RRC)*/ diff --git a/epan/dissectors/packet-umts_fp.h b/epan/dissectors/packet-umts_fp.h index 3d7ac5107c..eda671d032 100644 --- a/epan/dissectors/packet-umts_fp.h +++ b/epan/dissectors/packet-umts_fp.h @@ -146,9 +146,9 @@ typedef struct guint32 dl_frame_number; /* the frame where this conversation is started from CRNC */ guint32 ul_frame_number; /* the frame where this conversation is started from Node B */ address crnc_address; - guint16 /* Expecting specific lengths: 27 for frames with 1 TB, 48 for frames with 2 TBs */ - crnc_port; - gint com_context_id; /*Identifies a single UE in the network*/ + guint16 crnc_port; + gint com_context_id; /* Identifies a single UE in all NBAP messages */ + guint32 scrambling_code; /* Identifies a single UE's radio transmissions in the UTRAN */ /* For PCH channel */ gint paging_indications; |