Commit Graph

31 Commits

Author SHA1 Message Date
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 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 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
Stig Bjørlykke cf33ab117d Dissect some op codes.
svn path=/trunk/; revision=38770
2011-08-29 07:35:53 +00:00
Stig Bjørlykke 3890c88de5 Improved heuristics.
Corrected check for absurdly large values in for-loops,
as remaining data may be 0.

svn path=/trunk/; revision=38769
2011-08-29 07:35:44 +00:00
Jörg Mayer fcd99cf8e7 Stengthen the heuristics a bit (aka don't misclassify some of
my capture data as rpcap). Someone with more knowledge of the
format might want to look at this (I added FIXMEs).

svn path=/trunk/; revision=38754
2011-08-27 11:06:50 +00:00
Stig Bjørlykke ba2aae0f8e Use ENC_NA as encoding for FT_PROTOCOL, FT_NONE and FT_BYTES.
svn path=/trunk/; revision=38122
2011-07-19 18:48:31 +00:00
Stig Bjørlykke f282154ab0 Use correct encoding for proto_tree_add_item().
svn path=/trunk/; revision=38107
2011-07-19 10:51:12 +00:00
Bill Meier 3f7e7672c9 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38095
2011-07-18 19:11:32 +00:00
Stig Bjørlykke c026f4b01c Avoid absurdly large values used in for-loops.
svn path=/trunk/; revision=37842
2011-06-30 09:31:11 +00:00
Stig Bjørlykke 958919b8ca Strengthen heuristics for Packets.
This fixes bug 6073.

svn path=/trunk/; revision=37828
2011-06-29 07:02:04 +00:00
Guy Harris c5a413c569 Don't return an offset that you won't later use.
The length fields in a pcap_pkthdr are unsigned, so presumably the
equivalent fields in the rpcap protocol are also unsigned.

Make sure the captured data length isn't bigger than the remaining data
in the packet before attempting to construct a tvbuff for the packet
data.  If it is, report that as an error, and don't even try to
construct the tvbuff; that'll fail.  This fixes bug 6073.

svn path=/trunk/; revision=37826
2011-06-29 05:21:10 +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
Jeff Morriss 0ff5638f37 Replace blurbs that match the name (case insensitive) with NULL.
svn path=/trunk/; revision=34227
2010-09-23 21:46:31 +00:00
Anders Broman 440c3f9261 From Didier Gautheron:
check_col.diff
Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394

svn path=/trunk/; revision=31519
2010-01-13 20:32:01 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Stig Bjørlykke 2a6f8f21fc From Barry Miller via bug 4258:
Include sys/types.h to make it compile on OpenBSD 4.5.

svn path=/trunk/; revision=31051
2009-11-23 08:47:25 +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
Bill Meier d4e1095f54 Reword some help text slightly.
svn path=/trunk/; revision=29274
2009-08-03 16:21:55 +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
Stig Bjørlykke 94efc8a9c7 Removed unused rpcap_handle.
svn path=/trunk/; revision=27597
2009-03-03 22:04:44 +00:00
Bill Meier 19098177f3 Remove unneeded/incorrect properties
svn path=/trunk/; revision=27116
2008-12-26 17:02:08 +00:00
Bill Meier f0dbc63956 A few trivial changes related to proto_reg_handoff;
Also: Fix Emacs "file variable" to have a "safe" value:
 That is: indent-tabs-mode: tabs --> indent-tabs-mode: t

svn path=/trunk/; revision=26912
2008-12-04 17:10:51 +00:00
Stig Bjørlykke 130a59e567 Improved the msg_type and msg_value heur checks.
svn path=/trunk/; revision=26865
2008-11-27 16:41:44 +00:00
Stig Bjørlykke d014842509 Added an option to turn off content decoding, as this does not always work
correctly until we fix bug 2345.

svn path=/trunk/; revision=26795
2008-11-17 14:49:59 +00:00
Stig Bjørlykke a31012717f Added some expert infos.
svn path=/trunk/; revision=26758
2008-11-12 08:17:52 +00:00
Stig Bjørlykke 0e4ea8980b Simplified "info added" check.
svn path=/trunk/; revision=26713
2008-11-06 21:34:31 +00:00
Stig Bjørlykke e35859e118 Added TCP segment reassembly.
Only add one RPCAP entry to the Protocol and Info column.
Fixed some tree entry lengths.
Added packet frame number to the top tree entry.

svn path=/trunk/; revision=26708
2008-11-06 15:31:25 +00:00
Stig Bjørlykke b59b89dc5e Made rpcap heuristic.
svn path=/trunk/; revision=26701
2008-11-05 16:08:34 +00:00
Stig Bjørlykke 1d035a0542 Added support for RPCAP message formats.
svn path=/trunk/; revision=26633
2008-10-30 21:22:50 +00:00