aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
AgeCommit message (Collapse)AuthorFilesLines
2004-04-25put all required data into the print_args,ulfl1-3/+8
instead of confusing seperation of data git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10692 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-24some code cleanup of the printing systemulfl1-10/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10682 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-22added some options and enhancements to the print output:ulfl1-6/+22
-ps: added formatting hints for ghostscript, so pdf conversion will be much better -ps: print a thin line at the top and bottom of each page -ps/text: add an option to start a new page for every packet (formfeed) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10660 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-20changed postscript output:ulfl1-4/+4
reduced print margin to 1/2 inch and font size to 8 point, include filename in page header, wrap too long lines git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10652 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-16If we're printing summaries and packet detail or hex dump information,guy1-18/+44
print the header before each summary line, and print a blank line separating the summary line and the remaining information. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10614 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-16make print dialog "Packet Format" options somewhat similar to theulfl1-21/+27
Ethereal panes, thus better understandable git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10611 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-15Rename a bunch of variables and routines that pertain to string searchguy1-2/+2
with "string" rather than "ascii", to make it clearer what they're involved with. Use "gtk_toggle_button_set_active()", not "gtk_toggle_button_set_state()" (the latter is a deprecated alias for the former, probably dating back to GTK+ 1.0[.x] - 1.2[.x] and later have "gtk_toggle_button_set_active()"). Do *NOT* change the radio buttons for the type of string search to do based on whether we're doing a string search or not - doing so means we don't correctly remember the type of string search. Get rid of code to fetch some values that we don't subsequently use. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10609 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-14two memory leaks removedulfl1-1/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10599 f5534014-38df-0310-8fa8-9805f1628bb7
2004-04-13From Jon Oberheide: Add interface name to the capture and ethereal windowtuexen1-2/+5
while capturing. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10594 f5534014-38df-0310-8fa8-9805f1628bb7
2004-03-08Don't refer to "auto_scroll_live" if HAVE_LIBPCAP isn't defined - andguy1-1/+3
put the definition of it back under HAVE_LIBPCAP and don't add an extra declaration in "file.h", as there's no longer code that needs to refer to it if HAVE_LIBPCAP isn't defined. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10350 f5534014-38df-0310-8fa8-9805f1628bb7
2004-03-08This makes ethereal compile again when configured --without-pcapjmayer1-3/+1
I don't know whether this is the optimal patch, but it does the job. file.h: extern declaration of auto_scroll_live file.c: always declare auto_scroll_live git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10347 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-28tweaked the simple_dialog texts, to reflect the current search behaviourulfl1-7/+9
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10260 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-23Add a "force" argument to "filter_packets()" andguy1-9/+8
"main_filter_packets()", to force the filtering to be done even if the filter is the same as the current one; this is necessary in order to make sure "Follow TCP Stream" gets the packets processed even if you're filtering the stream that's currently filtered in. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10209 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-22Make the message a bit more detailed (modeled after the one from theguy1-3/+5
UNIX version of Acrobat Reader 4.0). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10185 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-22From Greg Morris: if a search reaches the end or beginning of the list,guy1-4/+16
pop up an alert box letting the user know, and asking whether they want to continue the search. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10184 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-21rework of capture.c: better seperation of sync and capture pipe by usingulfl1-11/+5
explicit names and seperated functionality of do_capture(), but no functional change! git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10168 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-21Add routines that can be called from dissectors to report file open andguy1-5/+3
read errors; there are separate implementations for Ethereal (pops up an alert box) and Tethereal (prints an error message). Use those routines in the ASN.1 dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10152 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-17fixed dialog box text and some commentsulfl1-7/+11
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10078 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-11Replace the "cf_XXX_error_message()" routines withguy1-88/+100
"cf_XXX_failure_alert_box()" routines that put the alert box up, and directly call the "alert_box.h" routines for OS errors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10028 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-11Add "write_failure_alert_box()" to put up an alert box for a failedguy1-6/+3
attempt to write to a file (or close a file opened for writing). Get rid of no-longer-needed #includes of <epan/filesystem.h>. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10027 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-11Add an "open_failure_alert_box()" routine to pop up an alert box for aguy1-7/+4
failed attempt to open/create a file. Fix one call to pass the right value for the "for_writing" flag. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10026 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-11Add a routine to be used to put up alert boxes for invalid displayguy1-6/+6
filter expressions; use that in a number of places, so we use the same alert box. (More work is needed to figure out the right way to handle some other "dfilter_compile()" failures.) Use the error message from the display filter as the primary error, as that's the message that tells you what the underlying problem is. (The GNOME HIG says "In most situations the user should only need the primary text to make a quick decision", so the primary text should tell you what's wrong with the filter, not just that it's invalid. If there are messages from the display filter code that don't give enough information, or are a bit cryptic, such as "Unexpected end of filter string," those should be fixed in the display filter code.) Improve the error used if an empty filter is used for "find frame". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10025 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-03enhanced some dialog messages,ulfl1-3/+18
close capture file when user told so git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9965 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-03Use "%ld", not "%u", to print "long" values.guy1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9962 f5534014-38df-0310-8fa8-9805f1628bb7
2004-02-03added some more info to the statusbar (filesize, packet count, ..),ulfl1-15/+42
fixed a minor bug in the cfile handling (file length in summary dialog) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9961 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-31Fix the spelling of "cumulative" (and variables whose names derive fromguy1-9/+9
that spelling). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9917 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-31Pass ESD_BTN_OK rather than NULL as a second argument toguy1-21/+22
"simple_dialog()"; NULL might be #defined to be a pointer expression on some platforms, causing compiler warnings (and, on platforms where a null pointer doesn't have all its bits 0, possibly causing misbehavior, although I don't think there are any such platforms on which Ethereal runs). Don't allow 0 as button mask argument to "simple_dialog()". Squelch a compiler warning. Report fatal problems as errors, not warnings. Report file I/O errors with "file_open_error_message()". Report file write errors (including those reported by "close()", e.g. some errors writing to an NFS server) when saving raw packet data to a file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9915 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-31renamed ESD_TYPE_CRIT to ESD_TYPE_ERROR toulfl1-19/+19
better reflect the real error text git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9913 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-26filter_packets: don't refilter all the packets,ulfl1-1/+10
if the new filter string is identical to the old one (as it's useless then) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9858 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-25Don't use "cf_read_error_message()" when reporting errors not fromguy1-2/+3
Wiretap. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9856 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inguy1-31/+81
addition to an error code, an error info string, for WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and WTAP_ERR_BAD_RECORD errors. Replace the error messages logged with "g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed strings returned as the error info string, and change the callers of those routines to, for those errors, put the info string into the printed message or alert box for the error. Add messages for cases where those errors were returned without printing an additional message. Nobody uses the error code from "cf_read()" - "cf_read()" puts up the alert box itself for failures; get rid of the error code, so it just returns a success/failure indication. Rename "file_read_error_message()" to "cf_read_error_message()", as it handles read errors from Wiretap, and have it take an error info string as an argument. (That handles a lot of the work of putting the info string into the error message.) Make some variables in "ascend-grammar.y" static. Check the return value of "erf_read_header()" in "erf_seek_read()". Get rid of an unused #define in "i4btrace.c". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9852 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-25There's no need to keep a "FILE *" for the file being printed to in aguy1-28/+47
"capture_file" structure. Keep it locally, instead. Check for errors when printing packets. Report failure to open a print destination and failure to write to a print destination differently. Don't have the "print preamble" and "print final" routines return success/failure indications - revert to the old scheme where they didn't, and have the callers use "ferror()" to check for errors. Report write errors when printing dissections in Tethereal. Report print errors as errors, not warnings. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9828 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-24As with "file_write_error_message()", so withguy1-28/+24
"file_close_error_message()" - but just use "file_write_error_message()" for UNIX-style errors, under the assumption that a close will only fail because a buffer-flushing write fails or because "close()" itself fails when, for example, pushing unsynced NFS client-side writes out over the wire. Make several routines in "print.c" return success/failure indications. Check for write errors when printing "Follow TCP Stream" stuff or saving it to a file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9825 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-24As with "cf_open_error_message()"/"file_open_error_message()", so withguy1-22/+12
"cf_write_error_message()"/"file_write_error_message()". Use "file_open_error_message()" instead of "cf_open_error_message()" in some places we missed in the previous checkin. Catch ENOSPC and EDQUOT in "file_open_error_message()". Use "file_open_error_message()" rather than "file_write_error_message()" to report errors when creating the file to which we're saving the "Follow TCP Stream" data. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9823 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-24Add a new "file_open_error_message()" routine in "epan/filesystem.c", toguy1-80/+68
translate UNIX errno values to a somewhat friendly message format string. Rename "file_open_error_message()" in "file.c" to "cf_open_error_message()", make "cf_open_error_message()" use the new "file_open_error_message()" for UNIX errno values, have "do_capture()" in "capture.c" use "file_open_error_message()" to report errors from "open()", and make "cf_open_error_message()" static as nothing outside "file.c" uses it. Do similar stuff in "tethereal.c". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9821 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-21The progressbar had a parameter to specify the text of the Cancel/Stop button.ulfl1-10/+9
As this will always be a Cancel of a running operation, this parameter was removed. This makes us also able to use a stock button for this. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9774 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-20a.) saving GTK1 and GTK2 fontnames in different preference setting, to ↵ulfl1-1/+56
prevent problems when switching between GTK1 and GTK2 ethereal versions b.) added new feature "Edit->Go To First Packet" "Edit->Go To Last Packet" with corresponding menu and toolbar items c.) added new feature "View->Zoom In" / "View->Zoom Out" / View->Normal Size" with corresponding menu and toolbar items This feature will act as a "size offset" to the current fontsize, so that the packet list/tree view/... will have a larger/smaller font size. The value is stored inside the recent file. d.) Win32 only: Try to get the win32 system font and fontsize at program startup and show the menus/dialogs and such with the same font and fontsize like other win32 windows. This makes the program make a *lot* more feel like a normal win32 program. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9753 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-16Reset the tap listeners in "retap_packets()" before rerunning the taps.guy1-1/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9677 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-13Add a routine "retap_packet()" that runs through all packets, dissectingguy1-1/+49
them and running all taps on them, but not reconstructing the packet list. Use that in the IO-stat tap rather than "redissect_packet()"; the latter does more work and redraws the display, neither of which are necessary. Call the filter callback when the Calc field is changed, to redraw the graphs; that change also fixes things so that it's called when the Filter field is changed. Rename the "filter_button" member of an io_stat_graph_t to "filter_field", as it's not the "Filter:" button, it's the text field containing the filter expression. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9659 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-10close the Save (As) dialog, when the capture file is closedulfl1-3/+3
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9642 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-09Have a common "process_specified_packets()" routine for processingguy1-268/+301
packets in a loop; it handles reading the packet from the capture file, creating and updating the progress bar, handling the stop button, and handling range specifications. Use that for printing and saving packets. (There might be other loops that should use it as well.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9620 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-09We don't need to keep the progress bar quantum or next step in theguy1-23/+31
capture_file structure - just make it local to the routine scanning through the packets. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9616 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-09use the same packet range things for "Print" dialog, as already implementedulfl1-20/+25
in the "Save As" dialog and some other minor changes git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9610 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-09some code cleanup in range.culfl1-2/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9609 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-09Fix the "unmarking a packet matching a color filter does not apply the colorobiot1-22/+35
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9607 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-02bugfix: init progbar to NULL at the right placeulfl1-3/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9526 f5534014-38df-0310-8fa8-9805f1628bb7
2004-01-02added a progressbar, when saving a large capture fileulfl1-28/+91
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9525 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-29From Dick Gooris (and me :-)ulfl1-38/+47
more ways to choose which packets can be saved, in the save(as) dialog box git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9476 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-19From Lars Roland:guy1-1/+3
use the common display filter dialog infrastructure in the MGCP service response time tap; add common infrastructure for updating the titles of tap dialogs when the capture file name changes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9366 f5534014-38df-0310-8fa8-9805f1628bb7
2003-12-13added "most recently used" lists forulfl1-1/+10
"opened capture files" and "display filter used", the settings will be saved in the file "recent" in the users config path git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9275 f5534014-38df-0310-8fa8-9805f1628bb7