diff options
Diffstat (limited to 'pcap2tzsp.c')
-rw-r--r-- | pcap2tzsp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pcap2tzsp.c b/pcap2tzsp.c index 4c1ff03..f508abe 100644 --- a/pcap2tzsp.c +++ b/pcap2tzsp.c @@ -79,15 +79,16 @@ static char *opt_snaplen=NULL; pcap_t *pcap_handle = NULL; void usage(char progname[]) { - printf("Usage : %s [--verbose] [--brief] [-i <iface>] [-h <host>] [-p <port>] [custom_pcap_filter]\n", progname); + printf("Usage : %s [--verbose] [--brief] [-i <iface>] [-h <host>] [-p <port>] [-s <snaplen>] [custom_pcap_filter]\n", progname); printf("\t<iface> : Interface name to capture from (Default : first available interface)\n"); printf("\t<host> : Host (or IPv4 address) for sending captured packet headers (Default : '%s')\n", DEFAULT_HOST); printf("\t<port> : Port for sending captured packet headers (Default '%s')\n", DEFAULT_PORT); + printf("\t<snaplen> : Snarf snaplen bytes of data from each packet (Default '%s')\n", DEFAULT_SNAPLEN); printf("\t<custom_pcap_filter> : libpcap capture filter (Default '%s')\n", DEFAULT_FILTER); exit(1); } - +#ifndef COMPAT_LIBPCAP_0_7 void sig_handler(int signo) { static int pcap_break=0; @@ -103,6 +104,7 @@ void sig_handler(int signo) { fprintf(stderr, "Catched an unhandled signal : %i\n", signo); } } +#endif int main(int argc, char *argv[]) { @@ -203,7 +205,9 @@ int main(int argc, char *argv[]) { } #endif +#ifndef COMPAT_LIBPCAP_0_7 signal(SIGINT, sig_handler); +#endif /* Run the capture loop */ start_capture_loop(pcap_filter); |