Commit Graph

46 Commits

Author SHA1 Message Date
Gerald Combs 3f765b3ef9 Add a CF_FUNC macro for casting BASE_CUSTOM functions.
Add a CF_FUNC macro to match VALS, TFS, etc. This should help us to avoid
the following warning:

    warning: ISO C forbids initialization between function pointer and 'void *' [-Wpedantic]

We could start adding DIAG_OFF+DIAG_ON everywhere but this seems to be
more consistent with the other macros in proto.h. Update each instance
of BASE_CUSTOM to use CF_FUNC.

Adjust a dummy variable name generated by asn2wrs.py that was triggering
an invalid error in checkhf.pl.

Fix an encoding arguement in packet-elasticsearch.c found by
fix-encoding-args.pl.

Change-Id: Id0e75076c2d71736639d486f47b87bab84e07d22
Reviewed-on: https://code.wireshark.org/review/7150
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-18 00:05:38 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Bill Meier 10406870f5 Add editor modelines; fix indentation as needed.
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263
Reviewed-on: https://code.wireshark.org/review/4363
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-29 13:47:02 +00:00
Michael Mann 3635d7bed7 Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the neighborhood.

Change-Id: Ib76f4a9f89b5933425760af0a980c6a549031b8f
Reviewed-on: https://code.wireshark.org/review/3537
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-10 21:39:20 +00:00
Michael Mann 7bf6862ecf convert to proto_tree_add_subtree[_format]
Change-Id: Ia7014003a3cff5181295172978d6c613c3b83b0b
Reviewed-on: https://code.wireshark.org/review/2676
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-28 12:05:43 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki 064082e68a Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)
svn path=/trunk/; revision=54314
2013-12-20 22:39:32 +00:00
Chris Maynard f756c9b2c4 Since we're always calling ptvcursor_new() now, always call ptvcursor_free().
svn path=/trunk/; revision=54254
2013-12-19 17:46:59 +00:00
Chris Maynard f0a58ef523 Call ptvcursor_new() to initialize cursor whether tree is NULL or not.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9578
#BACKPORT(1.10, 1.8)

svn path=/trunk/; revision=54227
2013-12-18 18:27:07 +00:00
Jakub Zawadzki c45475ab45 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54135
2013-12-15 23:44:12 +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
Jaap Keuter 97136126bc Typo's. That is all.
svn path=/trunk/; revision=48685
2013-04-01 15:29:49 +00:00
Bill Meier c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +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 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 436b44b99e Fix some duplicate display filter names.
svn path=/trunk/; revision=40592
2012-01-19 21:57:24 +00:00
Bill Meier eea1de5489 Fix 'encoding-arg' for ptvcursor_add_with_subtree(): TRUE=>ENC_LITTLE_ENDIAN, etc
svn path=/trunk/; revision=40346
2011-12-30 15:30:32 +00:00
Bill Meier 3f5b02de51 Fix encoding arg for ptvcursor_add() and ptvcursor_add_noadvance() function calls.
svn path=/trunk/; revision=39566
2011-10-25 16:04:31 +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 2bf572bc41 Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...
svn path=/trunk/; revision=38413
2011-08-08 17:59:32 +00:00
Alexis La Goutte e95cbfcecf Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=36870
2011-04-26 14:41:49 +00:00
Bill Meier cca5904550 Don't assign to a proto_item * if the value won't be used: Coverity 923-927;
Add braces around around certain code sections for indentation purposes;
Do some indentation & whitespace cleanup.

svn path=/trunk/; revision=36529
2011-04-09 17:11:13 +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
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
Kovarththanan Rajaratnam cf8138e195 Remove check_col() guard
svn path=/trunk/; revision=30124
2009-09-24 19:50:43 +00:00
Kovarththanan Rajaratnam 99624329fa Don't col_clear() followed by col_set_str(). A col_set_str() will clear (replace) any existing string (the fence still needs to be respected though)
svn path=/trunk/; revision=30086
2009-09-23 14:30:36 +00:00
Stig Bjørlykke 7a413a615a Don't pass length 0 to a FT_UINT.
Fixed some uint types with length 2.

svn path=/trunk/; revision=29755
2009-09-07 01:19:26 +00:00
Stig Bjørlykke ba14c67566 Use correct field types for variable length fields.
Fixed types by adding new types for "undissected" blocks:
- Replace Bridge Address
- Multicast With Response
- Confirm Network Encryption Key
- Host Tag

svn path=/trunk/; revision=29741
2009-09-06 11:24:56 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Stig Bjørlykke 0437f102c3 From Kovarththanan Rajaratnam:
More FT_XXX cleanup.

svn path=/trunk/; revision=28971
2009-07-07 09:02:59 +00:00
Anders Broman f16859def3 From Kovarththanan Rajaratnam:
Cleanup header_field_info definitions
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3548

svn path=/trunk/; revision=28940
2009-07-05 11:49:36 +00:00
Anders Broman 4d8424a2bb From Jon Smirl:
More packet decoding for Intellon powerline devices.

From me put proto_register_homeplug() last in the file and whitespace changes.

svn path=/trunk/; revision=28872
2009-06-28 15:18:27 +00:00
Stig Bjørlykke 69116bfad2 Fixed field types for some reserved fields.
svn path=/trunk/; revision=28835
2009-06-24 05:54:19 +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 292f1e1eb4 reg_handoff: "once-only" test [if(!initted)...] not req'd since no prefs callback.
svn path=/trunk/; revision=27227
2009-01-14 02:25:37 +00:00
Jaap Keuter b4617e2a85 From Luca Ceresoli:
Several improvements to the Homeplug dissector.

New features:
 * Added decoding of new packet types:
   Vendor Specific, Set NEK, Set Local Parameters, Bridging Characteristics
   (Local and Network), Set Transmit Characteristics
 * Completed Network Statistics dissector, now decodes Extended packets;
   added a generated boolean value to allow Basic/Extended filtering
 * Local/Network specifier for Bridging Characteristics and
   Basic/Extended specifier for Network Statistics now appear in info column

Cleanups:
 * Cleaned up and made more concise decoding of IC-ID (chip ID) using range_string
 * Fixed formatting of some field types
 * A few minor cleanups

svn path=/trunk/; revision=27218
2009-01-13 07:08:03 +00:00
Bill Meier c3ea1560bd Minor cleanup related to proto_register and proto_reg_handoff
svn path=/trunk/; revision=26281
2008-09-26 22:07:45 +00:00
Jaap Keuter 890cbb15d1 Fix for bug 2859:
Skip data portion of unknown TLV.

Expand type interpretation and several other cleanups.

svn path=/trunk/; revision=26169
2008-09-09 21:17:17 +00:00
Bill Meier 77b81b391b #include <prefs.h> not req'd
svn path=/trunk/; revision=26089
2008-08-25 22:06:20 +00:00
Sebastien Tandel 9eb8eca6c4 get rid of unused variable
svn path=/trunk/; revision=21394
2007-04-12 22:39:16 +00:00
Sebastien Tandel 01faab8977 update of homeplug dissector with the use of ptvcursor subtree management
functions.


svn path=/trunk/; revision=21278
2007-03-30 00:38:58 +00:00
Jörg Mayer d987ac4127 Fixes for: warning: function declaration isn't a prototype
svn path=/trunk/; revision=21082
2007-03-21 04:54:20 +00:00
Jeff Morriss 0656a77020 Oops, set properties on the new file
svn path=/trunk/; revision=20461
2007-01-17 16:41:40 +00:00
Jeff Morriss 7d5b55679e From Sebastien Tandel: Support for the dissection of the Intellon homeplug powerline protocol based on INT51X1 specification.
svn path=/trunk/; revision=20459
2007-01-17 16:34:11 +00:00