An old proposal from Martin, append to COL_PROTO the name taken from a matching DTD...
authorlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 10 Aug 2007 21:03:26 +0000 (21:03 +0000)
committerlego <lego@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 10 Aug 2007 21:03:26 +0000 (21:03 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@22483 f5534014-38df-0310-8fa8-9805f1628bb7

dtds/presence.dtd
epan/dissectors/packet-xml.c

index 49c4543451a544eb5b0eb6631b960e3fbaebb527..4e5c42b662ce9d55ff4610b07178f03bfe28ed5a 100644 (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$
 -->
 
 
index fceb4be553c89c212aad775ff40e7b17b0116000..6d9a14a052c20bffe9e0cd9966034bc399d87404 100644 (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);