X-Git-Url: https://git.tcpdump.org/libpcap/blobdiff_plain/8a2938e3f128ebcece251889c3e8da09fe139ddb..ac43dafe5e5f6a3dda0f04f033aafb0570b75fcd:/pcap-netfilter-linux.c diff --git a/pcap-netfilter-linux.c b/pcap-netfilter-linux.c index 785cd2a0..d5c5dcdc 100644 --- a/pcap-netfilter-linux.c +++ b/pcap-netfilter-linux.c @@ -299,7 +299,7 @@ netfilter_stats_linux(pcap_t *handle, struct pcap_stat *stats) } static int -netfilter_inject_linux(pcap_t *handle, const void *buf, size_t size) +netfilter_inject_linux(pcap_t *handle, const void *buf _U_, size_t size _U_) { pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "inject not supported on netfilter devices"); return (-1); @@ -743,9 +743,17 @@ netfilter_findalldevs(pcap_if_list_t *devlistp, char *err_str) } close(sock); - if (add_dev(devlistp, NFLOG_IFACE, 0, "Linux netfilter log (NFLOG) interface", err_str) == NULL) + /* + * The notion of "connected" vs. "disconnected" doesn't apply. + * XXX - what about "up" and "running"? + */ + if (add_dev(devlistp, NFLOG_IFACE, + PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE, + "Linux netfilter log (NFLOG) interface", err_str) == NULL) return -1; - if (add_dev(devlistp, NFQUEUE_IFACE, 0, "Linux netfilter queue (NFQUEUE) interface", err_str) == NULL) + if (add_dev(devlistp, NFQUEUE_IFACE, + PCAP_IF_CONNECTION_STATUS_NOT_APPLICABLE, + "Linux netfilter queue (NFQUEUE) interface", err_str) == NULL) return -1; return 0; }