# cdt.cnf # Compressed Data Type conformation file #.EXPORTS CompressedData #.REGISTER CompressedData B "1.3.26.0.4406.0.4.2" "cdt" #.FN_BODY CompressedData content_type = 0; %(DEFAULT_BODY)s #.FN_PARS AlgorithmID-ShortForm VAL_PTR = &value #.FN_BODY AlgorithmID-ShortForm guint32 value; %(DEFAULT_BODY)s proto_item_append_text (cdt_item, ", %%s", val_to_str (value, cdt_AlgorithmID_ShortForm_vals, "unknown")); col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", val_to_str (value, cdt_AlgorithmID_ShortForm_vals, "unknown")); #.FN_PARS ContentType-ShortForm VAL_PTR = &content_type #.FN_BODY ContentType-ShortForm %(DEFAULT_BODY)s proto_item_append_text (cdt_item, ", %%s", val_to_str (content_type, cdt_ContentType_ShortForm_vals, "unknown")); col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", val_to_str (content_type, cdt_ContentType_ShortForm_vals, "unknown")); #.FN_PARS CompressedContentInfo/contentType/contentType-OID FN_VARIANT = _str VAL_PTR = &obj_id #.FN_BODY CompressedContentInfo/contentType/contentType-OID const char *obj_id = NULL; %(DEFAULT_BODY)s if (obj_id) { const char *name = oid_resolved_from_string (wmem_packet_scope(), obj_id); if (!name) { name = obj_id; } proto_item_append_text (cdt_item, ", %%s", name); col_append_fstr (actx->pinfo->cinfo, COL_INFO, "%%s ", name); } #.FN_PARS CompressedContent VAL_PTR = &compr_tvb #.FN_BODY CompressedContent tvbuff_t *next_tvb = NULL, *compr_tvb = NULL; int save_offset = offset; %(DEFAULT_BODY)s if (compr_tvb == NULL) { proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_compress_content, tvb, save_offset, -1); col_append_str (actx->pinfo->cinfo, COL_INFO, "[Error: Unable to get compressed content]"); return offset; } next_tvb = tvb_child_uncompress (tvb, compr_tvb, 0, tvb_reported_length (compr_tvb)); if (next_tvb == NULL) { proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_uncompress_content, tvb, save_offset, -1); col_append_str (actx->pinfo->cinfo, COL_INFO, "[Error: Unable to uncompress content]"); return offset; } add_new_data_source (actx->pinfo, next_tvb, "Uncompressed Content"); switch (content_type) { case CDT_UNDEFINED: call_data_dissector(next_tvb, actx->pinfo, top_tree); break; case CDT_EXTERNAL: dissect_unknown_ber (actx->pinfo, next_tvb, 0, top_tree); break; case CDT_P1: dissect_p1_mts_apdu (next_tvb, actx->pinfo, top_tree, NULL); break; default: call_data_dissector(next_tvb, actx->pinfo, top_tree); break; } #.END