aboutsummaryrefslogtreecommitdiffstats
path: root/epan/column-utils.h
AgeCommit message (Collapse)AuthorFilesLines
2014-05-17Introduce col_add_lstr(), use it instead of slower col_add_fstr.Jakub Zawadzki1-0/+4
We have callgrind benchmarks which shows that col_add_fstr() takes 5% of Ir count cause of formatting done in g_vsnprintf(). New col_add_lstr() can be used in few dissectors without much ugliness, and it should be a little faster. Change-Id: Ifddd951063dfd3a27c2a7da4dafce9b242c0472c Reviewed-on: https://code.wireshark.org/review/1629 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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>
2013-12-22Avoid including definition of column_info structure in dissectors.Jakub Zawadzki1-1/+79
Move COL_* enum to <epan/column-utils.h> XXX Later we can rename epan/column-info.h to column-int.h (or smth like this) svn path=/trunk/; revision=54352
2013-12-18Added col_clear_fence().Stig Bjørlykke1-0/+10
svn path=/trunk/; revision=54220
2013-12-03Avoid including <epan/epan.h> in dissectors.Jakub Zawadzki1-3/+4
svn path=/trunk/; revision=53774
2013-10-18After looking for something in the column-*.h files andJörg Mayer1-1/+1
not finding it, I finally found it in column_info.h Renamed column_info.h to column-info.h to have consistency with the column*h files. svn path=/trunk/; revision=52667
2013-10-01FINALLY remove the check_col API so that reviewers won't have to mention ↵Michael Mann1-11/+0
that it's deprecated. Now it just won't compile if its included in a dissector. svn path=/trunk/; revision=52317
2013-07-21Add helper function to epan_session which can be used to get absolute ↵Jakub Zawadzki1-2/+2
timestamp of given frame. Remove ->prev_cap, for testing purpose also replace ->prev_dis with number of previously displayed frame number. This patch reduce size of frame_data by 8B (amd64) This is what (I think) was suggested by Guy in comment 13 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5821#c13) svn path=/trunk/; revision=50765
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-21/+26
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2013-02-25LUA API improvementsMichael Mann1-0/+9
1. Add col_set_fence() equivalent 2. Update __tostring function to actually return column text From Hadriel Kaplan, bug 8295 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8295) svn path=/trunk/; revision=47882
2012-12-26Fix a bunch of warnings.Guy Harris1-1/+1
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-10-08col_cleanup() is undoing the allocations that col_init() does, so it'sGuy Harris1-5/+6
freeing the allocated array of pointers, not what the pointers ported to, so it should free col_data. Note that it does that, and put it after col_init() in the source file and header file. Put in a comment explaining the MSVC bug that we're working around with the casts. svn path=/trunk/; revision=45393
2012-10-08Don't leak all of our column data in packet_list_recreate (I think we still leakEvan Huus1-0/+6
some of it?). Maybe part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7775 svn path=/trunk/; revision=45388
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-01-28Well, we *did* go to a widget that invokes callback to get the text forGuy Harris1-6/+0
the columns, so we *can* clean up the exporting of col_set_fmt_time() by not exporting it any more. svn path=/trunk/; revision=40743
2011-09-19Make it possiblwe to creare a trime string from frame data.Anders Broman1-0/+2
svn path=/trunk/; revision=39036
2011-04-09In packet_list_dissect_and_cache_record(), set the columns toGuy Harris1-0/+8
*something* if we get an error reading the packet from the capture file, rather than leaving them as null (which will cause a crash). svn path=/trunk/; revision=36527
2010-08-30Doxygen related changes.Anders Broman1-4/+14
svn path=/trunk/; revision=34009
2010-08-21Remove duplicate definition of COL_MAX_LEN and COL_MAX_INFO_LEN: apparently ↵Jeff Morriss1-11/+0
no one needs them in this file (probably because they're marked as "don't use"). Now they are only defined in column_info.h . svn path=/trunk/; revision=33871
2010-04-03 From Yaniv Kaul: constify parametersBill Meier1-21/+21
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 From me: Fix a number of instances where the function prototype or the function definition wasn't changed so there was a mismatch thus causing Windows (but not gcc) compilation errors. svn path=/trunk/; revision=32365
2010-04-02Revert SVN #32360 until Windows compilation errors corrected.Bill Meier1-21/+21
svn path=/trunk/; revision=32361
2010-04-02From Yaniv Kaul: constify parametersBill Meier1-21/+21
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 svn path=/trunk/; revision=32360
2010-01-25Changed from using own defined GNUC_FORMAT_CHECK to G_GNUC_PRINTFStig Bjørlykke1-6/+5
defined in GLib. Removed epan/gnuc_format_check.h. svn path=/trunk/; revision=31657
2009-09-08Add an option to col_fill_in() to allow us to disable column expression ↵Kovarththanan Rajaratnam1-7/+7
processing. This is rarely needed. It's only needed when the user right clicks on the packet list view to generate a display filter. svn path=/trunk/; revision=29806
2009-09-05col_custom_set_fstr() is unused. Remove itKovarththanan Rajaratnam1-4/+0
svn path=/trunk/; revision=29722
2009-08-26Add missing prototype ....Bill Meier1-0/+3
svn path=/trunk/; revision=29555
2009-08-23Custom columnfication:Kovarththanan Rajaratnam1-2/+2
* Deprecate COL_REL_CONV_TIME (Relative time (conversation)). Use tcp.time_relative svn path=/trunk/; revision=29523
2009-07-27From Kovarththanan Rajaratnam:Anders Broman1-1/+1
Only fill in frame_data vals when needed. svn path=/trunk/; revision=29203
2009-07-27From Kovarththanan Rajaratnam:Anders Broman1-0/+7
Use frame_data values . svn path=/trunk/; revision=29202
2009-02-15Fixed a typo.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=27452
2008-06-14Update all time columns when changing the time precision.Stig Bjørlykke1-1/+2
Not implemented for conversation relative and delta time yet, because this will need a reload as they are set by the dissectors and does not exist in the frame data. svn path=/trunk/; revision=25452
2008-03-01Custom column updates:Stephen Fisher1-1/+1
- Change apply / prepare / ... as filter to use the field's value, which is now stored in fdata as well as cinfo. Now we don't have to reprocess the entire packet list when using these features. This also prevents the use of these features from overwriting custom column information. (custom columns can now be used in apply / prepare ... as filter) - Break col_expr and col_expr_val out into a struct that is included not only in cinfo, but now also fdata. - Have col_custom_set_fstr() quote FT_STRING & FT_STRINGZ when storing the col_expr_val value (for filter creation). svn path=/trunk/; revision=24511
2008-02-13Check in changes originally checked in as SVN revision 24308 (new columnStephen Fisher1-0/+11
type: Custom) that were backed out in SVN revision 24309. Changes since that revision include a reworking of the handling of the cfile/cinfo variables in epan/column-utils.c, addition of three new functions to libwireshark.def and a bug fix to prevent a crash when no custom columns were not in use. Compilation verified locally on MacOS X, Linux and Windows. svn path=/trunk/; revision=24317
2008-02-12Revert commit 24308 until I can get it to compile on Windows/Linux/SolarisStephen Fisher1-10/+0
(strangely, it compiled fine on my MacOS X machine). svn path=/trunk/; revision=24309
2008-02-12Introduce a new column type called custom, which lets you put any displayStephen Fisher1-0/+10
filter name in the description field and it will display that field in the packet list if it occurs in that packet. Note that the more common fields are implemented, but a number of them remain to be implemented in epan/proto.c. I will work on these other fields as I have time. svn path=/trunk/; revision=24308
2007-10-03This patch adds two new column types:Sake Blok1-0/+14
- COL_REL_CONV_TIME which is used to display the time relative to the first frame that was seen in the conversation - COL_DELTA_CONV_TIME which is used to display the delta time from the previous frame of the conversation It also adds the function "col_set_time()" to "epan/column-utils.[ch]" which can be called from within a dissector to set either of these two columns to the appropiate time. Last but not least, it lets the tcp-dissector make use of these two columns. svn path=/trunk/; revision=23058
2007-01-18PutGuy Harris1-0/+7
#ifdef __cplusplus extern "C" { #endif /* __cplusplus */ ... #ifdef __cplusplus } #endif /* __cplusplus */ wrappers into some header files, for the benefit of C++ plugins. Also, add multiple-include protections. svn path=/trunk/; revision=20485
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2005-10-04in svn 15335 the tcp analysis was changed to do its stuff and to populate ↵Ronnie Sahlberg1-0/+11
(prepend to) COL_INFO before callking the subdissectors instead of calling the tcp analysis (and prepend colingo) eitehr after the subdissector returned normally or if an exception caused by a subdissector was rised. this as a sideffect caused tcp analysis data to be overwritten if the subdissector caused any output to the info column. (and made tcp analysis suboptimal) this change adds a new function col_prepend_fence_fstr() that will prepend the info column with the string and also, if there was no fence already defined, create a fence and set it after the prepended col info text. This way, even if the subdissectors generate and rewrite col info, the tcp analysis data will still be displayed on the info column. svn path=/trunk/; revision=16116
2005-10-02add doxygen comments to column-utils.h and do a slight code cleanupUlf Lamping1-25/+155
svn path=/trunk/; revision=16066
2005-09-13Move the definition of GNUC_FORMAT_CHECK() to its own header, use it inGuy Harris1-12/+5
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
2004-12-30Make the "col_data" field in a "column_info" structure a pointer to anGuy Harris1-1/+1
array of "const char *" rather than to an array of "char *", and make the second argument of "col_set_str()" a "const char *" - there's no guarantee that "col_data" points to something you're allowed to modify. svn path=/trunk/; revision=12878
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-02-05Add new col_append methods which will prepend the (format) string with theOlivier Biot1-1/+8
provided separator (or a default ", ") if the column is not empty. svn path=/trunk/; revision=9986
2003-04-16Pull the stuff done in "dissect_packet()" to initialize a column_infoGuy Harris1-2/+5
structure into its own routine; rename "col_init()" to "col_setup()", and call the new routine "col_init()". svn path=/trunk/; revision=7467
2003-04-16Add the notion of a "fence" to columns. A dissector can set the fenceGuy Harris1-1/+2
to "protect" what's currently in the column, so that attempts to clear the column will only clear stuff after the fence and attempts to overwrite the column will append stuff after the fence. This, for example, allows a dissector to arrange that the Info column contain information for its protocol and for protocols running atop it. svn path=/trunk/; revision=7466
2002-12-02Make the format argument to the "col_XXX_fstr()" routines, and the "str"Guy Harris1-8/+8
argument to "col_append_str()", const pointers; they're not modified by the routines in question. svn path=/trunk/; revision=6725
2002-11-11Instead of tweaking a "Protocol configuration options" extension headerGuy Harris1-1/+2
item to look more-or-less like a PPP packet, just dissect it in place and hand off to the appropriate subdissector using the PPP dissector's handoff table (which we export, along with its value_string table for protocol IDs, which we use to report the protocol ID symbolically). This means there's no point in having a configurable option to control whether to do that tweaking; make it an obsolete option. Bring "col_get_writable()" back from the dead, and have the GTP dissector save the current "writable" flag for columns, mark the columns non-writable before calling the subdissector for the PPP configuration protocol, and restore the state of the writable flag, rather than putting the columns back after the PPP configuration protocol's dissector is done. Fix some more typos in comments. Don't register the IP dissector in the "ppp.protocol" table in the GTP dissector's handoff registration routine - it's already being done in the IP dissector's handoff routine. Fix the name for CHAP to match what RFC 1994 calls it (if the name changed, it should be changed in all places, but, at least according to this message, a while ago, from Bob Sutterfield, "since the RFC defines the protocol, the RFC defines the name": http://mail-index.netbsd.org/netbsd-help/1996/05/16/0011.html and the RFC defines the name as "PPP Challenge Handshake Authentication Protocol (CHAP)"). svn path=/trunk/; revision=6617
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-4/+4
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2002-01-29Support for capturing on, and reading captures from, OpenBSD firewallGuy Harris1-1/+4
logging virtual interface, from Mike Frantzen. svn path=/trunk/; revision=4616