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/cdt/cdt.cnf | 28 ++++++++++++++-------------- asn1/cdt/packet-cdt-template.c | 1 + 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'asn1/cdt') diff --git a/asn1/cdt/cdt.cnf b/asn1/cdt/cdt.cnf index 332a9e9a03..aeb7abe2a0 100644 --- a/asn1/cdt/cdt.cnf +++ b/asn1/cdt/cdt.cnf @@ -20,8 +20,8 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt" val_to_str (value, cdt_AlgorithmID_ShortForm_vals, "unknown")); - if (check_col (pinfo->cinfo, COL_INFO)) - col_append_fstr (pinfo->cinfo, COL_INFO, "%%s ", + if (check_col (actx->pinfo->cinfo, COL_INFO)) + col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", val_to_str (value, cdt_AlgorithmID_ShortForm_vals, "unknown")); @@ -36,8 +36,8 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt" val_to_str (value, cdt_ContentType_ShortForm_vals, "unknown")); - if (check_col (pinfo->cinfo, COL_INFO)) - col_append_fstr (pinfo->cinfo, COL_INFO, "%%s ", + if (check_col (actx->pinfo->cinfo, COL_INFO)) + col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", val_to_str (value, cdt_ContentType_ShortForm_vals, "unknown")); @@ -57,8 +57,8 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt" proto_item_append_text (cdt_item, ", %%s", name); - if (check_col (pinfo->cinfo, COL_INFO)) - col_append_fstr (pinfo->cinfo, COL_INFO, "%%s ", name); + if (check_col (actx->pinfo->cinfo, COL_INFO)) + col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", name); } #.FN_PARS CompressedContent @@ -73,10 +73,10 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt" if (compr_tvb == NULL) { tf = proto_tree_add_text (top_tree, tvb, save_offset, -1, "[Error: Unable to get compressed content]"); - expert_add_info_format (pinfo, tf, PI_UNDECODED, PI_ERROR, + expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR, "Unable to get compressed content"); - if (check_col (pinfo->cinfo, COL_INFO)) - col_append_fstr (pinfo->cinfo, COL_INFO, + if (check_col (actx->pinfo->cinfo, COL_INFO)) + col_append_fstr (actx->pinfo->cinfo, COL_INFO, "[Error: Unable to get compressed content]"); return offset; } @@ -86,17 +86,17 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt" if (next_tvb == NULL) { tf = proto_tree_add_text (top_tree, tvb, save_offset, -1, "[Error: Unable to uncompress content]"); - expert_add_info_format (pinfo, tf, PI_UNDECODED, PI_ERROR, + expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR, "Unable to uncompress content"); - if (check_col (pinfo->cinfo, COL_INFO)) - col_append_fstr (pinfo->cinfo, COL_INFO, + if (check_col (actx->pinfo->cinfo, COL_INFO)) + col_append_fstr (actx->pinfo->cinfo, COL_INFO, "[Error: Unable to uncompress content]"); return offset; } tvb_set_child_real_data_tvbuff (tvb, next_tvb); - add_new_data_source (pinfo, next_tvb, "Uncompressed Content"); + add_new_data_source (actx->pinfo, next_tvb, "Uncompressed Content"); - dissect_x411_mts_apdu (next_tvb, pinfo, top_tree); + dissect_x411_mts_apdu (next_tvb, actx->pinfo, top_tree); #.END diff --git a/asn1/cdt/packet-cdt-template.c b/asn1/cdt/packet-cdt-template.c index 4a048aba4e..718c8e7b7f 100644 --- a/asn1/cdt/packet-cdt-template.c +++ b/asn1/cdt/packet-cdt-template.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "packet-ber.h" #include "packet-x411.h" -- cgit v1.2.3