aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
AgeCommit message (Collapse)AuthorFilesLines
2004-08-19As suggested by Guy: Have mark_frame() do nothing if the frame hasGerald Combs1-6/+10
already been marked and have unmark_frame() do likewise. Don't mess with the marked frame count in mark_all_frames(). Be a little more paranoid about the marked frame count in other places. svn path=/trunk/; revision=11775
2004-08-18If you mark all frames, then unmark all frames "marked_count" overflows.Gerald Combs1-2/+4
Keep this from happening. svn path=/trunk/; revision=11771
2004-08-15From Greg Morris: Add a configuration option to control search wrapping.Gerald Combs1-10/+33
svn path=/trunk/; revision=11744
2004-07-27Move the code to open the printer/print file from "print_packets()" toGuy Harris1-48/+21
"print_ok_cb()", and have "print_packets()" just work on a "print_stream_t" handed to it, so that different platforms can open the printer/print file in different ways (opening the file is probably not going to be platform-dependent, but opening the printer will be). svn path=/trunk/; revision=11544
2004-07-25Make some generic print routines that take, as an argument, a pointer toGuy Harris1-30/+78
a structure containing a pointer to print operations for that object and a pointer to the private subclass-dependent data for that object, with subclasses for text and PostScript, and use those rather than the old scheme where a print format was passed as an argument - or where (as in the case of printing summary information in Tethereal) we just printed as text even if "-T ps" was selected. Check whether those routines succeed or get an I/O error writing output. Clean up indentation. svn path=/trunk/; revision=11514
2004-07-24Move the color-filter related stuff out of "color.h" intoGuy Harris1-0/+1
"color_filters.h", as that's the appropriate place for it - "color.h" should just deal with "color_t". svn path=/trunk/; revision=11503
2004-07-18Move dissectors to epan/dissectors directory.Gilbert Ramirez1-1/+1
Also move ncp222.py, x11-fields, process-x11-fields.pl, make-reg-dotc, and make-reg-dotc.py. Adjust #include lines in files that include packet-*.h files. svn path=/trunk/; revision=11410
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
2004-07-08If we're producing PostScript, don't put the column headers out if we'reGuy Harris1-13/+15
not putting the column data out. Don't fill in the column information if we're not going to use it. svn path=/trunk/; revision=11343
2004-07-08Make the "human-readable text vs. PSML vs. PDML" choice separate fromGuy Harris1-3/+146
the "text vs. PostScript" choice. The "text vs. PostScript" choice should probably ultimately be done with a generic set of print methods, to handle various platform-native print mechanisms more cleanly (and perhaps the dialog box code for "export as {PDML,PSML}" should be separate from the "export as text"/"print" dialog). svn path=/trunk/; revision=11342
2004-07-08A read can return WTAP_ERR_UNSUPPORTED_ENCAP if the encapsulation typeGuy Harris1-3/+10
is per-packet and the packet has an encapsulation type we don't know about, so handle it on reads as well as errors - show an error message noting that we had a packet with a network type we don't know about, and show the extra info returned for that error giving details. It shouldn't return WTAP_ERR_UNSUPPORTED, however, so just give the "wtap_strerror()" error for that case. svn path=/trunk/; revision=11340
2004-06-30On at least some platforms, a #define of O_BINARY is needed even ifGuy Harris1-1/+6
<fcntl.h> is included, as <fcntl.h> doesn't define it. svn path=/trunk/; revision=11276
2004-06-29define of O_BINARY not needed, if fcntl.h is includedUlf Lamping1-5/+1
other #include related cleanups svn path=/trunk/; revision=11272
2004-05-27added a small commentUlf Lamping1-1/+2
svn path=/trunk/; revision=11023
2004-05-09From Lars Roland: add support for building a libethereal.dll with MSVC:Guy Harris1-1/+5
add a config.nmake option to control whether to build libethereal.dll or not; remove "./wiretap" from PATH to prevent problems due to wrongly-loaded files; build dissector.lib with MSVC; move "print.c" and "ps.c" to the dissector helpers, as "print.c" imports variables from packet-frame.c and packet-data.c, which are in libethereal; move "g711.c" out of the dissector helpers, as they're used only by Ethereal in a tap, not in Tethereal or in any dissector; add a .def file for libethereal; arrange to declare global variables exported from libethereal with "__declspec(dllimport)" when building programs that import those variables; update the NSIS installer. Make the "configure" script define ETH_VAR_IMPORT as "extern". svn path=/trunk/; revision=10834
2004-05-02bugfix: reset the tap listeners, when the capture file is closedUlf Lamping1-1/+3
svn path=/trunk/; revision=10769
2004-05-01The display filter engine can return an error message that is not safeOlivier Biot1-4/+9
when using GTK2 code for rendering the error. In order to correctly render the error message, it must be XML escaped. TODO: track down the remaining places where this XML escaping is required, and fix it there too (not sure if they exist though). svn path=/trunk/; revision=10764
2004-05-01add PROTO_ITEM_SET_HIDDEN() and PROTO_ITEM_SET_GENERATED(),Ulf Lamping1-2/+2
this sets flags for later rendering of the field data svn path=/trunk/; revision=10752
2004-04-25put all required data into the print_args,Ulf Lamping1-3/+8
instead of confusing seperation of data svn path=/trunk/; revision=10692
2004-04-24some code cleanup of the printing systemUlf Lamping1-10/+1
svn path=/trunk/; revision=10682
2004-04-22added some options and enhancements to the print output:Ulf Lamping1-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) svn path=/trunk/; revision=10660
2004-04-20changed postscript output:Ulf Lamping1-4/+4
reduced print margin to 1/2 inch and font size to 8 point, include filename in page header, wrap too long lines svn path=/trunk/; revision=10652
2004-04-16If we're printing summaries and packet detail or hex dump information,Guy Harris1-18/+44
print the header before each summary line, and print a blank line separating the summary line and the remaining information. svn path=/trunk/; revision=10614
2004-04-16make print dialog "Packet Format" options somewhat similar to theUlf Lamping1-21/+27
Ethereal panes, thus better understandable svn path=/trunk/; revision=10611
2004-04-15Rename a bunch of variables and routines that pertain to string searchGuy Harris1-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. svn path=/trunk/; revision=10609
2004-04-14two memory leaks removedUlf Lamping1-1/+3
svn path=/trunk/; revision=10599
2004-04-13From Jon Oberheide: Add interface name to the capture and ethereal windowMichael Tüxen1-2/+5
while capturing. svn path=/trunk/; revision=10594
2004-03-08Don't refer to "auto_scroll_live" if HAVE_LIBPCAP isn't defined - andGuy Harris1-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. svn path=/trunk/; revision=10350
2004-03-08This makes ethereal compile again when configured --without-pcapJörg Mayer1-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 svn path=/trunk/; revision=10347
2004-02-28tweaked the simple_dialog texts, to reflect the current search behaviourUlf Lamping1-7/+9
svn path=/trunk/; revision=10260
2004-02-23Add a "force" argument to "filter_packets()" andGuy Harris1-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. svn path=/trunk/; revision=10209
2004-02-22Make the message a bit more detailed (modeled after the one from theGuy Harris1-3/+5
UNIX version of Acrobat Reader 4.0). svn path=/trunk/; revision=10185
2004-02-22From Greg Morris: if a search reaches the end or beginning of the list,Guy Harris1-4/+16
pop up an alert box letting the user know, and asking whether they want to continue the search. svn path=/trunk/; revision=10184
2004-02-21rework of capture.c: better seperation of sync and capture pipe by usingUlf Lamping1-11/+5
explicit names and seperated functionality of do_capture(), but no functional change! svn path=/trunk/; revision=10168
2004-02-21Add routines that can be called from dissectors to report file open andGuy Harris1-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. svn path=/trunk/; revision=10152
2004-02-17fixed dialog box text and some commentsUlf Lamping1-7/+11
svn path=/trunk/; revision=10078
2004-02-11Replace the "cf_XXX_error_message()" routines withGuy Harris1-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. svn path=/trunk/; revision=10028
2004-02-11Add "write_failure_alert_box()" to put up an alert box for a failedGuy Harris1-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>. svn path=/trunk/; revision=10027
2004-02-11Add an "open_failure_alert_box()" routine to pop up an alert box for aGuy Harris1-7/+4
failed attempt to open/create a file. Fix one call to pass the right value for the "for_writing" flag. svn path=/trunk/; revision=10026
2004-02-11Add a routine to be used to put up alert boxes for invalid displayGuy Harris1-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". svn path=/trunk/; revision=10025
2004-02-03enhanced some dialog messages,Ulf Lamping1-3/+18
close capture file when user told so svn path=/trunk/; revision=9965
2004-02-03Use "%ld", not "%u", to print "long" values.Guy Harris1-4/+4
svn path=/trunk/; revision=9962
2004-02-03added some more info to the statusbar (filesize, packet count, ..),Ulf Lamping1-15/+42
fixed a minor bug in the cfile handling (file length in summary dialog) svn path=/trunk/; revision=9961
2004-01-31Fix the spelling of "cumulative" (and variables whose names derive fromGuy Harris1-9/+9
that spelling). svn path=/trunk/; revision=9917
2004-01-31Pass ESD_BTN_OK rather than NULL as a second argument toGuy Harris1-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. svn path=/trunk/; revision=9915
2004-01-31renamed ESD_TYPE_CRIT to ESD_TYPE_ERROR toUlf Lamping1-19/+19
better reflect the real error text svn path=/trunk/; revision=9913
2004-01-26filter_packets: don't refilter all the packets,Ulf Lamping1-1/+10
if the new filter string is identical to the old one (as it's useless then) svn path=/trunk/; revision=9858
2004-01-25Don't use "cf_read_error_message()" when reporting errors not fromGuy Harris1-2/+3
Wiretap. svn path=/trunk/; revision=9856
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inGuy Harris1-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". svn path=/trunk/; revision=9852
2004-01-25There's no need to keep a "FILE *" for the file being printed to in aGuy Harris1-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. svn path=/trunk/; revision=9828