Commit Graph

36 Commits

Author SHA1 Message Date
Michael Mann b38ee917b1 Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly.
The script didn't catch as many as I would have liked, but it's a start.

The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum.

svn path=/trunk/; revision=52045
2013-09-15 01:48:30 +00:00
Alexis La Goutte e7316b7770 Move Do not clear / Clear & Confirmed / Unconfirmed TFS to epan/tfs.[ch]
svn path=/trunk/; revision=50695
2013-07-17 10:44:26 +00:00
Alexis La Goutte 4c34d30a35 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=50631
2013-07-15 18:06:19 +00:00
Michael Mann 0f0c111119 Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49920
2013-06-14 01:02:11 +00:00
Anders Broman 6bde918078 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48426
2013-03-19 20:00:52 +00:00
Bill Meier 3c0d6b8260 General minor cleanup:
- create/use several extended value strings;
- remove unneeded #includes;
- remove unneeded code & variable initializers;
- convert "4 space tabs" to spaces;
- do some reformatting to use a consistent whitespace style.

svn path=/trunk/; revision=46347
2012-12-03 17:28:43 +00:00
Michael Mann 5cb75e808d replaced decode_boolean_bitfield, decode_numeric_bitfield, and decode_enumerated_bitfield calls with itemized filters
svn path=/trunk/; revision=45135
2012-09-25 18:41:41 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Michael Mann 7da7443c00 length check "heuristics" for FF dissector (UDP + TCP)
Fix compiler error

"Fix" WTP+WSP packets incorrectly dissected as Foundation FieldBus packets https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4822

svn path=/trunk/; revision=44735
2012-09-02 02:28:55 +00:00
Anders Broman 89f2554ef1 Revert
length check "heuristics" for FF dissector (UDP + TCP)

"Fix" WTP+WSP packets incorrectly dissected as Foundation FieldBus packets https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4822

As it fails with
cc1: warnings being treated as errors
packet-ff.c: In function 'dissect_ff_tcp':
packet-ff.c:13061: warning: passing argument 7 of 'tcp_dissect_pdus' from incompatible pointer type

svn path=/trunk/; revision=44724
2012-09-01 12:06:58 +00:00
Anders Broman 4b6ad1d9d7 From Michael Mann:
length check "heuristics" for FF dissector (UDP + TCP)

"Fix" WTP+WSP packets incorrectly dissected as Foundation FieldBus packets https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4822

svn path=/trunk/; revision=44722
2012-09-01 11:37:42 +00:00
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
Also (for a few files):
- create/use some extended value strings;
- remove unneeded #include files;
- remove unneeded variable initialization;
- re-order fcns slightly so prefs_reg_handoff...() at end, etc

svn path=/trunk/; revision=44438
2012-08-10 22:55:02 +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 dea0a5d277 Fix some duplicate display filter names.
svn path=/trunk/; revision=40591
2012-01-19 21:01:52 +00:00
Alexis La Goutte ccb7bfd718 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40235
2011-12-17 10:06:38 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +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 67ee5049d4 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_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
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
Ronnie Sahlberg 0832de6b8e value&0x03 does not need to be shifted to the right by two.
cut-n-paste bug from a few lines above where value&0x0c do need to be shifted by two
before printing as a value

coverity 342


svn path=/trunk/; revision=36278
2011-03-23 06:50:09 +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 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Anders Broman c4dd31cd87 From Didier Gautheron:
col_clear.diff 
Remove calls to col_clear :
- called twice.
- before functions which also clear the column
- by replacing col_clear + col_append_xxx with col_add_xxx
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394

svn path=/trunk/; revision=31517
2010-01-13 20:25:10 +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 d4b575f041 Use correct length for "Version OD Calling".
This fixes bug 3694.

svn path=/trunk/; revision=29051
2009-07-10 09:12:13 +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
Stig Bjørlykke df120bc8d2 Removed some "initializer does not fit or is out of range" warnings.
svn path=/trunk/; revision=27826
2009-03-23 12:44:50 +00:00
Bill Meier b52d95d591 #include <emem.h> not req'd
svn path=/trunk/; revision=26091
2008-08-26 01:28:50 +00:00
Bill Meier 9ca142b160 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25282
2008-05-13 01:23:37 +00:00
Jaap Keuter 4562744a64 Properly attribute the FOUNDATION Fieldbus dissector to Yukiyo Akisada.
Correct protocol name.

svn path=/trunk/; revision=24503
2008-02-29 07:53:15 +00:00
Bill Meier 5b8da491d7 Add $Id$
svn path=/trunk/; revision=24382
2008-02-18 22:39:03 +00:00
Stig Bjørlykke 28ae535b00 Removed even more "statement not reached" warnings.
svn path=/trunk/; revision=24286
2008-02-07 15:44:45 +00:00
Stephen Fisher aee504c8f5 Fix Windows warning/error: integral size mismatch
Then fix comparison of signed/unsigned warning/error


svn path=/trunk/; revision=24070
2008-01-12 06:38:09 +00:00
Jeff Morriss 01df06d697 The Windows compiler thinks that doing return(func_that_returns_void()) in a function that itself returns void is "'void' function returning a value". So don't do that.
svn path=/trunk/; revision=24068
2008-01-11 21:06:00 +00:00
Jaap Keuter 7def8e7b3e From Yukiyo Akisada:
This modifications are for the new protocol support.
HSE protocol was defined at Fieldbus Foundation <http://www.fieldbus.org/>.

svn path=/trunk/; revision=24064
2008-01-11 07:28:01 +00:00