diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-01-16 12:01:36 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-01-16 12:01:36 +0000 |
commit | 835fc32a3ae2bfcbb7c4b16dbbe3fc5906fd99d1 (patch) | |
tree | aba7a98c444702f9fce0a5ec0b35bb2649c534d3 /winsup/cygwin/include | |
parent | 2fd167e6de34199a834a88a5d61a7b67e3a0d6c9 (diff) | |
download | cygnal-835fc32a3ae2bfcbb7c4b16dbbe3fc5906fd99d1.tar.gz cygnal-835fc32a3ae2bfcbb7c4b16dbbe3fc5906fd99d1.tar.bz2 cygnal-835fc32a3ae2bfcbb7c4b16dbbe3fc5906fd99d1.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/include')
-rw-r--r-- | winsup/cygwin/include/asm/socket.h | 3 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/if.h | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/include/asm/socket.h b/winsup/cygwin/include/asm/socket.h index ed062190c..637cec294 100644 --- a/winsup/cygwin/include/asm/socket.h +++ b/winsup/cygwin/include/asm/socket.h @@ -1,6 +1,6 @@ /* asm/socket.h - Copyright 1996, 1997, 1998, 2001 Red Hat, Inc. + Copyright 1996, 1997, 1998, 2001, 2005, 2007 Red Hat, Inc. This file is part of Cygwin. @@ -41,6 +41,7 @@ details. */ #define SIOCGIFHWADDR _IOW('s', 105, struct ifreq) /* Get hw addr */ #define SIOCGIFMETRIC _IOW('s', 106, struct ifreq) /* get metric */ #define SIOCGIFMTU _IOW('s', 107, struct ifreq) /* get MTU size */ +#define SIOCGIFINDEX _IOW('s', 108, struct ifreq) /* get if index */ #define SOL_SOCKET 0xffff /* options for socket level */ diff --git a/winsup/cygwin/include/cygwin/if.h b/winsup/cygwin/include/cygwin/if.h index b0953de36..fe36afcf2 100644 --- a/winsup/cygwin/include/cygwin/if.h +++ b/winsup/cygwin/include/cygwin/if.h @@ -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. |