summaryrefslogtreecommitdiff
path: root/lib/prefix.c
diff options
context:
space:
mode:
authorhasso <hasso>2005-04-05 14:36:49 +0000
committerhasso <hasso>2005-04-05 14:36:49 +0000
commit5920990fecba7e2430af3cfaa8bcbaed40d0ba1a (patch)
treed91dd49e4ed2c03cd0c007660232716f11172a56 /lib/prefix.c
parent6a52470660000bb6ddba971dc5c40b3422ab49bc (diff)
* lib/prefix.[hc]: inet6_ntoa utility function copied from
ripngd/ripngd.c (inet6_ntop). * ripngd.[hc]: Remove inet6_ntop() and any usage of it. inet6_ntoa() from lib is used now. * ripng_interface.c: inet6_ntop() -> inet6_ntoa(). * ripng_peer.c: inet6_ntop() -> inet6_ntoa().
Diffstat (limited to 'lib/prefix.c')
-rw-r--r--lib/prefix.c11
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 */