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-logotypecertextn.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-logotypecertextn.c')
-rw-r--r-- | epan/dissectors/packet-logotypecertextn.c | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/epan/dissectors/packet-logotypecertextn.c b/epan/dissectors/packet-logotypecertextn.c index b3fc18f2c0..729911d9f5 100644 --- a/epan/dissectors/packet-logotypecertextn.c +++ b/epan/dissectors/packet-logotypecertextn.c @@ -75,7 +75,7 @@ static int hf_logotypecertextn_mediaType = -1; /* IA5String */ static int hf_logotypecertextn_logotypeHash = -1; /* SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue */ static int hf_logotypecertextn_logotypeHash_item = -1; /* HashAlgAndValue */ static int hf_logotypecertextn_logotypeURI = -1; /* T_logotypeURI */ -static int hf_logotypecertextn_logotypeURI_item = -1; /* IA5String */ +static int hf_logotypecertextn_logotypeURI_item = -1; /* T_logotypeURI_item */ static int hf_logotypecertextn_type = -1; /* LogotypeImageType */ static int hf_logotypecertextn_fileSize = -1; /* INTEGER */ static int hf_logotypecertextn_xSize = -1; /* INTEGER */ @@ -92,7 +92,7 @@ static int hf_logotypecertextn_info = -1; /* LogotypeInfo */ static int hf_logotypecertextn_refStructHash = -1; /* SEQUENCE_SIZE_1_MAX_OF_HashAlgAndValue */ static int hf_logotypecertextn_refStructHash_item = -1; /* HashAlgAndValue */ static int hf_logotypecertextn_refStructURI = -1; /* T_refStructURI */ -static int hf_logotypecertextn_refStructURI_item = -1; /* IA5String */ +static int hf_logotypecertextn_refStructURI_item = -1; /* T_refStructURI_item */ static int hf_logotypecertextn_hashAlg = -1; /* AlgorithmIdentifier */ static int hf_logotypecertextn_hashValue = -1; /* OCTET_STRING */ @@ -144,26 +144,14 @@ dissect_logotypecertextn_IA5String(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, actx, tree, tvb, offset, hf_index, NULL); -#line 18 "logotype-cert-extn.cnf" - if((hf_index == hf_logotypecertextn_logotypeURI_item) || - (hf_index == hf_logotypecertextn_refStructURI_item)) - PROTO_ITEM_SET_URL(get_ber_last_created_item()); - - return offset; } static int dissect_mediaType(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { return dissect_logotypecertextn_IA5String(FALSE, tvb, offset, actx, tree, hf_logotypecertextn_mediaType); } -static int dissect_logotypeURI_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_logotypecertextn_IA5String(FALSE, tvb, offset, actx, tree, hf_logotypecertextn_logotypeURI_item); -} static int dissect_language_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { return dissect_logotypecertextn_IA5String(TRUE, tvb, offset, actx, tree, hf_logotypecertextn_language); } -static int dissect_refStructURI_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { - return dissect_logotypecertextn_IA5String(FALSE, tvb, offset, actx, tree, hf_logotypecertextn_refStructURI_item); -} @@ -219,6 +207,24 @@ static int dissect_refStructHash(proto_tree *tree _U_, tvbuff_t *tvb _U_, int of } + +static int +dissect_logotypecertextn_T_logotypeURI_item(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_restricted_string(implicit_tag, BER_UNI_TAG_IA5String, + actx, tree, tvb, offset, hf_index, + NULL); + +#line 18 "logotype-cert-extn.cnf" + PROTO_ITEM_SET_URL(get_ber_last_created_item()); + + + return offset; +} +static int dissect_logotypeURI_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { + return dissect_logotypecertextn_T_logotypeURI_item(FALSE, tvb, offset, actx, tree, hf_logotypecertextn_logotypeURI_item); +} + + static const ber_old_sequence_t T_logotypeURI_sequence_of[1] = { { BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_logotypeURI_item }, }; @@ -464,6 +470,24 @@ static int dissect_direct_impl(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offs } + +static int +dissect_logotypecertextn_T_refStructURI_item(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_restricted_string(implicit_tag, BER_UNI_TAG_IA5String, + actx, tree, tvb, offset, hf_index, + NULL); + +#line 21 "logotype-cert-extn.cnf" + PROTO_ITEM_SET_URL(get_ber_last_created_item()); + + + return offset; +} +static int dissect_refStructURI_item(proto_tree *tree _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_) { + return dissect_logotypecertextn_T_refStructURI_item(FALSE, tvb, offset, actx, tree, hf_logotypecertextn_refStructURI_item); +} + + static const ber_old_sequence_t T_refStructURI_sequence_of[1] = { { BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_refStructURI_item }, }; @@ -718,7 +742,7 @@ void proto_register_logotypecertextn(void) { { &hf_logotypecertextn_logotypeURI_item, { "Item", "logotypecertextn.logotypeURI_item", FT_STRING, BASE_NONE, NULL, 0, - "logotypecertextn.IA5String", HFILL }}, + "logotypecertextn.T_logotypeURI_item", HFILL }}, { &hf_logotypecertextn_type, { "type", "logotypecertextn.type", FT_INT32, BASE_DEC, VALS(logotypecertextn_LogotypeImageType_vals), 0, @@ -786,7 +810,7 @@ void proto_register_logotypecertextn(void) { { &hf_logotypecertextn_refStructURI_item, { "Item", "logotypecertextn.refStructURI_item", FT_STRING, BASE_NONE, NULL, 0, - "logotypecertextn.IA5String", HFILL }}, + "logotypecertextn.T_refStructURI_item", HFILL }}, { &hf_logotypecertextn_hashAlg, { "hashAlg", "logotypecertextn.hashAlg", FT_NONE, BASE_NONE, NULL, 0, |