diff options
Diffstat (limited to 'usr.sbin/bgpd/log.c')
-rw-r--r-- | usr.sbin/bgpd/log.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c index 651972754b6..669081f57ee 100644 --- a/usr.sbin/bgpd/log.c +++ b/usr.sbin/bgpd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.44 2005/03/31 12:13:07 henning Exp $ */ +/* $OpenBSD: log.c,v 1.45 2005/05/27 17:52:11 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -344,6 +344,17 @@ log_addr(const struct bgpd_addr *addr) } const char * +log_in6addr(const struct in6_addr *addr) +{ + static char buf[48]; + + if (inet_ntop(AF_INET6, addr, buf, sizeof(buf)) == NULL) + return ("?"); + else + return (buf); +} + +const char * log_sockaddr(struct sockaddr *sa) { static char buf[NI_MAXHOST]; |