1999-08-07 04:11:37 +08:00
|
|
|
#include <netdb.h>
|
|
|
|
#include <stdio.h>
|
1999-08-07 06:27:07 +08:00
|
|
|
#include <netinet/in.h>
|
1999-08-07 04:11:37 +08:00
|
|
|
|
|
|
|
/* The unspecified IPv6 address. */
|
|
|
|
struct in6_addr anyv6 = IN6ADDR_ANY_INIT;
|
|
|
|
|
|
|
|
int
|
|
|
|
main (void)
|
|
|
|
{
|
|
|
|
int errors = 0;
|
|
|
|
int errval;
|
|
|
|
|
|
|
|
/* Test the unspecifed IPv6 address. */
|
|
|
|
errval = 0x3453456;
|
1999-08-07 06:27:07 +08:00
|
|
|
if (getipnodebyaddr ((char *) &anyv6, sizeof (anyv6), AF_INET6, &errval)
|
|
|
|
!= NULL
|
1999-08-07 04:11:37 +08:00
|
|
|
|| errval != HOST_NOT_FOUND)
|
|
|
|
{
|
|
|
|
puts ("getipnodenyaddr(in6addr_any,...) != NULL");
|
|
|
|
++errors;
|
|
|
|
}
|
|
|
|
|
1999-08-10 13:41:26 +08:00
|
|
|
return errors != 0;
|
1999-08-07 04:11:37 +08:00
|
|
|
}
|