Use value_string_ext fcns to access several value_string arrays.

svn path=/trunk/; revision=34891
This commit is contained in:
Bill Meier 2010-11-15 22:37:35 +00:00
parent 37742d97d8
commit 3c98cf2ebc
2 changed files with 30 additions and 24 deletions

View File

@ -27,6 +27,8 @@ ProtocolIE-ID
#.USE_VALS_EXT
ProtocolIE-ID
CauseRadioNetwork
ProcedureCode
#.NO_EMIT
TBCD-STRING
@ -85,7 +87,7 @@ RAB-DataVolumeReportItem/dl-UnsuccessfullyTransmittedDataVolume rab-dl-Unsuccess
#.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode
#.FN_FTR ProcedureCode
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"));
#.END

View File

@ -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",