* autoload.cc (WSAIoctl): Remove.
* cygwin.din: Export freeifaddrs, getifaddrs. * fhandler_socket.cc (fhandler_socket::ioctl): Drop SOCKET parameter from get_ifconf. * net.cc: Include ifaddrs.h. (in_are_prefix_equal): Match addresses in network byte order. (ip_addr_prefix): Convert address into host byte order before testing with IN_LOOPBACK. (struct ifall): Define. (get_xp_ifs): Replace get_xp_ifconf. Return struct ifall array. (get_2k_ifs): Ditto, replace get_2k_ifconf. (get_nt_ifs): Ditto, replace get_nt_ifconf. (getifaddrs): New function. (freeifaddrs): New function. (get_ifconf): Call matching get_XX_ifs function and create ifc content from here. Drop lo fake since it's now in get_nt_ifs. * posix.sgml: Add freeifaddrs and getifaddrs to list of implemented BSD functions. * wincap.h (wincapc::has_broken_if_oper_status): New element. * wincap.cc: Implement above element throughout. * include/ifaddrs.h: New file. * include/cygwin/version.h: Bump API minor number.
This commit is contained in:
@ -1455,7 +1455,7 @@ struct __old_ifreq {
|
||||
int
|
||||
fhandler_socket::ioctl (unsigned int cmd, void *p)
|
||||
{
|
||||
extern int get_ifconf (SOCKET s, struct ifconf *ifc, int what); /* net.cc */
|
||||
extern int get_ifconf (struct ifconf *ifc, int what); /* net.cc */
|
||||
int res;
|
||||
struct ifconf ifc, *ifcp;
|
||||
struct ifreq *ifrp;
|
||||
@ -1480,7 +1480,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
|
||||
ifc.ifc_len = ifcp->ifc_len;
|
||||
ifc.ifc_buf = ifcp->ifc_buf;
|
||||
}
|
||||
res = get_ifconf (get_socket (), &ifc, cmd);
|
||||
res = get_ifconf (&ifc, cmd);
|
||||
if (res)
|
||||
debug_printf ("error in get_ifconf");
|
||||
if (CYGWIN_VERSION_CHECK_FOR_OLD_IFREQ)
|
||||
@ -1544,7 +1544,7 @@ fhandler_socket::ioctl (unsigned int cmd, void *p)
|
||||
ifc.ifc_req[i].ifr_frndlyname = &iff[i];
|
||||
}
|
||||
|
||||
res = get_ifconf (get_socket (), &ifc, cmd);
|
||||
res = get_ifconf (&ifc, cmd);
|
||||
if (res)
|
||||
{
|
||||
debug_printf ("error in get_ifconf");
|
||||
|
Reference in New Issue
Block a user