diff options
author | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-06-05 12:00:57 +0000 |
---|---|---|
committer | Tomas Kukosa <tomas.kukosa@siemens.com> | 2007-06-05 12:00:57 +0000 |
commit | 31e45c7a2130ada609c53cef7fb6e630bfb0ae45 (patch) | |
tree | a1f6be33237edf23b9b6bdb87a1014d78b96736f /epan/dissectors/packet-x411.c | |
parent | 368528502eff6bb908da692f67b025ca95e05d26 (diff) |
not allow #.FN_HDR/FTR for Wireshark types but only for ASN.1 types
it makes interconnection between .cnf file and ASN.1 source more readable
(changes for #.FN_BODY will follow)
svn path=/trunk/; revision=22043
Diffstat (limited to 'epan/dissectors/packet-x411.c')
-rw-r--r-- | epan/dissectors/packet-x411.c | 55 |
1 files changed, 37 insertions, 18 deletions
diff --git a/epan/dissectors/packet-x411.c b/epan/dissectors/packet-x411.c index 3c1d8fceb4..7f4803990a 100644 --- a/epan/dissectors/packet-x411.c +++ b/epan/dissectors/packet-x411.c @@ -349,8 +349,8 @@ static int hf_x411_ContentTypes_item = -1; /* ContentType */ static int hf_x411_built_in = -1; /* BuiltInContentType */ static int hf_x411_extended = -1; /* ExtendedContentType */ static int hf_x411_OtherRecipientNames_item = -1; /* OtherRecipientName */ -static int hf_x411_standard_extension = -1; /* INTEGER */ -static int hf_x411_private_extension = -1; /* OBJECT_IDENTIFIER */ +static int hf_x411_standard_extension = -1; /* T_standard_extension */ +static int hf_x411_private_extension = -1; /* T_private_extension */ static int hf_x411_extension_type = -1; /* ExtensionType */ static int hf_x411_criticality = -1; /* Criticality */ static int hf_x411_extension_value = -1; /* ExtensionValue */ @@ -1169,19 +1169,10 @@ static int dissect_privacy_mark(proto_tree *tree _U_, tvbuff_t *tvb _U_, int off static int dissect_x411_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { -#line 339 "x411.cnf" - - offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id); - - extension_id = -1; - - + offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL); return offset; } -static int dissect_private_extension_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_x411_OBJECT_IDENTIFIER(TRUE, tvb, offset, actx, tree, hf_x411_private_extension); -} static int dissect_category_type_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { return dissect_x411_OBJECT_IDENTIFIER(TRUE, tvb, offset, actx, tree, hf_x411_category_type); } @@ -2000,7 +1991,7 @@ static int dissect_built_in_domain_defined_attributes(proto_tree *tree _U_, tvbu static int dissect_x411_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, - &extension_id); + NULL); return offset; } @@ -2010,9 +2001,6 @@ static int dissect_messages_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int of static int dissect_delivery_queue_octets_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { return dissect_x411_INTEGER(TRUE, tvb, offset, actx, tree, hf_x411_delivery_queue_octets); } -static int dissect_standard_extension_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_x411_INTEGER(TRUE, tvb, offset, actx, tree, hf_x411_standard_extension); -} static int dissect_extension_attribute_type_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { return dissect_x411_INTEGER(TRUE, tvb, offset, actx, tree, hf_x411_extension_attribute_type); } @@ -2855,6 +2843,37 @@ static int dissect_trace_information(proto_tree *tree _U_, tvbuff_t *tvb _U_, in } + +static int +dissect_x411_T_standard_extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { + offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index, + &extension_id); + + return offset; +} +static int dissect_standard_extension_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { + return dissect_x411_T_standard_extension(TRUE, tvb, offset, actx, tree, hf_x411_standard_extension); +} + + + +static int +dissect_x411_T_private_extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) { +#line 339 "x411.cnf" + + offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id); + + extension_id = -1; + + + + return offset; +} +static int dissect_private_extension_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { + return dissect_x411_T_private_extension(TRUE, tvb, offset, actx, tree, hf_x411_private_extension); +} + + static const value_string x411_ExtensionType_vals[] = { { 0, "standard-extension" }, { 3, "private-extension" }, @@ -8778,11 +8797,11 @@ void proto_register_x411(void) { { &hf_x411_standard_extension, { "standard-extension", "x411.standard_extension", FT_INT32, BASE_DEC, NULL, 0, - "x411.INTEGER", HFILL }}, + "x411.T_standard_extension", HFILL }}, { &hf_x411_private_extension, { "private-extension", "x411.private_extension", FT_OID, BASE_NONE, NULL, 0, - "x411.OBJECT_IDENTIFIER", HFILL }}, + "x411.T_private_extension", HFILL }}, { &hf_x411_extension_type, { "type", "x411.type", FT_UINT32, BASE_DEC, VALS(x411_ExtensionType_vals), 0, |