aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-01-29 05:38:56 +0000
committerGuy Harris <guy@alum.mit.edu>2002-01-29 05:38:56 +0000
commitd76a4172a628adee57cf34155782a31a9444b930 (patch)
treee4debed93dccd013c7bb8ecb748f666a64c4a559 /tethereal.c
parent80dcfd02aca689716fd5bdf0d2455e35a991cf74 (diff)
The ring buffer code only supports libpcap format captures; print an
error message and quit if the user tries to use ring buffering with another capture file format, and put a note about that in the Tethereal man page. svn path=/trunk/; revision=4615
Diffstat (limited to 'tethereal.c')
-rw-r--r--tethereal.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tethereal.c b/tethereal.c
index c7081ec11a..6ef3224a9b 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.119 2002/01/21 07:36:48 guy Exp $
+ * $Id: tethereal.c,v 1.120 2002/01/29 05:38:55 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -635,12 +635,17 @@ main(int argc, char *argv[])
/* Ring buffer works only under certain conditions:
a) ring buffer does not work if you're not saving the capture to
a file;
- b) it makes no sense to enable the ring buffer if the maximum
+ b) ring buffer only works if you're saving in libpcap format;
+ c) it makes no sense to enable the ring buffer if the maximum
file size is set to "infinite". */
if (cfile.save_file == NULL) {
fprintf(stderr, "tethereal: Ring buffer requested, but capture isn't being saved to a file.\n");
exit(2);
}
+ if (out_file_type != WTAP_FILE_PCAP) {
+ fprintf(stderr, "tethereal: Ring buffer requested, but capture isn't being saved in libpcap format.\n");
+ exit(2);
+ }
if (cfile.autostop_filesize == 0) {
fprintf(stderr, "tethereal: Ring buffer requested, but no maximum capture file size was specified.\n");
exit(2);