diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-11-15 22:37:35 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-11-15 22:37:35 +0000 |
commit | f10b2641f96c7ccb52ea5c4c63bbe4feb74c8513 (patch) | |
tree | 48ce6269baaee7ad76ddc5bcaa3aa3230ae37bc7 /epan/dissectors/packet-ranap.c | |
parent | fda6a357fe143b58b09ac5eae21b2d4fff78affc (diff) |
Use value_string_ext fcns to access several value_string arrays.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34891 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ranap.c')
-rw-r--r-- | epan/dissectors/packet-ranap.c | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index 117ed1d3ad..9e3ae8e7c1 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -1515,15 +1515,17 @@ static const value_string ranap_ProcedureCode_vals[] = { { 0, NULL } }; +static value_string_ext ranap_ProcedureCode_vals_ext = VALUE_STRING_EXT_INIT(ranap_ProcedureCode_vals); + static int dissect_ranap_ProcedureCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, &ProcedureCode, FALSE); -#line 87 "ranap.cnf" +#line 89 "ranap.cnf" col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", - val_to_str(ProcedureCode, ranap_ProcedureCode_vals, + val_to_str_ext_const(ProcedureCode, &ranap_ProcedureCode_vals_ext, "unknown message")); return offset; @@ -1781,7 +1783,7 @@ dissect_ranap_ProtocolIE_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 65535U, &ProtocolIE_ID, FALSE); -#line 71 "ranap.cnf" +#line 73 "ranap.cnf" if (tree) { proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str_ext(ProtocolIE_ID, &ranap_ProtocolIE_ID_vals_ext, "unknown (%d)")); } @@ -1903,7 +1905,7 @@ static const per_sequence_t ProtocolIE_ContainerList_sequence_of[1] = { static int dissect_ranap_ProtocolIE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 111 "ranap.cnf" +#line 113 "ranap.cnf" static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = { { "lowerBound", ASN1_PAR_INTEGER }, { "upperBound", ASN1_PAR_INTEGER }, @@ -1925,7 +1927,7 @@ static const per_sequence_t ProtocolIE_ContainerPairList_sequence_of[1] = { static int dissect_ranap_ProtocolIE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 127 "ranap.cnf" +#line 129 "ranap.cnf" static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = { { "lowerBound", ASN1_PAR_INTEGER }, { "upperBound", ASN1_PAR_INTEGER }, @@ -2494,7 +2496,7 @@ dissect_ranap_APN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto static int dissect_ranap_PLMNidentity(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 267 "ranap.cnf" +#line 269 "ranap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -3102,6 +3104,8 @@ static const value_string ranap_CauseRadioNetwork_vals[] = { { 0, NULL } }; +static value_string_ext ranap_CauseRadioNetwork_vals_ext = VALUE_STRING_EXT_INIT(ranap_CauseRadioNetwork_vals); + static int dissect_ranap_CauseRadioNetwork(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { @@ -4254,7 +4258,7 @@ dissect_ranap_GlobalRNC_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_ranap_GTP_TEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 308 "ranap.cnf" +#line 310 "ranap.cnf" tvbuff_t *parameter_tvb=NULL; int saved_hf; @@ -4287,7 +4291,7 @@ dissect_ranap_HS_DSCH_MAC_d_Flow_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_ static int dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 184 "ranap.cnf" +#line 186 "ranap.cnf" tvbuff_t* imsi_tvb; const char *digit_str; @@ -4996,7 +5000,7 @@ dissect_ranap_LocationRelatedDataRequestTypeSpecificToGERANIuMode(tvbuff_t *tvb static int dissect_ranap_L3_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 255 "ranap.cnf" +#line 257 "ranap.cnf" tvbuff_t *l3_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -5168,7 +5172,7 @@ dissect_ranap_MBMSSessionRepetitionNumber(tvbuff_t *tvb _U_, int offset _U_, asn static int dissect_ranap_NAS_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 207 "ranap.cnf" +#line 209 "ranap.cnf" tvbuff_t *nas_pdu_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -5206,7 +5210,7 @@ dissect_ranap_NAS_SynchronisationIndicator(tvbuff_t *tvb _U_, int offset _U_, as static int dissect_ranap_NewBSS_To_OldBSS_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 247 "ranap.cnf" +#line 249 "ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -5259,7 +5263,7 @@ dissect_ranap_NumberOfSteps(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx static int dissect_ranap_OldBSS_ToNewBSS_Information(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 239 "ranap.cnf" +#line 241 "ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6245,7 +6249,7 @@ dissect_ranap_ResponseTime(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _ static int dissect_ranap_RRC_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 216 "ranap.cnf" +#line 218 "ranap.cnf" tvbuff_t *rrc_message_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6350,7 +6354,7 @@ dissect_ranap_Service_Handover(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *ac static int dissect_ranap_Source_ToTarget_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 334 "ranap.cnf" +#line 336 "ranap.cnf" dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ); @@ -6427,7 +6431,7 @@ static const per_sequence_t SourceRNC_ToTargetRNC_TransparentContainer_sequence[ static int dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 320 "ranap.cnf" +#line 322 "ranap.cnf" /* If SourceRNC-ToTargetRNC-TransparentContainer is called trough dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ProtocolIE_ID may be unset @@ -6553,7 +6557,7 @@ dissect_ranap_SRVCC_Operation_Possible(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_ranap_Target_ToSource_TransparentContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 344 "ranap.cnf" +#line 346 "ranap.cnf" dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU ); @@ -6738,7 +6742,7 @@ dissect_ranap_UnsuccessfullyTransmittedDataVolume(tvbuff_t *tvb _U_, int offset static int dissect_ranap_TransportLayerAddress(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 286 "ranap.cnf" +#line 288 "ranap.cnf" tvbuff_t *parameter_tvb=NULL; proto_tree *subtree; gint tvb_len; @@ -7123,7 +7127,7 @@ dissect_ranap_VerticalAccuracyCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_ranap_RAB_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 137 "ranap.cnf" +#line 139 "ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfRABs); @@ -7139,7 +7143,7 @@ dissect_ranap_RAB_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t static int dissect_ranap_RAB_IE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 145 "ranap.cnf" +#line 147 "ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerPairList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfRABs); @@ -7155,7 +7159,7 @@ dissect_ranap_RAB_IE_ContainerPairList(tvbuff_t *tvb _U_, int offset _U_, asn1_c static int dissect_ranap_IuSigConId_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 162 "ranap.cnf" +#line 164 "ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfIuSigConIds); @@ -7171,7 +7175,7 @@ dissect_ranap_IuSigConId_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn static int dissect_ranap_DirectTransfer_IE_ContainerList(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 170 "ranap.cnf" +#line 172 "ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfDTs); @@ -13422,7 +13426,7 @@ void proto_register_ranap(void) { "BIT_STRING_SIZE_56", HFILL }}, { &hf_ranap_radioNetwork, { "radioNetwork", "ranap.radioNetwork", - FT_UINT32, BASE_DEC, VALS(ranap_CauseRadioNetwork_vals), 0, + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &ranap_CauseRadioNetwork_vals_ext, 0, "CauseRadioNetwork", HFILL }}, { &hf_ranap_transmissionNetwork, { "transmissionNetwork", "ranap.transmissionNetwork", @@ -13478,7 +13482,7 @@ void proto_register_ranap(void) { "CellLoadInformation", HFILL }}, { &hf_ranap_procedureCode, { "procedureCode", "ranap.procedureCode", - FT_UINT32, BASE_DEC, VALS(ranap_ProcedureCode_vals), 0, + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &ranap_ProcedureCode_vals_ext, 0, NULL, HFILL }}, { &hf_ranap_triggeringMessage, { "triggeringMessage", "ranap.triggeringMessage", |