net_interface ipv6 support requires msvc7 or higher

This commit is contained in:
unknown 2009-07-30 10:31:14 -07:00 committed by Doug MacEachern
parent e2c74bb616
commit ba22cc0531
2 changed files with 8 additions and 1 deletions

View File

@ -2640,6 +2640,9 @@ sigar_net_interface_list_get(sigar_t *sigar,
static int sigar_net_interface_ipv6_config_find(sigar_t *sigar, int index, static int sigar_net_interface_ipv6_config_find(sigar_t *sigar, int index,
sigar_net_interface_config_t *ifconfig) sigar_net_interface_config_t *ifconfig)
{ {
#ifdef SIGAR_USING_MSC6
return SIGAR_ENOTIMPL;
#else
int status; int status;
PIP_ADAPTER_ADDRESSES aa, addrs; PIP_ADAPTER_ADDRESSES aa, addrs;
ULONG flags = GAA_FLAG_INCLUDE_PREFIX; ULONG flags = GAA_FLAG_INCLUDE_PREFIX;
@ -2671,6 +2674,7 @@ static int sigar_net_interface_ipv6_config_find(sigar_t *sigar, int index,
} }
} }
return SIGAR_ENOENT; return SIGAR_ENOENT;
#endif
} }
SIGAR_DECLARE(int) SIGAR_DECLARE(int)

View File

@ -353,7 +353,10 @@ SIGAR_DECLARE(int) sigar_net_address_equals(sigar_net_address_t *addr1,
} }
} }
#if defined(WIN32) #if defined(SIGAR_USING_MSC6)
#define sigar_inet_ntop(af, src, dst, size) NULL
#define sigar_inet_ntop_errno SIGAR_ENOTIMPL
#elif defined(WIN32)
static char *sigar_inet_ntop(int af, const void *src, char *dst, int cnt) static char *sigar_inet_ntop(int af, const void *src, char *dst, int cnt)
{ {
struct sockaddr_in6 sa; /* note only using this for AF_INET6 */ struct sockaddr_in6 sa; /* note only using this for AF_INET6 */