aboutsummaryrefslogtreecommitdiffstats
path: root/epan/frame_data.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-03TShark doesn't need column text attached to each frame; move col_textGuy Harris1-2/+0
and col_text_len from the frame_data structure to the PacketRecord structure. svn path=/trunk/; revision=36967
2011-04-27Create a new frame_data_sequence data type; it represents a denseGuy Harris1-1/+0
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-25Store the frame_data structures in a tree, rather than a linked list. Guy Harris1-2/+0
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-03-08Removal of the old packet-list in favor of the new packet list.Sake Blok1-2/+0
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
2010-07-22In the frame_data structure, expand the per-packetGuy Harris1-3/+3
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-06-23Ensure the "Delta time displayed" is always zero for the first displayedStig Bjørlykke1-8/+7
packet, and not the delta from the first captured package. svn path=/trunk/; revision=33301
2010-01-19Use more unique names for certain enum constants.Bill Meier1-1/+1
(enum constant names are part of the global name space). (Fixes at least one gcc -Wshadow warning). svn path=/trunk/; revision=31572
2009-12-17Introduce "Ignore Packet" in the packet list.Stig Bjørlykke1-0/+1
This will remove the package from the dissection functions without removing it from the capture file. svn path=/trunk/; revision=31287
2009-10-05se_alloc returns a non NULL pointer so we don't have to check for NULLKovarththanan Rajaratnam1-5/+2
svn path=/trunk/; revision=30343
2009-09-22Make frame_data_set_after_dissect() callers do the necessary checks insteadKovarththanan Rajaratnam1-18/+15
svn path=/trunk/; revision=30068
2009-09-22Switch Wireshark GUI (file.c) over to using frame_data.cKovarththanan Rajaratnam1-7/+4
svn path=/trunk/; revision=30067
2009-09-22Refactor frame_data_init() into frame_data_set_before_dissect() and ↵Kovarththanan Rajaratnam1-7/+36
frame_data_set_after_dissect(). svn path=/trunk/; revision=30066
2009-09-21Bring frame_data_init() and add_packet_to_packet_list() more in sync by ↵Kovarththanan Rajaratnam1-7/+13
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-21Guard fdata->col_text_len/fdata->col_text with NEW_PACKET_LISTKovarththanan Rajaratnam1-38/+41
svn path=/trunk/; revision=30044
2009-09-21Move frame_data_init() declaration to frame_data.hKovarththanan Rajaratnam1-5/+6
svn path=/trunk/; revision=30033
2009-09-20Fix return type for frame_data_init()Kovarththanan Rajaratnam1-0/+1
svn path=/trunk/; revision=30024
2009-09-20Introduce frame_data_cleanup() and start using itKovarththanan Rajaratnam1-0/+9
svn path=/trunk/; revision=30023
2009-09-20Introduce frame_data_init() and get rid of fill_in_fdata() in tshark.cKovarththanan Rajaratnam1-4/+77
svn path=/trunk/; revision=30021
2009-07-22From Jakub Zawadzki:Anders Broman1-0/+75
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
2008-01-08Changed email address for Gerald from zing.org to wireshark.orgStig Bjørlykke1-1/+1
in a lot of files, which I suppose is correct. svn path=/trunk/; revision=24034
2006-05-21name changeRonnie Sahlberg1-1/+1
svn path=/trunk/; revision=18197
2006-01-24minor code cleanupUlf Lamping1-1/+1
svn path=/trunk/; revision=17093
2005-08-13get rid of one more gmemchunkRonnie Sahlberg1-36/+2
svn path=/trunk/; revision=15332
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
2003-07-08Added prototype for p_rem_proto_data()Tim Potter1-8/+2
Fixed bug in said function which prevented it from actually working. svn path=/trunk/; revision=7982
2002-11-27Cast various "const gpointer" arguments to const pointers rather thanGuy Harris1-3/+5
non-const pointers. svn path=/trunk/; revision=6683
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-8/+8
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-5/+1
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
2001-04-01Moved the frame_data structures and functions from packet.{h,c} toEd Warnicke1-0/+155
frame_data{h,c}. Added a frame_data_init to be called by epan_init. svn path=/trunk/; revision=3223