diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-10-04 21:59:44 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-10-04 22:11:12 +0200 |
commit | 8a54b2483b27c6bdaeaf3c25e33052b9df271859 (patch) | |
tree | 6d811d63b28d5161264338e0c123fe28e79a5da9 /tcpdump.c | |
parent | 14f0354db128fd7aa28d36ecfd3d234626280f56 (diff) | |
download | tcpdump-8a54b2483b27c6bdaeaf3c25e33052b9df271859.tar.gz |
Add the snapshot length to the "reading from file ..." message
Diffstat (limited to 'tcpdump.c')
-rw-r--r-- | tcpdump.c | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -1974,15 +1974,14 @@ main(int argc, char **argv) #endif dlt = pcap_datalink(pd); dlt_name = pcap_datalink_val_to_name(dlt); + fprintf(stderr, "reading from file %s", RFileName); if (dlt_name == NULL) { - fprintf(stderr, "reading from file %s, link-type %u\n", - RFileName, dlt); + fprintf(stderr, ", link-type %u", dlt); } else { - fprintf(stderr, - "reading from file %s, link-type %s (%s)\n", - RFileName, dlt_name, - pcap_datalink_val_to_description(dlt)); + fprintf(stderr, ", link-type %s (%s)", dlt_name, + pcap_datalink_val_to_description(dlt)); } + fprintf(stderr, ", snapshot length %d\n", pcap_snapshot(pd)); #ifdef DLT_LINUX_SLL2 if (dlt == DLT_LINUX_SLL2) fprintf(stderr, "Warning: interface names might be incorrect\n"); @@ -2502,15 +2501,15 @@ DIAG_ON_CLANG(assign-enum) * Report the new file. */ dlt_name = pcap_datalink_val_to_name(dlt); + fprintf(stderr, "reading from file %s", RFileName); if (dlt_name == NULL) { - fprintf(stderr, "reading from file %s, link-type %u\n", - RFileName, dlt); + fprintf(stderr, ", link-type %u", dlt); } else { - fprintf(stderr, - "reading from file %s, link-type %s (%s)\n", - RFileName, dlt_name, - pcap_datalink_val_to_description(dlt)); + fprintf(stderr, ", link-type %s (%s)", + dlt_name, + pcap_datalink_val_to_description(dlt)); } + fprintf(stderr, ", snapshot length %d\n", pcap_snapshot(pd)); } } } |