#endif
#if defined(HAVE_PCAP_USB_H) && defined(DLT_USB_LINUX_MMAPPED)
{ usb_linux_print, DLT_USB_LINUX_MMAPPED},
+#endif
+#ifdef DLT_IPNET
+ { ipnet_if_print, DLT_IPNET },
#endif
{ NULL, 0 },
};
{
struct pcap_stat stat;
+ /*
+ * Older versions of libpcap didn't set ps_ifdrop on some
+ * platforms; initialize it to 0 to handle that.
+ */
+ stat.ps_ifdrop = 0;
if (pcap_stats(pd, &stat) < 0) {
(void)fprintf(stderr, "pcap_stats: %s\n", pcap_geterr(pd));
infoprint = 0;
fputs(", ", stderr);
else
putc('\n', stderr);
- (void)fprintf(stderr, "%d packets received by filter", stat.ps_recv);
+ (void)fprintf(stderr, "%u packets received by filter", stat.ps_recv);
if (!verbose)
fputs(", ", stderr);
else
putc('\n', stderr);
- (void)fprintf(stderr, "%d packets dropped by kernel\n", stat.ps_drop);
+ (void)fprintf(stderr, "%u packets dropped by kernel", stat.ps_drop);
+ if (stat.ps_ifdrop != 0) {
+ if (!verbose)
+ fputs(", ", stderr);
+ else
+ putc('\n', stderr);
+ (void)fprintf(stderr, "%u packets dropped by interface\n",
+ stat.ps_ifdrop);
+ } else
+ putc('\n', stderr);
infoprint = 0;
}
#else
setpriority(PRIO_PROCESS, 0, 19);
#endif
- if (execlp(zflag, zflag, filename, NULL) == -1)
+ if (execlp(zflag, zflag, filename, (char *)NULL) == -1)
fprintf(stderr,
"compress_savefile:execlp(%s, %s): %s\n",
zflag,