An old proposal from Martin, append to COL_PROTO the name taken from a matching DTD (in case the media-type actually matches it). Having the name of the root element found would be nicer.

svn path=/trunk/; revision=22483
This commit is contained in:
Luis Ontanon 2007-08-10 21:03:26 +00:00
parent 8ae37d9391
commit d7b9378232
2 changed files with 11 additions and 5 deletions

View File

@ -1,9 +1,10 @@
<? wireshark:protocol
proto_name="presence"
description="presence XML doc (RFC 3863)"
media="application/cpim-pidf+xml"
hierarchy="yes" ?>
<!--
$Id:$
$Id$
-->

View File

@ -182,10 +182,8 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvbparse_elem_t* tok = NULL;
static GPtrArray* stack = NULL;
xml_frame_t* current_frame;
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_append_str(pinfo->cinfo, COL_PROTOCOL, "/XML");
char* colinfo_str;
if(!tree) return;
if (stack != NULL)
@ -205,8 +203,15 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (! root_ns ) {
root_ns = &xml_ns;
colinfo_str = "/XML";
} else {
colinfo_str = ep_strdup_printf("/%s",root_ns->name);
g_strup(colinfo_str);
}
if (check_col(pinfo->cinfo, COL_PROTOCOL))
col_append_str(pinfo->cinfo, COL_PROTOCOL, colinfo_str);
current_frame->ns = root_ns;
current_frame->item = proto_tree_add_item(tree,current_frame->ns->hf_tag,tvb,0,-1,FALSE);