diff options
author | Thomas Habets <habets@google.com> | 2014-12-05 11:09:49 +0000 |
---|---|---|
committer | Thomas Habets <habets@google.com> | 2014-12-05 11:09:49 +0000 |
commit | f53e461f346f79cf9454a1b9b49048e30012b85a (patch) | |
tree | b84ca2e21443303959b7a9552367c89f21b5e7d1 | |
parent | 48d1af17603d50d6073fa19f251cb3e4f853888a (diff) | |
download | arping-f53e461f346f79cf9454a1b9b49048e30012b85a.tar.gz |
Friendlier error message if setting timestamp type fails.
-rw-r--r-- | src/arping.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/arping.c b/src/arping.c index b6c8e7b..5e48a09 100644 --- a/src/arping.c +++ b/src/arping.c @@ -376,7 +376,11 @@ try_pcap_open_live(const char *device, int snaplen, } #endif if ((rc = pcap_activate(pcap))) { - snprintf(errbuf, PCAP_ERRBUF_SIZE, "pcap_activate(): %s", pcap_statustostr(rc)); + if (timestamp_type) { + snprintf(errbuf, PCAP_ERRBUF_SIZE, "pcap_activate(tstype=\"%s\"): %s. Try without setting timestamp type.", timestamp_type, pcap_statustostr(rc)); + } else { + snprintf(errbuf, PCAP_ERRBUF_SIZE, "pcap_activate(): %s", pcap_statustostr(rc)); + } goto err; } #ifdef HAVE_PCAP_LIST_TSTAMP_TYPES |