Commit Graph

282 Commits

Author SHA1 Message Date
Anders Broman bd87f77148 set_abs_time and friends always return 1.
svn path=/trunk/; revision=39027
2011-09-16 14:25:50 +00:00
Stig Bjørlykke 50be3577ab Support negative nsecs when viewing seconds with hours and minutes.
svn path=/trunk/; revision=38862
2011-09-02 11:46:33 +00:00
Anders Broman 2f05cf4dcf From Michael Mann:
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
2011-07-04 21:43:34 +00:00
Stig Bjørlykke d201977d9c Don't assert on invalid custom columns, just set as invalid/unknown.
This fixes bug 6028.

svn path=/trunk/; revision=37756
2011-06-22 20:15:34 +00:00
Guy Harris c8d2cd3cb5 In packet_list_dissect_and_cache_record(), set the columns to
*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
2011-04-09 04:33:26 +00:00
Chris Maynard 8f429fd919 separator will never be NULL, but sep_len could be 0, so test for that instead.
Fixes CID 620.

svn path=/trunk/; revision=36423
2011-03-31 17:27:48 +00:00
Sake Blok 307c0d70fb Removal of the old packet-list in favor of the new packet list.
It compiles with "./configure without options" on my Mac. Let's see what the buildbots have to say about it :-)


svn path=/trunk/; revision=36161
2011-03-08 01:52:25 +00:00
Sake Blok 7364bef1b3 When using a custom column, make it possible to select which occurrence to show if the field has multiple occurrences.
svn path=/trunk/; revision=34186
2010-09-22 20:56:14 +00:00
Stig Bjørlykke c1a591cd37 Support negative values when viewing seconds with hours and minutes.
svn path=/trunk/; revision=34079
2010-09-08 10:29:06 +00:00
Anders Broman 6d1a0a2e86 Doxygen related changes.
svn path=/trunk/; revision=34009
2010-08-30 05:39:02 +00:00
Jeff Morriss b0cf38c06c Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4854 (crash when adding
2nd info column):

Duplicate col_do_append_sep_va_fstr()'s code into col_append_fstr() and
col_append_sep_fstr() (and remove col_do_append_sep_va_fstr()) because we need
to call va_start() and va_end() after each call to g_vsnprintf().  (This is a
followon to rev 32961.)

svn path=/trunk/; revision=33472
2010-07-08 02:54:26 +00:00
Stig Bjørlykke 5e0a3b2ded Corrected a typo in "display seconds with hours and minutes".
svn path=/trunk/; revision=33174
2010-06-09 08:52:56 +00:00
Stig Bjørlykke bdc492cc40 Improved readability when displaying seconds with hours and minutes.
svn path=/trunk/; revision=33074
2010-06-03 13:53:03 +00:00
Guy Harris ebc3739570 Once you've used a va_list, you can't use it again until you
reinitialize it with va_start().  (Yes, there are platforms where
reusing the va_arg fails, e.g. Mac OS X on x86-64.)

svn path=/trunk/; revision=32961
2010-05-26 02:01:49 +00:00
Stig Bjørlykke 39eb93b5a2 Simplified hour_min_sec calculations.
svn path=/trunk/; revision=32684
2010-05-06 11:25:15 +00:00
Stig Bjørlykke 6efcb1adf0 Added an option to display seconds as hours, minutes and seconds
in the packet list, on this format: "1h 2m 3.456s".

svn path=/trunk/; revision=32683
2010-05-06 10:32:59 +00:00
Gerald Combs d13ecdea62 Add a catch-all if statement for column formats that are filled in by
dissectors. Fixes bug 4732.

svn path=/trunk/; revision=32615
2010-04-30 20:49:41 +00:00
Gerald Combs 3c8db1cae5 Several dissectors fill in custom custom data in the source and
destination address columns. Don't clobber it in the new packet list.

svn path=/trunk/; revision=32609
2010-04-29 23:53:57 +00:00
Bill Meier 6812b68eb1 From Yaniv Kaul: constify parameters
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-03 18:18:50 +00:00
Bill Meier d32b4c0758 Revert SVN #32360 until Windows compilation errors corrected.
svn path=/trunk/; revision=32361
2010-04-02 15:18:03 +00:00
Bill Meier 049f9eac85 From Yaniv Kaul: constify parameters
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422

svn path=/trunk/; revision=32360
2010-04-02 14:37:49 +00:00
Anders Broman 4e66c899d1 From Jakub Zawadzki:
Optimizations.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4303

svn path=/trunk/; revision=31967
2010-02-23 19:28:38 +00:00
Bill Meier e0064797fb Use more unique names for certain enum constants.
(enum constant names are part of the global name space).
(Fixes at least one gcc -Wshadow warning).

svn path=/trunk/; revision=31572
2010-01-19 19:37:03 +00:00
Gerasimos Dimitriadis a72447c0da Avoid assertion failure when adding a column of type
IEEE 802.11 TX rate.

svn path=/trunk/; revision=31527
2010-01-14 18:30:57 +00:00
Bill Meier cfca0020c5 From Jakub Zawadzki: remove double NUL termination.
From me: fix a 3rd instance.
See: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3339

svn path=/trunk/; revision=31373
2009-12-28 16:12:25 +00:00
Kovarththanan Rajaratnam e981de7a99 Don't attempt to fill custom columns if we don't have a valid column expression.
svn path=/trunk/; revision=30407
2009-10-08 16:35:58 +00:00
Stig Bjørlykke 9401317238 Removed unused variable 'sep_len' in col_do_append_str().
svn path=/trunk/; revision=30199
2009-09-29 19:19:40 +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
Kovarththanan Rajaratnam a05517fd21 (Cosmetic) Reorder functions
svn path=/trunk/; revision=30081
2009-09-22 21:08:48 +00:00
Kovarththanan Rajaratnam afe5b2fe9d Use ep_verify_pointer() in col_set_str() to verify that the caller hasn't passed us something from the ephemeral pool
svn path=/trunk/; revision=30012
2009-09-20 12:09:25 +00:00
Kovarththanan Rajaratnam b50ffb1c6b Assert on null string in col_set_str(). This is reasonable behaviour since the caller is expeceted to pass in a constant string
svn path=/trunk/; revision=30010
2009-09-20 10:19:37 +00:00
Kovarththanan Rajaratnam f4e27f4549 Add a couple of g_asserts
svn path=/trunk/; revision=29992
2009-09-20 07:48:33 +00:00
Bill Meier 38dae2ab74 (Trivial) Fix a typo in a comment
svn path=/trunk/; revision=29899
2009-09-14 16:04:54 +00:00
Kovarththanan Rajaratnam 8d802d414c Make sure that we point the current column to a constant string if we have no address.
Fixes http://wiki.wireshark.org/Development/OptimizePacketList?action=diff&rev1=20&rev2=21

svn path=/trunk/; revision=29860
2009-09-11 14:21:04 +00:00
Kovarththanan Rajaratnam 129f907f0c Move some CHECK_COL to our public functions, allowing us to bail our more quickly
svn path=/trunk/; revision=29859
2009-09-11 14:00:36 +00:00
Kovarththanan Rajaratnam de23d92163 Add an option to col_fill_in() to allow us to disable column expression 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-08 19:00:54 +00:00
Kovarththanan Rajaratnam d713b846e6 Hoist COL_CHECK_REF_TIME in the call hierarchy. Use it in our public functions, not our internal functions
svn path=/trunk/; revision=29798
2009-09-08 15:55:10 +00:00
Kovarththanan Rajaratnam d75778eb4a Custom columnfication:
* Deprecate COL_DCE_CTX ("Context ID). Use dcerpc.cn_ctx_id

svn path=/trunk/; revision=29797
2009-09-08 14:59:26 +00:00
Kovarththanan Rajaratnam bc845e056c Custom column deprecation:
We fill out the COL_DSTIDX column by using 'pinfo->dst_idx'. This member is only set by the MDS Header dissector based on 'mdshdr.dstidx'. So remove COL_DSTIDX and migrate to 'mdshdr.dstidx' custom column.

svn path=/trunk/; revision=29795
2009-09-08 14:29:08 +00:00
Kovarththanan Rajaratnam 62af6eff84 Custom column deprecation:
We fill out the COL_SRCIDX column by using 'pinfo->src_idx'. This member is only set by the MDS Header dissector based on 'mdshdr.srcidx'. So remove COL_SRCIDX and migrate to 'mdshdr.srcidx' custom column.

svn path=/trunk/; revision=29794
2009-09-08 14:26:09 +00:00
Kovarththanan Rajaratnam 2cf14900d2 Custom column deprecation:
We fill out the COL_RXID column by using 'pinfo->rxid'. This member is only set by the Fibre Channel dissector based on 'fc.rx_id'. So remove COL_RXID and migrate to 'fc.rx_id' custom column.

svn path=/trunk/; revision=29793
2009-09-08 14:21:14 +00:00
Kovarththanan Rajaratnam cdfeebdd26 Custom column deprecation:
We fill out the COL_OXID column by using 'pinfo->oxid'. This member is only set by the Fibre Channel dissector based on 'fc.ox_id'. So remove COL_OXID and migrate to 'fc.ox_id' custom column.

svn path=/trunk/; revision=29792
2009-09-08 14:17:36 +00:00
Anders Broman c6d4c80371 From : Didier Gautheron
speed up a little proto_custom_set.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3972

svn path=/trunk/; revision=29789
2009-09-08 10:33:15 +00:00
Anders Broman 65e2d90058 Remove an unused parameter.
svn path=/trunk/; revision=29784
2009-09-08 04:50:48 +00:00
Kovarththanan Rajaratnam 3efea601d4 Make sure that we fill in the frame_data before passing it onto col_fill_in_frame_data
svn path=/trunk/; revision=29780
2009-09-07 19:43:05 +00:00
Kovarththanan Rajaratnam 72c9662da6 ntroduce some seasonal address name lookup functions which we use when NEW_PACKET_LIST is defined. This change partially reverts some parts of r29768, which didn't seem to work because it assumed that get_addr_name() would always return a seasonal string. This wasn't the case if the adddress type was AT_STRINGZ.
svn path=/trunk/; revision=29771
2009-09-07 16:05:37 +00:00
Anders Broman 2fe83ebaed mark unused parameter.
svn path=/trunk/; revision=29769
2009-09-07 15:01:51 +00:00
Anders Broman 3abd049a9b Use constant strings for Addresses saves some memory.
svn path=/trunk/; revision=29768
2009-09-07 14:03:05 +00:00
Kovarththanan Rajaratnam c7eb52b086 Remove already #if 0'ed code that was made redundant due to COL_CIRCUIT_ID custom column deprecation
svn path=/trunk/; revision=29745
2009-09-06 13:35:27 +00:00
Kovarththanan Rajaratnam bfe9f61a7c Remove static custom column variable which is no longer used
svn path=/trunk/; revision=29744
2009-09-06 13:25:31 +00:00
Kovarththanan Rajaratnam 09237c27f9 Inline col_has_time_fmt() into col_based_on_frame_data()
svn path=/trunk/; revision=29739
2009-09-06 10:03:06 +00:00
Kovarththanan Rajaratnam 474f5930db Macrofy have_custom_cols() -> HAVE_CUSTOM_COLS() internally in columns-utils.c
svn path=/trunk/; revision=29737
2009-09-06 09:11:17 +00:00
Kovarththanan Rajaratnam 22077a8eb1 Macrofy check_col() -> CHECK_COL() internally in columns-utils.c
svn path=/trunk/; revision=29736
2009-09-06 09:03:15 +00:00
Kovarththanan Rajaratnam 7d4cf0b966 col_custom_set_fstr() is unused. Remove it
svn path=/trunk/; revision=29722
2009-09-05 18:45:55 +00:00
Kovarththanan Rajaratnam a108023b2a COL_BSSGP_TLLI is deprecated
svn path=/trunk/; revision=29721
2009-09-05 18:39:46 +00:00
Kovarththanan Rajaratnam 7e8455ff63 Reorder col_fill_in()
svn path=/trunk/; revision=29720
2009-09-05 18:28:06 +00:00
Martin Mathieson b076f98b46 Show correct time value for "Time since previous displayed frame".
svn path=/trunk/; revision=29572
2009-08-26 22:31:06 +00:00
Anders Broman 32e7cddf70 From Didier Gautheron:
move custom col set from  proto_tree_set_xxx() to
epan_dissect_fill_in_columns().
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3930

I'v added the new functions to the .h files.

svn path=/trunk/; revision=29551
2009-08-25 21:10:35 +00:00
Kovarththanan Rajaratnam 23d4eba3b1 Custom columnfication:
* Deprecate COL_DELTA_CONV_TIME (Delta time (conversation)). Use tcp.time_delta

svn path=/trunk/; revision=29524
2009-08-23 12:30:48 +00:00
Kovarththanan Rajaratnam b9cbd15469 Custom columnfication:
* Deprecate COL_REL_CONV_TIME (Relative time (conversation)). Use tcp.time_relative

svn path=/trunk/; revision=29523
2009-08-23 12:24:14 +00:00
Kovarththanan Rajaratnam 55cf35e3a0 Custom columnfication:
* Deprecate COL_FR_DLCI (Frame Relay DLCI). Use fr.dlci

svn path=/trunk/; revision=29522
2009-08-23 12:16:10 +00:00
Kovarththanan Rajaratnam 1a7b6733cd #if 0 col_set_circuit_id(). It isn't being used
svn path=/trunk/; revision=29519
2009-08-23 11:13:53 +00:00
Kovarththanan Rajaratnam 51ca1739ae Custom columfication:
* Deprecate COL_DSCP_VALUE (IP DSCP Value). Use ip.dsfield

svn path=/trunk/; revision=29518
2009-08-23 11:12:12 +00:00
Kovarththanan Rajaratnam 00670c55c6 Custom columfication:
* Deprecate COL_HPUX_DEVID (HP-UX Device ID). Use nettl.devid

svn path=/trunk/; revision=29517
2009-08-23 10:25:51 +00:00
Kovarththanan Rajaratnam 205129d25c Custom columfication:
* Deprecate COL_HPUX_SUBSYS (HP-UX Nettl Subsystem). Use nettl.subsys

svn path=/trunk/; revision=29516
2009-08-23 10:20:42 +00:00
Kovarththanan Rajaratnam 56369978ae Custom columfication:
* Deprecate COL_CIRCUIT_ID (Circuit ID). Use iax2.call

svn path=/trunk/; revision=29515
2009-08-23 09:52:57 +00:00
Kovarththanan Rajaratnam 6b89de8393 Custom columfication:
* Deprecate COL_COS_VALUE (L2 COS Value (802.1p)). Use vlan.priority

svn path=/trunk/; revision=29513
2009-08-23 09:07:54 +00:00
Kovarththanan Rajaratnam 3d740a490f We initialize col_expr and col_expr_val in col_init() so there's no need to initialize them again in col_set_xxx()
svn path=/trunk/; revision=29507
2009-08-22 19:29:44 +00:00
Anders Broman 1108352f00 Use col_text in frame data.
- colum-utils needs more work, based on
 Didier Gautherons optimizations patch http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=29489
2009-08-21 10:12:47 +00:00
Anders Broman 100aeddafe From Didier Gautheron:
Extracted from optimizations patch http://wiki.wireshark.org/Development/Optimization
Make col_expr const gchar.

svn path=/trunk/; revision=29471
2009-08-19 07:55:11 +00:00
Anders Broman a1a129abb5 Prepare to store column data from pinfo.
svn path=/trunk/; revision=29454
2009-08-17 15:05:43 +00:00
Anders Broman ca335d25cb From Kovarththanan Rajaratnam:
- Compute and cache color/custom filters dynamically.
- Delay column construction.

svn path=/trunk/; revision=29370
2009-08-10 20:52:56 +00:00
Anders Broman cb771536df From Kovarththanan Rajaratnam:
Only fill in frame_data vals when needed.

svn path=/trunk/; revision=29203
2009-07-27 08:33:26 +00:00
Anders Broman 9ca4ac2bed From Kovarththanan Rajaratnam:
Use frame_data values .

svn path=/trunk/; revision=29202
2009-07-27 03:34:57 +00:00
Anders Broman 733bdd4e56 Try to get the #includes right - take 2.
svn path=/trunk/; revision=29176
2009-07-23 08:53:13 +00:00
Anders Broman b4a0cda41e Try to get the #includes right.
svn path=/trunk/; revision=29175
2009-07-23 07:57:32 +00:00
Anders Broman ded297677f From Kovarththanan Rajaratnam:
Precompile custom columns filters.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3767

svn path=/trunk/; revision=29174
2009-07-23 05:48:39 +00:00
Stephen Fisher c570bf42e2 Change some g_malloc() calls to g_new() to make the code easier to read.
svn path=/trunk/; revision=29162
2009-07-22 05:02:24 +00:00
Stig Bjørlykke 8c4abdfb47 From didier gautheron via bug 3762:
This patch removes col_expr in frame_data structure,
it can be recomputed when needed.

svn path=/trunk/; revision=29159
2009-07-21 16:48:16 +00:00
Gerald Combs 6348c17c16 size_t fixes.
svn path=/trunk/; revision=27984
2009-04-07 16:36:52 +00:00
Stig Bjørlykke 825f3d64e0 Put check_col() in each column util function, as discussed in bug 2902.
This will eliminate some problems when not checking before calling the 
functions, and makes the dissector code looks cleaner.

Cleaning up the dissectors is TBD.

svn path=/trunk/; revision=27806
2009-03-20 12:41:03 +00:00
Stig Bjørlykke 965448f3e7 From Jakub Zawadzki (bug 3334):
Fix typo in filter name for frame.len (Packet length column).

svn path=/trunk/; revision=27721
2009-03-15 13:50:42 +00:00
Jaap Keuter acdf91e263 Make "Copy as Filter" on the packet list actually work.
Up till now every packet in the packet list got a copy of the pointer to the filter expressions for
the last packets' columns. Hence any 'Copy as Filter" on a column got the expression of the last
packet in the packet list. Instead every packet needs to get a pointer to the filter expressions 
for its own columns. This requires making a copy of the filter expressions themselves.

Since this is a bug in 1.0 as well the GLIB1 code is provided for backporting, which can later be dropped from the development tree.

svn path=/trunk/; revision=27396
2009-02-09 07:10:46 +00:00
Stig Bjørlykke c64847fe16 Update all time columns when changing the time precision.
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-06-14 16:51:11 +00:00
Stig Bjørlykke 1b4857ee33 Initialize ipv6_addr before we use it.
svn path=/trunk/; revision=24553
2008-03-04 18:55:36 +00:00
Stig Bjørlykke fd906bb33a Free compiled dfilter after usage.
svn path=/trunk/; revision=24549
2008-03-04 12:12:41 +00:00
Stephen Fisher ea297f369f Convert strcpy() calls to g_strlcpy()
svn path=/trunk/; revision=24532
2008-03-02 23:45:24 +00:00
Stephen Fisher 56226b49b8 Custom column updates:
- 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-03-01 05:16:45 +00:00
Stig Bjørlykke 51b26f95f3 Improved custom columns with custom title.
Fixed a crash when adding an empty custom field.

svn path=/trunk/; revision=24438
2008-02-22 22:47:19 +00:00
Stig Bjørlykke 3ebc2a4d00 Check for existing cinfo in have_custom_cols().
This fixes the latest buildbot fuzz failures.

svn path=/trunk/; revision=24421
2008-02-22 13:41:25 +00:00
Stephen Fisher c7d656555a Use custom column check function for custom columns to make sure the dfilter
is always primed when needed.  This ensures more than just the first row
has a custom column's information in it.


svn path=/trunk/; revision=24413
2008-02-22 01:25:45 +00:00
Stephen Fisher 8f3a1b0d16 Check in changes originally checked in as SVN revision 24308 (new column
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-13 05:05:33 +00:00
Stephen Fisher 5e893a8b1c Revert commit 24308 until I can get it to compile on Windows/Linux/Solaris
(strangely, it compiled fine on my MacOS X machine).


svn path=/trunk/; revision=24309
2008-02-12 08:09:22 +00:00
Stephen Fisher 0a85a9e4c6 Introduce a new column type called custom, which lets you put any display
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
2008-02-12 03:16:09 +00:00
Anders Broman 1143ab41b1 Apply yet another set of the optimization patches:
- Use a fast path for the most common use of tvb_get_xxx functions:
offset is >= 0 and tvb->real_data is set (this one is always true).
- match_strval() is a linear search, put the most common protocols
TCP/UDP/RDP first.
- fix gtk1 g_strlcat declaration Use g_strlcat

svn path=/trunk/; revision=23285
2007-10-27 14:44:29 +00:00
Anders Broman 3a16fb20a3 Apply yet another set of the optimization patches:
Replace strncpy with g_strlcpy.
Add g_strlcat for GTK1 and don't use g_snprintf in GTK1 g_strlcpy
printf family is very slow.

svn path=/trunk/; revision=23273
2007-10-26 05:42:12 +00:00
Sake Blok a592e6412c This patch adds two new column types:
- 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-10-03 14:02:08 +00:00
Mike Duigou 2697adeda4 Special casing is no longer necessary for formatting of AT_STRINGZ in col_set_addr() as
address_to_str_buf() does now take COL_MAX_LEN as a parameter.

Add support for AT_URI to col_expr for addresses in col_set_addr(). The field names are "uri.src" and "uri.dst".


svn path=/trunk/; revision=23017
2007-09-28 19:00:45 +00:00
Mike Duigou 6aeb75c3f0 Changes get_addr_name_buf() to use the more common convention where the provided buffer size is the entire size of the buffer including the space for the terminating \0
svn path=/trunk/; revision=23016
2007-09-28 18:23:59 +00:00
Gerald Combs 72daa58e19 Instead of converting between 802.11 frequencies and channels umpteen
different ways, add a set of common conversion routines.  Add a
"Frequency/Channel" column and fill it in where we can.  Fix RSSI column
printing in PPI.

Fix up whitespace along the way.

svn path=/trunk/; revision=22538
2007-08-17 19:34:14 +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 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Ulf Lamping 5aa4b3cecd remove remaining warnings in epan dir and set the "treat warning as error" barrier
(epan/dissectors still waiting for a cleanup)

svn path=/trunk/; revision=21181
2007-03-25 15:13:03 +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
Stephen Fisher 6d8d2854c8 From Sake Blok:
Fix for bug #491: Unexpected frame.time_delta behavior

This patch ... fixes bug 491. It does this by changing the
behaviour of the frame.time_delta field so it reflects the delta
time between captured packets (tshark already did this).  To keep
the delta time between displayed packets, the field 
frame.time_delta_displayed is created.


svn path=/trunk/; revision=21154
2007-03-23 18:08:17 +00:00
Ulf Lamping b323125a9c fix some more warnings
svn path=/trunk/; revision=21105
2007-03-22 00:49:06 +00:00
Stephen Fisher f4e0b64fe7 From Thomas Sillaber:
Create two new columns: IP DSCP and L2 COS (802.1p)


svn path=/trunk/; revision=20118
2006-12-11 20:24:51 +00:00
Stephen Fisher 75acf34518 From Douglas Pratley with trivial changes and documentation changes
by myself:

Corrected patch; epan/column.c and epan/column_utils.c were not included. This
one has now been properly tested against a clean checkout of today's code.

- New menu option available under view\time display format
- New sub-option (e) to -t switch for both wireshark and tshark
- Extended recent settings code to handle new value
- Did NOT add new explicit epoch time column


svn path=/trunk/; revision=20040
2006-12-05 03:19:51 +00:00
Anders Broman 6c9ce8acf8 Froim Rene Pilz:
This patch consists also the last issues. Additionally it solves:
- For the SSCOP frames the AAL5 decoding was not performed due to an earlier patch. This caused that no SSCOP message was properly decoded.
- As the detection between a LANE frame and a SSCOP frame is rather hard a switch within the atm dissector is included which enforce SSCOP dissecting over a LANE frame. At the moment I do not see a better solution for that.

svn path=/trunk/; revision=20013
2006-11-29 06:44:07 +00:00
Ronnie Sahlberg 714ce64b12 add a new port type for usb endpoints
start introducing conversations to the usb dissector so that we can start tracking requests/responses
which we need to in order to dissect for example the data returned by a device to a GET DESCRIPTORS call



svn path=/trunk/; revision=19539
2006-10-15 06:10:59 +00:00
Ulf Lamping ecb07acdef add a new column DCE/RPC context ID
svn path=/trunk/; revision=18578
2006-06-26 20:46:15 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Jörg Mayer 256225d73f Mike Hall:
This will add the ability to configure a .1q vlan column in ethereal.

Me:
Change 1q -> 1Q

svn path=/trunk/; revision=17058
2006-01-20 08:48:43 +00:00
Jörg Mayer 5222a20c1c "Fix" for warning: enumeration value 'TS_NOT_SET' not handled in switch
Just g_assert until someone who understands the code checks in a real
   fix.

svn path=/trunk/; revision=16855
2005-12-18 23:29:37 +00:00
Ronnie Sahlberg 4e4f6d67fa in svn 15335 the tcp analysis was changed to do its stuff and to populate (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-04 13:34:52 +00:00
Ulf Lamping 3b66410f77 add doxygen comments to column-utils.h and do a slight code cleanup
svn path=/trunk/; revision=16066
2005-10-02 14:56:27 +00:00
Gerald Combs 02b91e3978 If we set one or more time references and then changed the time display
format, our time-formatted columns would display a time value instead of
"*REF*".  Don't to that.

svn path=/trunk/; revision=15645
2005-08-31 21:38:08 +00:00
Ulf Lamping 723c80ea90 timestamp display precision:
- automatic adjustment depending on file format
- manual adjustment through menu items

save the setting in the recent file

svn path=/trunk/; revision=15534
2005-08-25 21:29:54 +00:00
Ulf Lamping 6f43fbb2f0 EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...

What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.

As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.

Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...

As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...

svn path=/trunk/; revision=15520
2005-08-24 21:31:56 +00:00
Ulf Lamping 994496a184 several times replacing:
sprintf -> g_snprintf
snprintf -> g_snprintf
vsnprintf -> g_vsnprintf
strdup -> g_strdup

svn path=/trunk/; revision=15412
2005-08-18 19:31:15 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Ulf Lamping 3d831f4bfb add a new DCE/RPC related column, which contains the call_id for connection oriented packets or the sequence number for connectionless (datagram) packets.
This is extremely useful, to keep track of the corresponding request/response packets of a DCE/RPC call (which can be quite a lot packets if fragmentation is used).

svn path=/trunk/; revision=14826
2005-06-30 22:46:19 +00:00
Ronnie Sahlberg 3b435e70a3 From Mark C Brown NETTL updates
svn path=/trunk/; revision=13999
2005-04-01 10:17:05 +00:00
Guy Harris e41c4740c9 Handle XNS IDP socket numbers.
Handle SMB-over-SPP.

svn path=/trunk/; revision=13635
2005-03-06 20:13:58 +00:00
Luis Ontanon f0c8a7ab65 From Francisco Alcoba:
changed the behaviour of get_addr_name:
 - resolve to a name if the address supports it
 - call address_to_str if it does not, but the address is valid
 - return "NONE" if it is AT_NONE


svn path=/trunk/; revision=13463
2005-02-22 01:55:04 +00:00
Guy Harris f2972f0925 Properly cast the pointer assigned to col_info->col_data.
svn path=/trunk/; revision=12889
2004-12-31 02:03:16 +00:00
Guy Harris 467e33d1b1 Make the "col_data" field in a "column_info" structure a pointer to an
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=12875
2004-12-30 23:42:02 +00:00
Guy Harris 0ccf418724 Add a "get_addr_name()" routine that takes an "address *" and attempts
to resolve it to a name.

Fix up some const-pointer-to-non-const-pointer, and
function-pointer-to-void-*, conversions.

Fix some comments.

svn path=/trunk/; revision=12863
2004-12-30 02:10:24 +00:00
Guy Harris f724a1399f From Tomas Kukosa: fix "col_set_str()" to work correctly with fenced
columns.

svn path=/trunk/; revision=12283
2004-10-12 18:08:23 +00:00
Guy Harris cc5f5d5d5d When deciding whether to add a separator or not, look at the buffer to
which we're going to append the data.

svn path=/trunk/; revision=11820
2004-08-24 08:20:20 +00:00
Guy Harris e95e6cbfbc In "col_append_sep_fstr()" and "col_append_sep_str()", check "col_data"
rather than "col_buf", so that we correctly handle a column set with
"col_set_str()" (where we set "col_data" to point to the string, and
leave "col_buf" alone).

svn path=/trunk/; revision=11818
2004-08-24 07:38:29 +00:00
Guy Harris c3f8410630 From Neil Piercy: put in some missing "put in the terminating NUL"s
after "vsnprintf()" calls.

svn path=/trunk/; revision=11648
2004-08-10 21:29:57 +00:00
Guy Harris 3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
include of <resolv.h> in any system header file gets the system
<resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]).

svn path=/trunk/; revision=11615
2004-08-06 19:57:49 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
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-07-18 00:24:25 +00:00
Guy Harris a1d95cbec1 From Olivier Biot: support AT_STRINGZ columns.
svn path=/trunk/; revision=10544
2004-04-02 09:04:12 +00:00
Olivier Biot 11f9232336 From Lars Roland: Move timestamp_type into libethereal and provide accessor
methods for getting and setting the timestamp type.

This is a move towards a real libethereal shared library.

svn path=/trunk/; revision=10402
2004-03-18 19:04:33 +00:00
Guy Harris d4b00639d6 From Jeff Morriss:
support the ISUP CIC as a circuit ID;

	add a preference option to control whether to put the CIC into
	the Info column or not.

svn path=/trunk/; revision=10265
2004-02-29 08:47:11 +00:00
Olivier Biot 3f1530d2d6 Add new col_append methods which will prepend the (format) string with the
provided separator (or a default ", ") if the column is not empty.

svn path=/trunk/; revision=9986
2004-02-05 23:57:15 +00:00
Guy Harris f914e6e9e7 Fix the spelling of "cumulative" (and variables whose names derive from
that spelling).

svn path=/trunk/; revision=9917
2004-01-31 04:10:05 +00:00
Guy Harris 073a8b42ca Clean up whitespace, and use "%u" to print unsigned quantities.
svn path=/trunk/; revision=9900
2004-01-29 03:37:31 +00:00
Ulf Lamping 0353c5823f move timestamp format options from "View->Options" dialog into
menuitems under "View->Time Display Format".
renamed timestamp enum items e.g. from ABSOLUTE to TS_ABSOLUTE,
to prevent conflicting definitions with MSVC

svn path=/trunk/; revision=9729
2004-01-19 03:46:43 +00:00
Guy Harris 11d8817da0 Don't automatically size the columns - that's expensive in large
captures, as it has to compute the width of an auto-resizing column in
every row.  Just pick fixed widths for the columns (and tune the width
of the "Protocol" column so that it's not narrower than the column
title).

svn path=/trunk/; revision=9219
2003-12-09 06:48:40 +00:00
Guy Harris 0c84e1c329 From Didier Gautheron: for each column format type, save the first and
last columns, if any, with that format, and use that to speed up
processing of columns with a particular format and checking whether
we're displaying a column with a particular format.

svn path=/trunk/; revision=9147
2003-12-02 23:14:32 +00:00
Ronnie Sahlberg 007d873671 Added TimeReference frames.
One can now select a packet and mark it as a TimeReference packet using the menu.
A TimeReference packet will be indicated by having all timestamp related column entries replaced by the string *REF*
A TimeReference packet will always be displayed in the packet pane, and overrides any display filters.

When a frame is a TimeReference frame, all later frames will calculate the TimeRelativeToFirstPacket  relative to the timestamp of the TimeReference frame instead of the first frame of the capture.

You can have any number of TimeReference frames you like.

svn path=/trunk/; revision=8459
2003-09-12 02:48:23 +00:00
Ronnie Sahlberg b9ce30cd35 And for Cal,
Ethereal presents   a column to display culmulative bytes into the capture.

A new column type is added : Culmulative Bytes.
While PacketLength column type specifies the number of bytes in the current packet,
Culmulative Bytes specifies the culmulative number of bytes from the start of the capture.

svn path=/trunk/; revision=8359
2003-09-03 10:49:03 +00:00
Guy Harris 87d35a7c55 In "col_set_addr()", don't do anything other than clearing the column
expression information if the address type is AT_NONE -
"address_to_str_buf()" panics if passed an AT_NONE address, as there's
nothing sensible one can do with them.  (A null string wouldn't be
appropriate here, as a dissector might have set the address columns to a
string.)

svn path=/trunk/; revision=8269
2003-08-26 06:40:25 +00:00
Guy Harris dcf024f759 Use "address_to_str_buf()" to generate column data for non-resolved
addresses.

svn path=/trunk/; revision=8262
2003-08-26 01:30:48 +00:00
Guy Harris d9c401c74c Create an "address_to_str_buf()" routine, called by "address_to_str()",
which fills in a caller-supplied buffer.

Create "_buf()" versions of various "to_str" routines for various
address types, and create a routine to map SNA FIDs to strings, and use
them to finish up "address_to_str_buf()".

Get rid of the declaration of "sna_fid_type_4_addr_to_str()" in
"packet-sna.h", as that routine has been swallowed up in
"sna_fid_to_str()".

svn path=/trunk/; revision=8260
2003-08-26 01:00:30 +00:00
Guy Harris 2678786425 Pull the stuff done in "dissect_packet()" to initialize a column_info
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-16 05:55:41 +00:00
Guy Harris 24ec2110d1 Add the notion of a "fence" to columns. A dissector can set the fence
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
2003-04-16 04:52:55 +00:00