aboutsummaryrefslogtreecommitdiffstats
path: root/cfile.h
AgeCommit message (Collapse)AuthorFilesLines
2013-12-03Avoid including <epan/epan.h> in dissectors.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53774
2013-11-29Avoid including <wiretap/wtap.h> in dissectors.Jakub Zawadzki1-0/+9
svn path=/trunk/; revision=53655
2013-11-15Remove comment & defines for frame_data_sequence from cfile.hJakub Zawadzki1-13/+0
It's already in epan/frame_data_sequence.c and no-one else should use it. svn path=/trunk/; revision=53341
2013-08-14Global variables considered harmful.Guy Harris1-0/+6
svn path=/trunk/; revision=51352
2013-08-01Remove fdata->opt_comment, add pkt_comment to pinfoJakub Zawadzki1-0/+1
Original (read from file) comments can be accessed by pkthdr->opt_comment Keep user comments in seperated BST, add new method for epan session to get it. svn path=/trunk/; revision=51090
2013-07-22Abuse epan_t more: add callback to get interface name.Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=50794
2013-07-21Some work on multi file dissectionJakub Zawadzki1-0/+1
- make init_dissection/cleanup_dissection private for libwireshark - implement epan_new(), epan_free() - pass epan_t to epan_dissect* svn path=/trunk/; revision=50761
2013-07-11Move some more modules into epan.Jeff Morriss1-1/+1
svn path=/trunk/; revision=50517
2013-06-16Have the seek-read routines take a Buffer rather than a guint8 pointerGuy Harris1-1/+1
as the "where to put the packet data" argument. This lets more of the libwiretap code be common between the read and seek-read code paths, and also allows for more flexibility in the "fill in the data" path - we can expand the buffer as needed in both cases. svn path=/trunk/; revision=49949
2013-03-30Update -2, -R and -Y to behave consistently as per the concensus reached onEvan Huus1-1/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8223 Mention the new -Y flag and associated changes in the release notes. svn path=/trunk/; revision=48654
2012-12-15Rename the search type menu items to more accurately reflect what we'reGerald Combs1-3/+3
actually doing and what users are likely to want to do. Rename the search enum values and functions to reflect what we're actually doing and add a comment explaining why making searches more correct might make searching worse. Add a search bar to the Qt main window, thus continuing the War On Gratuitous Dialogs. Clear out any previous temporary label stack items before adding a new one. svn path=/trunk/; revision=46541
2012-10-16Add wtap_pseudo_header union to wtap_pkthdr structure.Jakub Zawadzki1-1/+1
Use pkthdr instead of pseudo_header as argument for dissecting. svn path=/trunk/; revision=45601
2012-10-05Add a capture_file * element to packet_range_t and pass it explicitly inGerald Combs1-0/+2
packet_range_init(). Get rid of global cfile references in packet-range.c. C++-ize packet-range.h. Shuffle some includes around. svn path=/trunk/; revision=45333
2012-09-28Revert r45183:r45184Jakub Zawadzki1-1/+1
r45182 was good fix, but updae frames_count when redissecting. svn path=/trunk/; revision=45189
2012-09-27Missing part of r45183Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=45184
2012-09-03cinfo.columns_changed is only used by ui/gtk, move it to cfile structure.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=44750
2012-07-19Pass {delayed_}create_progress_dlg a pointer the top level windowGerald Combs1-0/+1
so that we can properly associate a widget with create, update, and destroy events. Only used by Qt so far but it should be easy enough to add to GTK+. Rename ui/qt/progress_dialog.{h,cpp} to progress_bar.{h,cpp}. Show a progress bar in the status bar of the main window instead of creating a separate dialog. Note that we still need to add a "cancel" mechanism and display the task and item titles somewhere. Thus began the War Against Gratuitous Dialogs. svn path=/trunk/; revision=43833
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-20If the file has an SHB comment or any packet comments, and the userGuy Harris1-0/+1
tries to do "Save As" in a format for which we don't support comments (currently, we only support them for pcap-ng), ask whether they want to discard the comments and save anyway or, *if* the file can be saved in a format for which we *do* support comments, they want to save the file in some other format. Keep a count of packet comments so that we don't have to scan all the frame_data structures to determine whether we have any comments. svn path=/trunk/; revision=43392
2012-06-15For a capture file, keep an array of all encapsulation types seen.Guy Harris1-1/+2
Show all of them in the summary dialog; we will be using it in the future to figure out what capture file formats we can write to (just because a capture file format supports per-packet encapsulations, that doesn't mean that it supports *all possible* encapsulations). svn path=/trunk/; revision=43278
2012-05-24Keep track, in Wiretap, of whether the file is compressed, and provideGuy Harris1-0/+1
an API to fetch that. When doing "Save" on a compressed file, write it out compressed. In the Statistics -> Summary dialog and in capinfos, report whether the file is gzip-compressed. svn path=/trunk/; revision=42818
2012-05-20Change the "user_saved" member of a capture_file structure toGuy Harris1-1/+1
"unsaved_changes", and have it be TRUE iff changes have been made to the file since it was read - *not* if it's a temporary file from a live capture. Check the "is_tempfile" member, and the "unsaved_changes" member, when appropriate. Just have a set_toolbar_for_capture_file() routine that updates the "save", "close", and "reload" toolbar as appropriate, given a capture_file structure - absorb the function of set_toolbar_for_unsaved_capture_file() into it. svn path=/trunk/; revision=42721
2012-03-02Update comment - now that we support adding comments to files, a captureGuy Harris1-1/+1
that we've saved to a particular path, or that we've read in, could still be unsaved if we add comments to it. svn path=/trunk/; revision=41321
2011-12-29Add 'extern "C"' wrappers and #include guards to various header files.Gerald Combs1-0/+8
svn path=/trunk/; revision=40321
2011-05-12Packet editor: support for saving changed frames.Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=37099
2011-04-27Create a new frame_data_sequence data type; it represents a denseGuy Harris1-15/+3
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-17/+24
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-25Make the packet count an unsigned value, as frame numbers are unsigned.Guy Harris1-5/+15
Make the loops that scan through all the packets do so by frame number, to abstract away the "next" and "previous" pointers in the frame_data structure. Add a routine to cfile.c to map frame numbers to frame_data structures, and put in some special case handling so scanning forward or backward through the packets is O(N) rather than O(N^2). svn path=/trunk/; revision=36846
2011-01-31From Cal Turney:Anders Broman1-8/+9
Bug 5621 - With String in Packet details searches, highlight row in tree https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5621 svn path=/trunk/; revision=35718
2011-01-19From Cal Turney via enhancement bug #5587: In hex or string searches of theStephen Fisher1-0/+1
packet data highlight the target rather than the entire field. svn path=/trunk/; revision=35584
2010-08-16From Cal Turney:Anders Broman1-0/+1
1. Restore the functionality of <Ctrl>A and <Ctrl>X to the filter textbox. 2. Assign intuitive shortcuts without consuming any new shortcut letters. 3. Add 'Un-Time Reference All Packets' to the menu. 4. Disallow the marking or ignoring of all packets in the capture. 5. Make the Mark/Ignore/Time Reference-related menu items context sensitive. 6. Add 'ref_time_count' to the capture_file structure 7. Utilize marked/ignored/ref_time_count vars to prevent needless looping thru the entire packet list by exiting the loop when it becomes zero. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5115 svn path=/trunk/; revision=33817
2010-08-13Instead of using a Boolean for the search direction, use an enum, soGuy Harris1-1/+6
that you can tell from examination whether the search is forward or backward. Make the cf_find_packet routines take the direction as an explicit argument, rather than, in the cases where you don't want to permanently set the direction, saving the direction in the capture_file structure, changing it, doing the search, and restoring the saved direction. Give more information in the Doxygen comments for those routines. Add a cf_find_packet_dfilter_string() routine, which takes a filter string rather than a compiled filter as an argument. Replace find_previous_next_frame_with_filter() with it. Have cf_read_frame_r() and cf_read_frame() pop up the error dialog if the read fails, rather than leaving that up to its caller. That lets us eliminate cf_read_error_message(), by swallowing its code into cf_read_frame_r(). Add Doxygen comments for cf_read_frame_r() and cf_read_frame(). Don't have find_packet() read the packet before calling the callback routine; leave that up to the callback routine. Add cf_find_packet_marked(), to find the next or previous marked packet, and cf_find_packet_time_reference(), to find the next or previous time reference packet. Those routines do *not* need to read the packet data to see if it matches; that lets them run much faster. Clean up indentation. svn path=/trunk/; revision=33791
2010-04-01Keep a copy of the interface description and capture filter around so thatGerald Combs1-0/+1
we can use it in the main window title during and after capture. Add a "-X" option for providing a description for stdin. svn path=/trunk/; revision=32357
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-09-22Rename init_cap_file() to cap_file_init()Kovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=30073
2009-09-22Introduce cap_file_add_fdata() and start using itKovarththanan Rajaratnam1-0/+2
svn path=/trunk/; revision=30071
2009-09-21Remove unused 'vers' member in capture_fileKovarththanan Rajaratnam1-1/+0
svn path=/trunk/; revision=30049
2009-09-21Remove unused 'pstats' member in capture_fileKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=30048
2009-09-21Rename capture_file.plist to capture_file.plist_start to make it consistent ↵Kovarththanan Rajaratnam1-2/+2
with capture_file.plist_end svn path=/trunk/; revision=30047
2009-07-24Use g_slice if glib >=2.10Anders Broman1-0/+7
svn path=/trunk/; revision=29187
2009-02-15Adjust some spacing ....Bill Meier1-45/+45
svn path=/trunk/; revision=27457
2008-11-18Optimized finding current row from cfile.current_frame.Stig Bjørlykke1-0/+1
svn path=/trunk/; revision=26804
2008-09-30From jmmikkel@mit.edu (Bug 2895):Sake Blok1-0/+1
We might receive new packets while redissecting and don't want to dissect those before the packet-list is fully rebuilt. svn path=/trunk/; revision=26309
2007-01-01break out dfcode from the capture file structure and declare it locally ↵Ronnie Sahlberg1-1/+0
where it is needed. allocate and release the dfcode program as needed instead of having it hang around in the capture file structure. this will ensure that dfcode will not have longer than se scope lifetime in case we need that property of it later svn path=/trunk/; revision=20251
2006-11-14New feature to automatically highlight the field found when doing a find.Stephen Fisher1-0/+1
This works for both string and hex searches. This resolves feature request bug #776. svn path=/trunk/; revision=19897
2006-11-05change all file offsets from long to gint64 so we can - theoretically - ↵Ulf Lamping1-1/+1
handle files > 2GB correct. Please distclean Win32 builds! svn path=/trunk/; revision=19814
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2005-08-25timestamp display precision:Ulf Lamping1-4/+4
- 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-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! Ulf Lamping1-2/+3
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-20Get rid of f_len field in capture_file structure - we can just keepGuy Harris1-1/+0
the length locally. within cf_read(). svn path=/trunk/; revision=15454