summaryrefslogtreecommitdiff
path: root/epan/column.c
AgeCommit message (Collapse)AuthorFilesLines
2016-11-03Fix lintian found spelling error "occurence" -> "occurrence"Michael Mann1-1/+1
Change-Id: I4fcff029ec15a1627dde0d311b063a249f0e0c0a Reviewed-on: https://code.wireshark.org/review/18643 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-09-02Qt: Conversation time column updates.Gerald Combs1-1/+1
Add a checkbox which lets you toggle between absolute and relative start times. Use the local time for now. Fixes bug 11618. Adjust our time precision based on the capture file's time precision. Fixes bug 12803. Update the User's Guide accordingly. Bug: 11618 Bug: 12803 Change-Id: I0049d6db6e4d0b6967bf35e6d056a61bfb4de10f Reviewed-on: https://code.wireshark.org/review/17448 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-07-25Fix checkAPI.pl warnings about printfMichael Mann1-2/+3
Many of the complaints from checkAPI.pl for use of printf are when its embedded in an #ifdef and checkAPI isn't smart enough to figure that out. The other (non-ifdef) use is dumping internal structures (which is a type of debug functionality) Add a "ws_debug_printf" macro for printf to pacify the warnings. Change-Id: I63610e1adbbaf2feffb4ec9d4f817247d833f7fd Reviewed-on: https://code.wireshark.org/review/16623 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-06-15Display "IP DSCP" column as short textJoão Valverde1-1/+1
Ping-Bug: 12429 Change-Id: I618b2017e161d89f0efa25ce2fb82a1808e8d315 Reviewed-on: https://code.wireshark.org/review/10701 Reviewed-by: João Valverde <j@v6e.pt>
2016-01-27Remove the deprecated column types so users don't think they still exist.Michael Mann1-151/+109
Bug: 11559 Change-Id: I51836dc9a4fa399835c7bdabcba577ebd40327ad Reviewed-on: https://code.wireshark.org/review/13538 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-22ui: Optimize col_custom_prime_edt()Stig Bjørlykke1-0/+17
The col_item->col_custom_fields_ids list does not change between packet so this can be initialized in build_column_format_array(). Change-Id: I171b583912dbd1568c3d85159fac1ab435dcaa7c Reviewed-on: https://code.wireshark.org/review/12801 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-12-21ui: Fixed column tooltip when having multi-field custom columns.Stig Bjørlykke1-19/+47
Change-Id: Iac09b841ff782ea351052ad6b20f5b4ff170e8e8 Reviewed-on: https://code.wireshark.org/review/12752 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-12-20Qt: Add missing multi-field column validationMichal Labedzki1-13/+13
GTK already has it, but Qt forgot about it, so multi-field custom column works ok if previously saved in GTK-shark. Invalid validation prevent from modifying and saving multi-field custom column in Qt version. While at it, rename "custom field" to "custom fields" to ensure we think about multi-field custom column. Change-Id: I99588150ccb38be11b75f5dd5b0f6443e7055ebb Reviewed-on: https://code.wireshark.org/review/12685 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-23Qt: Set tooltip for packet list headerStig Bjørlykke1-0/+36
Added get_column_tooltip() to use common code in GTK and Qt. Change-Id: I2f6ce95e2e129752bbb958a28aec6f42aa81be3d Reviewed-on: https://code.wireshark.org/review/12047 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-29Take all epan_column_info members that always get allocated to "number of ↵Michael Mann1-22/+24
columns" to share their own data structure. Change-Id: Ib982662db6cf68730a7d121eac60d9bc5ae67429 Reviewed-on: https://code.wireshark.org/review/9195 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-18Clean up ftype-conversion and dfilter error message string handling.Guy Harris1-1/+1
Have dfilter_compile() take an additional gchar ** argument, pointing to a gchar * item that, on error, gets set to point to a g_malloc()ed error string. That removes one bit of global state from the display filter parser, and doesn't impose a fixed limit on the error message strings. Have fvalue_from_string() and fvalue_from_unparsed() take a gchar ** argument, pointer to a gchar * item, rather than an error-reporting function, and set the gchar * item to point to a g_malloc()ed error string on an error. Allow either gchar ** argument to be null; if the argument is null, no error message is allocated or provided. Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c Reviewed-on: https://code.wireshark.org/review/6608 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-11-10Fixed memory leakage in col_cleanup.Stig Bjørlykke1-1/+1
Several fields in cinfo is allocated memory and must be freed here to avoid memory leakage when recreating the packet list. Do not allocate memory for col_expr[] as this points to static strings or other allocated strings. Change-Id: I840377e3c590b1a3e2a38e0537465a028041d1e9 Reviewed-on: https://code.wireshark.org/review/5137 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-17Get rid of unnecessary includes of ctype.h.Guy Harris1-1/+0
Change-Id: Ibb194cd839d174af9c96f7bb1e2941b3dd6c1ce1 Reviewed-on: https://code.wireshark.org/review/4797 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-28Make the time stamp resolution per-packet.Guy Harris1-30/+5
Pcap-ng files don't have a per-file time stamp resolution, they have a per-interface time stamp resolution. Add new time stamp resolution types of "unknown" and "per-packet", add the time stamp resolution to struct wtap_pkthdr, have the libwiretap core initialize it to the per-file time stamp resolution, and have pcap-ng do the same thing with the resolution that it does with the packet encapsulation. Get rid of the TS_PREC_AUTO_XXX values; just have TS_PREC_AUTO, which means "use the packet's resolution to determine how many significant digits to display". Rename all the WTAP_FILE_TSPREC_XXX values to WTAP_TSPREC_XXX, as they're also used for per-packet values. Change-Id: If9fd8f799b19836a5104aaa0870a951498886c69 Reviewed-on: https://code.wireshark.org/review/4349 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-09-27Make get_column_longest_string() static.Guy Harris1-13/+13
It's not used outside epan/column.c, so don't export it. Change-Id: I38e084946d92f3c31b06fc4fc1991c88e652f58a Reviewed-on: https://code.wireshark.org/review/4334 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-03(Pedantic): set editor modelines tab-width & etc to 8; Also: fix some ↵Bill Meier1-3/+3
indentation in packet-sip.c Change-Id: I623fc5e4c1247dbe5e15f0f33270f4f0994268ab Reviewed-on: https://code.wireshark.org/review/943 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.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-2/+2
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-11-06Add support for displaying dates as year and day-of-year (1-origin).Guy Harris1-126/+167
In the process, fix various man page descriptions of the -t flag, and add support for UTC absolute times in the iousers and iostat TShark taps. svn path=/trunk/; revision=53114
2013-10-27Remove "Cisco MDS-specific" fields from packet_info. 2 of the 3 fields were ↵Michael Mann1-4/+4
used strictly for columns that are considered "deprecated" and I think the third could be put in that category as well. I assume the column enumerations haven't already been removed because of legacy "indexing issues", but if I'm wrong, we should definitely remove the columns altogether. Could also see renaming columns to DEPRECATED_[X]. svn path=/trunk/; revision=52910
2013-10-23Provide a usage example of the column formats.Chris Maynard1-0/+21
svn path=/trunk/; revision=52802
2013-10-18After looking for something in the column-*.h files andJörg Mayer1-2/+2
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-15From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9272Chris Maynard1-0/+23
Add tshark -G column-formats report and document the missing ftypes, heuristic-decodes and plugins reports. From me: Sort the reports. Add modelines to epan/column.c. Minor whitespace changes. svn path=/trunk/; revision=52627
2013-06-30Declare slist[] as static (reduces storage & code executed: *See below);Bill Meier1-5/+5
Declare dlist[] similarly to slist[] (not really needed since generated storage/code was OK as is) *On Windows the following program generates sub-optimal code (when built using VC10 or VC11 with CFLAGS as used when building Wireshark). void foo(void) { const char *const zz[] = {"ABC", "abc"}; } ------------- Code generated: <snip> _DATA SEGMENT $SG1013 DB 'ABC', 00H !!! note string stored twice !! $SG1014 DB 'ABC', 00H $SG1015 DB 'abc', 00H $SG1016 DB 'abc', 00H _DATA ENDS <snip> ; 1 : void foo(void) { push ebp mov ebp, esp sub esp, 8 ; 2 : const char *const zz[] = {"ABC", "abc"}; mov DWORD PTR _zz$[ebp], OFFSET $SG1014 !! note: each ptr of array mov DWORD PTR _zz$[ebp+4], OFFSET $SG1016 !! individually pushed on stack <snip> Not shown: Declaring zz as 'static' generates much better code.... svn path=/trunk/; revision=50271
2013-06-25Move a couple of time-related modules into wsutil.Jeff Morriss1-1/+0
A bunch of files didn't really need to include these header files so remove the include line rather than changing it. svn path=/trunk/; revision=50154
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2012-08-14cleanup get_column_format_matches()Jakub Zawadzki1-66/+0
fmt_list[format] is set to TRUE on begin of function as 'obvious' thing to do svn path=/trunk/; revision=44494
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-11-13If we set "column.hidden" on the command line but don't setGuy Harris1-3/+2
"column.format" in a later argument, make sure we mark the appropriate existing columns as hidden. As part of cleaning up the infrastructure for doing this, store the COL_ code for a column in a fmt_data structure rather than a pointer to the raw column format string; this simplifies some code. Have a routine to return whether a column is visible, not hidden, as it's used to set a "visible" flag. svn path=/trunk/; revision=39822
2011-07-04From Michael Mann:Anders Broman1-2/+14
Added ability to display UTC time or UTC time with date. I liked having the difference between UTC and local time, not just setting local=UTC. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2629 svn path=/trunk/; revision=37898
2010-10-09Added "Edit Column Details" functions to the packet list heading popup.Stig Bjørlykke1-0/+59
Removed "Rename Column Title" as this is moved to "Edit Column Details". svn path=/trunk/; revision=34444
2010-09-22When using a custom column, make it possible to select which occurrence to ↵Sake Blok1-0/+17
show if the field has multiple occurrences. svn path=/trunk/; revision=34186
2010-06-25Introduce "Show Resolved" as an option in custom columns. This will determineStig Bjørlykke1-0/+28
if we show the value or the string representing the value. This setting is not stored in the preferences file yet, and the option is not available in the columns preferences window. svn path=/trunk/; revision=33317
2010-06-20Added "Hide Column" functionality.Stig Bjørlykke1-0/+28
svn path=/trunk/; revision=33266
2010-04-03 From Yaniv Kaul: constify parametersBill Meier1-12/+12
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-11/+11
svn path=/trunk/; revision=32361
2010-04-02From Yaniv Kaul: constify parametersBill Meier1-11/+11
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 svn path=/trunk/; revision=32360
2010-01-26Move underscore escaping/unscaping function to strutil.c;Gerasimos Dimitriadis1-52/+0
Update decoding of IS-801 Request GPS Acquisition Assistance svn path=/trunk/; revision=31685
2010-01-25Handle underscore escaping/unescaping for old packet list; SimplifyGerasimos Dimitriadis1-7/+4
and make more robust the unescaping function. svn path=/trunk/; revision=31668
2010-01-25Change the prefix of the underscore escaping/unescapingGerasimos Dimitriadis1-2/+2
functions from g_ to ws_; Insert function names in libwireshark.def svn path=/trunk/; revision=31662
2010-01-24Handle underscore escaping/unescaping of the column titlesGerasimos Dimitriadis1-0/+56
under the new packet list svn path=/trunk/; revision=31649
2009-10-12Corrected some return values.Stig Bjørlykke1-2/+2
svn path=/trunk/; revision=30534
2009-10-12Added check for valid column in get_column_title() andStig Bjørlykke1-5/+15
get_column_custom_field(). svn path=/trunk/; revision=30531
2009-10-12Return from get_column_format() when invalid column requested.Stig Bjørlykke1-0/+3
svn path=/trunk/; revision=30530
2009-09-08Make tshark and rawshark use build_column_format_array() instead of ↵Kovarththanan Rajaratnam1-156/+156
duplicating the code svn path=/trunk/; revision=29803
2009-08-25Note in dlist[] that COL_BSSGP_TLLI is deprecated.Guy Harris1-1/+1
svn path=/trunk/; revision=29547
2009-08-25 Custom columnfication:Anders Broman1-1/+1
* Deprecate COL_BSSGP_TLLI (GPRS BSSGP IE TLLI). Use bssgp.tlli svn path=/trunk/; revision=29546
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-08-23Custom columnfication:Kovarththanan Rajaratnam1-2/+2
* Deprecate COL_FR_DLCI (Frame Relay DLCI). Use fr.dlci svn path=/trunk/; revision=29522
2009-08-23Custom columfication:Kovarththanan Rajaratnam1-2/+2
* Deprecate COL_HPUX_DEVID (HP-UX Device ID). Use nettl.devid svn path=/trunk/; revision=29517