* autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.
Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12. * fhandler_socket.cc (fhandler_socket::ioctl): Move variable definitions to the beginning of the function to allow better debugging. Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. * net.cc: Include iphlpapi.h. (get_2k_ifconf): Rewritten. Uses IP Helper API now. (get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. (get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'. (get_ifconf): Name loopback `lo' instead of `lo0' as in Linux. Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only on Windows NT < Service Pack 3, `get_2k_ifconf otherwise. * include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU. * include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'. (struct ifreq): Add `ifru_hwaddr'.
This commit is contained in:
@ -23,11 +23,14 @@
|
||||
#define SIOCGLOWAT _IOR('s', 3, u_long) /* get low watermark */
|
||||
|
||||
/* Needed for if queries */
|
||||
#define SIOCGIFCONF _IOW('s', 100, struct ifconf) /* get if list */
|
||||
#define SIOCGIFFLAGS _IOW('s', 101, struct ifreq) /* Get if flags */
|
||||
#define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */
|
||||
#define SIOCGIFCONF _IOW('s', 100, struct ifconf) /* get if list */
|
||||
#define SIOCGIFFLAGS _IOW('s', 101, struct ifreq) /* Get if flags */
|
||||
#define SIOCGIFADDR _IOW('s', 102, struct ifreq) /* Get if addr */
|
||||
#define SIOCGIFBRDADDR _IOW('s', 103, struct ifreq) /* Get if broadcastaddr */
|
||||
#define SIOCGIFNETMASK _IOW('s', 104, struct ifreq) /* Get if netmask */
|
||||
#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 SOL_SOCKET 0xffff /* options for socket level */
|
||||
|
||||
|
Reference in New Issue
Block a user