summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-05-29 22:22:21 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-05-29 22:22:21 +0000
commitfa88c49cf87763741484970530c5aa42960b2aad (patch)
treeb3c6ad0a5d5608a6951791b5c2c1002ac5367908 /usr.sbin
parent025158c1bb4d56c76dcd8e14fc8c0fad6e15f1ca (diff)
sync more with kame. sockaddr_dl printing
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ndp/ndp.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c
index 61d943cfd8d..620fb435743 100644
--- a/usr.sbin/ndp/ndp.c
+++ b/usr.sbin/ndp/ndp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ndp.c,v 1.17 2002/05/29 18:40:21 deraadt Exp $ */
+/* $OpenBSD: ndp.c,v 1.18 2002/05/29 22:22:20 itojun Exp $ */
/* $KAME: ndp.c,v 1.86 2002/05/26 01:16:10 itojun Exp $ */
/*
@@ -87,17 +87,11 @@
#include <sys/queue.h>
#include <net/if.h>
-#if defined(__FreeBSD__) && __FreeBSD__ >= 3
-#include <net/if_var.h>
-#endif /* __FreeBSD__ >= 3 */
#include <net/if_dl.h>
#include <net/if_types.h>
#include <net/route.h>
#include <netinet/in.h>
-#ifndef __NetBSD__
-#include <netinet/if_ether.h>
-#endif
#include <netinet/icmp6.h>
#include <netinet6/in6_var.h>
@@ -791,18 +785,17 @@ static char *
ether_str(sdl)
struct sockaddr_dl *sdl;
{
- static char ebuf[32];
+ static char hbuf[NI_MAXHOST];
u_char *cp;
if (sdl->sdl_alen) {
cp = (u_char *)LLADDR(sdl);
- snprintf(ebuf, sizeof(ebuf), "%x:%x:%x:%x:%x:%x",
+ snprintf(hbuf, sizeof(hbuf), "%x:%x:%x:%x:%x:%x",
cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]);
- } else {
- snprintf(ebuf, sizeof(ebuf), "(incomplete)");
- }
+ } else
+ snprintf(hbuf, sizeof(hbuf), "(incomplete)");
- return(ebuf);
+ return(hbuf);
}
int