aboutsummaryrefslogtreecommitdiff
path: root/fad-gifc.c
diff options
context:
space:
mode:
authorguy <guy>2002-08-03 20:24:33 +0000
committerguy <guy>2002-08-03 20:24:33 +0000
commit7c27bf63044780fd7e6ea11a21ce222005f3dc7c (patch)
treeab483cc1817cbf0c27b1c8acfbb5a3240d59718b /fad-gifc.c
parent1b05b89228d9052d679f7951754d5b9a543b6825 (diff)
Put in a note about IPv6 addresses on platforms that have only
SIOCGIFLIST to get interface lists.
Diffstat (limited to 'fad-gifc.c')
-rw-r--r--fad-gifc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/fad-gifc.c b/fad-gifc.c
index 93a27f87..1ed01a73 100644
--- a/fad-gifc.c
+++ b/fad-gifc.c
@@ -34,7 +34,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/fad-gifc.c,v 1.2 2002-07-30 08:12:13 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/fad-gifc.c,v 1.3 2002-08-03 20:24:33 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -305,6 +305,16 @@ pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
ifend = (struct ifreq *)(buf + ifc.ifc_len);
for (; ifrp < ifend; ifrp = ifnext) {
+ /*
+ * XXX - what if this isn't an IPv4 address? Can
+ * we still get the netmask, etc. with ioctls on
+ * an IPv4 socket?
+ *
+ * The answer is probably platform-dependent, and
+ * if the answer is "no" on more than one platform,
+ * the way you work around it is probably platform-
+ * dependent as well.
+ */
n = SA_LEN(&ifrp->ifr_addr) + sizeof(ifrp->ifr_name);
if (n < sizeof(*ifrp))
ifnext = ifrp + 1;