aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorTomas Kukosa <tomas.kukosa@siemens.com>2005-11-14 10:02:31 +0000
committerTomas Kukosa <tomas.kukosa@siemens.com>2005-11-14 10:02:31 +0000
commit3b770d5c7c9aa12a455d6307b762b3fca875fbf7 (patch)
treee8f6231cfc7a837d8fc9901a7a676180dce93bd1 /asn1
parent0496eb5dcabb32c36084b2efb620fe6fe9a50b12 (diff)
- dissect_ber_object_identifier() returns value as tvb
- new dissect_ber_object_identifier_str() function - BER dissectors adapted and regenerated svn path=/trunk/; revision=16501
Diffstat (limited to 'asn1')
-rw-r--r--asn1/acse/acse.cnf34
-rw-r--r--asn1/acse/packet-acse-template.c2
-rw-r--r--asn1/cmip/cmip.cnf85
-rw-r--r--asn1/cmip/packet-cmip-template.c8
-rw-r--r--asn1/cms/cms.cnf19
-rw-r--r--asn1/cms/packet-cms-template.c2
-rw-r--r--asn1/ess/ess.cnf5
-rw-r--r--asn1/ess/packet-ess-template.c2
-rw-r--r--asn1/ftam/ftam.cnf11
-rw-r--r--asn1/ftam/packet-ftam-template.c2
-rw-r--r--asn1/ocsp/ocsp.cnf5
-rw-r--r--asn1/ocsp/packet-ocsp-template.c2
-rw-r--r--asn1/pkix1explicit/packet-pkix1explicit-template.c2
-rw-r--r--asn1/pkix1explicit/pkix1explicit.cnf10
-rw-r--r--asn1/pkixcmp/cmp.cnf5
-rw-r--r--asn1/pkixcmp/packet-cmp-template.c2
-rw-r--r--asn1/pkixcrmf/crmf.cnf5
-rw-r--r--asn1/pkixcrmf/packet-crmf-template.c2
-rw-r--r--asn1/pkixqualified/packet-pkixqualified-template.c2
-rw-r--r--asn1/pkixqualified/pkixqualified.cnf5
-rw-r--r--asn1/pres/packet-pres-template.c4
-rw-r--r--asn1/pres/pres.cnf2
-rw-r--r--asn1/spnego/packet-spnego-template.c6
-rw-r--r--asn1/spnego/spnego.cnf2
-rw-r--r--asn1/tcap/packet-tcap-template.c4
-rw-r--r--asn1/tcap/tcap.cnf20
-rw-r--r--asn1/x411/packet-x411-template.c3
-rw-r--r--asn1/x411/x411.cnf6
-rw-r--r--asn1/x420/packet-x420-template.c2
-rw-r--r--asn1/x420/x420.cnf2
-rw-r--r--asn1/x509af/packet-x509af-template.c4
-rw-r--r--asn1/x509af/x509af.cnf11
-rw-r--r--asn1/x509ce/packet-x509ce-template.c2
-rw-r--r--asn1/x509ce/x509ce.cnf5
-rw-r--r--asn1/x509if/packet-x509if-template.c2
-rw-r--r--asn1/x509if/x509if.cnf15
36 files changed, 127 insertions, 173 deletions
diff --git a/asn1/acse/acse.cnf b/asn1/acse/acse.cnf
index c80e625366..5a72fa3690 100644
--- a/asn1/acse/acse.cnf
+++ b/asn1/acse/acse.cnf
@@ -1,3 +1,8 @@
+# asce.cnf
+# ACSE conformation file
+
+# $Id$
+
#.MODULE_IMPORT
InformationFramework x509if
@@ -52,9 +57,8 @@ ACRQ-apdu/aSO-context-name aCRQ_aSO_context_name
offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
EXTERNAL_sequence, hf_index, ett_acse_EXTERNAL);
-#.FN_BODY Authentication-value-other/other-mechanism-name
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_index, object_identifier_id);
+#.FN_PARS Authentication-value-other/other-mechanism-name
+ FN_VARIANT = _str VAL_PTR = &object_identifier_id
#.FN_BODY Authentication-value-other/other-mechanism-value
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree);
@@ -63,20 +67,20 @@ ACRQ-apdu/aSO-context-name aCRQ_aSO_context_name
/*XXX not implemented yet */
#.FN_BODY AARQ-apdu/aSO-context-name
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_index, object_identifier_id);
+ offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+ hf_index, &object_identifier_id);
#.FN_BODY AARE-apdu/aSO-context-name
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_index, object_identifier_id);
+ offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+ hf_index, &object_identifier_id);
#.FN_BODY ACRQ-apdu/aSO-context-name
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_index, object_identifier_id);
+ offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+ hf_index, &object_identifier_id);
#.FN_BODY ACRP-apdu/aSO-context-name
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_index, object_identifier_id);
+ offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+ hf_index, &object_identifier_id);
#.FN_BODY EXTERNAL/indirect-reference
char *oid;
@@ -86,16 +90,14 @@ ACRQ-apdu/aSO-context-name aCRQ_aSO_context_name
/* look up the indirect reference */
if((oid = find_oid_by_pres_ctx_id(pinfo, indir_ref)) != NULL) {
- g_snprintf(object_identifier_id, MAX_OID_STR_LEN, "%%s", oid);
+ object_identifier_id = ep_strdup(oid);
}
if(session)
session->pres_ctx_id = indir_ref;
-#.FN_BODY EXTERNAL/direct-reference
-
- offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, object_identifier_id);
-
+#.FN_PARS EXTERNAL/direct-reference
+ FN_VARIANT = _str VAL_PTR = &object_identifier_id
#.FN_BODY EXTERNAL/encoding/single-ASN1-type
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree ? top_tree : tree);
diff --git a/asn1/acse/packet-acse-template.c b/asn1/acse/packet-acse-template.c
index 67d86ed5f3..0e32bcaa57 100644
--- a/asn1/acse/packet-acse-template.c
+++ b/asn1/acse/packet-acse-template.c
@@ -68,7 +68,7 @@ static gint ett_acse = -1;
static struct SESSION_DATA_STRUCTURE* session = NULL;
-static char object_identifier_id[MAX_OID_STR_LEN];
+static const char *object_identifier_id;
/* indirect_reference, used to pick up the signalling so we know what
kind of data is transferred in SES_DATA_TRANSFER_PDUs */
static guint32 indir_ref=0;
diff --git a/asn1/cmip/cmip.cnf b/asn1/cmip/cmip.cnf
index f601cd77b8..c1c0a6a000 100644
--- a/asn1/cmip/cmip.cnf
+++ b/asn1/cmip/cmip.cnf
@@ -38,11 +38,7 @@ RDNSequence
}
#.END
-#.FN_PARS CMIPAbortSource
-
-VAL_PTR = &value
-
-#.FN_BODY CMIPAbortSource
+#.FN_BODY CMIPAbortSource VAL_PTR = &value
guint32 value;
%(DEFAULT_BODY)s
@@ -50,10 +46,8 @@ VAL_PTR = &value
col_append_fstr(pinfo->cinfo, COL_INFO, " AbortSource:%%s", val_to_str(value, cmip_CMIPAbortSource_vals, " Unknown AbortSource:%%d"));
}
#.END
-#.FN_PARS Opcode
- VAL_PTR = &opcode
-#.FN_BODY Opcode
+#.FN_BODY Opcode VAL_PTR = &opcode
%(DEFAULT_BODY)s
if(check_col(pinfo->cinfo, COL_INFO)){
col_prepend_fstr(pinfo->cinfo, COL_INFO, "%%s", val_to_str(opcode, cmip_Opcode_vals, " Unknown Opcode:%%d"));
@@ -88,10 +82,7 @@ VAL_PTR = &value
}
#.END
-#.FN_PARS AttributeId/globalForm
- VAL_PTR = attribute_identifier_id
-
-#.FN_BODY AttributeId/globalForm
+#.FN_BODY AttributeId/globalForm FN_VARIANT = _str VAL_PTR = &attribute_identifier_id
attributeform = ATTRIBUTE_GLOBAL_FORM;
%(DEFAULT_BODY)s
@@ -105,7 +96,7 @@ VAL_PTR = &value
offset=call_ber_oid_callback(attribute_identifier_id, tvb, offset, pinfo, tree);
}
#.FN_PARS AttributeValueAssertion/id
- VAL_PTR = attributevalueassertion_id
+ FN_VARIANT = _str VAL_PTR = &attributevalueassertion_id
#.FN_BODY AttributeValueAssertion/value
offset=call_ber_oid_callback(attributevalueassertion_id, tvb, offset, pinfo, tree);
@@ -184,87 +175,71 @@ VAL_PTR = &value
/*XXX add more types here */
}
-#.FN_BODY ObjectClass/ocglobalForm
+#.FN_HDR ObjectClass/ocglobalForm
objectclassform = OBJECTCLASS_GLOBAL_FORM;
- offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset,
- hf_cmip_ocglobalForm, objectclass_identifier_id);
+#.FN_PARS ObjectClass/ocglobalForm
+ FN_VARIANT = _str VAL_PTR = &objectclass_identifier_id
-#.FN_BODY ObjectClass/oclocalForm
+#.FN_HDR ObjectClass/oclocalForm
objectclassform = OBJECTCLASS_LOCAL_FORM;
- offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_cmip_oclocalForm, NULL);
-#.FN_BODY ActionInfo/actionType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_actionType_OID, object_identifier_id);
+#.FN_PARS ActionInfo/actionType
+ FN_VARIANT = _str HF_INDEX = hf_cmip_actionType_OID VAL_PTR = &object_identifier_id
#.FN_BODY ActionInfo/actionInfoArg
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-#.FN_BODY ActionReply/actionType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_actionType_OID, object_identifier_id);
+#.FN_PARS ActionReply/actionType
+ FN_VARIANT = _str HF_INDEX = hf_cmip_actionType_OID VAL_PTR = &object_identifier_id
#.FN_BODY ActionReply/actionReplyInfo
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-#.FN_BODY EventReportArgument/eventType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_eventType_OID, object_identifier_id);
+#.FN_PARS EventReportArgument/eventType
+ FN_VARIANT = _str HF_INDEX = hf_cmip_eventType_OID VAL_PTR = &object_identifier_id
#.FN_BODY EventReportArgument/eventInfo
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-
-#.FN_BODY EventReply/eventType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_eventType_OID, object_identifier_id);
+#.FN_PARS EventReply/eventType
+ FN_VARIANT = _str HF_INDEX = hf_cmip_eventType_OID VAL_PTR = &object_identifier_id
#.FN_BODY EventReply/eventReplyInfo
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-#.FN_BODY ModificationItem/attributeId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_attributeId_OID, object_identifier_id);
+#.FN_PARS ModificationItem/attributeId
+ FN_VARIANT = _str HF_INDEX = hf_cmip_attributeId_OID VAL_PTR = &object_identifier_id
#.FN_BODY ModificationItem/attributeValue
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-
-#.FN_BODY SpecificErrorInfo/errorId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_errorId_OID, object_identifier_id);
+#.FN_PARS SpecificErrorInfo/errorId
+ FN_VARIANT = _str HF_INDEX = hf_cmip_errorId_OID VAL_PTR = &object_identifier_id
#.FN_BODY SpecificErrorInfo/errorInfo
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-#.FN_BODY AttributeError/attributeId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_attributeId_OID, object_identifier_id);
+#.FN_PARS AttributeError/attributeId
+ FN_VARIANT = _str HF_INDEX = hf_cmip_attributeId_OID VAL_PTR = &object_identifier_id
#.FN_BODY AttributeError/attributeValue
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+#.FN_PARS ErrorInfo/actionType
+ FN_VARIANT = _str HF_INDEX = hf_cmip_actionType_OID VAL_PTR = &object_identifier_id
-#.FN_BODY ErrorInfo/actionType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_actionType_OID, object_identifier_id);
-
-#.FN_BODY NoSuchArgumentAction/actionType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_actionType_OID, object_identifier_id);
+#.FN_PARS NoSuchArgumentAction/actionType
+ FN_VARIANT = _str HF_INDEX = hf_cmip_actionType_OID VAL_PTR = &object_identifier_id
-#.FN_BODY NoSuchArgumentEvent/eventType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_eventType_OID, object_identifier_id);
+#.FN_PARS NoSuchArgumentEvent/eventType
+ FN_VARIANT = _str HF_INDEX = hf_cmip_eventType_OID VAL_PTR = &object_identifier_id
-#.FN_BODY InvalidArgumentValueEventValue/eventType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmip_eventType_OID, object_identifier_id);
+#.FN_PARS InvalidArgumentValueEventValue/eventType
+ FN_VARIANT = _str HF_INDEX = hf_cmip_eventType_OID VAL_PTR = &object_identifier_id
#.FN_BODY InvalidArgumentValueEventValue/eventInfo
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-
#.END
diff --git a/asn1/cmip/packet-cmip-template.c b/asn1/cmip/packet-cmip-template.c
index 20453fb28b..4799c55980 100644
--- a/asn1/cmip/packet-cmip-template.c
+++ b/asn1/cmip/packet-cmip-template.c
@@ -75,16 +75,16 @@ static int opcode_type;
static int attributeform;
#define ATTRIBUTE_LOCAL_FORM 0
#define ATTRIBUTE_GLOBAL_FORM 1
-static char attribute_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *attribute_identifier_id;
-static char attributevalueassertion_id[BER_MAX_OID_STR_LEN];
+static const char *attributevalueassertion_id;
-static char object_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *object_identifier_id;
static int objectclassform;
#define OBJECTCLASS_LOCAL_FORM 0
#define OBJECTCLASS_GLOBAL_FORM 1
-static char objectclass_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *objectclass_identifier_id;
#include "packet-cmip-fn.c"
diff --git a/asn1/cms/cms.cnf b/asn1/cms/cms.cnf
index b2c8252850..2c09a38d58 100644
--- a/asn1/cms/cms.cnf
+++ b/asn1/cms/cms.cnf
@@ -48,15 +48,15 @@ SignerInfo/signature signatureValue
RecipientEncryptedKey/rid rekRid
#.FN_BODY ContentInfo/contentType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cms_ci_contentType, object_identifier_id);
+ offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+ hf_cms_ci_contentType, &object_identifier_id);
#.FN_BODY ContentInfo/content
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
#.FN_BODY EncapsulatedContentInfo/eContentType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cms_ci_contentType, object_identifier_id);
+ offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
+ hf_cms_ci_contentType, &object_identifier_id);
#.FN_BODY EncapsulatedContentInfo/eContent
gint8 class;
@@ -72,17 +72,14 @@ RecipientEncryptedKey/rid rekRid
pdu_offset = get_ber_length(tree, tvb, pdu_offset, &len, &ind);
pdu_offset = call_ber_oid_callback(object_identifier_id, tvb, pdu_offset, pinfo, tree);
-#.FN_BODY OtherKeyAttribute/keyAttrId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cms_ci_contentType, object_identifier_id);
+#.FN_PARS OtherKeyAttribute/keyAttrId
+ FN_VARIANT = _str HF_INDEX = hf_cms_ci_contentType VAL_PTR = &object_identifier_id
#.FN_BODY OtherKeyAttribute/keyAttr
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-#.FN_BODY Attribute/attrType
-
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cms_attrType, object_identifier_id);
+#.FN_PARS Attribute/attrType
+ FN_VARIANT = _str HF_INDEX = hf_cms_attrType VAL_PTR = &object_identifier_id
#.FN_BODY AttributeValue
diff --git a/asn1/cms/packet-cms-template.c b/asn1/cms/packet-cms-template.c
index 644ea2b82d..c52c79da72 100644
--- a/asn1/cms/packet-cms-template.c
+++ b/asn1/cms/packet-cms-template.c
@@ -54,7 +54,7 @@ static int hf_cms_ci_contentType = -1;
static int dissect_cms_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) ; /* XXX kill a compiler warning until asn2eth stops generating these silly wrappers */
-static char object_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *object_identifier_id;
#include "packet-cms-fn.c"
diff --git a/asn1/ess/ess.cnf b/asn1/ess/ess.cnf
index d4fe6fb510..10c2caa3ae 100644
--- a/asn1/ess/ess.cnf
+++ b/asn1/ess/ess.cnf
@@ -35,9 +35,8 @@ SigningCertificate B "1.2.840.113549.1.9.16.2.12" "id-aa-signingCertificate"
#.FIELD_RENAME
-#.FN_BODY SecurityCategory/type
- offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset,
- hf_ess_SecurityCategory_type_OID, object_identifier_id);
+#.FN_PARS SecurityCategory/type
+ FN_VARIANT = _str HF_INDEX = hf_ess_SecurityCategory_type_OID VAL_PTR = &object_identifier_id
#.FN_BODY SecurityCategory/value
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
diff --git a/asn1/ess/packet-ess-template.c b/asn1/ess/packet-ess-template.c
index 3d97f218e7..477522e0fd 100644
--- a/asn1/ess/packet-ess-template.c
+++ b/asn1/ess/packet-ess-template.c
@@ -51,7 +51,7 @@ static int hf_ess_SecurityCategory_type_OID = -1;
/* Initialize the subtree pointers */
#include "packet-ess-ett.c"
-static char object_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *object_identifier_id;
#include "packet-ess-fn.c"
diff --git a/asn1/ftam/ftam.cnf b/asn1/ftam/ftam.cnf
index d4f6af9448..22ab59d506 100644
--- a/asn1/ftam/ftam.cnf
+++ b/asn1/ftam/ftam.cnf
@@ -68,9 +68,7 @@ Object-Availability-Attribute/actual-values actual_values8
Legal-Qualification-Attribute/actual-values actual_values9
#.FN_PARS Extension-Attribute/extension-attribute-identifier
- VAL_PTR = object_identifier_id
-
-
+ FN_VARIANT = _str VAL_PTR = &object_identifier_id
#.FN_BODY Contents-Type-Attribute/document-type/parameter
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
@@ -79,7 +77,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
#.FN_PARS Attribute-Extensions-Pattern/_item/extension-set-attribute-Patterns/_item/extension-attribute-identifier
- VAL_PTR = object_identifier_id
+ FN_VARIANT = _str VAL_PTR = &object_identifier_id
#.FN_BODY Attribute-Extensions-Pattern/_item/extension-set-attribute-Patterns/_item/extension-attribute-Pattern
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
@@ -455,7 +453,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
Diagnostic_sequence_of, hf_index, ett_ftam_Diagnostic);
-#.FN_BODY Document-Type-Name
+#.FN_BODY Document-Type-Name FN_VARIANT = _str VAL_PTR = &object_identifier_id
gint8 class;
gboolean pc, ind_field;
gint32 tag;
@@ -468,8 +466,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
}
- offset = dissect_ber_object_identifier(TRUE, pinfo, tree, tvb, offset,
- hf_index, object_identifier_id);
+%(DEFAULT_BODY)s
#.FN_BODY FADU-Lock
gint8 class;
diff --git a/asn1/ftam/packet-ftam-template.c b/asn1/ftam/packet-ftam-template.c
index ceffa589b8..e0b01ebfc9 100644
--- a/asn1/ftam/packet-ftam-template.c
+++ b/asn1/ftam/packet-ftam-template.c
@@ -50,7 +50,7 @@
/* Initialize the protocol and registered fields */
int proto_ftam = -1;
-static char object_identifier_id[MAX_OID_STR_LEN];
+static const char *object_identifier_id;
/* Declare the function to avoid a compiler warning */
static int dissect_ftam_OR_Set(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_);
diff --git a/asn1/ocsp/ocsp.cnf b/asn1/ocsp/ocsp.cnf
index 567ef511bd..1f61c4372d 100644
--- a/asn1/ocsp/ocsp.cnf
+++ b/asn1/ocsp/ocsp.cnf
@@ -31,9 +31,8 @@ ServiceLocator B "1.3.6.1.5.5.7.48.1.7" "id-pkix-ocsp-service-locator"
#.FIELD_RENAME
-#.FN_BODY ResponseBytes/responseType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_ocsp_responseType_id, responseType_id);
+#.FN_PARS ResponseBytes/responseType
+ FN_VARIANT = _str HF_INDEX = hf_ocsp_responseType_id VAL_PTR = &responseType_id
#.FN_BODY ResponseBytes/response
gint8 class;
diff --git a/asn1/ocsp/packet-ocsp-template.c b/asn1/ocsp/packet-ocsp-template.c
index 888a52943b..45b513c329 100644
--- a/asn1/ocsp/packet-ocsp-template.c
+++ b/asn1/ocsp/packet-ocsp-template.c
@@ -53,7 +53,7 @@ static int hf_ocsp_responseType_id = -1;
static gint ett_ocsp = -1;
#include "packet-ocsp-ett.c"
-static char responseType_id[BER_MAX_OID_STR_LEN];
+static const char *responseType_id;
#include "packet-ocsp-fn.c"
diff --git a/asn1/pkix1explicit/packet-pkix1explicit-template.c b/asn1/pkix1explicit/packet-pkix1explicit-template.c
index 5864278ea7..5074eb1846 100644
--- a/asn1/pkix1explicit/packet-pkix1explicit-template.c
+++ b/asn1/pkix1explicit/packet-pkix1explicit-template.c
@@ -54,7 +54,7 @@ static int hf_pkix1explicit_object_identifier_id = -1;
#include "packet-pkix1explicit-ett.c"
-static char object_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *object_identifier_id;
int
dissect_pkix1explicit_Certificate(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
diff --git a/asn1/pkix1explicit/pkix1explicit.cnf b/asn1/pkix1explicit/pkix1explicit.cnf
index 5e9ec6adb0..2ee8302b40 100644
--- a/asn1/pkix1explicit/pkix1explicit.cnf
+++ b/asn1/pkix1explicit/pkix1explicit.cnf
@@ -31,16 +31,14 @@ DomainParameters B "1.2.840.10046.2.1" "dhpublicnumber"
#.FN_BODY DirectoryString
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
-#.FN_BODY AttributeTypeAndValue/value
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_pkix1explicit_object_identifier_id, object_identifier_id);
+#.FN_PARS AttributeTypeAndValue/value
+ FN_VARIANT = _str HF_INDEX = hf_pkix1explicit_object_identifier_id VAL_PTR = &object_identifier_id
#.FN_BODY AttributeTypeAndValue/value
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-#.FN_BODY Extension/extnId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_pkix1explicit_object_identifier_id, object_identifier_id);
+#.FN_PARS Extension/extnId
+ FN_VARIANT = _str HF_INDEX = hf_pkix1explicit_object_identifier_id VAL_PTR = &object_identifier_id
#.FN_BODY Extension/extnValue
gint8 class;
diff --git a/asn1/pkixcmp/cmp.cnf b/asn1/pkixcmp/cmp.cnf
index b6360cea6a..66798b85bf 100644
--- a/asn1/pkixcmp/cmp.cnf
+++ b/asn1/pkixcmp/cmp.cnf
@@ -59,9 +59,8 @@ RevReqContent
#.FIELD_RENAME
-#.FN_BODY InfoTypeAndValue/infoType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_cmp_type_oid, object_identifier_id);
+#.FN_PARS InfoTypeAndValue/infoType
+ FN_VARIANT = _str HF_INDEX = hf_cmp_type_oid VAL_PTR = &object_identifier_id
#.FN_BODY InfoTypeAndValue/infoValue
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
diff --git a/asn1/pkixcmp/packet-cmp-template.c b/asn1/pkixcmp/packet-cmp-template.c
index 4ee367dbc7..3e76384102 100644
--- a/asn1/pkixcmp/packet-cmp-template.c
+++ b/asn1/pkixcmp/packet-cmp-template.c
@@ -66,7 +66,7 @@ static int hf_cmp_ttcb = -1;
static gint ett_cmp = -1;
#include "packet-cmp-ett.c"
-static char object_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *object_identifier_id;
#include "packet-cmp-fn.c"
diff --git a/asn1/pkixcrmf/crmf.cnf b/asn1/pkixcrmf/crmf.cnf
index 3ceb9cadae..e7b77cef0a 100644
--- a/asn1/pkixcrmf/crmf.cnf
+++ b/asn1/pkixcrmf/crmf.cnf
@@ -53,9 +53,8 @@ CertTemplate/issuer template_issuer
POPOSigningKey/signature sk_signature
PKMACValue/value pkmac_value
-#.FN_BODY AttributeTypeAndValue/type
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_crmf_type_oid, object_identifier_id);
+#.FN_PARS AttributeTypeAndValue/type
+ FN_VARIANT = _str HF_INDEX = hf_crmf_type_oid VAL_PTR = &object_identifier_id
#.FN_BODY AttributeTypeAndValue/value
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
diff --git a/asn1/pkixcrmf/packet-crmf-template.c b/asn1/pkixcrmf/packet-crmf-template.c
index 5f5b8679b3..29b60fbc4b 100644
--- a/asn1/pkixcrmf/packet-crmf-template.c
+++ b/asn1/pkixcrmf/packet-crmf-template.c
@@ -52,7 +52,7 @@ static int hf_crmf_type_oid = -1;
/* Initialize the subtree pointers */
#include "packet-crmf-ett.c"
-static char object_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *object_identifier_id;
#include "packet-crmf-fn.c"
diff --git a/asn1/pkixqualified/packet-pkixqualified-template.c b/asn1/pkixqualified/packet-pkixqualified-template.c
index 865868e203..b7d0f75244 100644
--- a/asn1/pkixqualified/packet-pkixqualified-template.c
+++ b/asn1/pkixqualified/packet-pkixqualified-template.c
@@ -51,7 +51,7 @@ int proto_pkixqualified = -1;
/* Initialize the subtree pointers */
#include "packet-pkixqualified-ett.c"
-static char object_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *object_identifier_id;
#include "packet-pkixqualified-fn.c"
diff --git a/asn1/pkixqualified/pkixqualified.cnf b/asn1/pkixqualified/pkixqualified.cnf
index 29b2050fff..3307a6fc67 100644
--- a/asn1/pkixqualified/pkixqualified.cnf
+++ b/asn1/pkixqualified/pkixqualified.cnf
@@ -31,9 +31,8 @@ Printablestring B "1.3.6.1.5.5.7.9.5" "id-pda-countryOfResidence"
#.FIELD_RENAME
-#.FN_BODY QCStatement/statementId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_pkixqualified_statementId, object_identifier_id);
+#.FN_PARS QCStatement/statementId
+ FN_VARIANT = _str HF_INDEX = hf_pkixqualified_statementId VAL_PTR = &object_identifier_id
#.FN_BODY QCStatement/statementInfo
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
diff --git a/asn1/pres/packet-pres-template.c b/asn1/pres/packet-pres-template.c
index f4b79ac433..7e7513b6ff 100644
--- a/asn1/pres/packet-pres-template.c
+++ b/asn1/pres/packet-pres-template.c
@@ -58,7 +58,7 @@ packet_info *global_pinfo = NULL;
/* dissector for data */
static dissector_handle_t data_handle;
-static char abstract_syntax_name_oid[BER_MAX_OID_STR_LEN];
+static const char *abstract_syntax_name_oid;
static guint32 presentation_context_identifier;
/* to keep track of presentation context identifiers and protocol-oids */
@@ -111,7 +111,7 @@ pres_init(void)
}
static void
-register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, char *oid)
+register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
{
pres_ctx_oid_t *pco, *tmppco;
pco=se_alloc(sizeof(pres_ctx_oid_t));
diff --git a/asn1/pres/pres.cnf b/asn1/pres/pres.cnf
index fd5c4df37e..ba2d332ac9 100644
--- a/asn1/pres/pres.cnf
+++ b/asn1/pres/pres.cnf
@@ -63,7 +63,7 @@ CPR-PPDU/normal-mode-parameters/provider-reason cPR_PPDU__provider-reason
#.FN_PARS Abstract_syntax_name
- VAL_PTR = abstract_syntax_name_oid
+ FN_VARIANT = _str VAL_PTR = &abstract_syntax_name_oid
#.FN_PARS Presentation_context_identifier
VAL_PTR = &presentation_context_identifier
diff --git a/asn1/spnego/packet-spnego-template.c b/asn1/spnego/packet-spnego-template.c
index 151eb43a12..59f7851668 100644
--- a/asn1/spnego/packet-spnego-template.c
+++ b/asn1/spnego/packet-spnego-template.c
@@ -73,7 +73,7 @@ static int hf_spnego_krb5_confounder = -1;
#include "packet-spnego-hf.c"
/* Global variables */
-gchar MechType_oid[MAX_OID_STR_LEN];
+static const char *MechType_oid;
gssapi_oid_value *next_level_value;
gboolean saw_mechanism = FALSE;
@@ -163,7 +163,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *subtree;
int offset = 0;
guint16 token_id;
- gchar oid[MAX_OID_STR_LEN];
+ const char *oid;
gssapi_oid_value *value;
tvbuff_t *krb5_tvb;
gint8 class;
@@ -222,7 +222,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
/* Next, the OID */
- offset=dissect_ber_object_identifier(FALSE, pinfo, subtree, tvb, offset, hf_spnego_krb5_oid, oid);
+ offset=dissect_ber_object_identifier_str(FALSE, pinfo, subtree, tvb, offset, hf_spnego_krb5_oid, &oid);
value = gssapi_lookup_oid_str(oid);
diff --git a/asn1/spnego/spnego.cnf b/asn1/spnego/spnego.cnf
index 1ebd727d5e..d39d09238a 100644
--- a/asn1/spnego/spnego.cnf
+++ b/asn1/spnego/spnego.cnf
@@ -17,7 +17,7 @@ NegTokenInit/mechListMIC negTokenInit_mechListMIC
#.FN_PARS MechType
- VAL_PTR = MechType_oid
+ FN_VARIANT = _str VAL_PTR = &MechType_oid
#.FN_BODY MechType
diff --git a/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c
index 0bf0d6334e..1755934979 100644
--- a/asn1/tcap/packet-tcap-template.c
+++ b/asn1/tcap/packet-tcap-template.c
@@ -74,8 +74,8 @@ static gboolean g_tcap_ends_def_len = FALSE;
dissector_handle_t tcap_handle;
static dissector_table_t ber_oid_dissector_table=NULL;
-static char * cur_oid;
-static char * tcapext_oid;
+static const char * cur_oid;
+static const char * tcapext_oid;
static proto_tree *tcap_top_tree=NULL;
static dissector_handle_t data_handle;
static dissector_table_t tcap_itu_ssn_dissector_table; /* map use ssn in sccp */
diff --git a/asn1/tcap/tcap.cnf b/asn1/tcap/tcap.cnf
index 2e3068f0ee..687f5601ce 100644
--- a/asn1/tcap/tcap.cnf
+++ b/asn1/tcap/tcap.cnf
@@ -124,19 +124,13 @@ else
dissector_try_port(tcap_itu_ssn_dissector_table, pinfo->match_port, next_tvb, pinfo, tcap_top_tree);
return offset+len;
-#.FN_BODY Applicationcontext
- static char buffer[128];
- cur_oid = buffer;
- pinfo->private_data = buffer;
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_index, cur_oid);
-
-#.FN_BODY UserInfoOID
- static char buffer[128];
- tcapext_oid = buffer;
- pinfo->private_data = buffer;
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_index, tcapext_oid);
+#.FN_BODY Applicationcontext FN_VARIANT = _str VAL_PTR = &cur_oid
+%(DEFAULT_BODY)s
+ pinfo->private_data = cur_oid;
+
+#.FN_BODY UserInfoOID FN_VARIANT = _str VAL_PTR = &tcapext_oid
+%(DEFAULT_BODY)s
+ pinfo->private_data = tcapext_oid;
#.FN_BODY ExternUserInfo
tvbuff_t *next_tvb;
diff --git a/asn1/x411/packet-x411-template.c b/asn1/x411/packet-x411-template.c
index a02ed78ec0..f21ef4ebb1 100644
--- a/asn1/x411/packet-x411-template.c
+++ b/asn1/x411/packet-x411-template.c
@@ -28,6 +28,7 @@
#endif
#include <glib.h>
+#include <epan/emem.h>
#include <epan/packet.h>
#include <epan/conversation.h>
@@ -55,7 +56,7 @@ int proto_x411 = -1;
static struct SESSION_DATA_STRUCTURE* session = NULL;
static int extension_id = 0; /* integer extension id */
-static char object_identifier_id[BER_MAX_OID_STR_LEN]; /* content type identifier */
+static const char *object_identifier_id; /* content type identifier */
static proto_tree *top_tree=NULL;
diff --git a/asn1/x411/x411.cnf b/asn1/x411/x411.cnf
index 2260d5fd73..72cdef65c7 100644
--- a/asn1/x411/x411.cnf
+++ b/asn1/x411/x411.cnf
@@ -263,7 +263,7 @@ UniversalOrganizationalUnitNames B "x411.extension-attribute.27" "universal-orga
VAL_PTR = &extension_id
#.FN_PARS ExtendedContentType
- VAL_PTR = object_identifier_id
+ FN_VARIANT = _str VAL_PTR = &object_identifier_id
#.FN_PARS BuiltInContentType
VAL_PTR = &ict
@@ -276,10 +276,10 @@ UniversalOrganizationalUnitNames B "x411.extension-attribute.27" "universal-orga
/* convert integer content type to oid for dispatch when the content is found */
switch(ict) {
case 2:
- g_snprintf(object_identifier_id, BER_MAX_OID_STR_LEN, "2.6.1.10.0");
+ object_identifier_id = ep_strdup("2.6.1.10.0");
break;
case 22:
- g_snprintf(object_identifier_id, BER_MAX_OID_STR_LEN, "2.6.1.10.1");
+ object_identifier_id = ep_strdup("2.6.1.10.1");
break;
default:
break;
diff --git a/asn1/x420/packet-x420-template.c b/asn1/x420/packet-x420-template.c
index e17d6af99f..f0be929410 100644
--- a/asn1/x420/packet-x420-template.c
+++ b/asn1/x420/packet-x420-template.c
@@ -50,7 +50,7 @@
/* Initialize the protocol and registered fields */
int proto_x420 = -1;
-static char object_identifier_id[BER_MAX_OID_STR_LEN]; /* content type identifier */
+static const char *object_identifier_id; /* content type identifier */
#include "packet-x420-hf.c"
diff --git a/asn1/x420/x420.cnf b/asn1/x420/x420.cnf
index 71e7148527..564089c8a3 100644
--- a/asn1/x420/x420.cnf
+++ b/asn1/x420/x420.cnf
@@ -46,7 +46,7 @@ ChangeOfAddressAdvice B "2.6.1.19.1" "id-on-change-of-address-advice"
IPMAssemblyInstructions B "2.6.1.17.2" "id-mst-assembly-instructions"
#.FN_PARS IPMSExtension/type
- VAL_PTR = object_identifier_id
+ FN_VARIANT = _str VAL_PTR = &object_identifier_id
#.FN_BODY IPMSExtension/type
char *name = NULL;
diff --git a/asn1/x509af/packet-x509af-template.c b/asn1/x509af/packet-x509af-template.c
index 1f8a2993b9..393a052eea 100644
--- a/asn1/x509af/packet-x509af-template.c
+++ b/asn1/x509af/packet-x509af-template.c
@@ -54,10 +54,10 @@ static int hf_x509af_extension_id = -1;
static gint ett_pkix_crl = -1;
#include "packet-x509af-ett.c"
-static char algorithm_id[BER_MAX_OID_STR_LEN];
+static const char *algorithm_id;
-static char extension_id[BER_MAX_OID_STR_LEN];
+static const char *extension_id;
#include "packet-x509af-fn.c"
diff --git a/asn1/x509af/x509af.cnf b/asn1/x509af/x509af.cnf
index 942155eddf..4bde694356 100644
--- a/asn1/x509af/x509af.cnf
+++ b/asn1/x509af/x509af.cnf
@@ -66,16 +66,15 @@ IssuerSerial/issuer issuerName
CertificateList/signedCertificateList/revokedCertificates/_item/userCertificate revokedUserCertificate
#.END
-#.FN_BODY AlgorithmIdentifier/algorithmId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_x509af_algorithm_id, algorithm_id);
+#.FN_PARS AlgorithmIdentifier/algorithmId
+ FN_VARIANT = _str HF_INDEX = hf_x509af_algorithm_id VAL_PTR = &algorithm_id
+
#.FN_BODY AlgorithmIdentifier/parameters
offset=call_ber_oid_callback(algorithm_id, tvb, offset, pinfo, tree);
-#.FN_BODY Extension/extnId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_x509af_extension_id, extension_id);
+#.FN_PARS Extension/extnId
+ FN_VARIANT = _str HF_INDEX = hf_x509af_extension_id VAL_PTR = &extension_id
#.FN_BODY Extension/extnValue
gint8 class;
diff --git a/asn1/x509ce/packet-x509ce-template.c b/asn1/x509ce/packet-x509ce-template.c
index 05945be10f..d5928ceba9 100644
--- a/asn1/x509ce/packet-x509ce-template.c
+++ b/asn1/x509ce/packet-x509ce-template.c
@@ -55,7 +55,7 @@ static int hf_x509ce_IPAddress = -1;
/* Initialize the subtree pointers */
#include "packet-x509ce-ett.c"
-static char object_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *object_identifier_id;
#include "packet-x509ce-fn.c"
diff --git a/asn1/x509ce/x509ce.cnf b/asn1/x509ce/x509ce.cnf
index a547e1876c..edce713b94 100644
--- a/asn1/x509ce/x509ce.cnf
+++ b/asn1/x509ce/x509ce.cnf
@@ -104,9 +104,8 @@ CRLReferral/issuer crlr_issuer
CertificatePairExactAssertion/issuedToThisCAAssertion cpea_issuedToThisCAAssertion
CertificatePairExactAssertion/issuedByThisCAAssertion cpea_issuedByThisCAAssertion
-#.FN_BODY PolicyQualifierId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_x509ce_object_identifier_id, object_identifier_id);
+#.FN_PARS PolicyQualifierId
+ FN_VARIANT = _str HF_INDEX = hf_x509ce_object_identifier_id VAL_PTR = &object_identifier_id
#.FN_BODY PolicyQualifierValue
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
diff --git a/asn1/x509if/packet-x509if-template.c b/asn1/x509if/packet-x509if-template.c
index 097e4e1551..a53ddcc364 100644
--- a/asn1/x509if/packet-x509if-template.c
+++ b/asn1/x509if/packet-x509if-template.c
@@ -50,7 +50,7 @@ static int hf_x509if_object_identifier_id = -1;
/* Initialize the subtree pointers */
#include "packet-x509if-ett.c"
-static char object_identifier_id[BER_MAX_OID_STR_LEN];
+static const char *object_identifier_id;
#include "packet-x509if-fn.c"
diff --git a/asn1/x509if/x509if.cnf b/asn1/x509if/x509if.cnf
index 09303e7eab..d59a97022a 100644
--- a/asn1/x509if/x509if.cnf
+++ b/asn1/x509if/x509if.cnf
@@ -84,16 +84,14 @@ RequestAttribute/defaultValues/_item/values/_item ra_values_item
RequestAttribute/selectedValues ra_selectedValues
RequestAttribute/selectedValues/_item ra_selectedValues_item
-#.FN_BODY ContextId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_x509if_object_identifier_id, object_identifier_id);
+#.FN_PARS ContextId
+ FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id
#.FN_BODY ContextValue
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-#.FN_BODY AttributeId
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_x509if_object_identifier_id, object_identifier_id);
+#.FN_PARS AttributeId
+ FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id
#.FN_BODY AttributeValue
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
@@ -101,9 +99,8 @@ RequestAttribute/selectedValues/_item ra_selectedValues_item
#.FN_BODY SelectedValues
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
-#.FN_BODY DefaultValueType
- offset = dissect_ber_object_identifier(FALSE, pinfo, tree, tvb, offset,
- hf_x509if_object_identifier_id, object_identifier_id);
+#.FN_PARS DefaultValueType
+ FN_VARIANT = _str HF_INDEX = hf_x509if_object_identifier_id VAL_PTR = &object_identifier_id
#.FN_BODY DefaultValueValues
offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);