diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-07-27 08:10:31 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-07-27 08:10:31 +0000 |
commit | ad7c4a4bbadb408c4b0b0cc385a3db17209a1c98 (patch) | |
tree | ed17beb45e4ca4da9f7115a7761edfcf024252a8 | |
parent | 3bfda44ae01b5f16bfd425afe19261e51f4d78b6 (diff) | |
download | wireshark-ad7c4a4bbadb408c4b0b0cc385a3db17209a1c98.tar.gz |
From Jacob Nordgren and Rishie Sharma:
- Added basic support for tracking flows over reconfigured transport channels + mindor bugfixes
- small fix in rrc, and some small cleanups
svn path=/trunk/; revision=44062
-rw-r--r-- | asn1/nbap/nbap.cnf | 49 | ||||
-rw-r--r-- | asn1/nbap/packet-nbap-template.c | 54 | ||||
-rw-r--r-- | asn1/rrc/packet-rrc-template.c | 2 | ||||
-rw-r--r-- | asn1/rrc/rrc.cnf | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-nbap.c | 277 | ||||
-rw-r--r-- | epan/dissectors/packet-rlc.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-rrc.c | 32 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_fp.c | 54 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_mac.c | 9 |
9 files changed, 328 insertions, 159 deletions
diff --git a/asn1/nbap/nbap.cnf b/asn1/nbap/nbap.cnf index 38112efaea..e99c4959ed 100644 --- a/asn1/nbap/nbap.cnf +++ b/asn1/nbap/nbap.cnf @@ -106,6 +106,7 @@ ProtocolIE-ContainerPairList ProcedureID = ep_strdup_printf("%s/%s", val_to_str(ProcedureCode, VALS(nbap_ProcedureCode_vals), "unknown(%u)"), val_to_str(ddMode, VALS(nbap_DdMode_vals), "unknown(%u)")); + crcn_context_present = FALSE; /*Reset CRNC Com context present flag.*/ #.END #.FN_PARS InitiatingMessage/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_InitiatingMessageValue @@ -720,9 +721,8 @@ transportFormatSet_type = NBAP_CPCH; umts_fp_conversation_info->crnc_port = BindingID_port; umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN; - /*Save unique UE-identifier */ - /*umts_fp_conversation_info->com_context_id = com_context_id; - */ + /*Save unique UE-identifier */ + umts_fp_conversation_info->com_context_id = crcn_context_present ? 1337 : 1; /* DCH's in this flow */ umts_fp_conversation_info->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present; @@ -915,8 +915,8 @@ transportFormatSet_type = NBAP_CPCH; umts_fp_conversation_info->crnc_port = BindingID_port; umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN; /*Save unique UE-identifier */ - /*umts_fp_conversation_info->com_context_id = com_context_id; - */ + umts_fp_conversation_info->com_context_id = crcn_context_present ? com_context_id : 1; + /* DCH's in this flow */ umts_fp_conversation_info->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present; @@ -1230,12 +1230,22 @@ BindingID_port = 0; SE_COPY_ADDRESS(&(umts_fp_conversation_info->crnc_address), &dst_addr); umts_fp_conversation_info->crnc_port = BindingID_port; + umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN; - - /*TODO: Fix this (make it better)*/ - if(BindingID_port == 1968){ - umts_fp_conversation_info->urnti = 4711; + + + if(crcn_context_present){ + umts_fp_conversation_info->com_context_id = com_context_id; + }else{ + nbap_com_context_id * cur_val; + if((cur_val=g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){ + umts_fp_conversation_info->com_context_id = cur_val->crnc_context; + }else{ + expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not set Comunication Context-ID, fragments over reconfigured channels might fail"); + } } + + /* Set address for collection of DDI entries */ COPY_ADDRESS(&(nbap_edch_channel_info[e_dch_macdflow_id].crnc_address),&dst_addr); nbap_edch_channel_info[e_dch_macdflow_id].crnc_port = BindingID_port; @@ -1635,10 +1645,27 @@ int i; #Routines for figuring out a unique UE identification number (to track flows over changing channels) # -#.FN_BODY NodeB-CommunicationContextID VAL_PTR = &com_context_id -%(DEFAULT_BODY)s #.FN_BODY CRNC-CommunicationContextID VAL_PTR = &com_context_id %(DEFAULT_BODY)s +crcn_context_present = TRUE; + +#.FN_BODY NodeB-CommunicationContextID VAL_PTR = &node_b_com_context_id +/*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 *cur_val; + +%(DEFAULT_BODY)s + + /*If both are avaible we can update the map*/ +if(crcn_context_present){ + + if( (cur_val=g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) == NULL ){ + + cur_val = g_malloc(sizeof(nbap_com_context_id)); + cur_val->crnc_context = com_context_id; + cur_val->frame_num = actx->pinfo->fd->num; + g_tree_insert(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id), cur_val); + } + } #.FN_BODY HSDSCH-RNTI VAL_PTR = &hrnti umts_fp_conversation_info_t *umts_fp_conversation_info = NULL; diff --git a/asn1/nbap/packet-nbap-template.c b/asn1/nbap/packet-nbap-template.c index 165c9b194d..2514d40b72 100644 --- a/asn1/nbap/packet-nbap-template.c +++ b/asn1/nbap/packet-nbap-template.c @@ -172,6 +172,17 @@ gint hsdsch_macdflow_ids[maxNrOfMACdFlows]; gint hrnti; +guint node_b_com_context_id; + +/*Stuff for mapping NodeB-Comuncation Context ID to CRNC Comuncation Context ID*/ +typedef struct com_ctxt_{ + /*guint nodeb_context;*/ + guint crnc_context; + guint frame_num; +}nbap_com_context_id; +gboolean crcn_context_present = FALSE; +GTree * com_context_map; + struct _nbap_msg_info_for_fp g_nbap_msg_info_for_fp; /* Global variables */ @@ -314,6 +325,32 @@ static void add_hsdsch_bind(packet_info *pinfo, proto_tree * tree){ } } +static gint nbap_key_cmp(gconstpointer a_ptr, gconstpointer b_ptr, gpointer ignore _U_){ + if( GPOINTER_TO_INT(a_ptr) > GPOINTER_TO_INT(b_ptr) ){ + return -1; + } + return GPOINTER_TO_INT(a_ptr) < GPOINTER_TO_INT(b_ptr); +} +static void nbap_free_key(gpointer key ){ + g_free(key); + + } +static void nbap_free_value(gpointer value ){ + g_free(value); + } + +static void nbap_init(void){ + + /*Cleanup*/ + if(com_context_map){ + g_tree_destroy(com_context_map); + } + /*Initialize*/ + com_context_map = g_tree_new_full(nbap_key_cmp, + NULL, /* data pointer, optional */ + nbap_free_key, + nbap_free_value); +} static void dissect_nbap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -429,16 +466,19 @@ void proto_register_nbap(void) { attributes_uat);*/ /* Register dissector tables */ - nbap_ies_dissector_table = register_dissector_table("nbap.ies", "NBAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); - nbap_extension_dissector_table = register_dissector_table("nbap.extension", "NBAP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC); - nbap_proc_imsg_dissector_table = register_dissector_table("nbap.proc.imsg", "NBAP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_STRING, BASE_NONE); - nbap_proc_sout_dissector_table = register_dissector_table("nbap.proc.sout", "NBAP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_STRING, BASE_NONE); - nbap_proc_uout_dissector_table = register_dissector_table("nbap.proc.uout", "NBAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_STRING, BASE_NONE); - -} + nbap_ies_dissector_table = register_dissector_table("nbap.ies", "NBAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); + nbap_extension_dissector_table = register_dissector_table("nbap.extension", "NBAP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC); + nbap_proc_imsg_dissector_table = register_dissector_table("nbap.proc.imsg", "NBAP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_STRING, BASE_NONE); + nbap_proc_sout_dissector_table = register_dissector_table("nbap.proc.sout", "NBAP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_STRING, BASE_NONE); + nbap_proc_uout_dissector_table = register_dissector_table("nbap.proc.uout", "NBAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_STRING, BASE_NONE); + register_init_routine(nbap_init); +} +/* +#define EXTRA_PPI 1 +*/ /*--- proto_reg_handoff_nbap ---------------------------------------*/ void proto_reg_handoff_nbap(void) diff --git a/asn1/rrc/packet-rrc-template.c b/asn1/rrc/packet-rrc-template.c index 61ef2e1c2a..b38cf115d3 100644 --- a/asn1/rrc/packet-rrc-template.c +++ b/asn1/rrc/packet-rrc-template.c @@ -55,6 +55,7 @@ #define PFNAME "rrc" extern int proto_fp; /*Handler to FP*/ + GTree * hsdsch_muxed_flows; @@ -132,6 +133,7 @@ static tvbuff_t * hrnti; #define MAX_NUM_HSDHSCH_MACDFLOW 8 static guint8 num_chans_per_flow[MAX_NUM_HSDHSCH_MACDFLOW]; + #include "packet-rrc-fn.c" #include "packet-rrc.h" diff --git a/asn1/rrc/rrc.cnf b/asn1/rrc/rrc.cnf index a5925a67a0..f382b50f63 100644 --- a/asn1/rrc/rrc.cnf +++ b/asn1/rrc/rrc.cnf @@ -711,13 +711,13 @@ HNBName TYPE=FT_STRING DISPLAY=BASE_NONE #.FN_BODY MAC-d-FlowIdentity VAL_PTR = &flowd %(DEFAULT_BODY)s -#.FN_BODY SRB_InformationSetupList2_r6 +#.FN_BODY SRB-InformationSetupList2-r6 %(DEFAULT_BODY)s /*Clear memory*/ memset(num_chans_per_flow,0,sizeof(guint8)); -#.FN_BODY H_RNTI VAL_PTR = &hrnti +#.FN_BODY H-RNTI VAL_PTR = &hrnti diff --git a/epan/dissectors/packet-nbap.c b/epan/dissectors/packet-nbap.c index cc202a90b1..3c5558a89f 100644 --- a/epan/dissectors/packet-nbap.c +++ b/epan/dissectors/packet-nbap.c @@ -6565,6 +6565,17 @@ gint hsdsch_macdflow_ids[maxNrOfMACdFlows]; gint hrnti; +guint node_b_com_context_id; + +/*Stuff for mapping NodeB-Comuncation Context ID to CRNC Comuncation Context ID*/ +typedef struct com_ctxt_{ + /*guint nodeb_context;*/ + guint crnc_context; + guint frame_num; +}nbap_com_context_id; +gboolean crcn_context_present = FALSE; +GTree * com_context_map; + struct _nbap_msg_info_for_fp g_nbap_msg_info_for_fp; /* Global variables */ @@ -6806,6 +6817,7 @@ dissect_nbap_ProcedureID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_ ProcedureID = ep_strdup_printf("%s/%s", val_to_str(ProcedureCode, VALS(nbap_ProcedureCode_vals), "unknown(%u)"), val_to_str(ddMode, VALS(nbap_DdMode_vals), "unknown(%u)")); + crcn_context_present = FALSE; /*Reset CRNC Com context present flag.*/ return offset; } @@ -8594,7 +8606,7 @@ dissect_nbap_Additional_EDCH_RL_Specific_Information_To_Setup_List(tvbuff_t *tvb static int dissect_nbap_E_DCH_MACdFlow_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 653 "../../asn1/nbap/nbap.cnf" +#line 654 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, maxNrOfEDCHMACdFlows_1, &e_dch_macdflow_id, FALSE); @@ -8610,7 +8622,7 @@ dissect_nbap_E_DCH_MACdFlow_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_nbap_BindingID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 663 "../../asn1/nbap/nbap.cnf" +#line 664 "../../asn1/nbap/nbap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -8633,7 +8645,7 @@ dissect_nbap_BindingID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, static int dissect_nbap_TransportLayerAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 576 "../../asn1/nbap/nbap.cnf" +#line 577 "../../asn1/nbap/nbap.cnf" tvbuff_t *parameter_tvb=NULL; proto_item *item; proto_tree *subtree, *nsap_tree; @@ -10189,7 +10201,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 1644 "../../asn1/nbap/nbap.cnf" +#line 1671 "../../asn1/nbap/nbap.cnf" umts_fp_conversation_info_t *umts_fp_conversation_info = NULL; address null_addr; conversation_t *conversation = NULL; @@ -10423,7 +10435,7 @@ dissect_nbap_BundlingModeIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_nbap_CommonTransportChannelID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 649 "../../asn1/nbap/nbap.cnf" +#line 650 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, &commontransportchannelid, FALSE); @@ -11233,7 +11245,7 @@ dissect_nbap_Common_E_DCH_HSDPCCH_InfoItem(tvbuff_t *tvb _U_, int offset _U_, as static int dissect_nbap_CommonPhysicalChannelID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 645 "../../asn1/nbap/nbap.cnf" +#line 646 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, &commonphysicalchannelid, FALSE); @@ -11402,7 +11414,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 1528 "../../asn1/nbap/nbap.cnf" +#line 1538 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, maxNrOfCommonMACFlows_1, &common_macdflow_id, FALSE); @@ -11484,7 +11496,7 @@ static const value_string nbap_PayloadCRC_PresenceIndicator_vals[] = { static int dissect_nbap_PayloadCRC_PresenceIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 610 "../../asn1/nbap/nbap.cnf" +#line 611 "../../asn1/nbap/nbap.cnf" guint32 payload_crc_value; offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, @@ -11536,7 +11548,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 1332 "../../asn1/nbap/nbap.cnf" +#line 1342 "../../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); @@ -11555,7 +11567,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 1416 "../../asn1/nbap/nbap.cnf" +#line 1426 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 1504U, NULL, TRUE); @@ -11979,7 +11991,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 1535 "../../asn1/nbap/nbap.cnf" +#line 1545 "../../asn1/nbap/nbap.cnf" address dst_addr; transportLayerAddress_ipv4 = 0; BindingID_port = 0; @@ -12026,7 +12038,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 1322 "../../asn1/nbap/nbap.cnf" +#line 1332 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 1U, 5000U, &MACdPDU_Size, TRUE); @@ -13247,10 +13259,11 @@ 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 1641 "../../asn1/nbap/nbap.cnf" +#line 1649 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 1048575U, &com_context_id, FALSE); +crcn_context_present = TRUE; @@ -14677,7 +14690,7 @@ dissect_nbap_ToAWE(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, prot 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 628 "../../asn1/nbap/nbap.cnf" +#line 629 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, &dch_id, FALSE); @@ -15422,7 +15435,7 @@ dissect_nbap_DCH_TDD_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t * static int dissect_nbap_T_dCH_ID_01(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 640 "../../asn1/nbap/nbap.cnf" +#line 641 "../../asn1/nbap/nbap.cnf" offset = dissect_nbap_DCH_ID(tvb, offset, actx, tree, hf_index); @@ -17929,7 +17942,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 1312 "../../asn1/nbap/nbap.cnf" +#line 1322 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 62U, &e_dch_ddi_value, FALSE); @@ -18063,7 +18076,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 1309 "../../asn1/nbap/nbap.cnf" +#line 1319 "../../asn1/nbap/nbap.cnf" num_items++; @@ -18080,7 +18093,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 1302 "../../asn1/nbap/nbap.cnf" +#line 1312 "../../asn1/nbap/nbap.cnf" num_items = 0; offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, @@ -18113,7 +18126,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 1251 "../../asn1/nbap/nbap.cnf" +#line 1261 "../../asn1/nbap/nbap.cnf" umts_fp_conversation_info_t *p_conv_data = NULL; address null_addr; conversation_t *p_conv; @@ -23016,7 +23029,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 1557 "../../asn1/nbap/nbap.cnf" +#line 1567 "../../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 @@ -23147,7 +23160,7 @@ dissect_nbap_HSDSCH_Common_System_Information_ResponseFDD(tvbuff_t *tvb _U_, int static int dissect_nbap_HSDSCH_MACdFlow_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 658 "../../asn1/nbap/nbap.cnf" +#line 659 "../../asn1/nbap/nbap.cnf" offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, maxNrOfMACdFlows_1, &hsdsch_macdflow_id, FALSE); @@ -23171,7 +23184,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 1393 "../../asn1/nbap/nbap.cnf" +#line 1403 "../../asn1/nbap/nbap.cnf" address dst_addr; @@ -23275,7 +23288,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 1340 "../../asn1/nbap/nbap.cnf" +#line 1350 "../../asn1/nbap/nbap.cnf" guint32 rlc_mode; offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, @@ -23346,7 +23359,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 1364 "../../asn1/nbap/nbap.cnf" +#line 1374 "../../asn1/nbap/nbap.cnf" int protocol_ie_id; guint32 i; @@ -23388,7 +23401,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 1357 "../../asn1/nbap/nbap.cnf" +#line 1367 "../../asn1/nbap/nbap.cnf" guint32 hsdsch_physical_layer_category; offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, @@ -23456,7 +23469,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 1440 "../../asn1/nbap/nbap.cnf" +#line 1450 "../../asn1/nbap/nbap.cnf" /* * Collect the information about the HSDSCH MACdFlows set up conversation(s) and set the conversation data. */ @@ -23776,7 +23789,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 1424 "../../asn1/nbap/nbap.cnf" +#line 1434 "../../asn1/nbap/nbap.cnf" /* * Set the channel entity i.e the type of the hsdsch channels (if this is present entity = ehs) */ @@ -24292,7 +24305,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 1632 "../../asn1/nbap/nbap.cnf" +#line 1642 "../../asn1/nbap/nbap.cnf" g_warning("HS-DSCH Type 3 NOT Implemented!"); @@ -25867,7 +25880,7 @@ dissect_nbap_IB_OC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p static int dissect_nbap_IB_SG_DATA(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 533 "../../asn1/nbap/nbap.cnf" +#line 534 "../../asn1/nbap/nbap.cnf" tvbuff_t *parameter_tvb=NULL; proto_tree *subtree; @@ -26001,7 +26014,7 @@ static const value_string nbap_IB_Type_vals[] = { static int dissect_nbap_IB_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 520 "../../asn1/nbap/nbap.cnf" +#line 521 "../../asn1/nbap/nbap.cnf" offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 26, &ib_type, TRUE, 15, NULL); @@ -27592,9 +27605,25 @@ 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 1639 "../../asn1/nbap/nbap.cnf" +#line 1653 "../../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 *cur_val; + offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, - 0U, 1048575U, &com_context_id, FALSE); + 0U, 1048575U, &node_b_com_context_id, FALSE); + + + /*If both are avaible we can update the map*/ +if(crcn_context_present){ + + if( (cur_val=g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) == NULL ){ + + cur_val = g_malloc(sizeof(nbap_com_context_id)); + cur_val->crnc_context = com_context_id; + cur_val->frame_num = actx->pinfo->fd->num; + g_tree_insert(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id), cur_val); + } + } @@ -28352,12 +28381,22 @@ BindingID_port = 0; SE_COPY_ADDRESS(&(umts_fp_conversation_info->crnc_address), &dst_addr); umts_fp_conversation_info->crnc_port = BindingID_port; + umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN; - - /*TODO: Fix this (make it better)*/ - if(BindingID_port == 1968){ - umts_fp_conversation_info->urnti = 4711; + + + if(crcn_context_present){ + umts_fp_conversation_info->com_context_id = com_context_id; + }else{ + nbap_com_context_id * cur_val; + if((cur_val=g_tree_lookup(com_context_map, GINT_TO_POINTER((gint)node_b_com_context_id))) != NULL){ + umts_fp_conversation_info->com_context_id = cur_val->crnc_context; + }else{ + expert_add_info_format(actx->pinfo, NULL, PI_MALFORMED, PI_WARN, "Couldn't not set Comunication Context-ID, fragments over reconfigured channels might fail"); + } } + + /* Set address for collection of DDI entries */ COPY_ADDRESS(&(nbap_edch_channel_info[e_dch_macdflow_id].crnc_address),&dst_addr); nbap_edch_channel_info[e_dch_macdflow_id].crnc_port = BindingID_port; @@ -29299,7 +29338,7 @@ static const value_string nbap_Segment_Type_vals[] = { static int dissect_nbap_Segment_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 523 "../../asn1/nbap/nbap.cnf" +#line 524 "../../asn1/nbap/nbap.cnf" offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index, 7, &segment_type, TRUE, 0, NULL); @@ -31632,7 +31671,7 @@ static const per_sequence_t CommonTransportChannelSetupRequestFDD_sequence[] = { static int dissect_nbap_CommonTransportChannelSetupRequestFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 148 "../../asn1/nbap/nbap.cnf" +#line 149 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CommonTransportChannelSetupRequest(FDD) "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -31872,8 +31911,8 @@ transportFormatSet_type = NBAP_CPCH; umts_fp_conversation_info->crnc_port = BindingID_port; umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN; /*Save unique UE-identifier */ - /*umts_fp_conversation_info->com_context_id = com_context_id; - */ + umts_fp_conversation_info->com_context_id = crcn_context_present ? com_context_id : 1; + /* DCH's in this flow */ umts_fp_conversation_info->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present; @@ -32124,7 +32163,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 678 "../../asn1/nbap/nbap.cnf" +#line 679 "../../asn1/nbap/nbap.cnf" address dst_addr, null_addr; conversation_t *conversation; umts_fp_conversation_info_t *umts_fp_conversation_info; @@ -32172,9 +32211,8 @@ transportFormatSet_type = NBAP_CPCH; umts_fp_conversation_info->crnc_port = BindingID_port; umts_fp_conversation_info->rlc_mode = FP_RLC_MODE_UNKNOWN; - /*Save unique UE-identifier */ - /*umts_fp_conversation_info->com_context_id = com_context_id; - */ + /*Save unique UE-identifier */ + umts_fp_conversation_info->com_context_id = crcn_context_present ? 1337 : 1; /* DCH's in this flow */ umts_fp_conversation_info->dch_crc_present = g_nbap_msg_info_for_fp.dch_crc_present; @@ -32906,7 +32944,7 @@ static const per_sequence_t CommonTransportChannelSetupResponse_sequence[] = { static int dissect_nbap_CommonTransportChannelSetupResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 154 "../../asn1/nbap/nbap.cnf" +#line 155 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CommonTransportChannelSetupResponse "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -32941,7 +32979,7 @@ static const per_sequence_t CommonTransportChannelSetupFailure_sequence[] = { static int dissect_nbap_CommonTransportChannelSetupFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 160 "../../asn1/nbap/nbap.cnf" +#line 161 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CommonTransportChannelSetupFailure "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -33661,7 +33699,7 @@ static const per_sequence_t UnblockResourceIndication_sequence[] = { static int dissect_nbap_UnblockResourceIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 484 "../../asn1/nbap/nbap.cnf" +#line 485 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"UnblockResourceIndication "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -33682,7 +33720,7 @@ static const per_sequence_t AuditRequiredIndication_sequence[] = { static int dissect_nbap_AuditRequiredIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 394 "../../asn1/nbap/nbap.cnf" +#line 395 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"AuditRequiredIndication "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -33703,7 +33741,7 @@ static const per_sequence_t AuditRequest_sequence[] = { static int dissect_nbap_AuditRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 178 "../../asn1/nbap/nbap.cnf" +#line 179 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"AuditRequest "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -33724,7 +33762,7 @@ static const per_sequence_t AuditResponse_sequence[] = { static int dissect_nbap_AuditResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 184 "../../asn1/nbap/nbap.cnf" +#line 185 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"AuditResponse "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -34318,7 +34356,7 @@ static const per_sequence_t AuditFailure_sequence[] = { static int dissect_nbap_AuditFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 190 "../../asn1/nbap/nbap.cnf" +#line 191 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"AuditFailure "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -34340,7 +34378,7 @@ static const per_sequence_t CommonMeasurementInitiationRequest_sequence[] = { static int dissect_nbap_CommonMeasurementInitiationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 255 "../../asn1/nbap/nbap.cnf" +#line 256 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CommonMeasurementInitiationRequest "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -34458,7 +34496,7 @@ static const per_sequence_t CommonMeasurementInitiationResponse_sequence[] = { static int dissect_nbap_CommonMeasurementInitiationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 261 "../../asn1/nbap/nbap.cnf" +#line 262 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CommonMeasurementInitiationResponse "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -34574,7 +34612,7 @@ static const per_sequence_t CommonMeasurementInitiationFailure_sequence[] = { static int dissect_nbap_CommonMeasurementInitiationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 267 "../../asn1/nbap/nbap.cnf" +#line 268 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CommonMeasurementInitiationFailure "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -34596,7 +34634,7 @@ static const per_sequence_t CommonMeasurementReport_sequence[] = { static int dissect_nbap_CommonMeasurementReport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 400 "../../asn1/nbap/nbap.cnf" +#line 401 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CommonMeasurementReport "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -34712,7 +34750,7 @@ static const per_sequence_t CommonMeasurementTerminationRequest_sequence[] = { static int dissect_nbap_CommonMeasurementTerminationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 406 "../../asn1/nbap/nbap.cnf" +#line 407 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CommonMeasurementTerminationRequest "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -34733,7 +34771,7 @@ static const per_sequence_t CommonMeasurementFailureIndication_sequence[] = { static int dissect_nbap_CommonMeasurementFailureIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 412 "../../asn1/nbap/nbap.cnf" +#line 413 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CommonMeasurementFailureIndication "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -34754,7 +34792,7 @@ static const per_sequence_t CellSetupRequestFDD_sequence[] = { static int dissect_nbap_CellSetupRequestFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 120 "../../asn1/nbap/nbap.cnf" +#line 121 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CellSetupRequest(FDD) "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -35286,7 +35324,7 @@ static const per_sequence_t CellSetupResponse_sequence[] = { static int dissect_nbap_CellSetupResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 126 "../../asn1/nbap/nbap.cnf" +#line 127 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CellSetupResponse "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -35307,7 +35345,7 @@ static const per_sequence_t CellSetupFailure_sequence[] = { static int dissect_nbap_CellSetupFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 132 "../../asn1/nbap/nbap.cnf" +#line 133 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CellSetupFailure "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -35850,7 +35888,7 @@ static const per_sequence_t ResourceStatusIndication_sequence[] = { static int dissect_nbap_ResourceStatusIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 388 "../../asn1/nbap/nbap.cnf" +#line 389 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"ResourceStatusIndication "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -36608,7 +36646,7 @@ static const per_sequence_t SystemInformationUpdateRequest_sequence[] = { static int dissect_nbap_SystemInformationUpdateRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 234 "../../asn1/nbap/nbap.cnf" +#line 235 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"SystemInformationUpdateRequest "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -36679,7 +36717,7 @@ static const per_sequence_t MIB_SB_SIB_InformationItem_SystemInfoUpdateRqst_sequ static int dissect_nbap_MIB_SB_SIB_InformationItem_SystemInfoUpdateRqst(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 526 "../../asn1/nbap/nbap.cnf" +#line 527 "../../asn1/nbap/nbap.cnf" ib_type = 10; /* not-Used-sIB8 */ segment_type = 0; @@ -36747,7 +36785,7 @@ static const per_sequence_t SystemInformationUpdateResponse_sequence[] = { static int dissect_nbap_SystemInformationUpdateResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 240 "../../asn1/nbap/nbap.cnf" +#line 241 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"SystemInformationUpdateResponse "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -36768,7 +36806,7 @@ static const per_sequence_t SystemInformationUpdateFailure_sequence[] = { static int dissect_nbap_SystemInformationUpdateFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 246 "../../asn1/nbap/nbap.cnf" +#line 247 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"SystemInformationUpdateFailure "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -36790,7 +36828,7 @@ static const per_sequence_t RadioLinkSetupRequestFDD_sequence[] = { static int dissect_nbap_RadioLinkSetupRequestFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 200 "../../asn1/nbap/nbap.cnf" +#line 201 "../../asn1/nbap/nbap.cnf" g_nbap_msg_info_for_fp.ProcedureCode = ProcedureCode; g_nbap_msg_info_for_fp.ddMode = ddMode; @@ -37272,7 +37310,7 @@ static const per_sequence_t RadioLinkSetupResponseFDD_sequence[] = { static int dissect_nbap_RadioLinkSetupResponseFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 212 "../../asn1/nbap/nbap.cnf" +#line 213 "../../asn1/nbap/nbap.cnf" g_nbap_msg_info_for_fp.ProcedureCode = ProcedureCode; g_nbap_msg_info_for_fp.ddMode = ddMode; @@ -37497,7 +37535,7 @@ static const per_sequence_t RadioLinkSetupFailureFDD_sequence[] = { static int dissect_nbap_RadioLinkSetupFailureFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 224 "../../asn1/nbap/nbap.cnf" +#line 225 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkSetupFailure(FDD) "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -38693,7 +38731,7 @@ static const per_sequence_t RadioLinkReconfigurationPrepareFDD_sequence[] = { static int dissect_nbap_RadioLinkReconfigurationPrepareFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 292 "../../asn1/nbap/nbap.cnf" +#line 293 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkReconfigurationPrepare(FDD) "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -40316,7 +40354,7 @@ static const per_sequence_t RadioLinkReconfigurationReady_sequence[] = { static int dissect_nbap_RadioLinkReconfigurationReady(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 303 "../../asn1/nbap/nbap.cnf" +#line 304 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkReconfigurationReady "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -40397,7 +40435,7 @@ static const per_sequence_t RadioLinkReconfigurationFailure_sequence[] = { static int dissect_nbap_RadioLinkReconfigurationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 309 "../../asn1/nbap/nbap.cnf" +#line 310 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkReconfigurationFailure "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -40505,7 +40543,7 @@ static const per_sequence_t RadioLinkReconfigurationCommit_sequence[] = { static int dissect_nbap_RadioLinkReconfigurationCommit(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 418 "../../asn1/nbap/nbap.cnf" +#line 419 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkReconfigurationCommit "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -40526,7 +40564,7 @@ static const per_sequence_t RadioLinkReconfigurationCancel_sequence[] = { static int dissect_nbap_RadioLinkReconfigurationCancel(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 424 "../../asn1/nbap/nbap.cnf" +#line 425 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkReconfigurationCancel "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -40547,7 +40585,7 @@ static const per_sequence_t RadioLinkReconfigurationRequestFDD_sequence[] = { static int dissect_nbap_RadioLinkReconfigurationRequestFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 319 "../../asn1/nbap/nbap.cnf" +#line 320 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkReconfigurationRequestFDD(FDD) "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -41059,7 +41097,7 @@ static const per_sequence_t RadioLinkDeletionRequest_sequence[] = { static int dissect_nbap_RadioLinkDeletionRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 280 "../../asn1/nbap/nbap.cnf" +#line 281 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkDeletionRequest "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -41109,7 +41147,7 @@ static const per_sequence_t RadioLinkDeletionResponse_sequence[] = { static int dissect_nbap_RadioLinkDeletionResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 286 "../../asn1/nbap/nbap.cnf" +#line 287 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkDeletionResponse "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -41130,7 +41168,7 @@ static const per_sequence_t DL_PowerControlRequest_sequence[] = { static int dissect_nbap_DL_PowerControlRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 466 "../../asn1/nbap/nbap.cnf" +#line 467 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"DL-PowerControlRequest "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -41181,7 +41219,7 @@ static const per_sequence_t DL_PowerTimeslotControlRequest_sequence[] = { static int dissect_nbap_DL_PowerTimeslotControlRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 472 "../../asn1/nbap/nbap.cnf" +#line 473 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"DL-PowerTimeslotControlRequest "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -41202,7 +41240,7 @@ static const per_sequence_t DedicatedMeasurementInitiationRequest_sequence[] = { static int dissect_nbap_DedicatedMeasurementInitiationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 336 "../../asn1/nbap/nbap.cnf" +#line 337 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"DedicatedMeasurementInitiationRequest "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -41398,7 +41436,7 @@ static const per_sequence_t DedicatedMeasurementInitiationResponse_sequence[] = static int dissect_nbap_DedicatedMeasurementInitiationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 342 "../../asn1/nbap/nbap.cnf" +#line 343 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"DedicatedMeasurementInitiationResponse "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -41702,7 +41740,7 @@ static const per_sequence_t DedicatedMeasurementInitiationFailure_sequence[] = { static int dissect_nbap_DedicatedMeasurementInitiationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 348 "../../asn1/nbap/nbap.cnf" +#line 349 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"DedicatedMeasurementInitiationFailure "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -41723,7 +41761,7 @@ static const per_sequence_t DedicatedMeasurementReport_sequence[] = { static int dissect_nbap_DedicatedMeasurementReport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 448 "../../asn1/nbap/nbap.cnf" +#line 449 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"DedicatedMeasurementReport "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -41905,7 +41943,7 @@ static const per_sequence_t DedicatedMeasurementTerminationRequest_sequence[] = static int dissect_nbap_DedicatedMeasurementTerminationRequest(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 454 "../../asn1/nbap/nbap.cnf" +#line 455 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"DedicatedMeasurementTerminationRequest "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -41926,7 +41964,7 @@ static const per_sequence_t DedicatedMeasurementFailureIndication_sequence[] = { static int dissect_nbap_DedicatedMeasurementFailureIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 460 "../../asn1/nbap/nbap.cnf" +#line 461 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"DedicatedMeasurementFailureIndication "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -41947,7 +41985,7 @@ static const per_sequence_t RadioLinkFailureIndication_sequence[] = { static int dissect_nbap_RadioLinkFailureIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 430 "../../asn1/nbap/nbap.cnf" +#line 431 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkFailureIndication "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -42128,7 +42166,7 @@ static const per_sequence_t RadioLinkPreemptionRequiredIndication_sequence[] = { static int dissect_nbap_RadioLinkPreemptionRequiredIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 436 "../../asn1/nbap/nbap.cnf" +#line 437 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkPreemptionRequiredIndication "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -42178,7 +42216,7 @@ static const per_sequence_t RadioLinkRestoreIndication_sequence[] = { static int dissect_nbap_RadioLinkRestoreIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 442 "../../asn1/nbap/nbap.cnf" +#line 443 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkRestoreIndication "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -42356,7 +42394,7 @@ static const per_sequence_t CompressedModeCommand_sequence[] = { static int dissect_nbap_CompressedModeCommand(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 478 "../../asn1/nbap/nbap.cnf" +#line 479 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"CompressedModeCommand "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -42377,7 +42415,7 @@ static const per_sequence_t ErrorIndication_sequence[] = { static int dissect_nbap_ErrorIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 490 "../../asn1/nbap/nbap.cnf" +#line 491 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"ErrorIndication "); @@ -42396,7 +42434,7 @@ static const per_sequence_t PrivateMessage_sequence[] = { static int dissect_nbap_PrivateMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 498 "../../asn1/nbap/nbap.cnf" +#line 499 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"PrivateMessage "); @@ -42416,7 +42454,7 @@ static const per_sequence_t PhysicalSharedChannelReconfigurationRequestFDD_seque static int dissect_nbap_PhysicalSharedChannelReconfigurationRequestFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 354 "../../asn1/nbap/nbap.cnf" +#line 355 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"PhysicalSharedChannelReconfigurationRequest(FDD) "); /* CRNC -> Node B */ actx->pinfo->link_dir=P2P_DIR_DL; @@ -44884,7 +44922,7 @@ static const per_sequence_t PhysicalSharedChannelReconfigurationResponse_sequenc static int dissect_nbap_PhysicalSharedChannelReconfigurationResponse(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 360 "../../asn1/nbap/nbap.cnf" +#line 361 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"PhysicalSharedChannelReconfigurationResponse "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -44935,7 +44973,7 @@ static const per_sequence_t PhysicalSharedChannelReconfigurationFailure_sequence static int dissect_nbap_PhysicalSharedChannelReconfigurationFailure(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 366 "../../asn1/nbap/nbap.cnf" +#line 367 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"PhysicalSharedChannelReconfigurationFailure "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -46684,7 +46722,7 @@ static const per_sequence_t RadioLinkParameterUpdateIndicationFDD_sequence[] = { static int dissect_nbap_RadioLinkParameterUpdateIndicationFDD(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 509 "../../asn1/nbap/nbap.cnf" +#line 510 "../../asn1/nbap/nbap.cnf" col_set_str(actx->pinfo->cinfo, COL_INFO,"RadioLinkParameterUpdateIndication(FDD) "); /* Node B -> CRNC */ actx->pinfo->link_dir=P2P_DIR_UL; @@ -54575,7 +54613,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 227 "../../asn1/nbap/packet-nbap-template.c" +#line 238 "../../asn1/nbap/packet-nbap-template.c" static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -54666,6 +54704,32 @@ static void add_hsdsch_bind(packet_info *pinfo, proto_tree * tree){ } } +static gint nbap_key_cmp(gconstpointer a_ptr, gconstpointer b_ptr, gpointer ignore _U_){ + if( GPOINTER_TO_INT(a_ptr) > GPOINTER_TO_INT(b_ptr) ){ + return -1; + } + return GPOINTER_TO_INT(a_ptr) < GPOINTER_TO_INT(b_ptr); +} +static void nbap_free_key(gpointer key ){ + g_free(key); + + } +static void nbap_free_value(gpointer value ){ + g_free(value); + } + +static void nbap_init(void){ + + /*Cleanup*/ + if(com_context_map){ + g_tree_destroy(com_context_map); + } + /*Initialize*/ + com_context_map = g_tree_new_full(nbap_key_cmp, + NULL, /* data pointer, optional */ + nbap_free_key, + nbap_free_value); +} static void dissect_nbap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { @@ -67894,7 +67958,7 @@ void proto_register_nbap(void) { NULL, HFILL }}, /*--- End of included file: packet-nbap-hfarr.c ---*/ -#line 381 "../../asn1/nbap/packet-nbap-template.c" +#line 418 "../../asn1/nbap/packet-nbap-template.c" }; /* List of subtrees */ @@ -69534,7 +69598,7 @@ void proto_register_nbap(void) { &ett_nbap_Outcome, /*--- End of included file: packet-nbap-ettarr.c ---*/ -#line 390 "../../asn1/nbap/packet-nbap-template.c" +#line 427 "../../asn1/nbap/packet-nbap-template.c" }; /* UAT for header fields */ @@ -69577,16 +69641,19 @@ void proto_register_nbap(void) { attributes_uat);*/ /* Register dissector tables */ - nbap_ies_dissector_table = register_dissector_table("nbap.ies", "NBAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); - nbap_extension_dissector_table = register_dissector_table("nbap.extension", "NBAP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC); - nbap_proc_imsg_dissector_table = register_dissector_table("nbap.proc.imsg", "NBAP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_STRING, BASE_NONE); - nbap_proc_sout_dissector_table = register_dissector_table("nbap.proc.sout", "NBAP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_STRING, BASE_NONE); - nbap_proc_uout_dissector_table = register_dissector_table("nbap.proc.uout", "NBAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_STRING, BASE_NONE); - -} + nbap_ies_dissector_table = register_dissector_table("nbap.ies", "NBAP-PROTOCOL-IES", FT_UINT32, BASE_DEC); + nbap_extension_dissector_table = register_dissector_table("nbap.extension", "NBAP-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC); + nbap_proc_imsg_dissector_table = register_dissector_table("nbap.proc.imsg", "NBAP-ELEMENTARY-PROCEDURE InitiatingMessage", FT_STRING, BASE_NONE); + nbap_proc_sout_dissector_table = register_dissector_table("nbap.proc.sout", "NBAP-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_STRING, BASE_NONE); + nbap_proc_uout_dissector_table = register_dissector_table("nbap.proc.uout", "NBAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_STRING, BASE_NONE); + register_init_routine(nbap_init); +} +/* +#define EXTRA_PPI 1 +*/ /*--- proto_reg_handoff_nbap ---------------------------------------*/ void proto_reg_handoff_nbap(void) @@ -70698,7 +70765,7 @@ proto_reg_handoff_nbap(void) /*--- End of included file: packet-nbap-dis-tab.c ---*/ -#line 457 "../../asn1/nbap/packet-nbap-template.c" +#line 497 "../../asn1/nbap/packet-nbap-template.c" } diff --git a/epan/dissectors/packet-rlc.c b/epan/dissectors/packet-rlc.c index 100c4d58f3..a4d49c583c 100644 --- a/epan/dissectors/packet-rlc.c +++ b/epan/dissectors/packet-rlc.c @@ -1465,6 +1465,8 @@ dissect_rlc_um(enum rlc_channel_type channel, tvbuff_t *tvb, packet_info *pinfo, return; } pos = fpinf->cur_tb; + proto_tree_add_text(tree,tvb,0,0,"U-RNTI: %d", rlcinf->urnti[pos]); + if (global_rlc_ciphered) { proto_tree_add_text(tree, tvb, 0, -1, "Cannot dissect RLC frame because it is ciphered"); @@ -1881,7 +1883,11 @@ dissect_rlc_am(enum rlc_channel_type channel, tvbuff_t *tvb, packet_info *pinfo, "Cannot dissect RLC frame because per-frame info is missing"); return; } + pos = fpinf->cur_tb; + + + proto_tree_add_text(tree,tvb,0,0,"U-RNTI e: %d", rlcinf->urnti[pos]); if (global_rlc_ciphered) { proto_tree_add_text(tree, tvb, 0, -1, "Cannot dissect RLC frame because it is ciphered"); diff --git a/epan/dissectors/packet-rrc.c b/epan/dissectors/packet-rrc.c index 2dcc651fc8..4dea75bf06 100644 --- a/epan/dissectors/packet-rrc.c +++ b/epan/dissectors/packet-rrc.c @@ -63,6 +63,7 @@ #define PFNAME "rrc" extern int proto_fp; /*Handler to FP*/ + GTree * hsdsch_muxed_flows; @@ -261,7 +262,7 @@ static int dissect_SysInfoType11bis_PDU(tvbuff_t *tvb, packet_info *pinfo, proto #define maxURNTI_Group 8 /*--- End of included file: packet-rrc-val.h ---*/ -#line 89 "../../asn1/rrc/packet-rrc-template.c" +#line 91 "../../asn1/rrc/packet-rrc-template.c" /* Initialize the protocol and registered fields */ int proto_rrc = -1; @@ -9144,7 +9145,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 94 "../../asn1/rrc/packet-rrc-template.c" +#line 96 "../../asn1/rrc/packet-rrc-template.c" /* Initialize the subtree pointers */ static int ett_rrc = -1; @@ -14763,7 +14764,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 99 "../../asn1/rrc/packet-rrc-template.c" +#line 101 "../../asn1/rrc/packet-rrc-template.c" static gint ett_rrc_eutraFeatureGroupIndicators = -1; static gint ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo = -1; @@ -14800,6 +14801,7 @@ static tvbuff_t * hrnti; static guint8 num_chans_per_flow[MAX_NUM_HSDHSCH_MACDFLOW]; + /*--- Included file: packet-rrc-fn.c ---*/ #line 1 "../../asn1/rrc/packet-rrc-fn.c" /*--- PDUs declarations ---*/ @@ -19123,8 +19125,11 @@ 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_) { - offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, - 16, 16, FALSE, &hrnti); +#line 721 "../../asn1/rrc/rrc.cnf" + + + + return offset; } @@ -94048,10 +94053,17 @@ static const per_sequence_t SRB_InformationSetupList2_r6_sequence_of[1] = { static int dissect_rrc_SRB_InformationSetupList2_r6(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { - offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, +#line 715 "../../asn1/rrc/rrc.cnf" + + offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index, ett_rrc_SRB_InformationSetupList2_r6, SRB_InformationSetupList2_r6_sequence_of, 3, 4, FALSE); + /*Clear memory*/ + memset(num_chans_per_flow,0,sizeof(guint8)); + + + return offset; } @@ -130900,7 +130912,7 @@ static int dissect_MeasurementReport_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _ /*--- End of included file: packet-rrc-fn.c ---*/ -#line 135 "../../asn1/rrc/packet-rrc-template.c" +#line 138 "../../asn1/rrc/packet-rrc-template.c" #include "packet-rrc.h" @@ -166474,7 +166486,7 @@ void proto_register_rrc(void) { NULL, HFILL }}, /*--- End of included file: packet-rrc-hfarr.c ---*/ -#line 216 "../../asn1/rrc/packet-rrc-template.c" +#line 219 "../../asn1/rrc/packet-rrc-template.c" { &hf_test, { "RAB Test", "rrc.RAB.test", FT_UINT8, BASE_DEC, NULL, 0, @@ -172114,7 +172126,7 @@ void proto_register_rrc(void) { &ett_rrc_UL_RFC3095_Context, /*--- End of included file: packet-rrc-ettarr.c ---*/ -#line 242 "../../asn1/rrc/packet-rrc-template.c" +#line 245 "../../asn1/rrc/packet-rrc-template.c" &ett_rrc_eutraFeatureGroupIndicators, &ett_rrc_cn_CommonGSM_MAP_NAS_SysInfo, }; @@ -172194,7 +172206,7 @@ void proto_register_rrc(void) { /*--- End of included file: packet-rrc-dis-reg.c ---*/ -#line 256 "../../asn1/rrc/packet-rrc-template.c" +#line 259 "../../asn1/rrc/packet-rrc-template.c" diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index 942e1f8798..3340e83d2a 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -640,13 +640,16 @@ dissect_tb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item; /* If this is DL we should not care about crci bits (since they dont exists)*/ if(p_fp_info->is_uplink){ - item = proto_tree_add_item(data_tree, hf_fp_crci[n%8], tvb, (crci_bit_offset/8)+(n/8), 1, ENC_BIG_ENDIAN); - PROTO_ITEM_SET_GENERATED(item); + if( p_fp_info->channel == CHANNEL_RACH_FDD){ /*In RACH we don't have any QE field, hence go back 8 bits.*/ crci_bit = tvb_get_bits8(tvb,crci_bit_offset+(n/8)-8,1); + item = proto_tree_add_item(data_tree, hf_fp_crci[n%8], tvb, (crci_bit_offset/8)+(n/8)-8, 1, ENC_BIG_ENDIAN); + PROTO_ITEM_SET_GENERATED(item); }else{ crci_bit = tvb_get_bits8(tvb,crci_bit_offset+(n/8),1); + item = proto_tree_add_item(data_tree, hf_fp_crci[n%8], tvb, (crci_bit_offset/8)+(n/8), 1, ENC_BIG_ENDIAN); + PROTO_ITEM_SET_GENERATED(item); } } @@ -2659,10 +2662,9 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, macinf->content[macd_idx] = lchId_type_table[lchid]; /*Set the proper Content type for the mac layer.*/ macinf->lchid[macd_idx] = lchid; rlcinf->mode[macd_idx] = lchId_rlc_map[lchid]; /* Set RLC mode by lchid to RLC_MODE map in nbap.h */ - - /***************/ - /* FIXME: This is probably wrong, but im writing it anyways*/ - rlcinf->urnti[macd_idx] = p_fp_info->channel; + + /* Set U-RNTI to ComuncationContext signaled from nbap*/ + rlcinf->urnti[macd_idx] = p_fp_info->com_context_id; rlcinf->rbid[macd_idx] = lchid; /*subframes[n].ddi[i];*/ /*Save the DDI value for RLC*/ /*g_warning("========Setting RBID:%d for lchid:%d",subframes[n].ddi[i],lchid);*/ /* rlcinf->mode[0] = RLC_AM;*/ @@ -2967,8 +2969,8 @@ dissect_e_dch_t2_or_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto macinf->lchid[sdu_no] = lchid; rlcinf->mode[sdu_no] = lchId_rlc_map[lchid]; /* Set RLC mode by lchid to RLC_MODE map in nbap.h */ - /* FIXME: This is probably wrong, but im writing it anyways*/ - rlcinf->urnti[sdu_no] = p_fp_info->channel; + + rlcinf->urnti[sdu_no] = 1 ; /*p_fp_info->com_context_id;*/ rlcinf->rbid[sdu_no] = lchid; /*subframes[n].ddi[i];*/ /*Save the DDI value for RLC*/ rlcinf->li_size[sdu_no] = RLC_LI_7BITS; rlcinf->ciphered[sdu_no] = FALSE; @@ -3262,6 +3264,7 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree col_append_fstr(pinfo->cinfo, COL_INFO, " User-Buffer-Size=%u", user_buffer_size); + /********************************************************************/ /* Now read number_of_pdu_blocks header entries */ for (n=0; n < number_of_pdu_blocks; n++) { @@ -3367,7 +3370,7 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree rlcinf->ciphered[j] = FALSE; rlcinf->deciphered[j] = FALSE; rlcinf->rbid[j] = (guint8)lchid[n]+1; - rlcinf->urnti[j] = p_fp_info->channel; /*We need to fake urnti*/ + rlcinf->urnti[j] = p_fp_info->com_context_id; /*We need to fake urnti*/ } /* Add PDU block header subtree */ @@ -3716,7 +3719,8 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, * differentiate 'lower' UDP layer from 'user data' UDP layer */ fpi->srcport = pinfo->srcport; fpi->destport = pinfo->destport; - + fpi->com_context_id = p_conv_data->com_context_id; + if (pinfo->link_dir==P2P_DIR_UL) { fpi->is_uplink = TRUE; } else { @@ -3740,8 +3744,9 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, /*Figure out RLC_MODE based on MACd-flow-ID, basically MACd-flow-ID = 0 then its SRB0 == UM else AM*/ rlcinf->mode[0] = hsdsch_macdflow_id_rlc_map[p_conv_data->hsdsch_macdflow_id]; - if(fpi->hsdsch_entity == hs){ + if(fpi->hsdsch_entity == hs && !rlc_is_ciphered(pinfo)){ for(i=0; i<MAX_NUM_HSDHSCH_MACDFLOW; i++){ + /*Figure out if this channel is multiplexed (signaled from RRC)*/ if((cur_val=g_tree_lookup(hsdsch_muxed_flows, GINT_TO_POINTER((gint)p_conv_data->hrnti))) != NULL){ j = 1 << i; fpi->hsdhsch_macfdlow_is_mux[i] = j & *cur_val; @@ -3772,7 +3777,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, }*/ /* rbid[MAX_RLC_CHANS] */ /* For RLC re-assembly to work we need to fake urnti */ - rlcinf->urnti[0] = fpi->channel; + rlcinf->urnti[0] = fpi->com_context_id; rlcinf->li_size[0] = RLC_LI_7BITS; rlcinf->ciphered[0] = FALSE; rlcinf->deciphered[0] = FALSE; @@ -3801,7 +3806,7 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, /* For RLC re-assembly to work we need to fake urnti */ - rlcinf->urnti[0] = fpi->channel; + rlcinf->urnti[0] = fpi->com_context_id; /* rlcinf->mode[0] = RLC_AM;*/ rlcinf->li_size[0] = RLC_LI_7BITS; rlcinf->ciphered[0] = FALSE; @@ -3907,13 +3912,13 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, /************************/ } - /*FIXME: NBAP should signal this?*/ - /*Set rlc info*/ - rlcinf->urnti[j+chan] = fpi->channel; /*Faked URNTI*/ + /*** Set rlc info ***/ + rlcinf->urnti[j+chan] = p_conv_data->com_context_id; rlcinf->li_size[j+chan] = RLC_LI_7BITS; - rlcinf->ciphered[j+chan] = FALSE; rlcinf->deciphered[j+chan] = FALSE; - + + + /*Step over this TB and it's C/T flag.*/ tb_bit_off += tb_size+4; } @@ -3967,12 +3972,17 @@ fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, offset = 2; /* set MAC data */ macinf = se_new0(umts_mac_info); - macinf->ctmux[0] = 1; - macinf->content[0] = MAC_CONTENT_DCCH; rlcinf = se_new0(rlc_info); + for( chan = 0; chan < fpi->num_chans; chan++ ){ + macinf->ctmux[chan] = 1; + macinf->content[chan] = MAC_CONTENT_DCCH; + rlcinf->urnti[chan] = fpi->com_context_id; /*Note that MAC probably will change this*/ + } + + p_add_proto_data(pinfo->fd, proto_umts_mac, macinf); - p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); + p_add_proto_data(pinfo->fd, proto_rlc, rlcinf); break; case CHANNEL_HSDSCH_COMMON: rlcinf = se_new0(rlc_info); @@ -4235,7 +4245,9 @@ dissect_fp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case CHANNEL_HSDSCH_COMMON: + if(FALSE) dissect_hsdsch_common_channel_info(tvb,pinfo, tree,offset, p_fp_info); + expert_add_info_format(pinfo, NULL, PI_DEBUG, PI_ERROR, "HSDSCH COMMON - Not implemented!"); break; diff --git a/epan/dissectors/packet-umts_mac.c b/epan/dissectors/packet-umts_mac.c index 9dcbb8fd01..8f08a401f0 100644 --- a/epan/dissectors/packet-umts_mac.c +++ b/epan/dissectors/packet-umts_mac.c @@ -177,21 +177,23 @@ static guint16 tree_add_common_dcch_dtch_fields(tvbuff_t *tvb, packet_info *pinf proto_tree *tree, guint16 bitoffs, fp_info *fpinf, umts_mac_info *macinf, rlc_info *rlcinf) { guint8 ueid_type; - + ueid_type = tvb_get_bits8(tvb, bitoffs, 2); proto_tree_add_bits_item(tree, hf_mac_ueid_type, tvb, bitoffs, 2, ENC_BIG_ENDIAN); bitoffs += 2; if (ueid_type == MAC_UEID_TYPE_URNTI) { proto_tree_add_bits_item(tree, hf_mac_urnti, tvb, bitoffs, 32, ENC_BIG_ENDIAN); + rlcinf->urnti[fpinf->cur_tb] = tvb_get_bits32(tvb, bitoffs, 32,FALSE); bitoffs += 32; } else if (ueid_type == MAC_UEID_TYPE_CRNTI) { proto_tree_add_bits_item(tree, hf_mac_crnti, tvb, 4, 16, ENC_BIG_ENDIAN); + rlcinf->urnti[fpinf->cur_tb] = tvb_get_bits16(tvb, bitoffs, 16,FALSE); bitoffs += 16; } if (macinf->ctmux[fpinf->cur_tb]) { if(rlcinf){ - rlcinf->rbid[fpinf->cur_tb] = tvb_get_bits8(tvb, bitoffs, 4); + rlcinf->rbid[fpinf->cur_tb] = tvb_get_bits8(tvb, bitoffs, 4)+1; } proto_tree_add_bits_item(tree, hf_mac_ct, tvb, bitoffs, 4, ENC_BIG_ENDIAN); bitoffs += 4; @@ -274,8 +276,9 @@ static void dissect_mac_fdd_rach(tvbuff_t *tvb, packet_info *pinfo, proto_tree * /*Set RLC Mode/MAC content based on the L-CHID derived from the C/T flag*/ c_t = tvb_get_bits8(tvb,bitoffs-4,4); - rlcinf->mode[fpinf->cur_tb] = lchId_rlc_map[c_t+1]; + rlcinf->mode[chan] = lchId_rlc_map[c_t+1]; macinf->content[chan] = lchId_type_table[c_t+1]; + rlcinf->rbid[chan] = c_t+1; switch (macinf->content[chan]) { case MAC_CONTENT_DCCH: proto_item_append_text(ti, " (DCCH)"); |