diff options
author | Bill Meier <wmeier@newsguy.com> | 2010-11-15 19:46:07 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2010-11-15 19:46:07 +0000 |
commit | 8548e1661309223e03b92074224567bed4e75604 (patch) | |
tree | 999db024b733dd956dab88afd9c1ec1d290e1486 /epan | |
parent | 0f286bbb8997f22ccd8bdc6abb6989c8a5bb58d6 (diff) |
Use value_string_ext fcns to access a value_string array.
svn path=/trunk/; revision=34884
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-ranap.c | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c index 62ff97b3e8..117ed1d3ad 100644 --- a/epan/dissectors/packet-ranap.c +++ b/epan/dissectors/packet-ranap.c @@ -1521,7 +1521,7 @@ dissect_ranap_ProcedureCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index, 0U, 255U, &ProcedureCode, FALSE); -#line 84 "ranap.cnf" +#line 87 "ranap.cnf" col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", val_to_str(ProcedureCode, ranap_ProcedureCode_vals, "unknown message")); @@ -1773,15 +1773,17 @@ static const value_string ranap_ProtocolIE_ID_vals[] = { { 0, NULL } }; +static value_string_ext ranap_ProtocolIE_ID_vals_ext = VALUE_STRING_EXT_INIT(ranap_ProtocolIE_ID_vals); + static int dissect_ranap_ProtocolIE_ID(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, 65535U, &ProtocolIE_ID, FALSE); -#line 68 "ranap.cnf" +#line 71 "ranap.cnf" if (tree) { - proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str(ProtocolIE_ID, VALS(ranap_ProtocolIE_ID_vals), "unknown (%d)")); + 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)")); } return offset; @@ -1901,7 +1903,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 108 "ranap.cnf" +#line 111 "ranap.cnf" static const asn1_par_def_t ProtocolIE_ContainerList_pars[] = { { "lowerBound", ASN1_PAR_INTEGER }, { "upperBound", ASN1_PAR_INTEGER }, @@ -1923,7 +1925,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 124 "ranap.cnf" +#line 127 "ranap.cnf" static const asn1_par_def_t ProtocolIE_ContainerPairList_pars[] = { { "lowerBound", ASN1_PAR_INTEGER }, { "upperBound", ASN1_PAR_INTEGER }, @@ -2492,7 +2494,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 264 "ranap.cnf" +#line 267 "ranap.cnf" tvbuff_t *parameter_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -4252,7 +4254,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 305 "ranap.cnf" +#line 308 "ranap.cnf" tvbuff_t *parameter_tvb=NULL; int saved_hf; @@ -4285,7 +4287,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 181 "ranap.cnf" +#line 184 "ranap.cnf" tvbuff_t* imsi_tvb; const char *digit_str; @@ -4994,7 +4996,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 252 "ranap.cnf" +#line 255 "ranap.cnf" tvbuff_t *l3_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -5166,7 +5168,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 204 "ranap.cnf" +#line 207 "ranap.cnf" tvbuff_t *nas_pdu_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -5204,7 +5206,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 244 "ranap.cnf" +#line 247 "ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -5257,7 +5259,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 236 "ranap.cnf" +#line 239 "ranap.cnf" tvbuff_t *bss_info_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6243,7 +6245,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 213 "ranap.cnf" +#line 216 "ranap.cnf" tvbuff_t *rrc_message_tvb=NULL; offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, @@ -6348,7 +6350,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 331 "ranap.cnf" +#line 334 "ranap.cnf" dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ); @@ -6425,7 +6427,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 317 "ranap.cnf" +#line 320 "ranap.cnf" /* If SourceRNC-ToTargetRNC-TransparentContainer is called trough dissect_ranap_SourceRNC_ToTargetRNC_TransparentContainer_PDU ProtocolIE_ID may be unset @@ -6551,7 +6553,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 341 "ranap.cnf" +#line 344 "ranap.cnf" dissect_ranap_TargetRNC_ToSourceRNC_TransparentContainer(tvb , offset, actx ,tree , hf_ranap_TargetRNC_ToSourceRNC_TransparentContainer_PDU ); @@ -6736,7 +6738,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 283 "ranap.cnf" +#line 286 "ranap.cnf" tvbuff_t *parameter_tvb=NULL; proto_tree *subtree; gint tvb_len; @@ -7121,7 +7123,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 134 "ranap.cnf" +#line 137 "ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfRABs); @@ -7137,7 +7139,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 142 "ranap.cnf" +#line 145 "ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerPairList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfRABs); @@ -7153,7 +7155,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 159 "ranap.cnf" +#line 162 "ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfIuSigConIds); @@ -7169,7 +7171,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 167 "ranap.cnf" +#line 170 "ranap.cnf" asn1_stack_frame_push(actx, "ProtocolIE-ContainerList"); asn1_param_push_integer(actx, 1); asn1_param_push_integer(actx, maxNrOfDTs); @@ -13180,7 +13182,7 @@ void proto_register_ranap(void) { NULL, HFILL }}, { &hf_ranap_id, { "id", "ranap.id", - FT_UINT32, BASE_DEC, VALS(ranap_ProtocolIE_ID_vals), 0, + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &ranap_ProtocolIE_ID_vals_ext, 0, "ProtocolIE_ID", HFILL }}, { &hf_ranap_criticality, { "criticality", "ranap.criticality", @@ -13224,7 +13226,7 @@ void proto_register_ranap(void) { NULL, HFILL }}, { &hf_ranap_ext_id, { "id", "ranap.id", - FT_UINT8, BASE_DEC, VALS(ranap_ProtocolIE_ID_vals), 0, + FT_UINT8, BASE_DEC|BASE_EXT_STRING, &ranap_ProtocolIE_ID_vals_ext, 0, "ProtocolExtensionID", HFILL }}, { &hf_ranap_extensionValue, { "extensionValue", "ranap.extensionValue", @@ -13500,7 +13502,7 @@ void proto_register_ranap(void) { "Criticality", HFILL }}, { &hf_ranap_iE_ID, { "iE-ID", "ranap.iE_ID", - FT_UINT32, BASE_DEC, VALS(ranap_ProtocolIE_ID_vals), 0, + FT_UINT32, BASE_DEC|BASE_EXT_STRING, &ranap_ProtocolIE_ID_vals_ext, 0, "ProtocolIE_ID", HFILL }}, { &hf_ranap_repetitionNumber, { "repetitionNumber", "ranap.repetitionNumber", |