Commit Graph

95 Commits

Author SHA1 Message Date
Stig Bjørlykke 0eefc553b2 From Edwin Groothuis via bug 6179:
Added Time Shift functionality.

From me:
Renamed to use "Time Shift" everywhere + some other minor cleanups.

svn path=/trunk/; revision=38510
2011-08-13 17:39:38 +00:00
Jakub Zawadzki 63981c8b35 Packet editor: support for saving changed frames.
svn path=/trunk/; revision=37099
2011-05-12 19:47:49 +00:00
Guy Harris b42fab3a61 TShark doesn't need column text attached to each frame; move col_text
and col_text_len from the frame_data structure to the PacketRecord
structure.

svn path=/trunk/; revision=36967
2011-05-03 01:19:55 +00:00
Guy Harris 71b31d92fc Store the frame_data structures in a tree, rather than a linked list.
This lets us get rid of the per-frame_data-structure prev and next
pointers, saving memory (at least according to Activity Monitor's report
of the virtual address space size on my Snow Leopard machine, it's a
noticeable saving), and lets us look up frame_data structures by frame
number in O(log2(number of frames)) time rather than O(number of frames)
time.  It seems to take more CPU time when reading in the file, but
seems to go from "finished reading in all the packets" to "displaying
the packets" faster and seems to free up the frame_data structures
faster when closing the file.

It *is* doing more copying, currently, as we now don't allocate the
frame_data structure until after the packet has passed the read filter,
so that might account for the additional CPU time.

(Oh, and, for what it's worth, on an LP64 platform, a frame_data
structure is exactly 128 bytes long.  However, there's more stuff to
remove, so the power-of-2 size is not guaranteed to remain, and it's not
a power-of-2 size on an ILP32 platform.)

It also means we don't need GLib 2.10 or later for the two-pass mode in
TShark.

It also means some code in the TCP dissector that was checking
pinfo->fd->next to see if it's NULL, in order to see if this is the last
packet in the file, no longer works, but that wasn't guaranteed to work
anyway:

	we might be doing a one-pass read through the capture in TShark;

	we might be dissecting the frame while we're reading in the
	packets for the first time in Wireshark;

	we might be doing a live capture in Wireshark;

in which case packets might be prematurely considered "the last packet".
#if 0 the no-longer-working tests, pending figuring out a better way of
doing it.

svn path=/trunk/; revision=36849
2011-04-25 19:01:05 +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
Anders Broman a009cc0605 Doxygen changes.
svn path=/trunk/; revision=33990
2010-08-29 10:47:38 +00:00
Anders Broman a96e6b2047 Doxygen changes.
svn path=/trunk/; revision=33981
2010-08-28 19:27:19 +00:00
Guy Harris a887d3a9f3 In the frame_data structure, expand the per-packet
encapsulation/data-link type to 16 bits, and shuffle some fields to
eliminate some unnecessary padding - the net result should be no change
in the structure size for 32 bits and a few bytes removed for 64 bits.

This allows more encapsulation types - we've just about run out of the
ones that fit in a signed 8-bit integer - and thus should fix bug 5025.

svn path=/trunk/; revision=33613
2010-07-22 09:11:16 +00:00
Stig Bjørlykke 47be3577a7 Introduce "Ignore Packet" in the packet list.
This will remove the package from the dissection functions without
removing it from the capture file.

svn path=/trunk/; revision=31287
2009-12-17 01:18:14 +00:00
Jaap Keuter 85748db18a Provide some utility macros for commonly used frame data fields.
svn path=/trunk/; revision=31126
2009-11-29 22:51:28 +00:00
Anders Broman 54aa776069 From Tobias Witek:
w protocols: UMTS RLC (ETSI TS 125 322), UMTS MAC (ETSI TS 125 321)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3495

svn path=/trunk/; revision=30838
2009-11-05 21:54:06 +00:00
Kovarththanan Rajaratnam 14d2f617c2 Refactor frame_data_init() into frame_data_set_before_dissect() and frame_data_set_after_dissect().
svn path=/trunk/; revision=30066
2009-09-22 14:23:20 +00:00
Kovarththanan Rajaratnam 3ea9409792 Store 'color_filter' as const in 'frame_data'
svn path=/trunk/; revision=30051
2009-09-21 18:48:53 +00:00
Kovarththanan Rajaratnam 9e21f0f2d8 Guard fdata->col_text_len/fdata->col_text with NEW_PACKET_LIST
svn path=/trunk/; revision=30044
2009-09-21 17:12:46 +00:00
Kovarththanan Rajaratnam 46b7430557 Move frame_data_init() declaration to frame_data.h
svn path=/trunk/; revision=30033
2009-09-21 11:26:23 +00:00
Kovarththanan Rajaratnam 2e282e7567 Introduce frame_data_cleanup() and start using it
svn path=/trunk/; revision=30023
2009-09-20 18:18:29 +00:00
Kovarththanan Rajaratnam a65d590002 Store the packet encapsulation type as gint8. Saves 3 bytes per packet
svn path=/trunk/; revision=29767
2009-09-07 13:54:46 +00:00
Kovarththanan Rajaratnam cd8831c72d Track length of columns strings. We'll need this in order to resize columns quickly
svn path=/trunk/; revision=29759
2009-09-07 11:33:38 +00:00
Anders Broman 0819c36d3a Prepare to store column text in frame data directly.
svn path=/trunk/; revision=29483
2009-08-20 09:49:32 +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 f186fba577 From Jakub Zawadzki:
This patch is cut&paste code from gtk/main_packet_list.c:packet_list_compare()
to new function frame_data_compare()
+ it make use of new function inside packet_list_compare() and
packet_list_compare_records()

svn path=/trunk/; revision=29164
2009-07-22 08:09:22 +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
Stig Bjørlykke 27572c22f4 From Kovarththanan Rajaratnam via bug 3702:
This patch optimizes the data source name processing in add_new_data_source()
by delaying it. We now simply store the constant string and lazily compute the
name when needed. This gives a performance boost because we only need the name
if we have multiple data sources.

svn path=/trunk/; revision=29066
2009-07-12 10:19:13 +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
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 59d6c8ea33 change all file offsets from long to gint64 so we can - theoretically - handle files > 2GB correct.
Please distclean Win32 builds!

svn path=/trunk/; revision=19814
2006-11-05 22:46:44 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ulf Lamping 3f3aae1681 minor code cleanup
svn path=/trunk/; revision=17093
2006-01-24 19:03:09 +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 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
Ronnie Sahlberg aa051bcca6 get rid of one more gmemchunk
svn path=/trunk/; revision=15332
2005-08-13 06:21:37 +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 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
Jörg Mayer 93da1d2117 Remove a C++ style comment
svn path=/trunk/; revision=9630
2004-01-10 13:15:41 +00:00
Olivier Biot f5f60f1ba3 Fix the "unmarking a packet matching a color filter does not apply the color
filter's colors" bug, by storing the pointer to the matching color_filter_t
structure in the frame_data structure.

Replace "frame" and "frames" by "packet" and "packets" in many places.

svn path=/trunk/; revision=9607
2004-01-09 02:57:54 +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
Tim Potter db76d47952 Added prototype for p_rem_proto_data()
Fixed bug in said function which prevented it from actually working.

svn path=/trunk/; revision=7982
2003-07-08 05:29:42 +00:00
Jörg Mayer 48be4e530d Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6116
2002-08-28 20:41:00 +00:00
Guy Harris d939032a24 From Tomas Kukosa: add some more routines to the plugin API.
While we're at it, add "extern" to a bunch of function declaration the
preceding change *didn't* require to have the "extern" added.

svn path=/trunk/; revision=5995
2002-08-14 19:18:20 +00:00
Guy Harris 392a7dfc04 Get rid of the "data_src" member of the "frame_data" structure; put it
in the "packet_info" structure instead, as we don't need a pointer for
every single frame in the capture file, just for each frame for which we
currently have an open "epan_dissect_t".

svn path=/trunk/; revision=5614
2002-06-04 07:03:57 +00:00
Guy Harris 6a21dc7e44 Don't give tvbuffs names; instead, give data sources names, where a
"data source" has a name and a top-level tvbuff, and frames can have a
list of data sources associated with them.

Use the tvbuff pointer to determine which data source is the data source
for a given field; this means we don't have to worry about multiple data
sources with the same name - the only thing the name does is label the
notebook tab for the display of the data source, and label the hex dump
of the data source in print/Tethereal output.

Clean up a bunch of things discovered in the process of doing the above.

svn path=/trunk/; revision=4749
2002-02-18 01:08:44 +00:00
Guy Harris 0fab2ae6d5 Remove some extra blank lines.
svn path=/trunk/; revision=4374
2001-12-10 02:16:59 +00:00
Guy Harris 23319ff023 Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

svn path=/trunk/; revision=4370
2001-12-10 00:26:21 +00:00
Ed Warnicke 20eee44b70 Moved the frame_data structures and functions from packet.{h,c} to
frame_data{h,c}.  Added a frame_data_init to be called by epan_init.

svn path=/trunk/; revision=3223
2001-04-01 04:11:51 +00:00