From: Guy Harris Date: Mon, 23 Aug 2010 00:59:00 +0000 (-0700) Subject: Print a -L-like header for -J. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/0491327f1dcacde03431507d2c5134f257242026 Print a -L-like header for -J. --- diff --git a/tcpdump.c b/tcpdump.c index 81ce2f77..e24802f1 100644 --- a/tcpdump.c +++ b/tcpdump.c @@ -375,6 +375,13 @@ show_tstamp_types_and_exit(const char *device, pcap_t *pd) if (n_tstamp_types < 0) error("%s", pcap_geterr(pd)); + if (n_tstamp_types == 0) { + fprintf(stderr, "Time stamp type cannot be set for %s\n", + device); + exit(0); + } + fprintf(stderr, "Time stamp types for %s (use option -j to set):\n", + device); for (i = 0; i < n_tstamp_types; i++) { tstamp_type_name = pcap_tstamp_type_val_to_name(tstamp_types[i]); if (tstamp_type_name != NULL) {