aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-linux.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-01-10 00:32:13 -0800
committerGuy Harris <guy@alum.mit.edu>2010-01-10 00:32:13 -0800
commit2fd233b16d6fd907d707877c9c18f7e6bd0edfaf (patch)
treea9b718a03181d21504e446783e76baf468d0cadf /pcap-linux.c
parent27636b9a98a80a25c18c8ae0d6d36d454134bac1 (diff)
On Linux, always at least try to scan /proc/net/dev.
If we fail to open it, we just drive on, so it's not a fatal error; yes, it'll slow us down a little, but it's probably not much, and most Linux kernels probably have it in any case.
Diffstat (limited to 'pcap-linux.c')
-rw-r--r--pcap-linux.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index 344917d..b502821 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -1775,7 +1775,6 @@ pcap_stats_linux(pcap_t *handle, struct pcap_stat *stats)
return 0;
}
-#ifdef HAVE_PROC_NET_DEV
/*
* Get from "/proc/net/dev" all interfaces listed there; if they're
* already in the list of interfaces we have, that won't add another
@@ -1915,7 +1914,6 @@ scan_proc_net_dev(pcap_if_t **devlistp, char *errbuf)
(void)fclose(proc_net_f);
return (ret);
}
-#endif /* HAVE_PROC_NET_DEV */
/*
* Description string for the "any" device.
@@ -1925,7 +1923,6 @@ static const char any_descr[] = "Pseudo-device that captures on all interfaces";
int
pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
{
-#ifdef HAVE_PROC_NET_DEV
/*
* Read "/proc/net/dev", and add to the list of interfaces all
* interfaces listed there that we don't already have, because,
@@ -1936,7 +1933,6 @@ pcap_platform_finddevs(pcap_if_t **alldevsp, char *errbuf)
*/
if (scan_proc_net_dev(alldevsp, errbuf) == -1)
return (-1);
-#endif
/*
* Add the "any" device.