Module Name: src
Committed By: christos
Date: Sat Apr 7 22:31:38 UTC 2018
Added Files:
src/external/mpl/dhcp: Makefile Makefile.inc dhcp2netbsd
src/external/mpl/dhcp/bin: Makefile Makefile.inc
src/external/mpl/dhcp/bin/client: Makefile
src/external/mpl/dhcp/bin/clientscript: Makefile dhclient-script
src/external/mpl/dhcp/bin/omshell: Makefile
src/external/mpl/dhcp/bin/relay: Makefile
src/external/mpl/dhcp/bin/server: Makefile dhcpd.conf
src/external/mpl/dhcp/include: config.h
src/external/mpl/dhcp/lib: Makefile Makefile.inc
src/external/mpl/dhcp/lib/common: Makefile
src/external/mpl/dhcp/lib/dhcpctl: Makefile
src/external/mpl/dhcp/lib/omapip: Makefile
src/external/mpl/dhcp/share: Makefile
src/external/mpl/dhcp/share/dhcpd: Makefile pxe.defs
Log Message:
Add build glue.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/Makefile \
src/external/mpl/dhcp/Makefile.inc src/external/mpl/dhcp/dhcp2netbsd
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/bin/Makefile \
src/external/mpl/dhcp/bin/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/bin/client/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/bin/clientscript/Makefile \
src/external/mpl/dhcp/bin/clientscript/dhclient-script
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/bin/omshell/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/bin/relay/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/bin/server/Makefile \
src/external/mpl/dhcp/bin/server/dhcpd.conf
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/include/config.h
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/lib/Makefile \
src/external/mpl/dhcp/lib/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/lib/common/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/lib/dhcpctl/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/lib/omapip/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/share/Makefile
cvs rdiff -u -r0 -r1.1 src/external/mpl/dhcp/share/dhcpd/Makefile \
src/external/mpl/dhcp/share/dhcpd/pxe.defs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: src/external/mpl/dhcp/Makefile
diff -u /dev/null src/external/mpl/dhcp/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/Makefile Sat Apr 7 18:31:36 2018
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:36 christos Exp $
+
+SUBDIR= lib share .WAIT bin
+
+.include <bsd.subdir.mk>
Index: src/external/mpl/dhcp/Makefile.inc
diff -u /dev/null src/external/mpl/dhcp/Makefile.inc:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/Makefile.inc Sat Apr 7 18:31:36 2018
@@ -0,0 +1,53 @@
+# $NetBSD: Makefile.inc,v 1.1 2018/04/07 22:31:36 christos Exp $
+
+WARNS?= 1 # XXX -Wshadow -Wcast-qual -Wsign-compare
+
+.include <bsd.own.mk>
+
+USE_FORT?= yes # network client/server
+CWARNFLAGS.clang+= -Wno-tautological-compare \
+ -Wno-conversion -Wno-constant-logical-operand \
+ -Wno-format-security -Wno-error=unused-const-variable
+
+DIST:= ${.PARSEDIR}/dist
+BIND:= ${.PARSEDIR}/../../bsd/bind/dist
+.PATH: ${DIST}/${DHCPSRCDIR}
+
+COBJDIR!=cd ${.PARSEDIR}/lib/common && ${PRINTOBJDIR}
+OMOBJDIR!=cd ${.PARSEDIR}/lib/omapip && ${PRINTOBJDIR}
+
+.if (${USE_INET6} != "no")
+CPPFLAGS+= -DDHCPv6
+.endif
+CPPFLAGS+= -DISC_PLATFORM_USETHREADS -DHAVE_CONFIG_H
+CPPFLAGS+= -I${DIST} -I${DIST}/includes -I${DIST}/../include
+CPPFLAGS+= -I${BIND} -I${BIND}/includes -I${BIND}/../include
+.for dir in isc dns irs
+CPPFLAGS+= -I${BIND}/lib/${dir}/include
+CPPFLAGS+= -I${BIND}/lib/${dir}/unix/include
+CPPFLAGS+= -I${BIND}/lib/${dir}/pthreads/include
+.endfor
+CPPFLAGS+= -DLOCALSTATEDIR='"/var"'
+LDADD+= ${COBJDIR}/libdhcp.a
+LDADD+= ${OMOBJDIR}/libomapi.a
+.if defined(PROG) && ${PROG} == "dhclient"
+LDADD+=-Wl,-Bstatic
+.endif
+LDADD+= -lirs -lisccfg -ldns -lisc
+LDADD+=-lpthread
+.if (${MKKERBEROS} != "no")
+LDADD+= -lgssapi -lheimntlm ${LIBKRB5_LDADD} ${LIBKRB5_STATIC_LDADD}
+DPADD+= ${LIBKRB5_DPADD} ${LIBHEIMNTLM} ${LIBGSSAPI} ${LIBKRB5_STATIC_DPADD}
+.endif
+.if defined(PROG) && ${PROG} == "dhclient"
+LDADD+=-Wl,-Bdynamic
+.endif
+LDADD+= -lcrypto -lipsec -lcrypt
+DPADD+= ${LIBCRYPTO} ${LIBIPSEC} ${LIBCRYPT}
+.if defined(PROG) && ${PROG} == "dhclient"
+LDADD+=-Wl,-Bdynamic
+.endif
+DPADD+= ${COBJDIR}/libdhcp.a
+DPADD+= ${OMOBJDIR}/libomapi.a
+DPADD+= ${LIBDNS} ${LIBISC}
+DPADD+= ${LIBPTHREAD}
Index: src/external/mpl/dhcp/dhcp2netbsd
diff -u /dev/null src/external/mpl/dhcp/dhcp2netbsd:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/dhcp2netbsd Sat Apr 7 18:31:36 2018
@@ -0,0 +1,102 @@
+#! /bin/sh
+#
+# $NetBSD: dhcp2netbsd,v 1.1 2018/04/07 22:31:36 christos Exp $
+#
+# Copyright (c) 2003, 2011 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# dhcp2netbsd: convert a dhcp source tree into a
+# format suitable for import. Works on current dir.
+# You can run this only once if you want it to work.
+#
+# based on file2netbsd
+#
+PROG="$(basename "$0")"
+
+if [ -z "$1" ]
+then
+ echo "Usage: $PROG <directory>" 1>&2
+ exit 1
+fi
+FILE="$1"
+
+### Wipe out stuff we don't want
+rm -fr bind
+
+### Remove the $'s around RCS tags
+cleantags "$FILE"
+
+### Add NetBSD RCS Id
+find "$FILE" -type f -name '*.[chly]' -print | while read c; do
+ sed -e '1{/$NetBSD/!{i\
+/* \$NetBSD\$ */\
+
+};}' $c > /tmp/dhcp1$$
+mv /tmp/dhcp1$$ $c && echo did source mods for $c
+done
+
+find "$FILE" -type f -name '*.[cly]' -print | while read c; do
+sed -e \
+'/:\/\/www.isc.org/,/^ \*\// {
+ /^ \*\//a\
+\
+#include <sys/cdefs.h>\
+__RCSID("\$NetBSD\$");
+}' $c > /tmp/dhcp1$$
+mv /tmp/dhcp1$$ $c && echo did source mods for $c
+done
+
+ for f in dst/dst_api.c dst/dst_support.c dst/hmac_link.c dst/prandom.c \
+ omapip/inet_addr.c omapip/iscprint.c server/dhcpv6.c \
+ server/dhcpleasequery.c server/ldap.c server/mdb6.c; do
+ c=$FILE/$f
+ sed -E -e \
+'/\* TH(E|IS) SOFTWARE/,/^ \*\// {
+ /^ \*\//a\
+\
+#include <sys/cdefs.h>\
+__RCSID("\$NetBSD\$");\
+
+}' $c > /tmp/dhcp1$$
+ mv /tmp/dhcp1$$ $c && echo did source mods for $c
+done
+
+
+
+#### Add RCS tags to man pages
+find "$FILE" -type f -name '*.[0-9]' -print | while read m; do
+ sed -e '1{/$NetBSD/!i\
+.\\" \$NetBSD\$\
+.\\"
+
+}' $m > /tmp/dhcp2$$
+mv /tmp/dhcp2$$ $m && echo did manpage mods for $m
+done
+
+echo done
+
+echo You can import now. Use the following command:
+echo cvs -d cvs.netbsd.org:/cvsroot import src/external/bsd/dhcp/dist ISC DHCPX_Y_Z
+
+exit 0
Index: src/external/mpl/dhcp/bin/Makefile
diff -u /dev/null src/external/mpl/dhcp/bin/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/bin/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+SUBDIR= clientscript server client relay omshell
+
+.include <bsd.subdir.mk>
Index: src/external/mpl/dhcp/bin/Makefile.inc
diff -u /dev/null src/external/mpl/dhcp/bin/Makefile.inc:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/bin/Makefile.inc Sat Apr 7 18:31:37 2018
@@ -0,0 +1,2 @@
+.include "${.PARSEDIR}/../Makefile.inc"
+BINDIR?=/usr/sbin
Index: src/external/mpl/dhcp/bin/client/Makefile
diff -u /dev/null src/external/mpl/dhcp/bin/client/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/bin/client/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,17 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+BINDIR= /sbin
+.include <bsd.own.mk> # for MKDYNAMICROOT definition
+
+SRCS = dhclient.c clparse.c dhc6.c client_tables.c
+PROG = dhclient
+MAN = dhclient.8 dhclient.conf.5 dhclient.leases.5 dhclient-script.8
+CPPFLAGS += -DCLIENT_PATH='"PATH=/usr/bin:/usr/sbin:/bin:/sbin"'
+
+DHCPSRCDIR= client
+
+.if (${MKDYNAMICROOT} == "no")
+LDSTATIC?= -static
+.endif
+
+.include <bsd.prog.mk>
Index: src/external/mpl/dhcp/bin/clientscript/Makefile
diff -u /dev/null src/external/mpl/dhcp/bin/clientscript/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/bin/clientscript/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,8 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+NOOBJ= # defined
+
+SCRIPTS=dhclient-script
+SCRIPTSDIR=/sbin
+
+.include <bsd.prog.mk>
Index: src/external/mpl/dhcp/bin/clientscript/dhclient-script
diff -u /dev/null src/external/mpl/dhcp/bin/clientscript/dhclient-script:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/bin/clientscript/dhclient-script Sat Apr 7 18:31:37 2018
@@ -0,0 +1,282 @@
+#!/bin/sh
+#
+# $NetBSD: dhclient-script,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+ENTERHOOKS=/etc/dhclient-enter-hooks
+EXITHOOKS=/etc/dhclient-exit-hooks
+RESOLV=/etc/resolv.conf
+SIGNATURE="# Created by dhclient from"
+INTSIG="$SIGNATURE $interface"
+
+echo_resolv_conf() {
+ echo "$INTSIG"
+ echo search $new_domain_name
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver
+ done
+}
+
+make_resolv_conf() {
+ if [ ! -z "$new_domain_name_servers" ]; then
+ if [ -x /sbin/resolvconf ]; then
+ echo_resolv_conf | /sbin/resolvconf -a $interface
+ else
+ if [ -f $RESOLV ]; then
+ while read line; do
+ case $line in
+ "$SIGNATURE"*)
+ ;;
+ *)
+ mv $RESOLV $RESOLV.save;;
+ esac
+ break
+ done < $RESOLV
+ fi
+ echo_resolv_conf > $RESOLV
+ fi
+ fi
+}
+
+restore_resolv_conf() {
+ if [ -x /sbin/resolvconf ]; then
+ /sbin/resolvconf -d $interface
+ elif [ -f $RESOLV.save -a -f $RESOLV ]; then
+ while read line; do
+ case $line in
+ "$INTSIG"*)
+ mv $RESOLV.save $RESOLV;;
+ esac
+ break
+ done < $RESOLV
+ fi
+}
+
+# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
+exit_with_hooks() {
+ exit_status=$1
+ if [ -f "$EXITHOOKS" ]; then
+ . "$EXITHOOKS"
+ fi
+ # probably should do something with exit status of the local script
+ exit $exit_status
+}
+
+
+add_new_routes() {
+ for router in $new_routers; do
+ route add default $router
+ done >/dev/null 2>&1
+
+ set -- $new_static_routes
+ while [ $# -gt 1 ]; do
+ route add $1 $2
+ shift; shift
+ done
+}
+
+delete_old_routes() {
+ for router in $old_routers; do
+ route delete default $router
+ done >/dev/null 2>&1
+
+ set -- $old_static_routes
+ while [ $# -gt 1 ]; do
+ route delete $1 $2
+ shift; shift
+ done
+
+ route -n flush -inet -host
+}
+
+# Invoke the local dhcp client enter hooks, if they exist.
+if [ -f $ENTERHOOKS ]; then
+ exit_status=0
+ . $ENTERHOOKS
+ # allow the local script to abort processing of this state
+ # local script must set exit_status variable to nonzero.
+ if [ $exit_status -ne 0 ]; then
+ exit $exit_status
+ fi
+fi
+
+#if [ ! -z "$new_host_name" ]; then
+# echo New Host Name: $new_host_name
+#fi
+#
+#if [ ! -z "$new_nis_domain" ]; then
+# echo New NIS Domain: $new_nis_domain
+#fi
+#
+#if [ ! -z "$new_network_number" ]; then
+# echo New Network Number: $new_network_number
+#fi
+
+if [ ! -z "$new_broadcast_address" ]; then
+# echo New Broadcast Address: $new_broadcast_address
+ new_broadcast_arg="broadcast $new_broadcast_address"
+fi
+
+if [ ! -z "$old_broadcast_address" ]; then
+ old_broadcast_arg="broadcast $old_broadcast_address"
+fi
+
+if [ ! -z "$new_subnet_mask" ]; then
+ new_netmask_arg="netmask $new_subnet_mask"
+fi
+
+if [ ! -z "$old_subnet_mask" ]; then
+ old_netmask_arg="netmask $old_subnet_mask"
+fi
+
+if [ ! -z "$alias_subnet_mask" ]; then
+ alias_subnet_arg="netmask $alias_subnet_mask"
+fi
+
+case "$reason" in
+MEDIUM)
+ test -z "$medium" && exit_with_hooks 0
+ eval "ifconfig $interface $medium"
+ eval "ifconfig $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1
+
+ sleep 1
+
+ exit_with_hooks 0
+ ;;
+
+PREINIT)
+ if [ ! -z "$alias_ip_address" ]; then
+ ifconfig $interface inet \
+ -alias $alias_ip_address >/dev/null 2>&1
+ fi
+
+ ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
+ broadcast 255.255.255.255 up
+
+ exit_with_hooks 0
+ ;;
+
+ARPCHECK|ARPSEND)
+ exit_with_hooks 0
+ ;;
+
+BOUND|RENEW|REBIND|REBOOT)
+ if [ ! -z "$new_nis_domain" ]; then
+ if type domainname > /dev/null 2>&1; then
+ domainname $new_nis_domain
+ fi
+ fi
+
+ if type hostname > /dev/null 2>&1; then
+ if [ \( -z "$current_hostname" \) -o \
+ \( "x$new_host_name" = "x$old_hostname" \) ]; then
+ current_hostname=`hostname`
+ fi
+ if [ \( -z "$current_hostname" \) -o \
+ \( "x$new_host_name" != "x$old_hostname" \) ]; then
+ hostname $new_host_name
+ fi
+ fi
+
+ if [ \( ! -z "$old_ip_address" \) -a \( ! -z "$alias_ip_address" \) -a \
+ \( "x$alias_ip_address" != "x$old_ip_address" \) ]; then
+ ifconfig $interface inet \
+ -alias $alias_ip_address > /dev/null 2>&1
+ fi
+
+ if [ \( ! -z "$old_ip_address" \) -a \
+ \( "x$old_ip_address" != "x$new_ip_address" \) ]; then
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
+ delete_old_routes
+ fi
+
+ if [ \( -z "$old_ip_address" \) -o \
+ \( "x$old_ip_address" != "x$new_ip_address" \) -o \
+ \( "x$reason" = "xBOUND" \) -o \( "x$reason" = "xREBOOT" \) ]; then
+ eval "ifconfig $interface inet $new_ip_address \
+ $new_netmask_arg $new_broadcast_arg $medium"
+ add_new_routes
+ fi
+
+ if [ \( ! -z "$alias_ip_address" \) -a \
+ \( "x$new_ip_address" != "x$alias_ip_address" \) ]; then
+ ifconfig $interface inet alias $alias_ip_address \
+ $alias_subnet_arg
+ fi
+ make_resolv_conf
+ exit_with_hooks 0
+ ;;
+
+EXPIRE|FAIL|RELEASE|STOP)
+ if [ ! -z "$old_nis_domain" ]; then
+ if type domainname > /dev/null 2>&1; then
+ # delete the old nis domain name
+ domainname ""
+ fi
+ fi
+
+ if [ ! -z "$alias_ip_address" ]; then
+ ifconfig $interface inet -alias $alias_ip_address
+ fi > /dev/null 2>&1
+
+ if [ ! -z "$old_ip_address" ]; then
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
+ delete_old_routes
+
+ fi
+
+ if [ ! -z "$alias_ip_address" ]; then
+ ifconfig $interface inet alias $alias_ip_address \
+ $alias_subnet_arg
+ fi
+
+ restore_resolv_conf
+ exit_with_hooks 0
+ ;;
+
+TIMEOUT)
+ if [ ! -z "$alias_ip_address" ]; then
+ ifconfig $interface inet -alias $alias_ip_address
+ fi > /dev/null 2>&1
+
+ if [ ! -z "$new_host_name" ]; then
+ if type hostname > /dev/null 2>&1; then
+ hostname $new_host_name
+ fi
+ fi
+
+ if [ ! -z "$new_nis_domain" ]; then
+ if type domainname > /dev/null 2>&1; then
+ domainname $new_nis_domain
+ fi
+ fi
+
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
+ sleep 1
+
+ if [ ! -z "$new_routers" ]; then
+ set -- $new_routers
+ if ping -n -q -c 1 -w 1 $1; then
+ if [ \( ! -z "$alias_ip_address" \) -a \
+ \( "x$new_ip_address" != "x$alias_ip_address" \) ]
+ then
+ ifconfig $interface inet alias \
+ $alias_ip_address $alias_subnet_arg
+ fi
+
+ add_new_routes
+ make_resolv_conf
+ exit_with_hooks 0
+ fi
+ fi
+
+ eval "ifconfig $interface inet -alias $new_ip_address $medium"
+
+ delete_old_routes
+
+ exit_with_hooks 1
+ ;;
+*)
+ exit_with_hooks 0
+ ;;
+esac
Index: src/external/mpl/dhcp/bin/omshell/Makefile
diff -u /dev/null src/external/mpl/dhcp/bin/omshell/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/bin/omshell/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+.include <bsd.own.mk>
+
+SRCS = omshell.c
+PROG = omshell
+MAN = omshell.1
+
+DHCPSRCDIR= dhcpctl
+
+CTLOBJDIR!=cd $(.CURDIR)/../../lib/dhcpctl && ${PRINTOBJDIR}
+
+LDADD+= ${CTLOBJDIR}/libdhcpctl.a
+DPADD+= ${CTLOBJDIR}/libdhcpctl.a
+
+.include <bsd.prog.mk>
Index: src/external/mpl/dhcp/bin/relay/Makefile
diff -u /dev/null src/external/mpl/dhcp/bin/relay/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/bin/relay/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+SRCS = dhcrelay.c
+PROG = dhcrelay
+MAN = dhcrelay.8
+
+DHCPSRCDIR= relay
+
+.include <bsd.prog.mk>
Index: src/external/mpl/dhcp/bin/server/Makefile
diff -u /dev/null src/external/mpl/dhcp/bin/server/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/bin/server/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,20 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+.include <bsd.own.mk>
+
+SRCS = dhcpd.c dhcp.c dhcpv6.c bootp.c confpars.c db.c class.c failover.c \
+ omapi.c mdb.c mdb6.c stables.c salloc.c ddns.c dhcpleasequery.c
+PROG = dhcpd
+MAN = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
+
+DHCPSRCDIR= server
+
+.if ${MKSHARE} != "no"
+FILESDIR= /usr/share/examples/dhcp
+
+FILES= dhcpd.conf
+.endif
+
+COPTS.omapi.c += -Wno-stack-protector
+
+.include <bsd.prog.mk>
Index: src/external/mpl/dhcp/bin/server/dhcpd.conf
diff -u /dev/null src/external/mpl/dhcp/bin/server/dhcpd.conf:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/bin/server/dhcpd.conf Sat Apr 7 18:31:37 2018
@@ -0,0 +1,104 @@
+# dhcpd.conf
+#
+# Sample configuration file for ISC dhcpd
+#
+
+# option definitions common to all supported networks...
+option domain-name "example.org";
+option domain-name-servers ns1.example.org, ns2.example.org;
+
+default-lease-time 600;
+max-lease-time 7200;
+
+# If this DHCP server is the official DHCP server for the local
+# network, the authoritative directive should be uncommented.
+#authoritative;
+
+# Dynamic DNS update scheme - must be set to "none", "interim" or "ad-hoc".
+ddns-update-style none;
+
+# Use this to send dhcp log messages to a different log file (you also
+# have to hack syslog.conf to complete the redirection).
+log-facility local7;
+
+# No service will be given on this subnet, but declaring it helps the
+# DHCP server to understand the network topology.
+
+subnet 10.152.187.0 netmask 255.255.255.0 {
+}
+
+# This is a very basic subnet declaration.
+
+subnet 10.254.239.0 netmask 255.255.255.224 {
+ range 10.254.239.10 10.254.239.20;
+ option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
+}
+
+# This declaration allows BOOTP clients to get dynamic addresses,
+# which we don't really recommend.
+
+subnet 10.254.239.32 netmask 255.255.255.224 {
+ range dynamic-bootp 10.254.239.40 10.254.239.60;
+ option broadcast-address 10.254.239.31;
+ option routers rtr-239-32-1.example.org;
+}
+
+# A slightly different configuration for an internal subnet.
+subnet 10.5.5.0 netmask 255.255.255.224 {
+ range 10.5.5.26 10.5.5.30;
+ option domain-name-servers ns1.internal.example.org;
+ option domain-name "internal.example.org";
+ option routers 10.5.5.1;
+ option broadcast-address 10.5.5.31;
+ default-lease-time 600;
+ max-lease-time 7200;
+}
+
+# Hosts which require special configuration options can be listed in
+# host statements. If no address is specified, the address will be
+# allocated dynamically (if possible), but the host-specific information
+# will still come from the host declaration.
+
+host passacaglia {
+ hardware ethernet 0:0:c0:5d:bd:95;
+ filename "vmunix.passacaglia";
+ server-name "toccata.fugue.com";
+}
+
+# Fixed IP addresses can also be specified for hosts. These addresses
+# should not also be listed as being available for dynamic assignment.
+# Hosts for which fixed IP addresses have been specified can boot using
+# BOOTP or DHCP. Hosts for which no fixed address is specified can only
+# be booted with DHCP, unless there is an address range on the subnet
+# to which a BOOTP client is connected which has the dynamic-bootp flag
+# set.
+host fantasia {
+ hardware ethernet 08:00:07:26:c0:a5;
+ fixed-address fantasia.fugue.com;
+}
+
+# You can declare a class of clients and then do address allocation
+# based on that. The example below shows a case where all clients
+# in a certain class get addresses on the 10.17.224/24 subnet, and all
+# other clients get addresses on the 10.0.29/24 subnet.
+
+class "foo" {
+ match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
+}
+
+shared-network 224-29 {
+ subnet 10.17.224.0 netmask 255.255.255.0 {
+ option routers rtr-224.example.org;
+ }
+ subnet 10.0.29.0 netmask 255.255.255.0 {
+ option routers rtr-29.example.org;
+ }
+ pool {
+ allow members of "foo";
+ range 10.17.224.10 10.17.224.250;
+ }
+ pool {
+ deny members of "foo";
+ range 10.0.29.10 10.0.29.230;
+ }
+}
Index: src/external/mpl/dhcp/include/config.h
diff -u /dev/null src/external/mpl/dhcp/include/config.h:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/include/config.h Sat Apr 7 18:31:37 2018
@@ -0,0 +1,326 @@
+/* includes/config.h. Generated from config.h.in by configure. */
+/* includes/config.h.in. Generated from configure.ac by autoheader. */
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Define to support binary insertion of leases into queues. */
+/* #undef BINARY_LEASES */
+
+/* Define to compile debug-only DHCP software. */
+/* #undef DEBUG */
+
+/* Define to queue multiple DHCPACK replies per fsync. */
+/* #undef DELAYED_ACK */
+
+/* Define to BIG_ENDIAN for MSB (Motorola or SPARC CPUs) or LITTLE_ENDIAN for
+ LSB (Intel CPUs). */
+#include <sys/endian.h>
+#define DHCP_BYTE_ORDER _BYTE_ORDER
+
+#if 0
+/* make it possible to obey USE_INET6=no, define it in the Makefile instead */
+/* Define to 1 to include DHCPv6 support. */
+#define DHCPv6 1
+#endif
+
+/* Define to any value to chroot() prior to loading config. */
+/* #undef EARLY_CHROOT */
+
+/* Define to include execute() config language support. */
+#define ENABLE_EXECUTE 1
+
+/* Define to include Failover Protocol support. */
+#define FAILOVER_PROTOCOL 1
+
+/* Define to nothing if C supports flexible array members, and to 1 if it does
+ not. That way, with a declaration like `struct s { int n; double
+ d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
+ compilers. When computing the size of such an object, don't use 'sizeof
+ (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
+ instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
+ MSVC and with C++ compilers. */
+#define FLEXIBLE_ARRAY_MEMBER /**/
+
+/* ATF framework specified? */
+#define HAVE_ATF 1
+
+/* Define to 1 to use the Berkeley Packet Filter interface code. */
+#define HAVE_BPF 1
+
+/* Define to 1 if you have the /dev/random file. */
+#define HAVE_DEV_RANDOM 1
+
+/* Define to 1 to use DLPI interface code. */
+/* #undef HAVE_DLPI */
+
+/* Define to 1 if you have the <ifaddrs.h> header file. */
+#define HAVE_IFADDRS_H 1
+
+/* Define to 1 if you have the `inet_ntop' function. */
+#define HAVE_INET_NTOP 1
+
+/* Define to 1 if you have the `inet_pton' function. */
+#define HAVE_INET_PTON 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <ldap.h> header file. */
+#define HAVE_LDAP_H 1
+
+/* Define to 1 if you have the <linux/types.h> header file. */
+/* #undef HAVE_LINUX_TYPES_H */
+
+/* Define to 1 to use the Linux Packet Filter interface code. */
+/* #undef HAVE_LPF */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <micasa_mgmd.h> header file. */
+/* #undef HAVE_MICASA_MGMD_H */
+
+/* Define to 1 if you have the <net/if6.h> header file. */
+/* #undef HAVE_NET_IF6_H */
+
+/* Define to 1 if you have the <net/if_dl.h> header file. */
+#define HAVE_NET_IF_DL_H 1
+
+/* Define to 1 if you have the <regex.h> header file. */
+#define HAVE_REGEX_H 1
+
+/* Define to 1 if the sockaddr structure has a length field. */
+#define HAVE_SA_LEN /**/
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcat' function. */
+#define HAVE_STRLCAT 1
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to the string for a noreturn attribute. */
+#define ISC_DHCP_NORETURN __attribute__((noreturn))
+
+/* Define to 1 if the system has 'struct if_laddrconf'. */
+/* #undef ISC_PLATFORM_HAVEIF_LADDRCONF */
+
+/* Define to 1 if the system has 'struct if_laddrreq'. */
+/* #undef ISC_PLATFORM_HAVEIF_LADDRREQ */
+
+/* Define to 1 if the system has 'struct lifnum'. */
+/* #undef ISC_PLATFORM_HAVELIFNUM */
+
+/* Define to 1 if the inet_aton() function is missing. */
+/* #undef NEED_INET_ATON */
+
+/* Name of package */
+#define PACKAGE "dhcp"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "[email protected]"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "DHCP"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "DHCP 4.3.3"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "dhcp"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "4.3.3"
+
+/* Define to any value to include Ari's PARANOIA patch. */
+/* #undef PARANOIA */
+
+/* Define to correct bad byteorders in secs field. */
+/* #undef SECS_BYTEORDER */
+
+/* The size of `struct iaddr *', as computed by sizeof. */
+#define SIZEOF_STRUCT_IADDR_P sizeof(void *)
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to include server activity tracing support. */
+#define TRACING 1
+
+/* Define to include PIDs in syslog messages. */
+#define USE_LOG_PID 1
+
+/* Define to 1 to use the standard BSD socket API. */
+/* #undef USE_SOCKETS */
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+
+/* Define to 1 to enable IPv4 packet info support. */
+/* #undef USE_V4_PKTINFO */
+
+/* Version number of package */
+#define VERSION "4.3.3"
+
+/* tpacket_auxdata.tp_vlan_tci present */
+/* #undef VLAN_TCI_PRESENT */
+
+#if 0
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* # undef WORDS_BIGENDIAN */
+# endif
+#endif
+#else
+#if _BYTE_ORDER == _BIG_ENDIAN
+# define WORDS_BIGENDIAN 1
+#endif
+#endif
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* File for dhclient6 leases. */
+/* #undef _PATH_DHCLIENT6_DB */
+
+/* File for dhclient6 process information. */
+/* #undef _PATH_DHCLIENT6_PID */
+
+/* File for dhclient leases. */
+/* #undef _PATH_DHCLIENT_DB */
+
+/* File for dhclient process information. */
+/* #undef _PATH_DHCLIENT_PID */
+
+/* File for dhcpd6 leases. */
+/* #undef _PATH_DHCPD6_DB */
+
+/* File for dhcpd6 process information. */
+/* #undef _PATH_DHCPD6_PID */
+
+/* File for dhcpd leases. */
+/* #undef _PATH_DHCPD_DB */
+
+/* File for dhcpd process information. */
+/* #undef _PATH_DHCPD_PID */
+
+/* File for dhcrelay6 process information. */
+/* #undef _PATH_DHCRELAY6_PID */
+
+/* File for dhcrelay process information. */
+/* #undef _PATH_DHCRELAY_PID */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+/* #undef _UINT32_T */
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+/* #undef _UINT64_T */
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+ <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+ #define below would cause a syntax error. */
+/* #undef _UINT8_T */
+
+/* Define to the type of a signed integer type of width exactly 16 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef int16_t */
+
+/* Define to the type of a signed integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef int32_t */
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef int64_t */
+
+/* Define to the type of a signed integer type of width exactly 8 bits if such
+ a type exists and the standard includes do not define it. */
+/* #undef int8_t */
+
+/* Define a type for 16-bit unsigned integers. */
+/* #undef u_int16_t */
+
+/* Define a type for 32-bit unsigned integers. */
+/* #undef u_int32_t */
+
+/* Define a type for 64-bit unsigned integers. */
+/* #undef u_int64_t */
+
+/* Define a type for 8-bit unsigned integers. */
+/* #undef u_int8_t */
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef uint16_t */
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef uint32_t */
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef uint64_t */
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef uint8_t */
Index: src/external/mpl/dhcp/lib/Makefile
diff -u /dev/null src/external/mpl/dhcp/lib/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/lib/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+SUBDIR= common dhcpctl omapip
+
+.include <bsd.subdir.mk>
Index: src/external/mpl/dhcp/lib/Makefile.inc
diff -u /dev/null src/external/mpl/dhcp/lib/Makefile.inc:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/lib/Makefile.inc Sat Apr 7 18:31:37 2018
@@ -0,0 +1 @@
+.include "${.PARSEDIR}/../Makefile.inc"
Index: src/external/mpl/dhcp/lib/common/Makefile
diff -u /dev/null src/external/mpl/dhcp/lib/common/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/lib/common/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,14 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+LIBISPRIVATE= yes
+
+LIB = dhcp
+SRCS = raw.c parse.c nit.c icmp.c dispatch.c conflex.c upf.c bpf.c socket.c \
+ lpf.c dlpi.c packet.c tr.c ethernet.c memory.c print.c options.c \
+ inet.c tree.c tables.c alloc.c fddi.c ctrace.c \
+ dns.c resolv.c execute.c discover.c comapi.c ns_name.c
+MAN = dhcp-options.5 dhcp-eval.5
+
+DHCPSRCDIR= common
+
+.include <bsd.lib.mk>
Index: src/external/mpl/dhcp/lib/dhcpctl/Makefile
diff -u /dev/null src/external/mpl/dhcp/lib/dhcpctl/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/lib/dhcpctl/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,10 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+LIBISPRIVATE= yes
+
+LIB = dhcpctl
+SRCS = dhcpctl.c callback.c remote.c
+
+DHCPSRCDIR= dhcpctl
+
+.include <bsd.lib.mk>
Index: src/external/mpl/dhcp/lib/omapip/Makefile
diff -u /dev/null src/external/mpl/dhcp/lib/omapip/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/lib/omapip/Makefile Sat Apr 7 18:31:37 2018
@@ -0,0 +1,13 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:37 christos Exp $
+
+LIBISPRIVATE= yes
+
+LIB = omapi
+SRCS = protocol.c buffer.c alloc.c result.c connection.c errwarn.c \
+ listener.c dispatch.c generic.c support.c handle.c message.c \
+ auth.c convert.c hash.c array.c inet_addr.c trace.c \
+ toisc.c isclib.c
+
+DHCPSRCDIR= omapip
+
+.include <bsd.lib.mk>
Index: src/external/mpl/dhcp/share/Makefile
diff -u /dev/null src/external/mpl/dhcp/share/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/share/Makefile Sat Apr 7 18:31:38 2018
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:38 christos Exp $
+
+SUBDIR= dhcpd
+
+.include <bsd.subdir.mk>
Index: src/external/mpl/dhcp/share/dhcpd/Makefile
diff -u /dev/null src/external/mpl/dhcp/share/dhcpd/Makefile:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/share/dhcpd/Makefile Sat Apr 7 18:31:38 2018
@@ -0,0 +1,10 @@
+# $NetBSD: Makefile,v 1.1 2018/04/07 22:31:38 christos Exp $
+
+.include <bsd.own.mk>
+
+.if ${MKSHARE} != "no"
+FILES= pxe.defs
+FILESDIR=/usr/share/dhcpd
+.endif
+
+.include <bsd.prog.mk>
Index: src/external/mpl/dhcp/share/dhcpd/pxe.defs
diff -u /dev/null src/external/mpl/dhcp/share/dhcpd/pxe.defs:1.1
--- /dev/null Sat Apr 7 18:31:38 2018
+++ src/external/mpl/dhcp/share/dhcpd/pxe.defs Sat Apr 7 18:31:38 2018
@@ -0,0 +1,113 @@
+# $NetBSD: pxe.defs,v 1.1 2018/04/07 22:31:38 christos Exp $
+#
+# Copyright 2001 Wasabi Systems, Inc.
+# All rights reserved.
+#
+# Written by Jason R. Thorpe for Wasabi Systems, Inc.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+# must display the following acknowledgement:
+# This product includes software developed for the NetBSD Project by
+# Wasabi Systems, Inc.
+# 4. The name of Wasabi Systems, Inc. may not be used to endorse
+# or promote products derived from this software without specific prior
+# written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# A PXE client can be identified using Option 60 (vendor-class-identifier).
+# The format of the option is:
+#
+# PXEClient:Arch:xxxxx:UNDI:yyyzzz
+#
+# This allows you to select PXE clients for special treatment using
+# classes, like so:
+#
+# class "pxe-clients-ia32" {
+# match if substring (option vendor-class-identifier, 0, 20) =
+# "PXEClient:Arch:00000";
+# .
+# .
+# .
+# }
+#
+# class "pxe-clients-ia64" {
+# match if substring (option vendor-class-identifier, 0, 20) =
+# "PXEClient:Arch:00002";
+# .
+# .
+# .
+# }
+#
+
+option space PXE;
+option PXE.mtftp-ip code 1 = ip-address;
+option PXE.mtftp-cport code 2 = unsigned integer 16; # XXX little-endian!
+option PXE.mtftp-sport code 3 = unsigned integer 16; # XXX little-endian!
+option PXE.mtftp-tmout code 4 = unsigned integer 8;
+option PXE.mtftp-delay code 5 = unsigned integer 8;
+
+# PXE.discovery-control is actually a bitfield with the
+# following bits:
+# 0x01 disable broadcast discovery
+# 0x02 disable multicast discovery
+# 0x04 only use/accept servers in PXE.boot-servers
+# 0x08 if file name is present in initial DHCP OFFER,
+# download that boot file, rather than prompting,
+# displaying a menu, or performing Boot Server
+# Discovery.
+option PXE.discovery-control code 6 = unsigned integer 8;
+
+# Note, this option is REQUIRED unless PXE.discovery-control has
+# 0x02 set.
+option PXE.discovery-mcast-addr code 7 = ip-address;
+
+# XXX
+# I don't even want to think about how to represent these options
+# in dhcpd.conf syntax. See table 2-1 in the PXE spec.
+#
+# Luckily, these are options sent by the server back to the client,
+# so we don't really have to deal with them unless we want to use
+# their functionality.
+#
+# option PXE.boot-servers code 8 = ...
+# option PXE.boot-menu code 9 = ...
+# option PXE.menu-prompt code 10 = ...
+
+# XXX
+# Not sure how to represent these in dhcpd.conf syntax.
+# option PXE.mcast-addrs-alloc code 11 = ...
+# option PXE.credential-types code 12 = ...
+
+# Codes 64-127 : Loader Options : Boot Server specific
+
+# PXE.boot-item is actually two 16-bit fields packed into a single
+# 32-bit integer:
+# Boot Server type 0xffff0000
+# Boot Server layer 0x0000ffff
+option PXE.boot-item code 71 = unsigned integer 32;
+
+# Codes 128-254 : Vendor Options : Vendor NBP specific
+
+# XXX NO WAY TO REPRESENT THIS!
+# option PXE.end code 255 = void;