diff options
author | AndersBroman <anders.broman@ericsson.com> | 2014-10-21 11:00:40 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-10-21 10:38:32 +0000 |
commit | 39b631da4dcd2b8a27054865040e5a1ebc28df34 (patch) | |
tree | 0fbe52642897651a8704222068bba5919c5d3d93 /asn1/s1ap/s1ap.cnf | |
parent | 750d377b30d9a117a007248de9af7275111b00ae (diff) |
Add OID callback for private IEs making it possible to call a dissector
for the private OID.
Change-Id: Ibb86d8523f1aee14ba1a843ec3ad4becc7729013
Reviewed-on: https://code.wireshark.org/review/4893
Reviewed-by: Anders Broman <a.broman58@gmail.com>
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 |