aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2007-02-01 09:04:46 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2007-02-01 09:04:46 +0000
commit57389a0c69ec63f701d6d2a04112d357f79a88c5 (patch)
treeb5fbcfe38db25e5c4cd6af9ad71625cda0b8c1d2 /tshark.c
parent4755299358151ccb8f0fd14b0ada55be0ae8eb71 (diff)
make tshark compile and work also when pcap is not available
svn path=/trunk/; revision=20664
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tshark.c b/tshark.c
index fcd661ddde..4489f60f77 100644
--- a/tshark.c
+++ b/tshark.c
@@ -1137,6 +1137,7 @@ main(int argc, char *argv[])
}
}
+#ifdef HAVE_LIBPCAP
if (!capture_opts.saving_to_file) {
/* We're not saving the capture to a file; if "-q" wasn't specified,
we should print packet information */
@@ -1154,6 +1155,12 @@ main(int argc, char *argv[])
exit(1);
}
}
+#else
+ /* We're not saving the capture to a file; if "-q" wasn't specified,
+ we should print packet information */
+ if (!quiet)
+ print_packet_info = TRUE;
+#endif
#ifndef HAVE_LIBPCAP
if (capture_option_specified)
@@ -1455,7 +1462,11 @@ main(int argc, char *argv[])
}
/* Process the packets in the file */
+#ifdef HAVE_LIBPCAP
err = load_cap_file(&cfile, capture_opts.save_file, out_file_type);
+#else
+ err = load_cap_file(&cfile, NULL, out_file_type);
+#endif
if (err != 0) {
epan_cleanup();
exit(2);