2 # Compressed Data Type conformation file
8 CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
10 #.FN_BODY CompressedData
15 #.FN_PARS AlgorithmID-ShortForm
18 #.FN_BODY AlgorithmID-ShortForm
22 proto_item_append_text (cdt_item, ", %%s",
23 val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
26 col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ",
27 val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
30 #.FN_PARS ContentType-ShortForm
31 VAL_PTR = &content_type
33 #.FN_BODY ContentType-ShortForm
36 proto_item_append_text (cdt_item, ", %%s",
37 val_to_str (content_type, cdt_ContentType_ShortForm_vals,
40 col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ",
41 val_to_str (content_type, cdt_ContentType_ShortForm_vals,
44 #.FN_PARS CompressedContentInfo/contentType/contentType-OID
45 FN_VARIANT = _str VAL_PTR = &obj_id
47 #.FN_BODY CompressedContentInfo/contentType/contentType-OID
48 const char *obj_id = NULL;
52 const char *name = oid_resolved_from_string (actx->pinfo->pool, obj_id);
58 proto_item_append_text (cdt_item, ", %%s", name);
60 col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", name);
63 #.FN_PARS CompressedContent
66 #.FN_BODY CompressedContent
67 tvbuff_t *next_tvb = NULL, *compr_tvb = NULL;
68 int save_offset = offset;
71 if (compr_tvb == NULL) {
72 proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_compress_content,
73 tvb, save_offset, -1);
74 col_append_str (actx->pinfo->cinfo, COL_INFO,
75 "[Error: Unable to get compressed content]");
79 next_tvb = tvb_child_uncompress_zlib(tvb, compr_tvb, 0, tvb_reported_length (compr_tvb));
81 if (next_tvb == NULL) {
82 proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_uncompress_content,
83 tvb, save_offset, -1);
84 col_append_str (actx->pinfo->cinfo, COL_INFO,
85 "[Error: Unable to uncompress content]");
89 add_new_data_source (actx->pinfo, next_tvb, "Uncompressed Content");
91 switch (content_type) {
93 call_data_dissector(next_tvb, actx->pinfo, top_tree);
96 dissect_unknown_ber (actx->pinfo, next_tvb, 0, top_tree);
99 dissect_p1_mts_apdu (next_tvb, actx->pinfo, top_tree, NULL);
102 call_data_dissector(next_tvb, actx->pinfo, top_tree);