forked from osmocom/wireshark
From Martin Mathieson:
- adds application/xpidf+xml as a media type known to be xml - appends /xml to the protocol column (as SDP does). It would be nice to append the top-level element, or the name taken from a matching DTD, but this will do for now (at least its a short name). - corrects the help text for the preference. I can see that it is registered as a heuristic for "http", "sip" and "media" I've also included a slightly updated version of reginfo.dtd (RFC 3680) for the dtds folder. svn path=/trunk/; revision=18173
This commit is contained in:
parent
103ad0253f
commit
56f73049b9
|
@ -0,0 +1,41 @@
|
||||||
|
<? ethereal:protocol
|
||||||
|
proto_name="reginfo"
|
||||||
|
description="Reginfo XML doc (RFC 3680)"
|
||||||
|
hierarchy="yes" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
$Id$
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!ELEMENT reginfo (registration)* >
|
||||||
|
<!ATTLIST reginfo xmlns CDATA #REQUIRED
|
||||||
|
version CDATA #REQUIRED
|
||||||
|
state CDATA #REQUIRED>
|
||||||
|
|
||||||
|
<!ELEMENT registration (contact)*>
|
||||||
|
<!ATTLIST registration aor CDATA #REQUIRED
|
||||||
|
id CDATA #REQUIRED
|
||||||
|
state CDATA #REQUIRED>
|
||||||
|
|
||||||
|
<!ELEMENT contact (uri | display-name? | unknown-param?)* >
|
||||||
|
<!ATTLIST contact id CDATA #REQUIRED
|
||||||
|
state CDATA #REQUIRED
|
||||||
|
event CDATA #REQUIRED
|
||||||
|
expires CDATA #IMPLIED
|
||||||
|
retry-after CDATA #IMPLIED
|
||||||
|
duration-registered CDATA #IMPLIED
|
||||||
|
q CDATA #IMPLIED
|
||||||
|
cseq CDATA #IMPLIED
|
||||||
|
callid CDATA #IMPLIED>
|
||||||
|
|
||||||
|
<!ELEMENT uri (#PCDATA)>
|
||||||
|
|
||||||
|
<!ELEMENT display-name (#PCDATA)>
|
||||||
|
<!ATTLIST display-name lang CDATA #IMPLIED>
|
||||||
|
|
||||||
|
<!ELEMENT unknown-param (#PCDATA)>
|
||||||
|
<!ATTLIST unknown-param name CDATA #REQUIRED>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -160,6 +160,7 @@ static const gchar* default_media_types[] = {
|
||||||
"application/xcap-error+xml",
|
"application/xcap-error+xml",
|
||||||
"application/xml",
|
"application/xml",
|
||||||
"application/xml-dtd",
|
"application/xml-dtd",
|
||||||
|
"application/xpidf+xml",
|
||||||
"application/xslt+xml",
|
"application/xslt+xml",
|
||||||
"image/svg+xml",
|
"image/svg+xml",
|
||||||
};
|
};
|
||||||
|
@ -171,7 +172,10 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||||
tvbparse_elem_t* tok = NULL;
|
tvbparse_elem_t* tok = NULL;
|
||||||
static GPtrArray* stack = NULL;
|
static GPtrArray* stack = NULL;
|
||||||
xml_frame_t* current_frame;
|
xml_frame_t* current_frame;
|
||||||
|
|
||||||
|
if (check_col(pinfo->cinfo, COL_PROTOCOL))
|
||||||
|
col_append_str(pinfo->cinfo, COL_PROTOCOL, "/XML");
|
||||||
|
|
||||||
if(!tree) return;
|
if(!tree) return;
|
||||||
|
|
||||||
if (stack != NULL)
|
if (stack != NULL)
|
||||||
|
@ -1118,7 +1122,7 @@ static void init_xml_names(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (test_for_directory(dirname) == EISDIR) {
|
if (test_for_directory(dirname) == EISDIR) {
|
||||||
|
|
||||||
if ((dir = OPENDIR_OP(dirname)) != NULL) {
|
if ((dir = OPENDIR_OP(dirname)) != NULL) {
|
||||||
while ((file = DIRGETNEXT_OP(dir)) != NULL) {
|
while ((file = DIRGETNEXT_OP(dir)) != NULL) {
|
||||||
guint namelen;
|
guint namelen;
|
||||||
|
@ -1216,7 +1220,7 @@ proto_register_xml(void) {
|
||||||
|
|
||||||
xml_module = prefs_register_protocol(xml_ns.hf_tag,apply_prefs);
|
xml_module = prefs_register_protocol(xml_ns.hf_tag,apply_prefs);
|
||||||
prefs_register_bool_preference(xml_module, "heuristic", "Use Heuristics",
|
prefs_register_bool_preference(xml_module, "heuristic", "Use Heuristics",
|
||||||
"Try to recognize XML for unknown HTTP media types",
|
"Try to recognize XML for unknown media types",
|
||||||
&pref_heuristic);
|
&pref_heuristic);
|
||||||
|
|
||||||
g_array_free(hf_arr,FALSE);
|
g_array_free(hf_arr,FALSE);
|
||||||
|
|
Loading…
Reference in New Issue