aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/cdt/cdt.cnf
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-11-23 07:24:18 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-11-23 07:24:18 +0000
commit704e12625318ce9cc26ca7155d249f53fc5ed077 (patch)
treef1f054fab595f0d36e337353101b7087df418c62 /asn1/cdt/cdt.cnf
parentc845a16144afc52fd333cfed3753388758d03229 (diff)
Add cdt
svn path=/trunk/; revision=16564
Diffstat (limited to 'asn1/cdt/cdt.cnf')
-rw-r--r--asn1/cdt/cdt.cnf97
1 files changed, 97 insertions, 0 deletions
diff --git a/asn1/cdt/cdt.cnf b/asn1/cdt/cdt.cnf
new file mode 100644
index 0000000000..e7e1ee8ae1
--- /dev/null
+++ b/asn1/cdt/cdt.cnf
@@ -0,0 +1,97 @@
+# cdt.cnf
+# Compressed Data Type conformation file
+
+# $Id$
+
+#.EXPORTS
+CompressedData
+
+#.REGISTER
+CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
+
+#.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"));
+
+ if (check_col (pinfo->cinfo, COL_INFO))
+ col_append_fstr (pinfo->cinfo, COL_INFO, "%%s ",
+ val_to_str (value, cdt_AlgorithmID_ShortForm_vals,
+ "unknown"));
+
+#.FN_PARS ContentType_ShortForm
+ VAL_PTR = &value
+
+#.FN_BODY ContentType_ShortForm
+ guint32 value;
+
+ %(DEFAULT_BODY)s
+ proto_item_append_text (cdt_item, ", %%s",
+ val_to_str (value, cdt_ContentType_ShortForm_vals,
+ "unknown"));
+
+ if (check_col (pinfo->cinfo, COL_INFO))
+ col_append_fstr (pinfo->cinfo, COL_INFO, "%%s ",
+ val_to_str (value, cdt_ContentType_ShortForm_vals,
+ "unknown"));
+
+#.FN_PARS OBJECT_IDENTIFIER
+ FN_VARIANT = _str VAL_PTR = &obj_id
+
+#.FN_BODY OBJECT_IDENTIFIER
+ const char *obj_id = NULL;
+
+ %(DEFAULT_BODY)s
+ if (obj_id) {
+ const char *name = get_ber_oid_name (obj_id);
+
+ if (!name) {
+ name = obj_id;
+ }
+
+ proto_item_append_text (cdt_item, ", %%s", name);
+
+ if (check_col (pinfo->cinfo, COL_INFO))
+ col_append_fstr (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_text (top_tree, tvb, save_offset, -1,
+ "[Error: Unable to get compressed content]");
+ if (check_col (pinfo->cinfo, COL_INFO))
+ col_append_fstr (pinfo->cinfo, COL_INFO,
+ "[Error: Unable to get compressed content]");
+ return offset;
+ }
+
+ next_tvb = tvb_uncompress (compr_tvb, 0, tvb_length (compr_tvb));
+
+ if (next_tvb == NULL) {
+ proto_tree_add_text (top_tree, tvb, save_offset, -1,
+ "[Error: Unable to uncompress content]");
+ if (check_col (pinfo->cinfo, COL_INFO))
+ col_append_fstr (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");
+
+ dissect_x411_mts_apdu (next_tvb, pinfo, top_tree);
+
+#.END