Commit Graph

39 Commits

Author SHA1 Message Date
Bill Meier 126b4a6a98 expert.[hc] Minor changes:
- Fix a few parameter descriptions in expert.h;
- Do whitespace changes;
- Add editor modelines.

Change-Id: I1b75fa88021f1f44bd607cd33d0ab7f9ec672ab7
Reviewed-on: https://code.wireshark.org/review/4122
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-15 23:49:12 +00:00
Michael Mann 507d07eda6 Allow severity levels of expert info items to be configured by the user.
UAT was the easiest way to do this and I like the "file format" of the data, but the presentation doesn't seem that great.

Bug:10180
Change-Id: I7e6bc9e148bc47585a0a7eb8f96900a5c374e673
Reviewed-on: https://code.wireshark.org/review/3082
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-07-26 01:03:07 +00:00
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
Alexis La Goutte 420b33d77d Fix warning: The following parameters of proto_tree_add_expert_format(proto_tree *tree, packet_info *pinfo, expert_field *eiindex, tvbuff_t *tvb, gint start, gint length, const char *format,...) are not documented: parameter 'format'
svn path=/trunk/; revision=53748
2013-12-03 13:37:49 +00:00
Michael Mann a891f3e70b Make expert items used in "low level" proto functions filterable (and ensure they are called even with a NULL tree). I don't really like the Type Length Mismatch "protocol", but it doesn't seem that much different than the exception "protocols".
svn path=/trunk/; revision=52341
2013-10-03 01:54:02 +00:00
Michael Mann bffe25fdc2 Complete the conversion of expert_add_info_format_text -> expert_add_info_format.
svn path=/trunk/; revision=51853
2013-09-09 01:02:44 +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
Alexis La Goutte 6b2498b349 Fix (-W)documentation error found by Clang
../../epan/expert.h:176:9: warning: parameter 'pi' not found in the function declaration [-Wdocumentation]
 @param pi Current protocol item (or NULL)
        ^~
../../epan/expert.h:176:9: note: did you mean 'tree'?
 @param pi Current protocol item (or NULL)
        ^~
        tree
../../epan/expert.h:195:9: warning: parameter 'pi' not found in the function declaration [-Wdocumentation]
 @param pi Current protocol item (or NULL)
        ^~
2 warnings generated.

svn path=/trunk/; revision=51258
2013-08-10 21:28:33 +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 5bbc26236a Batch of filterable expert infos.
Also added a note about deprecating expert_add_info_format

svn path=/trunk/; revision=50270
2013-06-30 22:19:37 +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
Jeff Morriss ac845e4d83 expert_add_info_format_text(): use the correct argument numbers in G_GNUC_PRINTF().
svn path=/trunk/; revision=49562
2013-05-24 18:12:00 +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
Evan Huus 63ef04ec84 Fix a whole bunch of doxygen warnings, mostly typos or renamed parameters.
svn path=/trunk/; revision=49053
2013-04-26 18:28:21 +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
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Martin Kaiser 9b78939cb3 expert.h needs packet_info.h
(trying to ensure that the order in which files are included
 does not matter)

svn path=/trunk/; revision=45402
2012-10-08 19:30:34 +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
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
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
Stephen Fisher 793eee70d0 From John Thacker via bug #5644: Can't include expert.h in C++ code
svn path=/trunk/; revision=35742
2011-02-01 21:03:29 +00:00
Jaap Keuter 9417ceec42 Clean up implementation.
svn path=/trunk/; revision=32039
2010-02-27 22:12:43 +00:00
Stig Bjørlykke 9092486f58 Changed from using own defined GNUC_FORMAT_CHECK to G_GNUC_PRINTF
defined in GLib.  Removed epan/gnuc_format_check.h.

svn path=/trunk/; revision=31657
2010-01-25 13:20:53 +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
Ulf Lamping a0d22c16ca add a note that PI_CHECKSUM and PI_WARN can be found in proto.h (don't want to search for it again :-)
svn path=/trunk/; revision=27297
2009-01-26 19:49:36 +00:00
Ulf Lamping d4499eb9a7 move value_strings from expert_dialogs into expert.c to remove duplicates
keep the highest severity level of the current file (experimental)

svn path=/trunk/; revision=19104
2006-08-31 22:56:38 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ulf Lamping 5d66658184 from Greg Morris:
Composite Expert statistics, see: 
http://www.ethereal.com/lists/ethereal-dev/200511/msg00002.html
and the following discussions

svn path=/trunk/; revision=16593
2005-11-25 23:42:52 +00:00
Guy Harris aba53424dd Move the definition of GNUC_FORMAT_CHECK() to its own header, use it in
column-utils.h, and add it to expert.h, so we check the arguments to
"expert_add_info_format()", at least if the format argument is a
constant string.

Fix some more calls to "expert_add_info_format()" to pass it a format
string.

Don't record BoundsError exceptions as expert events - they merely
reflect a capture done with a snapshot length too short to capture all
of the packet (any case where it's caused by something else is a bug).

svn path=/trunk/; revision=15776
2005-09-13 04:00:47 +00:00
Guy Harris d8873511a7 Frame numbers are unsigned, and they start at 1; 0 is what's used for
"unknown" for frame numbers.  Note that in epan/frame_data.h, and make
the frame number in experts unsigned, and use 0 for "unknown", and
display it as an unsigned number - and, if it's 0, don't display it at
all.

Fix the signature of "expert_dlg_draw()" to match what a tap's draw
routine's signature is expected to be.

svn path=/trunk/; revision=15760
2005-09-11 22:25:33 +00:00
Ulf Lamping 642467ad5c I'm adding the "Expert Info" prototype now, as it seems to be in a state where others might have a look and probably already find it useful :-). Anyway, we can easily disable it at one or two places in the code if it get's in our way of a new release.
Please see: http://wiki.ethereal.com/Development/ExpertInfo for a complete overview of the intended feature and it's current state of implementation.

While I'm working on this, I've also added some more status result codes to the DCE/RPC and DCOM dissectors.

svn path=/trunk/; revision=15754
2005-09-11 16:55:34 +00:00