diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-05-13 20:58:29 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-05-13 20:58:29 +0000 |
commit | c01f3829742dacd6d94dc50be54537661bad0581 (patch) | |
tree | eb3da0d69d5bc62ca587ebd999b6beacd693f168 /asn1/mms | |
parent | b80cb43018aa49bac3e24cabca009ca0471cd579 (diff) | |
download | wireshark-c01f3829742dacd6d94dc50be54537661bad0581.tar.gz wireshark-c01f3829742dacd6d94dc50be54537661bad0581.tar.bz2 wireshark-c01f3829742dacd6d94dc50be54537661bad0581.zip |
Second step in introducing asn context to BER dissectors just like in PER.
svn path=/trunk/; revision=21753
Diffstat (limited to 'asn1/mms')
-rw-r--r-- | asn1/mms/mms.cnf | 14 | ||||
-rw-r--r-- | asn1/mms/packet-mms-template.c | 5 |
2 files changed, 11 insertions, 8 deletions
diff --git a/asn1/mms/mms.cnf b/asn1/mms/mms.cnf index 6e7e89b7ef..bbb060e00f 100644 --- a/asn1/mms/mms.cnf +++ b/asn1/mms/mms.cnf @@ -20,25 +20,25 @@ MMSpdu #.FIELD_RENAME #.FN_BODY ApplicationReference/ap-title - offset=dissect_acse_AP_title(FALSE, tvb, offset, pinfo, tree, hf_mms_ap_title); + offset=dissect_acse_AP_title(FALSE, tvb, offset, actx, tree, hf_mms_ap_title); #.FN_BODY ApplicationReference/ap-invocation-id - offset=dissect_acse_AP_invocation_identifier(FALSE, tvb, offset, pinfo, tree, hf_mms_ap_invocation_id); + offset=dissect_acse_AP_invocation_identifier(FALSE, tvb, offset, actx, tree, hf_mms_ap_invocation_id); #.FN_BODY ApplicationReference/ae-qualifier - offset=dissect_acse_AE_qualifier(FALSE, tvb, offset, pinfo, tree, hf_mms_ae_qualifier); + offset=dissect_acse_AE_qualifier(FALSE, tvb, offset, actx, tree, hf_mms_ae_qualifier); #.FN_BODY ApplicationReference/ae-invocation-id - offset=dissect_acse_AE_invocation_identifier(FALSE, tvb, offset, pinfo, tree, hf_mms_ae_invocation_id); + offset=dissect_acse_AE_invocation_identifier(FALSE, tvb, offset, actx, tree, hf_mms_ae_invocation_id); #.FN_BODY MMSpdu gint branch_taken; - offset = dissect_ber_choice(pinfo, tree, tvb, offset, + offset = dissect_ber_choice(actx, tree, tvb, offset, MMSpdu_choice, hf_index, ett_mms_MMSpdu, &branch_taken); - if(check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, "%%s ", val_to_str(branch_taken, mms_MMSpdu_vals, "Unknown")); + if(check_col(actx->pinfo->cinfo, COL_INFO)) + col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s ", val_to_str(branch_taken, mms_MMSpdu_vals, "Unknown")); diff --git a/asn1/mms/packet-mms-template.c b/asn1/mms/packet-mms-template.c index 776d7b8a8e..9026e1bf56 100644 --- a/asn1/mms/packet-mms-template.c +++ b/asn1/mms/packet-mms-template.c @@ -30,6 +30,7 @@ #include <glib.h> #include <epan/packet.h> #include <epan/conversation.h> +#include <epan/asn1.h> #include <stdio.h> #include <string.h> @@ -63,6 +64,8 @@ dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) int old_offset; proto_item *item=NULL; proto_tree *tree=NULL; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); if(parent_tree){ item = proto_tree_add_item(parent_tree, proto_mms, tvb, 0, -1, FALSE); @@ -75,7 +78,7 @@ dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) while (tvb_reported_length_remaining(tvb, offset) > 0){ old_offset=offset; - offset=dissect_mms_MMSpdu(FALSE, tvb, offset, pinfo , tree, -1); + offset=dissect_mms_MMSpdu(FALSE, tvb, offset, &asn1_ctx , tree, -1); if(offset == old_offset){ proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte MMS PDU"); offset = tvb_length(tvb); |