From c01f3829742dacd6d94dc50be54537661bad0581 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Sun, 13 May 2007 20:58:29 +0000 Subject: Second step in introducing asn context to BER dissectors just like in PER. svn path=/trunk/; revision=21753 --- asn1/dsp/packet-dsp-template.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'asn1/dsp') diff --git a/asn1/dsp/packet-dsp-template.c b/asn1/dsp/packet-dsp-template.c index fb449d735c..56d2f358cb 100644 --- a/asn1/dsp/packet-dsp-template.c +++ b/asn1/dsp/packet-dsp-template.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -81,8 +82,11 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) int old_offset; proto_item *item=NULL; proto_tree *tree=NULL; - int (*dsp_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) = NULL; + int (*dsp_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_) = NULL; char *dsp_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 ){ @@ -258,7 +262,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) while (tvb_reported_length_remaining(tvb, offset) > 0){ old_offset=offset; - offset=(*dsp_dissector)(FALSE, tvb, offset, pinfo , tree, -1); + offset=(*dsp_dissector)(FALSE, tvb, offset, &asn1_ctx, tree, -1); if(offset == old_offset){ proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte DSP PDU"); offset = tvb_length(tvb); -- cgit v1.2.3