aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
AgeCommit message (Collapse)AuthorFilesLines
2003-11-15removed no longer used gtk includesUlf Lamping1-4/+1
svn path=/trunk/; revision=8971
2003-11-13For Time Reference frames reset the counter for CulmulativeBytes.Ronnie Sahlberg1-1/+6
This makes the CulmulativeBytes field make more sense since if we want something to be a TimeReference frame it is likely that we also want to measure BOTH time and number of bytes (==culmulative bytes) until the event we are looking at. svn path=/trunk/; revision=8956
2003-11-12Remove MAX_DECODE_BUFFER_SIZE; it's no longer used.Gerald Combs1-3/+1
svn path=/trunk/; revision=8948
2003-10-26Update to cf_get_display_name()Ronnie Sahlberg1-2/+6
return "<no file>" if there is no file loaded yet instead of crashing in io-stat io-stat only print the label for the top tick on the y axis to make it look less cluttered svn path=/trunk/; revision=8781
2003-09-25Correctly handle the case where the selected frame doesn't pass theGuy Harris1-11/+18
filter and no frames after it pass the filter either. svn path=/trunk/; revision=8540
2003-09-25If the currently selected frame doesn't pass the display filter, selectGuy Harris1-14/+80
the closest frame to that frame that did pass the display filter, if any did. svn path=/trunk/; revision=8539
2003-09-24Pass a pointer to a "capture_file" structure toGuy Harris1-6/+7
"set_menus_for_selected_packet()" and "set_menus_for_selected_tree_row()", and have them decide whether to enable or disable menu items based on whether that structure indicates that a packet or field is selected and, if one is, on its properties. Pass to the "selected packet enabled" routine for a menu item the "frame_data" and "edt" members of the "capture_file" structure, and pass to the "selected tree row enabled" routine the "field_info" member of that structure. Clear "cf->current_frame" if no packet is selected. svn path=/trunk/; revision=8525
2003-09-24Make "finfo_selected" a member of a "capture_file" structure rather thanGuy Harris1-5/+11
an independent global variable. svn path=/trunk/; revision=8524
2003-09-19From Lars Roland: initialize the flags.ref_time field of a frame_dataGuy Harris1-1/+2
structure. svn path=/trunk/; revision=8496
2003-09-15We no longer pop up tap windows until we have a capture file open, so weGuy Harris1-7/+3
don't have to worry about the file name being null when "cf_get_display_name()" is called. (It should never be called before we have a capture file open; if it is, that's a bug.) svn path=/trunk/; revision=8482
2003-09-15Rename various capture file routines to have names starting with "cf_".Guy Harris1-72/+71
svn path=/trunk/; revision=8479
2003-09-15Add a routine to return the display name for a "capture_file" structure,Guy Harris1-29/+38
rather than constructing that name when a capture file is opened and putting a pointer to it in that structure. svn path=/trunk/; revision=8476
2003-09-15Keep a "display name" as part of a capture_file structure; for liveGuy Harris1-26/+29
capture temporary files, it's "<capture", and for saved capture files, it's the last component of the pathname of the file. Use that in various places when displaying the file name. svn path=/trunk/; revision=8474
2003-09-12Added TimeReference frames.Ronnie Sahlberg1-3/+18
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-10When saving packets, we have a "Save only marked packets" option; labelGuy Harris1-3/+3
the option to print only marked packets similarly, rather than as "Suppress unmarked packets" (for consistency, and because the latter isn't unlike a double negative). svn path=/trunk/; revision=8451
2003-09-08Update to the culmulative byte column.Ronnie Sahlberg1-3/+7
Only calculate culmulative bytes on those packets that are actually displayed in the packet pane. When a display filter is applied, culmulative bytes should only be calculated on thoise packets that are actually displayed. svn path=/trunk/; revision=8418
2003-09-03If you get a read error while doing a search, go back to the frame whereGuy Harris1-1/+4
we started. svn path=/trunk/; revision=8365
2003-09-03Check for "wtap_seek_read()" failing.Guy Harris1-15/+27
svn path=/trunk/; revision=8363
2003-09-03And for Cal,Ronnie Sahlberg1-1/+6
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-08-29Get rid of the EBCDIC stuff in the find dialog - it's not supported yet,Guy Harris1-508/+311
so we shouldn't torment the users by offering it. Check the string type and convert it to an internal representation in the GUI code; have the search code deal only with the internal representation. Save the case-sensitivity flag, and the indication of where string searches look, along with other search parameters. Upper-casify the string, for case-insensitive searches, in the GUI code; don't save the upper-casified string, so it doesn't SHOUT at you when you next pop up a "find" dialog. Convert the hex value string to raw binary data in the GUI code, rather than doing so in the search code. Check that it's a valid string. Connect the signals to the radio buttons after the pointers have been attached to various GUI items - the signal handlers expect some of those pointers to be attached, and aren't happy if they're not. Have "find_packet()" contain a framework for searching, but not contain the matching code; instead, pass it a pointer to a matching routine and an opaque pointer to be passed to the matching routine. Have all the routines that do different types of searching have their own matching routines, and use the common "find_packet()" code, rather than duplicating that code. Search for the Info column by column type, not by name (the user can change the name). When matching on the protocol tree, don't format the entire protocol tree into a big buffer - just have a routine that matches the text representation of a protocol tree item against a string, and, if it finds a match, sets a "we found a match flag" and returns; have that routine not bother doing any more work if that flag is set. (Unfortunately, you can't abort "g_node_children_foreach()" in the middle of a traversal.) Free the generated display filter code after a find-by-display-filter finishes. svn path=/trunk/; revision=8306
2003-08-14Apply Greg Morris' buffer overflow prevention patch to the find enhancements.Richard Sharpe1-4/+20
svn path=/trunk/; revision=8165
2003-08-11Applied the "Updated find capabilities...." from Greg Morris.Richard Sharpe1-1/+289
svn path=/trunk/; revision=8158
2003-08-05From Greg Morris: add support for case-insensitive full-text searches.Guy Harris1-3/+14
svn path=/trunk/; revision=8132
2003-07-22From Greg Morris: code to support searches for text or raw binary dataGuy Harris1-1/+241
in a frame in Find Frame. svn path=/trunk/; revision=8067
2003-06-24From Tomas Kukosa: doubling the size of the line buffer when printingGuy Harris1-3/+3
isn't sufficient if the line to be printed is more than twice the current size of the line buffer. Make it twice the size of the line to be printed, instead. svn path=/trunk/; revision=7921
2003-03-02The frame number passed to "goto_frame()" wasn't necessarily explicitlyGuy Harris1-4/+4
specified by the user, so if the frame with that frame number isn't being displayed, just refer to it as "That frame", not "The frame with that frame number". (That's even OK if they *did* specify it.) (If there's no such frame, that "shouldn't happen" in cases where it was implicitly specified, e.g. by getting it from a list of fragments, or a "{request,reply} is in frame XXX" field, or clicking on a point in a TCP graph.) svn path=/trunk/; revision=7258
2003-03-02Have "goto_frame()" put up error dialog boxes itself, rather than havingGuy Harris1-7/+16
its callers put up the same error dialog boxes. Have it just return a success vs. failure Boolean. svn path=/trunk/; revision=7254
2002-12-01The previous change caused the delta time to be the delta between aGuy Harris1-4/+7
frame and the previous frame in the capture - a frame that might not be displayed, so you don't know what it was - rather than the previous frame in the display, as is intended. Fix that. svn path=/trunk/; revision=6708
2002-11-29calculate delta and rel time earlier and unconditionally of whether the ↵Ronnie Sahlberg1-30/+30
packet passed the displayfilter or not. there may be tap listeners that want to examine this field. svn path=/trunk/; revision=6702
2002-11-23From Tomas Kukosa: adjust the pointer into the line buffer if the lineGuy Harris1-1/+6
buffer gets reallocated. svn path=/trunk/; revision=6665
2002-10-17From Ronnie Sahlberg: don't have the tap code do a dissection, leaveGuy Harris1-4/+7
that up to its callers, so only one dissection need be done when reading a capture file. svn path=/trunk/; revision=6442
2002-10-14Another problem found by valgrind :Olivier Abad1-1/+3
in continue_tail_cap_file, the following test : else if (*err != 0) sometimes reads uninitialized memory (so the test might be incorrect). We now set *err to 0 at the beginning of the function. svn path=/trunk/; revision=6418
2002-09-23Change to color filters :Olivier Abad1-20/+4
- moved color_filter_t in color.h - change color_filter_t to use color_t instead of GdkColor This changed allowed to remove the last gtk includes in file.c. It is now completely free of any gtk related code. svn path=/trunk/; revision=6324
2002-09-21Removed all gtk calls in file.c :Olivier Abad1-101/+47
- created a few packet_list_xxx functions (ui_util.h gtk/packet_list.c gtk2/packet_list.c) ; - removed almost all "gtk/xxx" and "gtk2/xxx" includes in file.c The only remaining includes are related to color filters. We have to make color_filter_t GUI independent by replacing GdkColor with color_t. I'll work on this later. svn path=/trunk/; revision=6311
2002-09-04Enable the tap feature for ethereal as well. (will only update in real time ↵Ronnie Sahlberg1-2/+6
for the gtk2 port though) svn path=/trunk/; revision=6182
2002-08-31GTK+ v2 port.Olivier Abad1-1/+23
All the deprecated widgets have not been replaced yet : GtkList and GtkCList ==> GtkTreeView conversion : - color_dlg.c - column_prefs.c - decode_as_dlg.c : done - dfilter_expr_dialog - filter_prefs.c - main.c - plugins_dlg.c : done GtkCTree ==> GtkTreeView conversion : done GtkText ==> GtkTextView conversion : done Remaining problems : - gtk_font_selection_dialog_set_filter doesn't exist anymore (but hasn't been removed from the documentation). I don't know how to filter the font selection dialog to get only fixed width fonts ; - we have to remove GUI prefs which are not usefule anymore : tree line style and tree expander style. svn path=/trunk/; revision=6153
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-17/+17
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-28From Ulf Lamping: extend the progress dialog box to give more progressGuy Harris1-28/+60
information. Fix the types of some variables (make the file position in "read_cap_file()" a "long", as Wiretap supports "long" offsets, and make processed-packet counts in packet-processing loops "int"s, as the total packet count in a "capture_file" structure is an "int"). svn path=/trunk/; revision=6112
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-11/+3
equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. svn path=/trunk/; revision=5932
2002-07-30From Graeme Hewson:Guy Harris1-76/+112
Ethereal sometimes creates a progress dialog bar and then, if the processing is fast, quickly destroys it. The resulting "flash" can be disconcerting. This set of patches ensures a progress bar is either not created or is displayed for a minimum time. svn path=/trunk/; revision=5916
2002-07-21Fix the problems WRT overwriting a capture file. From Joerg Mayer.Richard Sharpe1-2/+10
svn path=/trunk/; revision=5898
2002-07-16From Graeme Hewson:Guy Harris1-7/+16
Allow "-" as the output file name in Wiretap, referring to the standard error. Optimize the capture loop. Fix some of the error-message printing code in Ethereal and Tethereal. Have Wiretap check whether it can seek on a file descriptor, and pass the results of that test to the file-type-specific "open for output" routine. Have the "open for output" routines for files where we need to seek when writing the file return an error if seeks don't work. svn path=/trunk/; revision=5884
2002-07-15This seems to fix the problem of trying to save over the top of an existingRichard Sharpe1-9/+12
capture on some occassions. svn path=/trunk/; revision=5872
2002-06-29Have "print_line()" take an indentation argument, and do blankGuy Harris1-4/+4
padding when printing text and use "putline" when printing PostScript. Eliminate "hexdump", as it's just a special case of "putline". Have "proto_tree_print_node()" just call "print_line()". Get rid of "print_ps_hex()" - the font used for the hex dump and the protocol tree are the same, so there's no need to switch fonts. svn path=/trunk/; revision=5798
2002-06-22Get rid of trailing newline in lines passed to "print_line()".Guy Harris1-9/+5
svn path=/trunk/; revision=5732
2002-06-22Get rid of separate "print_hex_data_text()" and "print_hex_data_ps()"Guy Harris1-2/+2
routines; instead, rename "print_hex_data_common()" to "print_hex_data_buffer()" as it prints a buffer in hex and ASCII (or EBCDIC), and have it take the print format as an argument. Have it use "print_line()" to print lines, and fix "print_line()" so that it prints a buffer *without* a newline at the end, printing the newline itself. svn path=/trunk/; revision=5729
2002-06-07Add a new error for attempts to open a pipe or FIFO for random access.Guy Harris1-1/+6
Have "wtap_open_offline()", if asked to open a FIFO, return that error if it was asked to open the file for random access. svn path=/trunk/; revision=5643
2002-06-04Get rid of the "data_src" member of the "frame_data" structure; put itGuy Harris1-9/+4
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-05-23Clean up the file saving code a bit.Guy Harris1-59/+51
svn path=/trunk/; revision=5531
2002-05-23Make "save_cap_file()" return a Boolean (TRUE on success, FALSE onGuy Harris1-11/+23
failure) - and don't use "err" to determine success or failure, as it's not set in some failure cases. svn path=/trunk/; revision=5528