If ENBname is a string append that string.

svn path=/trunk/; revision=25488
This commit is contained in:
Anders Broman 2008-06-19 16:03:15 +00:00
parent bc337f0845
commit 50d0a1c95a
2 changed files with 51 additions and 2 deletions

View File

@ -134,7 +134,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
# PLMNidentity ::= TBCD-STRING (SIZE (3))
# TBCD-STRING ::= OCTET STRING
#.FN_BODY PLMNidentity VAL_PTR =
#.FN_BODY PLMNidentity VAL_PTR = parameter_tvb
tvbuff_t *parameter_tvb=NULL;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
@ -145,6 +145,32 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound")
dissect_e212_mcc_mnc(parameter_tvb, tree, 0);
#.END
#.FN_BODY ENBname VAL_PTR = parameter_tvb
tvbuff_t *parameter_tvb=NULL;
int length;
int p_offset;
gboolean is_ascii;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, &parameter_tvb);
if (!parameter_tvb)
return offset;
length = tvb_length(parameter_tvb);
for (p_offset=0; p_offset < length; p_offset++){
if(!isalpha(tvb_get_guint8(parameter_tvb, p_offset ))){
is_ascii = FALSE;
break;
}
is_ascii = TRUE;
}
if (is_ascii)
proto_item_append_text(actx->created_item,"(%%s)",tvb_format_text(parameter_tvb, 0, length));
#.END
#.TYPE_ATTR
ProtocolExtensionID TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(s1ap_ProtocolIE_ID_vals)

View File

@ -1758,8 +1758,31 @@ dissect_s1ap_ENB_Global_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _
static int
dissect_s1ap_ENBname(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 149 "s1ap.cnf"
tvbuff_t *parameter_tvb=NULL;
int length;
int p_offset;
gboolean is_ascii;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, NULL);
NO_BOUND, NO_BOUND, FALSE, &parameter_tvb);
if (!parameter_tvb)
return offset;
length = tvb_length(parameter_tvb);
for (p_offset=0; p_offset < length; p_offset++){
if(!isalpha(tvb_get_guint8(parameter_tvb, p_offset ))){
is_ascii = FALSE;
break;
}
is_ascii = TRUE;
}
if (is_ascii)
proto_item_append_text(actx->created_item,"(%s)",tvb_format_text(parameter_tvb, 0, length));
return offset;
}