Commit Graph

55 Commits

Author SHA1 Message Date
Anders Broman 8e7599022d More size_t casts.
svn path=/trunk/; revision=27882
2009-03-29 14:37:57 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Tomas Kukosa 5b96cb0506 - add attributes and CDATA into XML structure
- implement functions for searching in XML structure

svn path=/trunk/; revision=27316
2009-01-28 11:25:39 +00:00
Bill Meier 7280c469a3 Fix some spelling/typos
svn path=/trunk/; revision=27024
2008-12-16 14:18:55 +00:00
Stig Bjørlykke 58e2d7a0d6 Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26649
2008-10-31 15:47:47 +00:00
Tomas Kukosa 1e9ab739c3 put original tag name (not lowercase) into dissected xml structure too
dissect xml even if tree is null

svn path=/trunk/; revision=26261
2008-09-24 10:42:24 +00:00
Bill Meier 82affdc4df Fix indentation to be consistent
svn path=/trunk/; revision=26194
2008-09-15 02:05:26 +00:00
Guy Harris 9d1b5335ac g_ascii_strdown() and g_ascii_strup(), unlike g_strdown() and g_strup(),
do *not* modify the string handed to them - they g_mallocate a new
string and return it.

Create routines that *do* ASCII-only case mapping in place, and use them
instead.

Clean up indentation.

svn path=/trunk/; revision=26131
2008-09-03 19:14:52 +00:00
Tomas Kukosa 39515048dc supply dissected XML structure to caller dissector
svn path=/trunk/; revision=26005
2008-08-13 15:19:08 +00:00
Stig Bjørlykke 22ff43e0bd Fix a typo: strl -> strlen
svn path=/trunk/; revision=25263
2008-05-09 12:55:37 +00:00
Anders Broman 1cc7c72db6 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25261
2008-05-09 11:59:44 +00:00
Anders Broman 45b8ffd1ec Remove depreciated functions g_string_sprint, g_string_sprintfa.
svn path=/trunk/; revision=25238
2008-05-05 19:52:59 +00:00
Anders Broman 63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Jeff Morriss 1d6df91a9d get_datafile_path() and get_persconffile_path() return malloc'd memory,
free it when we're done with the file name.

svn path=/trunk/; revision=24479
2008-02-26 19:52:21 +00:00
Tomas Kukosa 60c8859857 Allow UDP heuristic for XML
svn path=/trunk/; revision=24468
2008-02-26 08:10:46 +00:00
Stig Bjørlykke a2d1e9005d This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files.

This can be found in the "Configuration Profiles..." menu item from the Edit
menu, or by pressing Shift-Ctrl-A.  It's also possible to start wireshark
and tshark with a named profile by using the "-C ProfileName" option.
A new status pane in the main window will show the current profile.

The configuration files currently stored in the Profiles are:
- Preferences
- Capture Filters
- Display Filters
- Coloring Rules
- Disabled Protocols
- User Accessible Tables

The recent data are by design not added to the profile.

Planned future enhancements:
- make a more convenient function to switch between profiles
- add a "clone profile" button to copy an existing profile
- make the profiles list active and accept return as OK
- save users "Decode as" in the profile
- make new, clone and deletion of profiles more secure
- make some of the recent values available in the profile

This patch also fixes:
- setting default status pane sizes
- a bug setting status pane for packets when not having main lower pane.

svn path=/trunk/; revision=24089
2008-01-14 16:40:23 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Mike Duigou 07166afb69 From Yaniv Kaul :
Adds application/rss+xml mime type as a recognized XML type. It is used by some RSS servers.


svn path=/trunk/; revision=23465
2007-11-15 23:59:54 +00:00
Anders Broman e2111375a0 Use the media_type_dissector_table for the content type.
Add a few media types.

svn path=/trunk/; revision=23268
2007-10-24 21:47:13 +00:00
Luis Ontanon d7b9378232 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
2007-08-10 21:03:26 +00:00
Anders Broman 16e3bf0476 Add more XCAP application types.
svn path=/trunk/; revision=22471
2007-08-08 19:50:39 +00:00
Luis Ontanon 4238415deb Remove XML heuristic dissector when disabling it.
svn path=/trunk/; revision=22465
2007-08-07 23:07:27 +00:00
Luis Ontanon f7cdc0be31 Add preferences to register XML for a TCP port or as a TCP heuristic dissector.
svn path=/trunk/; revision=22454
2007-08-04 14:20:37 +00:00
Guy Harris 1d73cea470 Add a header that redefines g_array_index() to throw in a "void *" cast
to work around the "data" field of a GArray being a guint8 *, and
defines a g_array_data() macro to extract that field and cast it to void
*.

Use that header where needed.

svn path=/trunk/; revision=21627
2007-04-30 19:24:25 +00:00
Ronnie Sahlberg d5d5159b6d From Sebastien Tandel
fixes for various compiler warnings

svn path=/trunk/; revision=21210
2007-03-26 11:06:26 +00:00
Luis Ontanon ca6a9a7d13 solve both issues pointed out in:
http://wireshark.org/lists/ethereal-dev/200605/msg02351.html

- dtd_parse.l:
   be more liberal on what a name can be (a number now can be a name)

- packet-xml.c
  if proto-name is given use it instead of the root element name as prefix for generated fields


svn path=/trunk/; revision=19903
2006-11-15 18:40:37 +00:00
Anders Broman 83971ab494 Add application/media_control+xml
svn path=/trunk/; revision=19408
2006-10-03 18:04:15 +00:00
Luis Ontanon 87d6b997c6 From Mike Digou:
- free the right object.


svn path=/trunk/; revision=18774
2006-07-20 17:32:10 +00:00
Gerald Combs 7976c442db Fix a few format string bugs found by Ilja van Sprundel.
svn path=/trunk/; revision=18677
2006-07-07 00:45:54 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Anders Broman 56f73049b9 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
2006-05-16 19:04:53 +00:00
Anders Broman 4447785ed7 Add some more Media types.
svn path=/trunk/; revision=17927
2006-04-20 15:24:04 +00:00
Anders Broman 7fcc6f767b Add some applications
svn path=/trunk/; revision=17910
2006-04-19 18:58:13 +00:00
Luis Ontanon 009b5f7d29 From ENDOH Akira:
Add heuristic dissection of XML to SIP bodies with unknown media_type.


svn path=/trunk/; revision=17247
2006-02-11 00:13:23 +00:00
Luis Ontanon 0bb1b874ec Add heuristic dissection of XML
svn path=/trunk/; revision=17228
2006-02-09 13:05:32 +00:00
Luis Ontanon ba58e57a41 Fixes bug 717
Tag names with digits were not recognized.


svn path=/trunk/; revision=17128
2006-01-30 22:43:08 +00:00
Jörg Mayer 9575877bb7 packet-radius.c, packet-xml.c:
Fix a memory leak found by valgrind:
        Although dir isn't a directory it may still use memory

packet-xml.c:
        Reformat the relevant function in packet-xml.c to be readable on systems
        where a tab is 8 spaces.

svn path=/trunk/; revision=16865
2005-12-20 08:35:53 +00:00
Jörg Mayer eff40f65db Trivial warning fixes
svn path=/trunk/; revision=16561
2005-11-22 12:51:14 +00:00
Anders Broman e91462a7d8 Add "application/resource-lists+xml" to xml types
svn path=/trunk/; revision=16374
2005-11-01 19:50:25 +00:00
Luis Ontanon f35f5e317e do not free the element name, as its been passed to the hf array.
svn path=/trunk/; revision=16154
2005-10-07 17:59:13 +00:00
Luis Ontanon f1b498587b remove location from dtd_build_data_t avoiding to (double) free it.
svn path=/trunk/; revision=16147
2005-10-06 22:01:52 +00:00
Luis Ontanon c6ed07b117 tvbparse.[ch]:
- add a tvbparse_handle() (for recursion)
- change tvbparse_until() to allow more control when parsing
- make the wanted control an union so that different types of data can be used

packet-xml.c:
- change the parser definition to match changes to tvbparse_until()


svn path=/trunk/; revision=16045
2005-09-28 21:32:47 +00:00
Luis Ontanon 02a506e15f make sure we tell tvbparse_until() to include the last token.
svn path=/trunk/; revision=16033
2005-09-28 01:17:45 +00:00
Luis Ontanon 95d60cc7ea in tvbparse:
- tvbparse_some now handles 0 items.
  - added accessors for a tt's offset and remaining length.

in packet-xml:
  - min_len=0 for tvbparse_chars() is soon going to mean zero instead of 1 change the 0s to 1s.
  - attribute names can have ':' even if it's namespaces isn't managed yet.
  - split the xml grammar in more elements so It can be actually read by a human being.


svn path=/trunk/; revision=16031
2005-09-27 22:57:07 +00:00
Luis Ontanon 3cf75fd6bb get rid of most dtd leaks.
There's just one left I'm aware of (the doctype name).


svn path=/trunk/; revision=15990
2005-09-24 19:03:35 +00:00
Ulf Lamping a9e1c71b7a bugfix: don't crash, if current_frame->ns == NULL
svn path=/trunk/; revision=15967
2005-09-22 21:18:19 +00:00
Luis Ontanon 88dd585d23 in register_dtd() do not leak the elements hash
svn path=/trunk/; revision=15959
2005-09-22 16:41:53 +00:00
Gerald Combs 71f16f2a3f If pinfo->match_string is null (e.g. when we're called from the Jabber
dissector), don't try to look it up in a hash table.  Fixes the current
Buildbot failure.

svn path=/trunk/; revision=15929
2005-09-21 15:03:19 +00:00