aboutsummaryrefslogtreecommitdiffstats
path: root/tethereal.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-01-14 14:21:50 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-01-14 14:21:50 +0000
commitb65829c8084c878bce0ff942beeb87357581c564 (patch)
tree23bc35142585f4c8de8eeb5621e39adf6bcac4a7 /tethereal.c
parente0468c2e16f2a2982e5aa73e8ddf2017641c8be5 (diff)
Check for existence of cf.iface before calling capture(). Change
usage statement accordingly. svn path=/trunk/; revision=1474
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 f591fc4ca9..8111580f29 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.1 2000/01/14 06:45:52 guy Exp $
+ * $Id: tethereal.c,v 1.2 2000/01/14 14:21:50 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -132,7 +132,7 @@ print_usage(void) {
VERSION, comp_info_str);
fprintf(stderr, "t%s [-v] [-h] [-n]\n",
PACKAGE);
- fprintf(stderr, " [-r infile] [-t <time stamp format>]\n");
+ fprintf(stderr, " [-r infile] [-t <time stamp format>] -i iface\n");
}
int
@@ -369,6 +369,11 @@ main(int argc, char *argv[])
cf_name[0] = '\0';
#ifdef HAVE_LIBPCAP
} else {
+ if (!cf.iface) {
+ print_usage();
+ fprintf(stderr, "\nPlease specify an interface with the -i option.\n");
+ exit(1);
+ }
capture();
#endif
}