* fhandler_socket.cc (fhandler_socket::ioctl): Handle SIOCGIFINDEX.

* net.cc (get_2k_ifconf): Ditto.
	(get_nt_ifconf): Fake SIOCGIFINDEX.
	(get_95_ifconf): Ditto.
	(get_ifconf): Handle SIOCGIFINDEX.  Fake it for loopback on systems
	not supporting IP Helper Lib.
	* include/asm/socket.h (SIOCGIFINDEX): Define.
	* include/cygwin/if.h (struct ifreq): Add member for interface index.
	(ifr_ifindex): Define.
This commit is contained in:
Corinna Vinschen
2007-01-16 12:01:36 +00:00
parent 2fd167e6de
commit 835fc32a3a
5 changed files with 36 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/* cygwin/if.h
Copyright 1996, 2001 Red Hat, Inc.
Copyright 1996, 2001, 2007 Red Hat, Inc.
This file is part of Cygwin.
@ -51,6 +51,7 @@ struct ifreq
short ifru_flags;
int ifru_metric;
int ifru_mtu;
int ifru_ifindex;
} ifr_ifru;
};
@ -62,7 +63,7 @@ struct ifreq
#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
#define ifr_metric ifr_ifru.ifru_metric /* metric */
#define ifr_mtu ifr_ifru.ifru_mtu /* mtu */
#define ifr_ifindex ifr_ifru.ifru_ifindex /* interface index */
/*
* Structure used in SIOCGIFCONF request.