Commit Graph

82 Commits

Author SHA1 Message Date
Anders Broman 8aea738cda Add the abillity to read and write option comments unedited.
This is POC we may want to have more efficient use of the frame data
structure etc. But this allows for work to be done on the GUI to actually add comments.

svn path=/trunk/; revision=40969
2012-02-11 12:34:39 +00:00
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
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
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 c9b9dd690b Create a new frame_data_sequence data type; it represents a dense
sequence of frame_data structures, indexed by the frame number.  Extract
the relevant bits of the capture_file data structure and move them to
the frame_data_sequence, and move the relevant code from cfile.c and
tweak it to handle frame_data_sequence structures.

Have a possibly-null pointer to a frame_data_sequence structure in the
capture_file structure; if it's null, we aren't keeping a sequence of
frame_data structures (we don't keep that sequence when we're doing
one-pass processing in TShark).

Nothing in libwireshark should care about a capture_file structure; get
rid of some unnecessary includes of cfile.h.

svn path=/trunk/; revision=36881
2011-04-27 02:54:44 +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
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 3ba2260b8b Ensure the "Delta time displayed" is always zero for the first displayed
packet, and not the delta from the first captured package.

svn path=/trunk/; revision=33301
2010-06-23 11:57:16 +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
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
Kovarththanan Rajaratnam 14c4a8f23b se_alloc returns a non NULL pointer so we don't have to check for NULL
svn path=/trunk/; revision=30343
2009-10-05 18:24:59 +00:00
Kovarththanan Rajaratnam 1e8d9b4937 Make frame_data_set_after_dissect() callers do the necessary checks instead
svn path=/trunk/; revision=30068
2009-09-22 14:50:43 +00:00
Kovarththanan Rajaratnam 627a7c1f47 Switch Wireshark GUI (file.c) over to using frame_data.c
svn path=/trunk/; revision=30067
2009-09-22 14:41:30 +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 1989aa700d Bring frame_data_init() and add_packet_to_packet_list() more in sync by adding 'ref_time' handling to frame_data_init(). For tshark/rawshark this is unused because they only do a single pass through the capture file
svn path=/trunk/; revision=30055
2009-09-21 20:17:59 +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 8791df65e1 Fix return type for frame_data_init()
svn path=/trunk/; revision=30024
2009-09-20 19:01: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 e56f27dc99 Introduce frame_data_init() and get rid of fill_in_fdata() in tshark.c
svn path=/trunk/; revision=30021
2009-09-20 17:51:16 +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 6d4a2e7ebf Changed email address for Gerald from zing.org to wireshark.org
in a lot of files, which I suppose is correct.

svn path=/trunk/; revision=24034
2008-01-08 22:54:51 +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
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
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
Guy Harris acaf3c90b3 Cast various "const gpointer" arguments to const pointers rather than
non-const pointers.

svn path=/trunk/; revision=6683
2002-11-27 22:44:41 +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
Jörg Mayer 3105ee542f Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the epan/ directory but leave winsock2.h in inet_pton.c
and inet_ntop.c for now (can't estimate the consequences).

svn path=/trunk/; revision=5928
2002-08-02 21:29:45 +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