Commit Graph

21 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
Bill Meier 91191c6c00 Fix some gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
(Code commented out since it may be required in the future (at least in some cases).

svn path=/trunk/; revision=37723
2011-06-20 01:13:21 +00:00
Jeff Morriss cdedb31e94 As suggested by Chris: use val_to_str_const() instead of match_strval() plus a
NULL-return check.

Use val_to_str_const instead of val_to_str() in a couple places where the string
is constant.

Use val_to_str() instead of blindly passing the return value from match_strval()
into a format routine (to ensure a non-NULL string pointer).  A couple of these
were cases where it could not actually return NULL, but I changed it for
consistency.

Store the return value of match_strval() rather than calling it repeatedly.

svn path=/trunk/; revision=37204
2011-05-17 18:58:40 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +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
Guy Harris cfe974aadd The expert_item pointers and expert_status values don't need to be
static; make them auto variables.

Make sure that expert information is added outside "if (tree) { }", so
it gets added even if we're not building the protocol tree.

Clean up white space.

svn path=/trunk/; revision=28281
2009-05-05 19:33:46 +00:00
Bill Meier c0e92cbc04 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27065
2008-12-20 00:09:02 +00:00
Bill Meier 33c99f44fd Fix typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27028
2008-12-17 00:08:38 +00:00
Bill Meier 186a69dd83 Fix several cases of writing to COL_PROTOCOL w/o checking first
svn path=/trunk/; revision=26645
2008-10-31 14:06:20 +00:00
Bill Meier 77b81b391b #include <prefs.h> not req'd
svn path=/trunk/; revision=26089
2008-08-25 22:06:20 +00:00
Ronnie Sahlberg a003f7cd8f fix two of iljas bugs
svn path=/trunk/; revision=18710
2006-07-11 03:19:15 +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
Anders Broman 6612fea2ae From greg Morris:
Fixes proper decoding of extended error 2 values
Also adds a number of additional error codes/values

svn path=/trunk/; revision=16573
2005-11-23 21:27:39 +00:00
Gilbert Ramirez 804c13c213 From Greg Morris:
Updates to the NMAS dissector.
 
1. Fixes error checking fragments
2. Adds expert data


svn path=/trunk/; revision=16268
2005-10-19 14:39:09 +00:00
Gerald Combs 6c530b42b3 From Greg Morris: Improve malformed packet handling.
svn path=/trunk/; revision=13034
2005-01-14 17:09:11 +00:00
Guy Harris 4b3a0e98a5 From Greg Morris:
support 6 additional login message verbs;

	correct a problem with displaying proper return code values in
	the reply packets.

Clean up white space.

Use "tvb_reported_length_remaining()" instead of
"tvb_length_remaining()", and don't use either one to avoid throwing an
exception on a short or malformed packet.

Use "val_to_str()" rather than "match_strval()", so we don't crash if a
value happens not to be valid.

svn path=/trunk/; revision=12503
2004-11-10 10:03:42 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +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