aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/dop/packet-dop-template.c
diff options
context:
space:
mode:
Diffstat (limited to 'asn1/dop/packet-dop-template.c')
-rw-r--r--asn1/dop/packet-dop-template.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/asn1/dop/packet-dop-template.c b/asn1/dop/packet-dop-template.c
index 801ee49a39..c6b56b5fd3 100644
--- a/asn1/dop/packet-dop-template.c
+++ b/asn1/dop/packet-dop-template.c
@@ -32,6 +32,7 @@
#include <epan/prefs.h>
#include <epan/conversation.h>
#include <epan/oid_resolv.h>
+#include <epan/asn1.h>
#include <stdio.h>
#include <string.h>
@@ -99,8 +100,11 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
int old_offset;
proto_item *item=NULL;
proto_tree *tree=NULL;
- int (*dop_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) = NULL;
+ int (*dop_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) = NULL;
char *dop_op_name;
+ asn1_ctx_t asn1_ctx;
+
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
/* do we have operation information from the ROS dissector? */
if( !pinfo->private_data ){
@@ -198,7 +202,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
while (tvb_reported_length_remaining(tvb, offset) > 0){
old_offset=offset;
- offset=(*dop_dissector)(FALSE, tvb, offset, pinfo , tree, -1);
+ offset=(*dop_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1);
if(offset == old_offset){
proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte DOP PDU");
offset = tvb_length(tvb);