summaryrefslogtreecommitdiff
path: root/libexec/bootpd
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1996-01-23 02:22:16 +0000
committerPaul Traina <pst@FreeBSD.org>1996-01-23 02:22:16 +0000
commit6e159bbc62dee08f81871bba7e002ff8aa7b7d1a (patch)
tree73623b1e2a4eaa9b8ca763ac4ae9d8274ad88a7e /libexec/bootpd
parent0490e2a765f6edc6f4935611393ad2bfb8a65132 (diff)
downloadsrc-test2-6e159bbc62dee08f81871bba7e002ff8aa7b7d1a.tar.gz
src-test2-6e159bbc62dee08f81871bba7e002ff8aa7b7d1a.zip
Notes
Diffstat (limited to 'libexec/bootpd')
-rw-r--r--libexec/bootpd/Makefile.inc3
-rw-r--r--libexec/bootpd/hwaddr.c11
2 files changed, 14 insertions, 0 deletions
diff --git a/libexec/bootpd/Makefile.inc b/libexec/bootpd/Makefile.inc
new file mode 100644
index 000000000000..d055f527cdef
--- /dev/null
+++ b/libexec/bootpd/Makefile.inc
@@ -0,0 +1,3 @@
+# $Id$
+
+BINDIR?= /usr/libexec
diff --git a/libexec/bootpd/hwaddr.c b/libexec/bootpd/hwaddr.c
index 191fadced5de..81c1c98aed7c 100644
--- a/libexec/bootpd/hwaddr.c
+++ b/libexec/bootpd/hwaddr.c
@@ -48,6 +48,13 @@
#define ATF_INUSE 0
#endif
+/* For BSD 4.4, set arp entry by writing to routing socket */
+#if defined(BSD)
+#if BSD >= 199306
+extern int bsd_arp_set __P((struct in_addr *, char *, int));
+#endif
+#endif
+
#include "bptypes.h"
#include "hwaddr.h"
#include "report.h"
@@ -175,6 +182,9 @@ setarp(s, ia, hafamily, haddr, halen)
}
#endif /* SVR4 */
#else /* SIOCSARP */
+#if defined(BSD) && (BSD >= 199306)
+ bsd_arp_set(ia, haddr, halen);
+#else
/*
* Oh well, SIOCSARP is not defined. Just run arp(8).
* Need to delete partial entry first on some systems.
@@ -194,6 +204,7 @@ setarp(s, ia, hafamily, haddr, halen)
if (status)
report(LOG_ERR, "arp failed, exit code=0x%x", status);
return;
+#endif /* ! 4.4 BSD */
#endif /* SIOCSARP */
}