diff options
Diffstat (limited to 'lib/prefix.c')
-rw-r--r-- | lib/prefix.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/prefix.c b/lib/prefix.c index 82075442..56539fc9 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -735,3 +735,14 @@ netmask_str2prefix_str (const char *net_str, const char *mask_str, return 1; } +#ifdef HAVE_IPV6 +/* Utility function for making IPv6 address string. */ +const char * +inet6_ntoa (struct in6_addr *addr) +{ + static char buf[INET6_ADDRSTRLEN]; + + inet_ntop (AF_INET6, addr, buf, INET6_ADDRSTRLEN); + return buf; +} +#endif /* HAVE_IPV6 */ |