forked from osmocom/wireshark
d00c2baf5c
svn path=/trunk/; revision=28974
114 lines
3.2 KiB
INI
114 lines
3.2 KiB
INI
# cdt.cnf
|
|
# Compressed Data Type conformation file
|
|
|
|
# $Id$
|
|
|
|
#.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 (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;
|
|
proto_item *tf = NULL;
|
|
int save_offset = offset;
|
|
|
|
%(DEFAULT_BODY)s
|
|
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 (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
|
|
"Unable to get compressed content");
|
|
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_length (compr_tvb));
|
|
|
|
if (next_tvb == NULL) {
|
|
tf = proto_tree_add_text (top_tree, tvb, save_offset, -1,
|
|
"[Error: Unable to uncompress content]");
|
|
expert_add_info_format (actx->pinfo, tf, PI_UNDECODED, PI_ERROR,
|
|
"Unable to uncompress content");
|
|
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_dissector (data_handle, 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_x411_mts_apdu (next_tvb, actx->pinfo, top_tree);
|
|
break;
|
|
default:
|
|
call_dissector (data_handle, next_tvb, actx->pinfo, top_tree);
|
|
break;
|
|
}
|
|
|
|
#.END
|