support for printing IPv6-addresses

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3475 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1997-09-12 23:03:25 +00:00
parent a8948e7362
commit 0110fb35fb

View File

@@ -141,13 +141,13 @@ print_cred_verbose(krb5_context context, krb5_creds *cred)
case AF_INET:
printf("IPv4: %s", inet_ntoa(*(struct in_addr*)cred->addresses.val[j].address.data));
break;
#if defined(AF_INET6) && defined(HAVE_NETINET_IN6_H)
#if defined(AF_INET6) && defined(HAVE_INET_NTOP)
case AF_INET6: {
char foo[INET6_ADDRSTRLEN];
printf("IPv6: %s", inet_ntop(AF_INET6,
cred->addresses.val[j].address.data,
foo, sizeof(foo)));
cred->addresses.val[j].address.data,
foo, sizeof(foo)));
break;
}
#endif