diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-02-01 09:04:46 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2007-02-01 09:04:46 +0000 |
commit | 57389a0c69ec63f701d6d2a04112d357f79a88c5 (patch) | |
tree | b5fbcfe38db25e5c4cd6af9ad71625cda0b8c1d2 /tshark.c | |
parent | 4755299358151ccb8f0fd14b0ada55be0ae8eb71 (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.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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); |