diff options
Diffstat (limited to 'asn1/s1ap/s1ap.cnf')
-rw-r--r-- | asn1/s1ap/s1ap.cnf | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/asn1/s1ap/s1ap.cnf b/asn1/s1ap/s1ap.cnf index 085647e81e..d8d247a791 100644 --- a/asn1/s1ap/s1ap.cnf +++ b/asn1/s1ap/s1ap.cnf @@ -185,6 +185,20 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") # Handle 64 bit constraint #.FN_PARS BitRate FN_VARIANT = _64b +#.FN_HDR PrivateIE-ID +obj_id = NULL; + +#.FN_PARS PrivateIE-ID/global FN_VARIANT = _str VAL_PTR = &obj_id + +#.FN_BODY PrivateIE-Field/value + + if (obj_id){ + offset=call_per_oid_callback(obj_id, tvb, actx->pinfo, tree, offset, actx, hf_index); + }else{ +%(DEFAULT_BODY)s + } + + # following construction is not supported by asn2wrs # PLMNidentity ::= TBCD-STRING (SIZE (3)) # TBCD-STRING ::= OCTET STRING @@ -206,7 +220,7 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") tvbuff_t *parameter_tvb=NULL; int length; int p_offset; - gboolean is_printable_ascii; + gboolean is_ascii; %(DEFAULT_BODY)s @@ -215,14 +229,14 @@ MAX_VAL = asn1_param_get_integer(%(ACTX)s,"upperBound") length = tvb_reported_length(parameter_tvb); - is_printable_ascii = TRUE; + is_ascii = TRUE; for (p_offset=0; p_offset < length; p_offset++){ - if(!g_ascii_isprint(tvb_get_guint8(parameter_tvb, p_offset ))){ - is_printable_ascii = FALSE; + if(!isalpha(tvb_get_guint8(parameter_tvb, p_offset ))){ + is_ascii = FALSE; break; } } - if (is_printable_ascii) + if (is_ascii) proto_item_append_text(actx->created_item,"(%%s)",tvb_format_text(parameter_tvb, 0, length)); #.END |