diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2011-02-10 10:11:38 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2011-02-10 10:11:38 +0000 |
commit | 1ba57f4c04b4731b6a6d36f8e7a86ac6d73599a6 (patch) | |
tree | 3ec4ee3084f18eb25c7bbe3c9a2608252c25b7c2 /asn1/cmip | |
parent | 60297df554b03c4156cdcddc447b2b76591fc362 (diff) | |
download | wireshark-1ba57f4c04b4731b6a6d36f8e7a86ac6d73599a6.tar.gz wireshark-1ba57f4c04b4731b6a6d36f8e7a86ac6d73599a6.tar.bz2 wireshark-1ba57f4c04b4731b6a6d36f8e7a86ac6d73599a6.zip |
Added a dissector table for AttributeId localForm.
Use correct object identifier in ModificationList.
svn path=/trunk/; revision=35894
Diffstat (limited to 'asn1/cmip')
-rw-r--r-- | asn1/cmip/cmip.cnf | 22 | ||||
-rw-r--r-- | asn1/cmip/packet-cmip-template.c | 6 |
2 files changed, 22 insertions, 6 deletions
diff --git a/asn1/cmip/cmip.cnf b/asn1/cmip/cmip.cnf index 8807f6f43a..9b76fab270 100644 --- a/asn1/cmip/cmip.cnf +++ b/asn1/cmip/cmip.cnf @@ -266,15 +266,19 @@ RejectProblem attributeform = ATTRIBUTE_GLOBAL_FORM; %(DEFAULT_BODY)s -#.FN_BODY AttributeId/localForm +#.FN_BODY AttributeId/localForm VAL_PTR = &attribute_local_id attributeform = ATTRIBUTE_LOCAL_FORM; - offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_cmip_localForm, NULL); + %(DEFAULT_BODY)s #.FN_BODY Attribute/value - /*XXX handle local form here */ if(attributeform==ATTRIBUTE_GLOBAL_FORM){ offset=call_ber_oid_callback(attribute_identifier_id, tvb, offset, actx->pinfo, tree); + } else if (dissector_try_uint(attribute_id_dissector_table, attribute_local_id, tvb, actx->pinfo, tree)) { + offset=tvb_length (tvb); + } else { + offset=dissect_unknown_ber(actx->pinfo, tvb, offset, tree); } + #.FN_PARS AttributeValueAssertion/id FN_VARIANT = _str VAL_PTR = &attributevalueassertion_id @@ -446,8 +450,14 @@ RejectProblem offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); #.FN_BODY SetArgument/modificationList/_item/attributeValue - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); - + if(attributeform==ATTRIBUTE_GLOBAL_FORM){ + offset=call_ber_oid_callback(attribute_identifier_id, tvb, offset, actx->pinfo, tree); + } else if (dissector_try_uint(attribute_id_dissector_table, attribute_local_id, tvb, actx->pinfo, tree)) { + offset=tvb_length (tvb); + } else { + offset=dissect_unknown_ber(actx->pinfo, tvb, offset, tree); + } + #.FN_PARS SpecificErrorInfo/errorId FN_VARIANT = _str HF_INDEX = hf_cmip_errorId_OID VAL_PTR = &object_identifier_id @@ -458,8 +468,8 @@ RejectProblem offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); #.FN_BODY InvalidArgumentValue/eventValue/eventInfo - offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); + #.FN_BODY ActionReply/actionReplyInfo offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree); diff --git a/asn1/cmip/packet-cmip-template.c b/asn1/cmip/packet-cmip-template.c index ace3b1c9fd..7fcde6ef61 100644 --- a/asn1/cmip/packet-cmip-template.c +++ b/asn1/cmip/packet-cmip-template.c @@ -63,6 +63,9 @@ static gint ett_cmip = -1; static guint32 opcode; +/* Dissector table */ +static dissector_table_t attribute_id_dissector_table; + #include "packet-cmip-table.c" static int opcode_type; @@ -74,6 +77,7 @@ static int opcode_type; static int attributeform; #define ATTRIBUTE_LOCAL_FORM 0 #define ATTRIBUTE_GLOBAL_FORM 1 +static int attribute_local_id; static const char *attribute_identifier_id; static const char *attributevalueassertion_id; @@ -198,6 +202,8 @@ void proto_register_cmip(void) { #include "packet-cmip-dis-tab.c" oid_add_from_string("discriminatorId(1)","2.9.3.2.7.1"); + attribute_id_dissector_table = register_dissector_table("cmip.attribute_id", "CMIP Attribute Id", FT_UINT32, BASE_DEC); + } |