Commit Graph

22 Commits

Author SHA1 Message Date
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Gerald Combs 7b254f46fb Fix some Visual C++ static analyzer complaints.
svn path=/trunk/; revision=35971
2011-02-17 01:11:05 +00:00
Jeff Morriss 8d32d2066a There's no need to pass the result of tvb_get_ptr() as the 'value' in
proto_tree_add_*(): just use proto_tree_add_item().

Replace some tvb_get_ptr()s with tvb_get_ephemeral_string() or
tvb_get_const_stringz().

Use tvb_memeql() & tvb_memcmp().

svn path=/trunk/; revision=35558
2011-01-16 20:51:21 +00:00
Jeff Morriss cca3ba3ce2 (Refining the regexp...) Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34230
2010-09-24 02:51:40 +00:00
Stig Bjørlykke 5fa0e7b607 Removed some unused variables.
svn path=/trunk/; revision=30902
2009-11-09 15:17:14 +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
Jaap Keuter 5ff944b8ae From Reinhard Speyerer:
This patch fixes several misspellings/typos in Wireshark SVN revision 28201.

svn path=/trunk/; revision=28216
2009-05-01 07:14:44 +00:00
Anders Broman caf80bbb74 More size_t casts.
svn path=/trunk/; revision=27888
2009-03-29 21:20:15 +00:00
Bill Meier b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +00:00
Guy Harris 83fc9d5e09 Constify a bunch of stuff, to squelch -Wwrite-strings warnings.
epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're not
ready to enable that warning by default yet.

Throw in some casts to handle GLib routines that take arbitrary
non-const pointers (they can later return the pointers, and some
callers might want to modify or free up those pointers in cases where
they're known to be writable or allocated).

Use ep_tvb_memdup() rather than a combination of ep_alloc() and
tvb_memcpy().

Clean up some indentation.

svn path=/trunk/; revision=25601
2008-06-25 09:12:35 +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 8dabc0ded1 Fix some more warnings under gcc 4.0
svn path=/trunk/; revision=21237
2007-03-27 23:14:13 +00:00
Gerald Combs 8b315480f1 In new_format_oid(), handle a zero-length OID.
Fix a bug introduced recently in packet-rpc.c.

Replace DISSECTOR_ASSERT() with THROW(ReportedBoundsError) in my recent 
checkins, since fuzz-test.sh sets WIRESHARK_ABORT_ON_DISSECTOR_BUG.

svn path=/trunk/; revision=18693
2006-07-09 22:12:02 +00:00
Ulf Lamping 515562005d add missing #include <epan/emem.h> to fix a related warning
svn path=/trunk/; revision=18684
2006-07-07 21:01:01 +00:00
Gerald Combs bbc5a76517 Fix more bugs found by Ilja van Sprundel.
packet-mount.c:
  Don't allocate a huge amount of memory.

packet-ntp.c:
  Fix a possible format string bug.

packet-ndps.c:
packet-nmas.c:
  Fix an off-by-one buffer error.

svn path=/trunk/; revision=18678
2006-07-07 04:01:09 +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
Ronnie Sahlberg 6aa7909d79 get rid of some strcpy
svn path=/trunk/; revision=16340
2005-10-27 09:48:19 +00:00
Ronnie Sahlberg 8df0e21fba prettify mount,
if MNT fails with an error,   put the error string in the INFO column


svn path=/trunk/; revision=16076
2005-10-03 09:30:10 +00:00
Ronnie Sahlberg e7d5fbaeff prettify MNT (and friends) by placing the path in COL_INFO
svn path=/trunk/; revision=15373
2005-08-16 07:49:03 +00:00
Ronnie Sahlberg 6aaaedd633 we no longer need to g_free() teh string returned by dissect_rpc_string.
when checking the calls in packet-ndmp.c  we must have had a memleak there since it never freed those strings.



svn path=/trunk/; revision=15005
2005-07-23 00:22:02 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00