summaryrefslogtreecommitdiff
path: root/usr.sbin/rarpd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-12 23:42:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-12 23:42:13 +0000
commit89f9282c49b48d43b09f288b6bc437b97f9fb94e (patch)
tree61cef0f17bf9651937e90329dc1364c955503592 /usr.sbin/rarpd
parent7390202bec3c554684dae04ed21034f873094306 (diff)
cleanup protos and such
Diffstat (limited to 'usr.sbin/rarpd')
-rw-r--r--usr.sbin/rarpd/rarpd.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c
index de637b13cc9..7cba3473198 100644
--- a/usr.sbin/rarpd/rarpd.c
+++ b/usr.sbin/rarpd/rarpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rarpd.c,v 1.4 1996/06/25 15:13:50 deraadt Exp $ */
+/* $OpenBSD: rarpd.c,v 1.5 1996/08/12 23:42:12 deraadt Exp $ */
/* $NetBSD: rarpd.c,v 1.12 1996/03/21 18:28:23 jtc Exp $ */
/*
@@ -28,7 +28,7 @@ char copyright[] =
#endif /* not lint */
#ifndef lint
-static char rcsid[] = "$OpenBSD: rarpd.c,v 1.4 1996/06/25 15:13:50 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rarpd.c,v 1.5 1996/08/12 23:42:12 deraadt Exp $";
#endif
@@ -114,7 +114,7 @@ main(argc, argv)
extern char *optarg;
extern int optind, opterr;
- if (name = strrchr(argv[0], '/'))
+ if ((name = strrchr(argv[0], '/')))
++name;
else
name = argv[0];
@@ -185,7 +185,9 @@ main(argc, argv)
}
}
rarp_loop();
+ exit(0);
}
+
/*
* Add 'ifname' to the interface list. Lookup its IP address and network
* mask and Ethernet address, and open a BPF file for it.
@@ -537,7 +539,7 @@ rarp_process(ii, pkt)
ep = (struct ether_header *) pkt;
- if (ether_ntohost(ename, &ep->ether_shost) != 0 ||
+ if (ether_ntohost(ename, (struct ether_addr *)&ep->ether_shost) != 0 ||
(hp = gethostbyname(ename)) == 0)
return;
@@ -648,6 +650,9 @@ lookup_ipaddr(ifname, addrp, netmaskp)
(void) close(fd);
}
+
+int arptab_set __P((u_char *eaddr, u_long host));
+
/*
* Poke the kernel arp tables with the ethernet/ip address combinataion
* given. When processing a reply, we must do this so that the booting
@@ -664,6 +669,9 @@ update_arptab(ep, ipaddr)
struct arpreq request;
struct sockaddr_in *sin;
+ u_char *eaddr;
+ u_long host;
+
request.arp_flags = 0;
sin = (struct sockaddr_in *) & request.arp_pa;
sin->sin_family = AF_INET;