Commit Graph

75 Commits

Author SHA1 Message Date
Michael Mann c7cbfac88d cleanup some unnecessary g_malloc calls
svn path=/trunk/; revision=44662
2012-08-25 00:39:17 +00:00
Michael Mann f929edfe09 Have strings use ephemeral memory. This dissector appears to need a massive overhaul to using proto_tree_add_item, but for now I'll settle for using ephemeral memory.
svn path=/trunk/; revision=44488
2012-08-14 15:36:13 +00:00
Michael Mann 175851fb40 Updated GSM dissectors display filters per checkfiltername.pl
Tried to provide consistency with GSM dissector (protocol) names, even if the filenames now don't match the dissector name.

svn path=/trunk/; revision=44162
2012-07-31 18:54:11 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Chris Maynard ec10e23c5b Fix memory leaks involving tvb_get_stringz() by replacing it with tvb_get_ephemeral_stringz().
svn path=/trunk/; revision=40730
2012-01-26 15:51:05 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier a70163fa5c All: Fix proto_tree_add_item() encoding parameter:
- Use 'ENC_(LITTLE|BIG)_ENDIAN' instead of locally defined 'bo_(little|big)_endian';
- Use ENC_NA for hf fields with type FT_NONE or FT_BYTES.

packet-wsp.c:
- #if 0 unused hf fields;
-Fix two minor bugs in "sir" dissection.

svn path=/trunk/; revision=39276
2011-10-05 19:21:48 +00:00
Bill Meier 781129806f Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39081
2011-09-21 17:49:11 +00:00
Bill Meier afae0c92ad Remove unneeded #includes.
svn path=/trunk/; revision=38338
2011-08-04 16:51:21 +00:00
Bill Meier f0cf1cbed7 Whitespace cleanup: convert mixture of "4 space" and "8 space" tabs to spaces.
svn path=/trunk/; revision=38337
2011-08-04 16:42:32 +00:00
Bill Meier 6d407e6490 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38335
2011-08-04 15:59:23 +00:00
Chris Maynard f16b234b84 Fix memory leak, using ep_alloc() instead of g_malloc().
svn path=/trunk/; revision=37923
2011-07-06 16:03:43 +00:00
Bill Meier 74bc83a85a Fix Bug #5624: "Unknown MMS multipart media is shown in the wrong subtree"
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5624

Do ti = proto_tree_add_text(...,...); yyy=proto_item_add_subtree(ti,...) in the usual manner.

svn path=/trunk/; revision=36039
2011-02-24 03:46:30 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Bill Meier 0ca948bacf Use value_string_ext fcns to access certain value_string arrays;
Some whitespace cleanup.

svn path=/trunk/; revision=34763
2010-11-03 18:28:35 +00:00
Bill Meier 09d718f723 Rename vals_status & vals_pdu_type to wsp_vals_status & wsp_vals_pdu_type
svn path=/trunk/; revision=34463
2010-10-10 20:45:19 +00:00
Jeff Morriss 3edbdc151d Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34229
2010-09-24 01:34:45 +00:00
Guy Harris 927b7da346 Have abs_time_to_str() and abs_time_to_str_secs() take an additional
argument indicating whether to include the time zone in the string.  If
we're constructing a display filter, don't include the time zone,
otherwise do.  Fixes bug 4756.

svn path=/trunk/; revision=32913
2010-05-21 06:33:25 +00:00
Bill Meier 69df32fb11 #include <string.h> not needed.
svn path=/trunk/; revision=32411
2010-04-06 22:09:47 +00:00
Guy Harris 500eb99cd9 Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
date as YYYY/DDD, where DDD is a 1-origin day of year.  Move the formats
to a "time_fmt.h" file, included by the headers that use it.  Have
abs_time_to_str() and abs_time_secs_to_str() take the date format value,
rather than a Boolean "show this as UTC" flag, as an argument.  Document
the ABSOLUTE_TIME_ formats a bit better.  Use that format in the CCSDS
and VCDU dissectors, rather than having those dissectors do the
formatting themselves.

svn path=/trunk/; revision=32034
2010-02-27 19:01:27 +00:00
Bill Meier 066ba23f0b Fix some gcc -Wshadow warnings
svn path=/trunk/; revision=31673
2010-01-26 01:00:15 +00:00
Guy Harris 9038fc7098 We do proto_item_append_string() all over the place; make the tree
visible at the top level.

svn path=/trunk/; revision=31460
2010-01-07 02:51:57 +00:00
Guy Harris 4fde145bd2 Add an argument to abs_time_to_str() and abs_time_secs_to_str()
indicating whether the time should be shown as local time or UTC.  For
now, always pass FALSE, meaning "show as local time".

Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str()
for times with one-second resolution, and update a comment in various
macros in the WSP dissector, while we're at it.

svn path=/trunk/; revision=31227
2009-12-10 22:19:29 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +00:00
Kovarththanan Rajaratnam ac463d2697 Don't guard col_clear with col_check
svn path=/trunk/; revision=29346
2009-08-09 08:14:59 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
Kovarththanan Rajaratnam 24ca3c44c9 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29341
2009-08-09 06:47:24 +00:00
Stig Bjørlykke 85c8e31574 From Kovarththanan Rajaratnam via bug 3548:
More header_field_info cleanup.

From me:
Don't fix the empty name for hf_nisplus_dummy.

svn path=/trunk/; revision=28792
2009-06-21 18:45:56 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Bill Meier 6f92b028aa Use some default true_false_string's.
svn path=/trunk/; revision=27983
2009-04-07 12:20:41 +00:00
Jaap Keuter 8b65a8f0bb Fix for bug 3071:
Incorrect address structure assigned for find_conversation()

svn path=/trunk/; revision=26809
2008-11-19 07:27:02 +00:00
Bill Meier a042c3aedd Small changes related to proto_register & proto_reg_handoff
- Move find_dissector_table(...) to proto_reg_handoff;
 - Use dissactor_add_handle instead of registering the dissector to tcp port 0;
 - Use find_dissector when appropriate.


svn path=/trunk/; revision=26767
2008-11-13 01:31:57 +00:00
Anders Broman c29d949834 From Shmulik Bezale:
gsm sms -> reassemble + wap support
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3004

svn path=/trunk/; revision=26607
2008-10-28 19:48:55 +00:00
Anders Broman fb3d2f316b Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25336
2008-05-21 05:52:12 +00:00
Bill Meier b42aec2948 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25308
2008-05-15 13:22:06 +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
Jaap Keuter f37c29c2f5 Use proto functions i.s.o. manipulating node data directly.
svn path=/trunk/; revision=23940
2007-12-23 14:18:27 +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
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Jaap Keuter 792e51d00a Attempt to fix bug 1360.
Remove calls to tvb_free on subsets, since this seems to upset the tvb administration(!?)

svn path=/trunk/; revision=21772
2007-05-14 20:55:11 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher 85a464c980 Fix a bunch of warnings, add svn:keywords Id and svn:eol-style native
to packet-iuup.c.
 

svn path=/trunk/; revision=21244
2007-03-28 07:06:39 +00:00
Ulf Lamping 81297cee31 fix various const warnings
svn path=/trunk/; revision=21139
2007-03-23 00:20:59 +00:00
Anders Broman 498f530dc4 From Reinhard Speyerer:
this patch adds support for Any-encoding (WSP, 8.4.2.9) and Any-language (WSP, 8.4.2.10)

svn path=/trunk/; revision=20014
2006-11-29 06:53:48 +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
Olivier Biot f0c3253d6e Fix coverity Error CID: 15.
svn path=/trunk/; revision=17553
2006-03-09 16:21:39 +00:00
Olivier Biot 5cd8dbd028 Fix Coverity issue CID: 14 in wkh_accept_encoding().
svn path=/trunk/; revision=17539
2006-03-08 22:52:31 +00:00
Olivier Biot e931881626 Use g_print() instead of fprintf() to write messages to the debug console.
svn path=/trunk/; revision=16373
2005-11-01 18:18:46 +00:00
Gerald Combs c975c8e67a Use tvb_free() instead of g_free() to free tvbuffs.
svn path=/trunk/; revision=16220
2005-10-14 15:55:58 +00:00
Olivier Biot 6f5e84b2d7 Fix bug 492 - the MMSE dissector calls add_content_type() defined in WSP, which
uses proto_item_append_string(). The visibility hack must be present, otherwise
a dissector assert is generated within the MMSE dissector.

svn path=/trunk/; revision=16060
2005-09-30 19:29:21 +00:00