diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-02-04 00:23:49 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-02-04 00:23:49 +0000 |
commit | 34e8f16ec484d505c204f5391841ddd6200feaaf (patch) | |
tree | b24ee573fb108bbc649aa6f4c69e70d449242333 /usr.sbin/rarpd/rarpd.c | |
parent | 7c463e01622241ffcc091367f393b328445ac9ba (diff) |
Use ether_ntoa() instead of doing the equivalent by hand
Diffstat (limited to 'usr.sbin/rarpd/rarpd.c')
-rw-r--r-- | usr.sbin/rarpd/rarpd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c index 1137f557905..4bf1157af80 100644 --- a/usr.sbin/rarpd/rarpd.c +++ b/usr.sbin/rarpd/rarpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rarpd.c,v 1.24 1999/02/03 23:14:15 millert Exp $ */ +/* $OpenBSD: rarpd.c,v 1.25 1999/02/04 00:23:48 millert Exp $ */ /* $NetBSD: rarpd.c,v 1.25 1998/04/23 02:48:33 mrg Exp $ */ /* @@ -28,7 +28,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char rcsid[] = "$OpenBSD: rarpd.c,v 1.24 1999/02/03 23:14:15 millert Exp $"; +static char rcsid[] = "$OpenBSD: rarpd.c,v 1.25 1999/02/04 00:23:48 millert Exp $"; #endif @@ -585,17 +585,17 @@ rarp_process(ii, pkt) u_char *pkt; { struct ether_header *ep; + struct ether_addr *ea; struct hostent *hp; u_int32_t target_ipaddr; char ename[MAXHOSTNAMELEN]; struct in_addr in; ep = (struct ether_header *) pkt; + ea = (struct ether_addr *) &ep->ether_shost; - debug("ethernet address=0x%-2.2x:%-2.2x:%-2.2x:%-2.2x:%-2.2x:%-2.2x", - ep->ether_shost[0], ep->ether_shost[1], ep->ether_shost[2], - ep->ether_shost[3], ep->ether_shost[4], ep->ether_shost[5]); - if (ether_ntohost(ename, (struct ether_addr *)&ep->ether_shost) != 0) { + debug(ether_ntoa(ea)); + if (ether_ntohost(ename, ea) != 0) { debug("ether_ntohost failed"); return; } |