aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2007-05-15 05:49:43 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2007-05-15 05:49:43 +0000
commitc499249f60d4e6f61272804397f4ecca216456b2 (patch)
tree26b227bd3fdd4303f46b9d2121e3393034b631cf /asn1
parentaa0e4132ca2dda860ffaab66d5099538afaa7bc6 (diff)
actx in the rest of dissect_ber..()l
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21773 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1')
-rw-r--r--asn1/Makefile.nmake9
-rw-r--r--asn1/acse/acse.cnf10
-rw-r--r--asn1/cmip/cmip.cnf2
-rw-r--r--asn1/ftam/ftam.cnf38
-rw-r--r--asn1/h248/h248.cnf6
-rw-r--r--asn1/h248/packet-h248-template.c30
-rw-r--r--asn1/inap/inap.cnf4
-rw-r--r--asn1/ldap/ldap.cnf6
-rw-r--r--asn1/pkix1explicit/pkix1explicit.cnf2
-rw-r--r--asn1/rtse/rtse.cnf6
-rw-r--r--asn1/snmp/packet-snmp-template.c18
-rw-r--r--asn1/snmp/snmp.cnf14
-rw-r--r--asn1/spnego/packet-spnego-template.c4
-rw-r--r--asn1/spnego/spnego.cnf2
-rw-r--r--asn1/tcap/packet-tcap-template.c10
-rw-r--r--asn1/tcap/tcap.cnf10
-rw-r--r--asn1/x411/x411.cnf4
-rw-r--r--asn1/x509if/x509if.cnf2
18 files changed, 98 insertions, 79 deletions
diff --git a/asn1/Makefile.nmake b/asn1/Makefile.nmake
index b40d4b0ba9..b0ea901b9a 100644
--- a/asn1/Makefile.nmake
+++ b/asn1/Makefile.nmake
@@ -52,6 +52,7 @@ ber: \
snmp \
spnego \
tcap \
+ t38 \
wlancertextn \
x411 \
x420 \
@@ -241,6 +242,9 @@ clean:
cd tcap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ..
+ cd t38
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
+ cd ..
cd ulp
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ..
@@ -553,6 +557,11 @@ tcap::
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files
cd ..
+t38::
+ cd t38
+ $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files
+ cd ..
+
ulp::
cd ulp
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake copy_files
diff --git a/asn1/acse/acse.cnf b/asn1/acse/acse.cnf
index 231e4067aa..b1412b6d7d 100644
--- a/asn1/acse/acse.cnf
+++ b/asn1/acse/acse.cnf
@@ -64,24 +64,24 @@ 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_str(FALSE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset,
hf_index, &object_identifier_id);
#.FN_BODY AARE-apdu/aSO-context-name
- offset = dissect_ber_object_identifier_str(FALSE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset,
hf_index, &object_identifier_id);
#.FN_BODY ACRQ-apdu/aSO-context-name
- offset = dissect_ber_object_identifier_str(FALSE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset,
hf_index, &object_identifier_id);
#.FN_BODY ACRP-apdu/aSO-context-name
- offset = dissect_ber_object_identifier_str(FALSE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset,
hf_index, &object_identifier_id);
#.FN_BODY EXTERNALt/indirect-reference
char *oid;
- offset = dissect_ber_integer(FALSE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_integer(FALSE, actx, tree, tvb, offset,
hf_acse_indirect_reference,
&indir_ref);
diff --git a/asn1/cmip/cmip.cnf b/asn1/cmip/cmip.cnf
index 5b17c93c4a..f44ea05877 100644
--- a/asn1/cmip/cmip.cnf
+++ b/asn1/cmip/cmip.cnf
@@ -92,7 +92,7 @@ ObjectClass B "2.9.3.2.7.65" "smi2AttributeID(7)objectClass(65)"
#.FN_BODY AttributeId/localForm
attributeform = ATTRIBUTE_LOCAL_FORM;
- offset = dissect_ber_integer(implicit_tag, actx->pinfo, tree, tvb, offset, hf_cmip_localForm, NULL);
+ offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_cmip_localForm, NULL);
#.FN_BODY Attribute/value
/*XXX handle local form here */
diff --git a/asn1/ftam/ftam.cnf b/asn1/ftam/ftam.cnf
index 49b7d1c26c..860a507985 100644
--- a/asn1/ftam/ftam.cnf
+++ b/asn1/ftam/ftam.cnf
@@ -98,7 +98,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
}
offset = dissect_ber_restricted_string(TRUE, 1,
- actx->pinfo, tree, tvb, offset, hf_index,
+ actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Protocol-Version
@@ -114,7 +114,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_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_bitstring(TRUE, actx, tree, tvb, offset,
Protocol_Version_bits, hf_index, ett_ftam_Protocol_Version,
NULL);
@@ -131,7 +131,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_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_bitstring(TRUE, actx, tree, tvb, offset,
Service_Class_bits, hf_index, ett_ftam_Service_Class,
NULL);
@@ -148,7 +148,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_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_bitstring(TRUE, actx, tree, tvb, offset,
Functional_Units_bits, hf_index, ett_ftam_Functional_Units,
NULL);
@@ -166,7 +166,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_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_bitstring(TRUE, actx, tree, tvb, offset,
Attribute_Groups_bits, hf_index, ett_ftam_Attribute_Groups,
NULL);
@@ -184,7 +184,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_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Contents-Type-List
@@ -217,7 +217,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_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Request-Type
@@ -233,7 +233,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_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Abstract-Syntax-Name
@@ -249,7 +249,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, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_object_identifier(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
@@ -298,7 +298,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_bitstring(TRUE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_bitstring(TRUE, actx, tree, tvb, offset,
Access_Request_bits, hf_index, ett_ftam_Access_Request,
NULL);
#.FN_BODY Account
@@ -315,7 +315,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
}
offset = dissect_ber_restricted_string(TRUE, 4,
- actx->pinfo, tree, tvb, offset, hf_index,
+ actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Action-Result
gint8 class;
@@ -330,7 +330,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_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
@@ -347,7 +347,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_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Change-Attributes
@@ -414,7 +414,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, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_object_identifier(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Create-Attributes
@@ -465,7 +465,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_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Read-Attributes
@@ -513,7 +513,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_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY User-Identity
@@ -530,7 +530,7 @@ Legal-Qualification-Attribute/actual-values actual_values9
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
}
offset = dissect_ber_restricted_string(TRUE, 22,
- actx->pinfo, tree, tvb, offset, hf_index,
+ actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Scope
gint8 class;
@@ -594,7 +594,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_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index,
NULL);
#.FN_BODY Shared-ASE-Informatio
@@ -640,7 +640,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_boolean(TRUE, actx->pinfo, tree, tvb, offset, hf_index);
+ offset = dissect_ber_boolean(TRUE, actx, tree, tvb, offset, hf_index);
#.FN_BODY Password
gint8 class;
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf
index cab4f9c20c..e8837108ec 100644
--- a/asn1/h248/h248.cnf
+++ b/asn1/h248/h248.cnf
@@ -234,7 +234,7 @@ IndAudStatisticsDescriptor/statName iAStatName
#.END
#.FN_BODY ErrorDescriptor/errorCode
- offset = dissect_ber_integer(implicit_tag, actx->pinfo, tree, tvb, offset, hf_h248_error_code, &error_code);
+ offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_h248_error_code, &error_code);
expert_add_info_format(actx->pinfo, get_ber_last_created_item(), PI_RESPONSE_CODE, PI_WARN, "Errored Command");
if (curr_info.cmd) {
@@ -253,7 +253,7 @@ IndAudStatisticsDescriptor/statName iAStatName
#.FN_BODY WildcardField
tvbuff_t* new_tvb;
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
tree = proto_item_add_subtree(get_ber_last_created_item(),ett_wildcard);
proto_tree_add_item(tree,hf_h248_term_wild_type,new_tvb,0,1,FALSE);
proto_tree_add_item(tree,hf_h248_term_wild_level,new_tvb,0,1,FALSE);
@@ -265,7 +265,7 @@ IndAudStatisticsDescriptor/statName iAStatName
#.FN_BODY TerminationID/id
tvbuff_t* new_tvb;
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
if (new_tvb) {
curr_info.term->len = tvb_length(new_tvb);
diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c
index 8b2f3ae4f5..eae1e3fcce 100644
--- a/asn1/h248/packet-h248-template.c
+++ b/asn1/h248/packet-h248-template.c
@@ -520,15 +520,21 @@ static gcp_wildcard_t wild_term;
extern void h248_param_ber_integer(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* u _U_, void* implicit) {
- dissect_ber_integer(implicit ? *((gboolean*)implicit) : FALSE, pinfo, tree, tvb, 0, hfid, NULL);
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ dissect_ber_integer(implicit ? *((gboolean*)implicit) : FALSE, &asn1_ctx, tree, tvb, 0, hfid, NULL);
}
extern void h248_param_ber_octetstring(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* u _U_, void* implicit) {
- dissect_ber_octet_string(implicit ? *((gboolean*)implicit) : FALSE, pinfo, tree, tvb, 0, hfid, NULL);
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ dissect_ber_octet_string(implicit ? *((gboolean*)implicit) : FALSE, &asn1_ctx, tree, tvb, 0, hfid, NULL);
}
extern void h248_param_ber_boolean(proto_tree* tree, tvbuff_t* tvb, packet_info* pinfo, int hfid, h248_curr_info_t* u _U_, void* implicit) {
- dissect_ber_boolean(implicit ? *((gboolean*)implicit) : FALSE, pinfo, tree, tvb, 0, hfid);
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+ dissect_ber_boolean(implicit ? *((gboolean*)implicit) : FALSE, &asn1_ctx, tree, tvb, 0, hfid);
}
extern void h248_param_item(proto_tree* tree,
@@ -561,9 +567,11 @@ extern void h248_param_PkgdName(proto_tree* tree, tvbuff_t* tvb, packet_info* pi
const h248_package_t* pkg = NULL;
guint i;
int offset = 0;
-
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+
old_offset=offset;
- offset = dissect_ber_octet_string(FALSE, pinfo, tree, tvb, offset, hfid , &new_tvb);
+ offset = dissect_ber_octet_string(FALSE, &asn1_ctx, tree, tvb, offset, hfid , &new_tvb);
if (new_tvb) {
/* this field is always 4 bytes so just read it into two integers */
@@ -714,7 +722,7 @@ static int dissect_h248_PkgdName(gboolean implicit_tag, tvbuff_t *tvb, int offse
guint i;
old_offset=offset;
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
if (new_tvb) {
/* this field is always 4 bytes so just read it into two integers */
@@ -773,7 +781,7 @@ static int dissect_h248_EventName(gboolean implicit_tag, tvbuff_t *tvb, int offs
guint i;
old_offset=offset;
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
if (new_tvb) {
/* this field is always 4 bytes so just read it into two integers */
@@ -850,7 +858,7 @@ static int dissect_h248_SignalName(gboolean implicit_tag , tvbuff_t *tvb, int of
guint i;
old_offset=offset;
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
if (new_tvb) {
/* this field is always 4 bytes so just read it into two integers */
@@ -971,7 +979,7 @@ static int dissect_h248_SigParameterName(gboolean implicit_tag _U_, tvbuff_t *tv
const gchar* strval;
proto_item* pi;
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &next_tvb);
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
pi = get_ber_last_created_item();
switch(tvb_length(next_tvb)) {
@@ -1040,7 +1048,7 @@ static int dissect_h248_EventParameterName(gboolean implicit_tag _U_, tvbuff_t *
const gchar* strval;
proto_item* pi;
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &next_tvb);
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
pi = get_ber_last_created_item();
if (next_tvb) {
@@ -1115,7 +1123,7 @@ static int dissect_h248_MtpAddress(gboolean implicit_tag, tvbuff_t *tvb, int off
int i, len, old_offset;
old_offset=offset;
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &new_tvb);
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &new_tvb);
if (new_tvb) {
/* this field is either 2 or 4 bytes so just read it into an integer */
diff --git a/asn1/inap/inap.cnf b/asn1/inap/inap.cnf
index 8051edbc63..90c2043960 100644
--- a/asn1/inap/inap.cnf
+++ b/asn1/inap/inap.cnf
@@ -79,14 +79,14 @@ ReceivedInformationArg
offset = dissect_returnErrorData(tree, tvb, offset, actx);
#.FN_BODY INAPLocalErrorcode VAL_PTR = &errorCode
- offset = dissect_ber_integer(FALSE, actx->pinfo, tree, tvb, offset, hf_index, &errorCode);
+ offset = dissect_ber_integer(FALSE, actx, tree, tvb, offset, hf_index, &errorCode);
if (check_col(actx->pinfo->cinfo, COL_INFO)){
col_set_str(actx->pinfo->cinfo, COL_INFO, val_to_str(errorCode, inap_error_code_strings, "Unknown Inap (%u)"));
}
#.FN_BODY INAPOperationLocalvalue
- offset = dissect_ber_integer(FALSE, actx->pinfo, tree, tvb, offset, hf_index, &opcode);
+ offset = dissect_ber_integer(FALSE, actx, tree, tvb, offset, hf_index, &opcode);
if (check_col(actx->pinfo->cinfo, COL_INFO)){
col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", val_to_str(opcode, inap_opr_code_strings, "Unknown Inap (%u)"));
diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf
index 4ea3c25f0c..ab3b69b60c 100644
--- a/asn1/ldap/ldap.cnf
+++ b/asn1/ldap/ldap.cnf
@@ -407,7 +407,7 @@ ldap_conv_info_t *ldap_info;
int old_offset = offset;
/* extract the value of the octetstring */
- offset = dissect_ber_octet_string(FALSE, actx->pinfo, NULL, tvb, offset, hf_index, &next_tvb);
+ offset = dissect_ber_octet_string(FALSE, actx, NULL, tvb, offset, hf_index, &next_tvb);
/* if we have an attribute type that isn't binary see if there is a better dissector */
if(!attr_type || !dissector_try_string(ldap_name_dissector_table, attr_type, next_tvb, actx->pinfo, tree)) {
@@ -553,7 +553,7 @@ ldap_conv_info_t *ldap_info;
#.FN_BODY BOOLEAN
gboolean val;
- offset = dissect_ber_boolean_value(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, &val);
+ offset = dissect_ber_boolean_value(implicit_tag, actx, tree, tvb, offset, hf_index, &val);
if (hf_index == hf_ldap_dnAttributes) {
matching_rule_dnattr = val;
@@ -639,7 +639,7 @@ ldap_conv_info_t *ldap_info;
#.FN_BODY BindResponse/matchedDN
tvbuff_t *new_tvb=NULL;
- offset = dissect_ber_octet_string(FALSE, actx->pinfo, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb);
+ offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_ldap_matchedDN, &new_tvb);
if( new_tvb
&& (tvb_length(new_tvb)>=7)
diff --git a/asn1/pkix1explicit/pkix1explicit.cnf b/asn1/pkix1explicit/pkix1explicit.cnf
index 4c066c8e84..0e50f5955e 100644
--- a/asn1/pkix1explicit/pkix1explicit.cnf
+++ b/asn1/pkix1explicit/pkix1explicit.cnf
@@ -29,7 +29,7 @@ DomainParameters B "1.2.840.10046.2.1" "dhpublicnumber"
#.FIELD_RENAME
#.FN_BODY DirectoryString
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index, NULL);
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
#.FN_PARS AttributeTypeAndValue/value
FN_VARIANT = _str HF_INDEX = hf_pkix1explicit_object_identifier_id VAL_PTR = &object_identifier_id
diff --git a/asn1/rtse/rtse.cnf b/asn1/rtse/rtse.cnf
index 2f527dc4a6..9cc7dc434e 100644
--- a/asn1/rtse/rtse.cnf
+++ b/asn1/rtse/rtse.cnf
@@ -79,7 +79,7 @@ EXTERNALt
#.FN_BODY RTTRapdu
tvbuff_t *next_tvb = NULL;
- offset = dissect_ber_octet_string(FALSE, actx->pinfo, tree, tvb, offset, hf_index, &next_tvb);
+ offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &next_tvb);
if(next_tvb) {
@@ -114,7 +114,7 @@ EXTERNALt
#.FN_BODY EXTERNALt/indirect-reference
char *oid;
- offset = dissect_ber_integer(FALSE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_integer(FALSE, actx, tree, tvb, offset,
hf_rtse_indirect_reference,
&indir_ref);
@@ -130,7 +130,7 @@ EXTERNALt
#.FN_BODY T_applicationProtocol
- offset = dissect_ber_integer(TRUE, actx->pinfo, tree, tvb, offset, hf_index, &app_proto);
+ offset = dissect_ber_integer(TRUE, actx, tree, tvb, offset, hf_index, &app_proto);
#.FN_BODY SessionConnectionIdentifier
if(open_request && check_col(actx->pinfo->cinfo, COL_INFO))
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 574f734882..1e42f80d98 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -833,7 +833,7 @@ dissect_snmp_engineid(proto_tree *tree, tvbuff_t *tvb, int offset, int len)
*/
static void
-snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tvbuff_t *oid_tvb,
+snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, asn1_ctx_t *actx,tvbuff_t *oid_tvb,
int offset, guint *lengthp, tvbuff_t **out_tvb)
{
int start, vb_value_start;
@@ -865,8 +865,8 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv
start = offset;
/* parse the type of the object */
- offset = dissect_ber_identifier(pinfo, snmp_tree, tvb, start, &class, &pc, &ber_tag);
- offset = dissect_ber_length(pinfo, snmp_tree, tvb, offset, &vb_length, &ind);
+ offset = dissect_ber_identifier(actx->pinfo, snmp_tree, tvb, start, &class, &pc, &ber_tag);
+ offset = dissect_ber_length(actx->pinfo, snmp_tree, tvb, offset, &vb_length, &ind);
if(vb_length == 0){
length = offset - start;
@@ -898,7 +898,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv
switch (vb_type) {
case SNMP_INTEGER:
- offset = dissect_ber_integer(FALSE, pinfo, NULL, tvb, start, -1, (void*)&(vb_integer_value));
+ offset = dissect_ber_integer(FALSE, actx, NULL, tvb, start, -1, (void*)&(vb_integer_value));
length = offset - vb_value_start;
if (snmp_tree) {
#ifdef HAVE_NET_SNMP
@@ -926,7 +926,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv
case SNMP_COUNTER:
case SNMP_GAUGE:
case SNMP_TIMETICKS:
- offset = dissect_ber_integer(FALSE, pinfo, NULL, tvb, start, -1, &vb_uinteger_value);
+ offset = dissect_ber_integer(FALSE, actx, NULL, tvb, start, -1, &vb_uinteger_value);
length = offset - vb_value_start;
if (snmp_tree) {
#ifdef HAVE_NET_SNMP
@@ -951,14 +951,14 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv
}
break;
case SNMP_COUNTER64:
- offset=dissect_ber_integer64(TRUE, pinfo, snmp_tree, tvb, offset, hf_snmp_counter64, NULL);
+ offset=dissect_ber_integer64(TRUE, actx, snmp_tree, tvb, offset, hf_snmp_counter64, NULL);
break;
case SNMP_OCTETSTR:
case SNMP_IPADDR:
case SNMP_OPAQUE:
case SNMP_NSAP:
case SNMP_BITSTR:
- offset = dissect_ber_octet_string(FALSE, pinfo, NULL, tvb, start, -1, out_tvb);
+ offset = dissect_ber_octet_string(FALSE, actx, NULL, tvb, start, -1, out_tvb);
vb_octet_string = ep_tvb_memdup(tvb, vb_value_start, vb_length);
length = offset - vb_value_start;
@@ -1015,7 +1015,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, packet_info *pinfo,tv
break;
case SNMP_NULL:
- dissect_ber_null(FALSE, pinfo, NULL, tvb, start, -1);
+ dissect_ber_null(FALSE, actx, NULL, tvb, start, -1);
length = offset - vb_value_start;
if (snmp_tree) {
proto_tree_add_text(snmp_tree, tvb, vb_value_start, length,
@@ -1598,7 +1598,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
offset = dissect_ber_length(pinfo, 0, tvb, offset, &len, &ind);
message_length = len + 2;
- offset = dissect_ber_integer(FALSE, pinfo, 0, tvb, offset, -1, &version);
+ offset = dissect_ber_integer(FALSE, &asn1_ctx, 0, tvb, offset, -1, &version);
/*
diff --git a/asn1/snmp/snmp.cnf b/asn1/snmp/snmp.cnf
index ab8ad77165..fd9b464f9a 100644
--- a/asn1/snmp/snmp.cnf
+++ b/asn1/snmp/snmp.cnf
@@ -184,7 +184,7 @@ gint pdu_type;
#.FN_BODY UsmSecurityParameters/msgAuthoritativeEngineID
tvbuff_t *parameter_tvb = NULL;
- offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, tree, tvb, offset, hf_index,
+ offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
&usm_p.engine_tvb);
if (parameter_tvb) {
proto_tree* engine_tree = proto_item_add_subtree(get_ber_last_created_item(),ett_engineid);
@@ -195,7 +195,7 @@ gint pdu_type;
VAL_PTR = &usm_p.user_tvb
#.FN_BODY UsmSecurityParameters/msgAuthenticationParameters
- offset = dissect_ber_octet_string(FALSE, actx->pinfo, tree, tvb, offset, hf_index, &usm_p.auth_tvb);
+ offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &usm_p.auth_tvb);
if (usm_p.auth_tvb) {
usm_p.auth_item = get_ber_last_created_item();
usm_p.auth_offset = offset_from_real_beginning(usm_p.auth_tvb,0);
@@ -205,7 +205,7 @@ gint pdu_type;
#.FN_BODY ScopedPduData/encryptedPDU
tvbuff_t* crypt_tvb;
- offset = dissect_ber_octet_string(FALSE, actx->pinfo, tree, tvb, offset, hf_snmp_encryptedPDU, &crypt_tvb);
+ offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_snmp_encryptedPDU, &crypt_tvb);
if( usm_p.encrypted && crypt_tvb
&& usm_p.user_assoc
@@ -336,25 +336,25 @@ gint pdu_type;
#.FN_BODY String-value
guint length;
- snmp_variable_decode(tvb, tree, actx->pinfo, oid_tvb, offset, &length, &value_tvb);
+ snmp_variable_decode(tvb, tree, actx, oid_tvb, offset, &length, &value_tvb);
offset = offset + length;
#.FN_BODY Integer-value
guint length;
- snmp_variable_decode(tvb, tree, actx->pinfo, oid_tvb, offset, &length, NULL);
+ snmp_variable_decode(tvb, tree, actx, oid_tvb, offset, &length, NULL);
offset = offset + length;
#.FN_BODY ObjectID-value
guint length;
- snmp_variable_decode(tvb, tree, actx->pinfo, oid_tvb, offset, &length, NULL);
+ snmp_variable_decode(tvb, tree, actx, oid_tvb, offset, &length, NULL);
offset = offset + length;
#.FN_BODY Empty
guint length;
- snmp_variable_decode(tvb, tree, actx->pinfo, oid_tvb, offset, &length, NULL);
+ snmp_variable_decode(tvb, tree, actx, oid_tvb, offset, &length, NULL);
offset = offset + length;
#.FN_BODY NetworkAddress/internet
diff --git a/asn1/spnego/packet-spnego-template.c b/asn1/spnego/packet-spnego-template.c
index 4e52960d75..4a86547418 100644
--- a/asn1/spnego/packet-spnego-template.c
+++ b/asn1/spnego/packet-spnego-template.c
@@ -172,6 +172,8 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean pc, ind = 0;
gint32 tag;
guint32 len;
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
item = proto_tree_add_item(tree, hf_spnego_krb5, tvb, offset,
-1, FALSE);
@@ -224,7 +226,7 @@ dissect_spnego_krb5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
/* Next, the OID */
- offset=dissect_ber_object_identifier_str(FALSE, pinfo, subtree, tvb, offset, hf_spnego_krb5_oid, &oid);
+ offset=dissect_ber_object_identifier_str(FALSE, &asn1_ctx, 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 b6c0f9ab7a..563f9d17a8 100644
--- a/asn1/spnego/spnego.cnf
+++ b/asn1/spnego/spnego.cnf
@@ -158,7 +158,7 @@ NegTokenInit/mechListMIC negTokenInit_mechListMIC
* which is what it's supposed to be; that'll cause the
* right error report if it's not an octet string, either.
*/
- offset = dissect_ber_octet_string(FALSE, actx->pinfo, tree, tvb, offset,
+ offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset,
hf_spnego_mechListMIC, &mechListMIC_tvb);
/*
diff --git a/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c
index 3d89ff7b39..84bc8bb679 100644
--- a/asn1/tcap/packet-tcap-template.c
+++ b/asn1/tcap/packet-tcap-template.c
@@ -101,7 +101,7 @@ static dissector_handle_t data_handle;
static dissector_table_t sccp_ssn_table;
static void raz_tcap_private(struct tcap_private_t * p_tcap_private);
-static int dissect_tcap_param(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
+static int dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset);
static int dissect_tcap_UserInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_);
static int dissect_tcap_TheComponent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_);
static int dissect_tcap_TheExternUserInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset,asn1_ctx_t *actx _U_, proto_tree *tree, int hf_index _U_);
@@ -404,7 +404,7 @@ static void init_tcap(void) {
}
static int
-dissect_tcap_param(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset)
+dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset)
{
gint tag_offset, saved_offset, len_offset;
tvbuff_t *next_tvb;
@@ -440,7 +440,7 @@ dissect_tcap_param(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offs
if (len-(2*ind_field)) /*should always be positive unless we get an empty contructor pointless? */
{
next_tvb = tvb_new_subset(tvb, offset, len-(2*ind_field), len-(2*ind_field));
- dissect_tcap_param(pinfo, subtree,next_tvb,0);
+ dissect_tcap_param(actx, subtree,next_tvb,0);
}
if (ind_field)
proto_tree_add_text(subtree, tvb, offset+len-2, 2, "CONSTRUCTOR EOC");
@@ -461,7 +461,7 @@ dissect_tcap_param(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offs
if (len) /* check for NULLS */
{
next_tvb = tvb_new_subset(tvb, offset, len, len);
- dissect_ber_octet_string(TRUE, pinfo, tree, next_tvb, 0, hf_tcap_data,
+ dissect_ber_octet_string(TRUE, actx, tree, next_tvb, 0, hf_tcap_data,
NULL);
}
offset += len;
@@ -646,7 +646,7 @@ dissect_tcap_TheExternUserInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int off
if (ber_oid_dissector_table && tcapext_oid){
if(!dissector_try_string(ber_oid_dissector_table, tcapext_oid, next_tvb, actx->pinfo, tcap_top_tree))
{
- dissect_tcap_param(actx->pinfo,tree,next_tvb,0);
+ dissect_tcap_param(actx,tree,next_tvb,0);
offset+=len;
return offset;
}
diff --git a/asn1/tcap/tcap.cnf b/asn1/tcap/tcap.cnf
index 39623e6a82..3c02468089 100644
--- a/asn1/tcap/tcap.cnf
+++ b/asn1/tcap/tcap.cnf
@@ -87,7 +87,7 @@ gint8 class;
if (!next_tvb)
return offset;
- dissect_tcap_param(actx->pinfo,tree,tvb,0);
+ dissect_tcap_param(actx,tree,tvb,0);
offset += len;
return offset;
@@ -132,9 +132,9 @@ dissect_tcap_TheExternUserInfo(implicit_tag, tvb, offset, actx, tree, hf_index);
guint32 len;
len = tvb_length_remaining(tvb, offset);
if (len > 2) /* arghhh I dont know whether this is constructed or not! */
- offset = dissect_tcap_param(actx->pinfo,tree,tvb,offset);
+ offset = dissect_tcap_param(actx,tree,tvb,offset);
else
-offset = dissect_ber_octet_string(TRUE, actx->pinfo, tree, tvb, 0, hf_index,
+offset = dissect_ber_octet_string(TRUE, actx, tree, tvb, 0, hf_index,
NULL);
@@ -163,7 +163,7 @@ proto_tree *subtree;
tid_item = proto_tree_add_text(tree, tvb, offset, -1, "Source Transaction ID");
subtree = proto_item_add_subtree(tid_item, ett_otid);
-offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, subtree, tvb, offset, hf_tcap_tid,
+offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_tid,
&parameter_tvb);
if (parameter_tvb){
@@ -201,7 +201,7 @@ proto_tree *subtree;
tid_item = proto_tree_add_text(tree, tvb, offset, -1, "Destination Transaction ID");
subtree = proto_item_add_subtree(tid_item, ett_otid);
-offset = dissect_ber_octet_string(implicit_tag, actx->pinfo, subtree, tvb, offset, hf_tcap_tid,
+offset = dissect_ber_octet_string(implicit_tag, actx, subtree, tvb, offset, hf_tcap_tid,
&parameter_tvb);
if (parameter_tvb){
diff --git a/asn1/x411/x411.cnf b/asn1/x411/x411.cnf
index ec72538bd1..5024bfd4f4 100644
--- a/asn1/x411/x411.cnf
+++ b/asn1/x411/x411.cnf
@@ -325,7 +325,7 @@ ORAddress B "2.16.840.1.101.2.2.1.134.1" "id-at-collective-mhs-or-addresses"
/* this is magic I haven't seen used before - I've stripped the tag - but now I'm going to say it is IMPLICIT! */
offset = dissect_ber_restricted_string(TRUE, BER_UNI_TAG_PrintableString,
- actx->pinfo, tree, tvb, offset, hf_index,
+ actx, tree, tvb, offset, hf_index,
NULL);
@@ -381,7 +381,7 @@ ORAddress B "2.16.840.1.101.2.2.1.134.1" "id-at-collective-mhs-or-addresses"
tvbuff_t *next_tvb;
/* we can do this now constructed octet strings are supported */
- offset = dissect_ber_octet_string(FALSE, actx->pinfo, NULL, tvb, offset, hf_index, &next_tvb);
+ offset = dissect_ber_octet_string(FALSE, actx, NULL, tvb, offset, hf_index, &next_tvb);
if (next_tvb) {
if (content_type_id) {
diff --git a/asn1/x509if/x509if.cnf b/asn1/x509if/x509if.cnf
index e31af525c9..e2acbb9f5b 100644
--- a/asn1/x509if/x509if.cnf
+++ b/asn1/x509if/x509if.cnf
@@ -178,7 +178,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.140" "id-at-garrison"
object_identifier_id = orig_oid;
/* try and dissect as a string */
- dissect_ber_octet_string(FALSE, actx->pinfo, NULL, tvb, old_offset, hf_x509if_any_string, &out_tvb);
+ dissect_ber_octet_string(FALSE, actx, NULL, tvb, old_offset, hf_x509if_any_string, &out_tvb);
/* should also try and dissect as an OID and integer */
/* of course, if I can look up the syntax .... */