]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-netfilter-linux.c
Handle older OSes without DLT_PRISM_HEADER/DLT_AIRONET_HEADER/DLT_PPI.
[libpcap] / pcap-netfilter-linux.c
index e2cfe841a752d3263ad0e7ee80edfad42e7fbb86..486397063efa396e78a1c9ae925a8314ad3d9979 100644 (file)
@@ -168,7 +168,7 @@ netfilter_read_linux(pcap_t *handle, int max_packets, pcap_handler callback, u_c
                }
 
                if (nlh->nlmsg_len < sizeof(struct nlmsghdr) || (u_int)len < nlh->nlmsg_len) {
-                       pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Message truncated: (got: %d) (nlmsg_len: %u)", len, nlh->nlmsg_len);
+                       pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Message truncated: (got: %zd) (nlmsg_len: %u)", len, nlh->nlmsg_len);
                        return -1;
                }
 
@@ -301,7 +301,8 @@ netfilter_stats_linux(pcap_t *handle, struct pcap_stat *stats)
 static int
 netfilter_inject_linux(pcap_t *handle, const void *buf _U_, int size _U_)
 {
-       pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "inject not supported on netfilter devices");
+       pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
+           "Packet injection is not supported on netfilter devices");
        return (-1);
 }