Commit graph

57 commits

Author SHA1 Message Date
Hadriel Kaplan
da1af6e549 Add filterable expert info for Lua
This adds the ability for a Lua script to register expert info fields,
similar to C-code dissectors. This change also removes the need for
the expert_add_info_format_internal() function. Existing Lua scripts
do not have to change, because the existing expert info function
uses the internal "_ws.lua" protocol instead of nothing; but using
the new functionality provides more benefits since it correctly
registers the expert info fields to the dissector's protocol.

The test suite was amended to generate both old and new forms.

Change-Id: Ib5ae74e927cfa81312baf7b04ff4104b0b4f936e
Reviewed-on: https://code.wireshark.org/review/830
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-26 05:20:17 +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
Bill Meier
11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Jakub Zawadzki
51ea411db7 Move expert value_string body to expert.c (from expert.h)
svn path=/trunk/; revision=54354
2013-12-22 10:52:29 +00:00
Jakub Zawadzki
ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Michael Mann
9ccefb0ecd Prefix all "Wireshark application specific" display filters with a "_ws." to distinguish them from dissector filters.
This was committed now to get it into the 1.11 release so users can start getting used to the changed filter names.

svn path=/trunk/; revision=52462
2013-10-09 12:56:19 +00:00
Michael Mann
1b009df749 Couldn't quite figure out how to make the expert items in proto.c and the LUA API filterable (suggestions welcome!), but I wanted to start forcing dissectors to use the filterable expert API (nothing like compile errors to force change!). I created expert_add_info_format_internal (original expert_add_info_format) and used it as a placeholder for proto.c/LUA API until a solution is created. The "new" expert_add_info_format will be the "old" expert_add_info_format_text, and I'll slowly do the search/replace.
For those with dissectors outside the source tree, please see tools/convert_expert_add_info_format.pl for help with the conversion.  Please do not use expert_add_info_format_internal, as it's support time will be very short lived.

svn path=/trunk/; revision=51844
2013-09-08 19:32:10 +00:00
Michael Mann
1f4f0d535a Remove expert_add_undecoded_item in favor of proto_tree_add_expert.
svn path=/trunk/; revision=51632
2013-09-01 16:41:29 +00:00
Michael Mann
81f3faf1e8 Completely remove support for proto_item_set_expert_flags.
svn path=/trunk/; revision=51144
2013-08-05 02:25:45 +00:00
Evan Huus
5a744f4afa Remove unused data structures from new expert code. Cleans up another ~17KB
of leaks, and I suspect they won't be necessary (we can always add them back
using wmem if they do turn out to be needed).

svn path=/trunk/; revision=50409
2013-07-06 16:11:36 +00:00
Evan Huus
0bc2afcd06 Allocate expert protocol structs with wmem, cleans up a few KB of leaks in
epan_cleanup().

svn path=/trunk/; revision=50406
2013-07-06 12:54:13 +00:00
Evan Huus
34cd52a8e5 Fix the use of va_args in the new expert code. Passing a va_list to a ... is
valid, but doesn't do what you actually want most of the time.

svn path=/trunk/; revision=50392
2013-07-05 23:53:25 +00:00
Michael Mann
7ae263b9e4 Differentiate "Disabled" from "Unknown" and provide macros for the enumerated values.
svn path=/trunk/; revision=50323
2013-07-02 20:08:49 +00:00
Michael Mann
e16933f496 Add proto_tree_add_expert and proto_tree_add_expert_format. This was added to expert.h instead of proto.h because the underlying code to process expert info is static (and should probably remain so). Also, proto_tree_add_expert and proto_tree_add_expert_format follow "expert info" rules in that they should be called regardless of tree status (even though they take a tree as an argument), unlike the functions in proto.h
Also added an enumeration for checksum validation status, as verifying checksums is considered "expert" functionality.

svn path=/trunk/; revision=50322
2013-07-02 19:53:28 +00:00
Michael Mann
ecc4e4789e Cache the malformed filter instead of looking it up each time a malformed packet comes in. This drastically speeds up the load time of captures with lots of malformed packets (ie fuzztesting).
svn path=/trunk/; revision=50313
2013-07-02 16:02:31 +00:00
Martin Kaiser
369658c499 inform expert info layer about the current number of packet comments
when the last comment is removed and we have no other expert info,
the maximum severity is changed from comment to none

svn path=/trunk/; revision=50091
2013-06-20 22:25:33 +00:00
Michael Mann
586df977d1 Ensure most severe is displayed in expert column. Bug 7733 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7733)
#BACKPORT

svn path=/trunk/; revision=49565
2013-05-24 19:23:36 +00:00
Jeff Morriss
71bc722866 expert_add_info(): we can't use va_start()/va_end() so don't try to use a va_list (which isn't used by the called function) either.
svn path=/trunk/; revision=49564
2013-05-24 19:14:09 +00:00
Jeff Morriss
44b437c331 expert_add_info() doesn't take a variable number of args; don't use va_start()/va_end().
svn path=/trunk/; revision=49563
2013-05-24 18:15:09 +00:00
Michael Mann
0d1a4b2920 Add expert info configuration framework. Bug 2412 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2412).
Expert info "fields" can now be registered/addressed by name.  Right now, the basic framework allows expert info fields to become "display filters".  However more could be done, like user preferences overriding default severity level, speeding up expert info dialog load time by not needing to redissect a file, etc.

Long term goal is to have all expert_info filterable and have the functionality of expert_add_info_format() include the "registered index".  expert_add_info_format_text() is the workaround until all current calls to expert_add_info_format() have been updated with either expert_add_info() or expert_add_info_format_text().  Then the remaining expert_add_info_format_text() will be renamed to expert_add_info_format().

svn path=/trunk/; revision=49559
2013-05-24 17:59:36 +00:00
Bill Meier
0df5a9390d From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397

svn path=/trunk/; revision=48438
2013-03-20 01:18:10 +00:00
Balint Reczey
1b1716638a Move expert_group_vals expert_severity_vals constant definitions to expert.h
svn path=/trunk/; revision=47995
2013-03-02 01:00:20 +00:00
Jeff Morriss
3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Gerald Combs
e6ffe7b59b Add a missing NULL check pointed out by Jakub.
svn path=/trunk/; revision=44437
2012-08-10 22:52:04 +00:00
Gerald Combs
cd3cca7edc Make the corresponding packet_info available to each tree item. This
lets us pass a NULL pinfo to expert_add_info_format() and
expert_add_undecoded_item(), which makes it possible to use those
routines deep in the bowels of many dissectors. As a proof of concept
remove the recent pinfo additions to packet-afp.c. This should also make
it easier to fix bug 3884.

svn path=/trunk/; revision=44435
2012-08-10 20:33:01 +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
Bill Meier
9c9d57321f Fix compiler warning: "format not a string literal and no format arguments"
svn path=/trunk/; revision=43509
2012-06-27 14:44:00 +00:00
Bill Meier
e42127ce00 Don't show (essentially meaningless) numeric values of the expert codes.
svn path=/trunk/; revision=43508
2012-06-27 14:15:46 +00:00
Pascal Quantin
f2e85a5a96 Display expert codes in hexadecimal (less painful for my eyes :))
svn path=/trunk/; revision=43497
2012-06-26 19:36:08 +00:00
Jeff Morriss
3fa645481f Followup to r43176, r43177, r43178, and r43179: prohibit FT_*INT*
with BASE_NONE (or other future display values).

Don't use BASE_NONE with FT_UINT32s in the expert info fields.

svn path=/trunk/; revision=43412
2012-06-20 17:25:53 +00:00
Anders Broman
ff47bdf96c Use the expert system to show packet comments.
The packet comment widget should be replaced by a ListView with two columns,  packet no and Comment.

svn path=/trunk/; revision=41322
2012-03-02 13:31:16 +00:00
Chris Maynard
0a1072b083 Treat expert info as a <field> instead of a <proto> when exporting to pdml.
svn path=/trunk/; revision=40204
2011-12-14 21:13:06 +00:00
Stig Bjørlykke
4e20e37aa6 Use ENC_NA for FT_PROTOCOL.
svn path=/trunk/; revision=38125
2011-07-19 19:37:58 +00:00
Stig Bjørlykke
0d128b2c87 Revert r37702 in favour of r37705 for bug 6035.
svn path=/trunk/; revision=37706
2011-06-19 10:15:58 +00:00
Stig Bjørlykke
5faf9008af Use BASE_DEC for expert.group and expert.severity.
This fixes bug 6035.

svn path=/trunk/; revision=37702
2011-06-18 22:52:00 +00:00
Anders Broman
07cd05fa52 Use PI_UNDECODED instead.
svn path=/trunk/; revision=37392
2011-05-25 13:17:51 +00:00
Anders Broman
ccecf5b98b Add a convinience function to add expert warnings for not dissected items.
svn path=/trunk/; revision=37391
2011-05-25 11:05:23 +00:00
Martin Mathieson
e88b2f1fc9 Make frames containing Malformed expert items match with "malformed" display filter.
svn path=/trunk/; revision=33551
2010-07-16 11:17:32 +00:00
Jaap Keuter
9417ceec42 Clean up implementation.
svn path=/trunk/; revision=32039
2010-02-27 22:12:43 +00:00
Gerald Combs
2efa26e0e1 Fix a double-free bug which was causing a crash. Our decryption buffer
length doesn't change, so allocate it just once. Add an expert item for
a successful decryption.

svn path=/trunk/; revision=31571
2010-01-19 19:28:30 +00:00
Stig Bjørlykke
29a4a0789a Added expert info group PI_PROTOCOL.
svn path=/trunk/; revision=31308
2009-12-18 15:13:44 +00:00
Bill Meier
53b061495d Whitespace changes
svn path=/trunk/; revision=30210
2009-09-30 13:04:06 +00:00
Anders Broman
3a13c1a2a4 Modified extarct from Didier Gautheron:
optimizations patch http://wiki.wireshark.org/Development/Optimization
'patch.29854.diff.gz"

- ei->protocol is a constant.
- Don't setup expert tap data if there's no tap.

svn path=/trunk/; revision=29873
2009-09-13 13:39:09 +00:00
Kovarththanan Rajaratnam
0e5cef61be Split a bunch of init routines into init() and cleanup(). This allows us to free memory properly on shutdown.
This is an initial step. There's still some work to do.

svn path=/trunk/; revision=29754
2009-09-06 18:25:23 +00:00
Kovarththanan Rajaratnam
083729e02c Add PTREE_FINFO and use PITEM_FINFO when possible.
svn path=/trunk/; revision=29355
2009-08-09 17:57:31 +00:00
Stig Bjørlykke
3653b21838 Added missing PI_DEBUG to expert_group_vals[].
svn path=/trunk/; revision=28636
2009-06-04 14:22:16 +00:00
Bill Meier
4f34bb9b15 From Jakub Zawadzki: g_gnprintf & etc: Use size of buffer [not size -1];
- As suggested actually use sizeof(...) rather than a numeric constant.
  - g_snprintf() and g_vsnprintf() since glib 1.3.12 do not return -1.

svn path=/trunk/; revision=27772
2009-03-18 15:03:46 +00:00
Stig Bjørlykke
d52fd5e311 From Jakub Zawadzki and me (bug 3283):
Added display filter for packets with expert info.

svn path=/trunk/; revision=27668
2009-03-09 00:26:25 +00:00
Ulf Lamping
3b509e89ae - add a column for the expert info severity level
- fix a column related bug introduced in SVN 20118

svn path=/trunk/; revision=22387
2007-07-23 20:11:05 +00:00
Stephen Fisher
2896811274 Fix about 150 warnings new to gcc 4.0 in the error on warning directories.
Comment out -Werror in plugins/asn1/ until warnings can be fixed.


svn path=/trunk/; revision=21158
2007-03-23 22:49:23 +00:00