aboutsummaryrefslogtreecommitdiffstats
path: root/net/wide-dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'net/wide-dhcp')
-rw-r--r--net/wide-dhcp/Makefile44
-rw-r--r--net/wide-dhcp/distinfo2
-rw-r--r--net/wide-dhcp/files/patch-aa26
-rw-r--r--net/wide-dhcp/files/patch-ac109
-rw-r--r--net/wide-dhcp/files/patch-ae30
-rw-r--r--net/wide-dhcp/files/patch-ag25
-rw-r--r--net/wide-dhcp/files/patch-aq21
-rw-r--r--net/wide-dhcp/files/patch-as22
-rw-r--r--net/wide-dhcp/pkg-comment1
-rw-r--r--net/wide-dhcp/pkg-descr48
-rw-r--r--net/wide-dhcp/pkg-plist21
-rw-r--r--net/wide-dhcp/pkg-req13
12 files changed, 362 insertions, 0 deletions
diff --git a/net/wide-dhcp/Makefile b/net/wide-dhcp/Makefile
new file mode 100644
index 000000000000..90a143b0ee6c
--- /dev/null
+++ b/net/wide-dhcp/Makefile
@@ -0,0 +1,44 @@
+# New ports collection makefile for: dhcp
+# Version required: 1.3beta
+# Date created: 21 November 1995
+# Whom: Yoshiro MIHIRA <sanpei@yy.cs.keio.ac.jp>
+#
+# $Id$
+#
+
+DISTNAME= dhcp-1.3beta
+PKGNAME= wide-dhcp-1.3b
+CATEGORIES+= net
+MASTER_SITES= ftp://sh.wide.ad.jp/WIDE/free-ware/dhcp/ \
+ ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/lib/libc/stdtime/
+DISTFILES= dhcp-1.3beta.tar.gz tzfile.h
+EXTRACT_ONLY= dhcp-1.3beta.tar.gz
+
+MAINTAINER= sanpei@yy.cs.keio.ac.jp
+
+post-patch:
+ if [ ! -f ${WRKSRC}/server/tzfile.h ]; then \
+ cp ${DISTDIR}/tzfile.h ${WRKSRC}/server/; \
+ fi
+
+post-install:
+ @if [ ! -d ${PREFIX}/share/dhcp ]; then \
+ mkdir -p ${PREFIX}/share/dhcp; \
+ fi
+ @cp ${WRKSRC}/README ${PREFIX}/share/dhcp/
+ @cp ${WRKSRC}/README.jis ${PREFIX}/share/dhcp/
+ @cp ${WRKSRC}/db_sample/dhcpdb.pool ${PREFIX}/share/dhcp/dhcpdb.pool.sample
+ @cp ${WRKSRC}/db_sample/dhcpdb.relay ${PREFIX}/share/dhcp/dhcpdb.relay.sample
+ @cp ${WRKSRC}/db_sample/dhcpdb.server ${PREFIX}/share/dhcp/dhcpdb.server.sample
+ @cp ${WRKSRC}/db_sample/intro.dhcp ${PREFIX}/share/dhcp/
+ @if [ ! -c /dev/bpf1 ]; then \
+ echo "**********************************************************";\
+ echo "* W a r n i n g *";\
+ echo "* This DHCP program needs Berkeley packet filter (bpf). *";\
+ echo "* To use DHCP, your kernel must be rebuilt with bpf, and *";\
+ echo "* make bpf devices on /dev directory. *";\
+ echo "* Please read some info file with \`pkg_info ${PKGNAME}'. *";\
+ echo "**********************************************************";\
+ fi
+
+.include <bsd.port.mk>
diff --git a/net/wide-dhcp/distinfo b/net/wide-dhcp/distinfo
new file mode 100644
index 000000000000..a5c461a80fdc
--- /dev/null
+++ b/net/wide-dhcp/distinfo
@@ -0,0 +1,2 @@
+MD5 (dhcp-1.3beta.tar.gz) = 904e97022f52ee1935fe89f6a30f4637
+MD5 (tzfile.h) = 02d5c432e95d2a2680f3e6aa874ba36c
diff --git a/net/wide-dhcp/files/patch-aa b/net/wide-dhcp/files/patch-aa
new file mode 100644
index 000000000000..c6e470feab04
--- /dev/null
+++ b/net/wide-dhcp/files/patch-aa
@@ -0,0 +1,26 @@
+--- client/Makefile.FreeBSD.orig Mon Oct 9 14:34:12 1995
++++ client/Makefile.FreeBSD Thu Jan 11 11:48:49 1996
+@@ -1,6 +1,9 @@
+ INCLUDE = ../server/dhcp.h dhcpc.h common.h ../server/common_subr.h dhcpc_subr.h
+ OBJ = dhcpc_subr.o flushroute.o getmac.o common_subr.o dhcpc.o
+-LDFLAGS =
++LDFLAGS = -lkvm
++SBIN= ${PREFIX}/sbin
++LIBEXEC= ${PREFIX}/libexec
++MAN= ${PREFIX}/man
+
+ CC = gcc
+-CFLAGS = -Wall -g -I. -I../server #-DDEBUG
++CFLAGS += -Wall -I. -I../server #-DDEBUG
+@@ -9,6 +12,11 @@
+
+ dhcpc: ${OBJ}
+ ${CC} ${CFLAGS} -o dhcpc ${OBJ} ${LDFLAGS}
++
++install: dhcpc
++ ${INSTALL} -m 755 -s dhcpc ${SBIN}/dhcpc
++ cp dhcpc.8 ${MAN}/man8/dhcpc.8
++ gzip ${MAN}/man8/dhcpc.8
+
+ clean:
+ rm -f *~ *.o *core* dhcpc
diff --git a/net/wide-dhcp/files/patch-ac b/net/wide-dhcp/files/patch-ac
new file mode 100644
index 000000000000..198574153364
--- /dev/null
+++ b/net/wide-dhcp/files/patch-ac
@@ -0,0 +1,109 @@
+--- client/dhcpc_subr.c.org Sat Jan 20 19:40:45 1996
++++ client/dhcpc_subr.c Sat Jan 20 19:40:49 1996
+@@ -273,7 +273,11 @@
+ tmp = 0;
+ bcopy(&tmp, sarp->arp_spa, sarp->arp_pln);
+ bcopy(&target->s_addr, sarp->arp_tpa, sarp->arp_pln);
++#ifdef __FreeBSD__
++ sether->ether_type = ETHERTYPE_ARP;
++#else
+ sether->ether_type = htons(ETHERTYPE_ARP);
++#endif
+
+ if (ether_write(ifp->fd, sbuf, ETHERHL + sizeof(struct ether_arp)) < 0) {
+ return(0); /* it is harmless to return 0 */
+@@ -341,7 +345,11 @@
+ bcopy(&ipaddr->s_addr, sarp->arp_spa, sarp->arp_pln);
+ bcopy(&ipaddr->s_addr, sarp->arp_tpa, sarp->arp_pln);
+
++#ifdef __FreeBSD__
++ sether->ether_type = ETHERTYPE_ARP;
++#else
+ sether->ether_type = htons(ETHERTYPE_ARP);
++#endif
+
+ if (ether_write(ifp->fd, sbuf, ETHERHL + sizeof(struct ether_arp)) < 0) {
+ return(-1);
+@@ -1387,7 +1395,7 @@
+ /* get haddr of interface */
+ intface.haddr.htype = ETHER;
+ intface.haddr.hlen = 6;
+-#if defined(sony_news) || defined(__FreeBSD__)
++#if defined(sony_news) || !defined(__FreeBSD__)
+ if (ioctl(dhcpif.fd, SIOCGIFADDR, &ifr) < 0) {
+ syslog(LOG_WARNING, "ioctl(SIOCGIFADDR) error in initialize(): %m");
+ return(-1);
+@@ -1660,7 +1668,7 @@
+ /*
+ * set routing table
+ */
+-#ifndef BSDOS
++#if !defined(BSDOS) && (__FreeBSD__ != 2)
+ void
+ set_route(param)
+ struct dhcp_param *param;
+@@ -1730,6 +1738,10 @@
+ register char *cp = m_rtmsg.m_space;
+ register int l;
+
++ if (!ISSET(param->got_option, ROUTER) ||
++ param->router == NULL || param->router->addr == NULL)
++ return;
++
+ bzero(&so_dst, sizeof(struct sockaddr));
+ bzero(&so_mask, sizeof(struct sockaddr));
+ bzero(&so_gate, sizeof(struct sockaddr));
+@@ -1897,7 +1909,11 @@
+ lsether->ether_shost[i] = intface.haddr.haddr[i];
+ #endif
+ }
++#ifdef __FreeBSD__
++ lsether->ether_type = ETHERTYPE_IP;
++#else
+ lsether->ether_type = htons(ETHERTYPE_IP);
++#endif
+
+ return;
+ }
+@@ -2199,7 +2215,11 @@
+ snd.ether->ether_shost[i] = intface.haddr.haddr[i];
+ #endif
+ }
++#ifdef __FreeBSD__
++ snd.ether->ether_type = ETHERTYPE_IP;
++#else
+ snd.ether->ether_type = htons(ETHERTYPE_IP);
++#endif
+
+ return;
+ }
+@@ -2372,7 +2392,11 @@
+ snd.ether->ether_shost[i] = intface.haddr.haddr[i];
+ #endif
+ }
++#ifdef __FreeBSD__
++ snd.ether->ether_type = ETHERTYPE_IP;
++#else
+ snd.ether->ether_type = htons(ETHERTYPE_IP);
++#endif
+
+ return(0);
+ }
+@@ -2391,7 +2415,7 @@
+ struct msghdr msg;
+ struct iovec bufvec[1];
+ int bufsize = DFLTDHCPLEN;
+-#ifdef BSDOS
++#if defined(BSDOS) || (__FreeBSD__ == 2)
+ int on;
+ #endif
+
+@@ -2417,7 +2441,7 @@
+ return(-1);
+ }
+
+-#ifdef BSDOS
++#if defined(BSDOS) || (__FreeBSD__ == 2)
+ on = 1;
+ if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)) < 0) {
+ close(sockfd);
diff --git a/net/wide-dhcp/files/patch-ae b/net/wide-dhcp/files/patch-ae
new file mode 100644
index 000000000000..ceb4e48f595c
--- /dev/null
+++ b/net/wide-dhcp/files/patch-ae
@@ -0,0 +1,30 @@
+--- server/Makefile.FreeBSD.org Sat Jan 20 20:53:25 1996
++++ server/Makefile.FreeBSD Sat Jan 20 20:56:27 1996
+@@ -1,13 +1,25 @@
+ OBJ = dhcps.o database.o hash.o ctime.o getmac.o common_subr.o \
+ interface.o delarp.o
+-LDFLAGS =
++LDFLAGS = -lkvm
+ CC = gcc
+-CFLAGS = -g -Wall #-DCOMPAT_RFC1541 #-DNOICMPCHK
++CFLAGS += -Wall #-DCOMPAT_RFC1541 #-DNOICMPCHK
+ #CC = cc
+ #CFLAGS = -g #-DCOMPAT_RFC1541 #-DNOICMPCHK
++SBIN= ${PREFIX}/sbin
++LIBEXEC= ${PREFIX}/libexec
++MAN= ${PREFIX}/man
+
+ dhcps: ${OBJ}
+ ${CC} ${CFLAGS} -o dhcps ${OBJ} ${LDFLAGS}
++
++install: dhcps
++ ${INSTALL} -m 755 -s dhcps ${SBIN}/dhcps
++ cp dhcpdb.pool.5 ${MAN}/man5/dhcpdb.pool.5
++ gzip ${MAN}/man5/dhcpdb.pool.5
++ cp dhcpdb.relay.5 ${MAN}/man5/dhcpdb.relay.5
++ gzip ${MAN}/man5/dhcpdb.relay.5
++ cp dhcps.8 ${MAN}/man8/dhcps.8
++ gzip ${MAN}/man8/dhcps.8
+
+ clean:
+ rm -f *~ *.o *core* dhcps
diff --git a/net/wide-dhcp/files/patch-ag b/net/wide-dhcp/files/patch-ag
new file mode 100644
index 000000000000..dc5bfa381e1c
--- /dev/null
+++ b/net/wide-dhcp/files/patch-ag
@@ -0,0 +1,25 @@
+--- relay/Makefile.FreeBSD.org Sat Jan 20 20:44:01 1996
++++ relay/Makefile.FreeBSD Sat Jan 20 20:49:14 1996
+@@ -3,10 +3,20 @@
+-CFLAGS = -g -Wall -I. -I../server
++CFLAGS += -Wall -I. -I../server
+ #CC = cc
+ #CFLAGS = -g -I. -I../server
+-LDFLAGS =
++LDFLAGS = -lkvm
++SBIN= ${PREFIX}/sbin
++LIBEXEC= ${PREFIX}/libexec
++MAN= ${PREFIX}/man
+
+ relay: ${OBJ}
+ ${CC} ${CFLAGS} -o relay ${OBJ} ${LDFLAGS}
++
++install: relay
++ ${INSTALL} -m 755 -s relay ${SBIN}/relay
++ cp relay.8 ${MAN}/man8/relay.8
++ gzip ${MAN}/man8/relay.8
++ cp dhcpdb.server.5 ${MAN}/man5/dhcpdb.server.5
++ gzip ${MAN}/man5/dhcpdb.server.5
+
+ relay.o: relay.c common.h ../server/dhcp.h ../server/common_subr.h
+ common_subr.o: ../server/common_subr.c ../server/dhcp.h common.h ../server/common_subr.h
diff --git a/net/wide-dhcp/files/patch-aq b/net/wide-dhcp/files/patch-aq
new file mode 100644
index 000000000000..9b5337b9c133
--- /dev/null
+++ b/net/wide-dhcp/files/patch-aq
@@ -0,0 +1,21 @@
+--- tools/Makefile.FreeBSD.org Sat Jan 20 21:44:16 1996
++++ tools/Makefile.FreeBSD Sat Jan 20 21:48:39 1996
+@@ -2,9 +2,17 @@
+-CFLAGS = -g -Wall -I. -I../server
++CFLAGS += -Wall -I. -I../server
+ #CC = cc
+ #CFLAGS = -g -I. -I../server
++SBIN= ${PREFIX}/sbin
++LIBEXEC= ${PREFIX}/libexec
++MAN= ${PREFIX}/man
+
+ dhcpm: dhcpm.c ../server/dhcp.h
+ $(CC) $(CFLAGS) dhcpm.c -o dhcpm
++
++install: dhcpm
++ ${INSTALL} -m 755 -s dhcpm ${SBIN}/dhcpm
++ cp dhcpm.8 ${MAN}/man8/dhcpm.8
++ gzip ${MAN}/man8/dhcpm.8
+
+ clean:
+ rm -rf *~ *.o *core* dhcpm
diff --git a/net/wide-dhcp/files/patch-as b/net/wide-dhcp/files/patch-as
new file mode 100644
index 000000000000..fd057ececff7
--- /dev/null
+++ b/net/wide-dhcp/files/patch-as
@@ -0,0 +1,22 @@
+--- client/dhcpc.c.orig Fri Nov 3 01:40:40 1995
++++ client/dhcpc.c Tue Mar 26 18:06:39 1996
+@@ -1760,6 +1760,7 @@
+ {
+ int debug = 0;
+ int n = 0;
++ FILE *pid_file;
+ struct if_info ifinfo;
+
+ bzero(&reqspec, sizeof(reqspec));
+@@ -1789,6 +1790,11 @@
+ ioctl(n, TIOCNOTTY, (char *) 0);
+ close(n);
+ }
++ }
++ /* initialization works well, so recored its own pid */
++ if ((pid_file = fopen(PATH_PID, "w")) != NULL) {
++ fprintf(pid_file, "%d\n", (int) getpid());
++ fclose(pid_file);
+ }
+
+ /*
diff --git a/net/wide-dhcp/pkg-comment b/net/wide-dhcp/pkg-comment
new file mode 100644
index 000000000000..596dd0c1d4df
--- /dev/null
+++ b/net/wide-dhcp/pkg-comment
@@ -0,0 +1 @@
+Dynamic Host Configuration Protocol, WIDE-Implimentation.
diff --git a/net/wide-dhcp/pkg-descr b/net/wide-dhcp/pkg-descr
new file mode 100644
index 000000000000..9d7e015a0cb8
--- /dev/null
+++ b/net/wide-dhcp/pkg-descr
@@ -0,0 +1,48 @@
+ << DHCP WIDE-Implementation, version 1.3 >>
+
+ October, 1995.
+
+ This package is a distribution kit of DHCP WIDE-Implementation
+ version 1.3. DHCP (Dynamic Host Configuration Protocol) is a
+ protocol which provides informations to computer when it boots.
+ This release includes DHCP server, relay agent, and client.
+
+
+<License>
+
+ See "Copyright" included in this directory.
+
+ Also, portions of this software may fall under the copyrights which
+ are included the end of this file. These are included corresponded
+ source code files.
+
+
+<Package>
+
+ You can get the latest version from;
+ ftp://sh.wide.ad.jp/WIDE/free-ware/dhcp/
+
+------------------------------
+
+**Attention for this ports file>**
+
+ To use DHCP, your kernel must be rebuilt with the following line
+ added to your kernel config file (/sys/i386/conf/<YourMachine>):
+
+pseudo-device bpfilter 4 #Berkeley packet filter
+
+ and make bpf devices in your /dev directory: /dev/bpf[0-3].
+
+cd /dev
+./MAKEDEV bpf0
+./MAKEDEV bpf1
+./MAKEDEV bpf2
+./MAKEDEV bpf3
+
+**Acknowledgements to this ports file**
+ Special thanks to:
+ Hirotaka TAKETA<taketa@csk.co.jp>
+ Hajimu UMEMOTO<ume@calm.imasy.or.jp>
+
+- Yoshiro MIHIRA
+(sanpei@yy.cs.keio.ac.jp)
diff --git a/net/wide-dhcp/pkg-plist b/net/wide-dhcp/pkg-plist
new file mode 100644
index 000000000000..fe214f9bb898
--- /dev/null
+++ b/net/wide-dhcp/pkg-plist
@@ -0,0 +1,21 @@
+sbin/dhcpc
+sbin/dhcpm
+sbin/relay
+sbin/dhcps
+man/man8/dhcpc.8.gz
+man/man8/relay.8.gz
+man/man8/dhcps.8.gz
+man/man8/dhcpm.8.gz
+man/man5/dhcpdb.server.5.gz
+man/man5/dhcpdb.pool.5.gz
+man/man5/dhcpdb.relay.5.gz
+share/dhcp/README
+share/dhcp/README.jis
+share/dhcp/intro.dhcp
+share/dhcp/dhcpdb.pool.sample
+share/dhcp/dhcpdb.relay.sample
+share/dhcp/dhcpdb.server.sample
+@exec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcps /etc/services.bak ; echo "dhcps 67/udp # dhcp server") > /etc/services
+@unexec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcps /etc/services.bak ) > /etc/services
+@exec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcpc /etc/services.bak ; echo "dhcpc 68/udp # dhcp client") > /etc/services
+@unexec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^dhcpc /etc/services.bak ) > /etc/services
diff --git a/net/wide-dhcp/pkg-req b/net/wide-dhcp/pkg-req
new file mode 100644
index 000000000000..f4b0f7421d4f
--- /dev/null
+++ b/net/wide-dhcp/pkg-req
@@ -0,0 +1,13 @@
+#!/bin/sh
+if [ "$2" != "INSTALL" ]; then
+ exit 0
+fi
+if [ ! -c /dev/bpf1 ]; then \
+ echo "**********************************************************";\
+ echo "* W a r n i n g *";\
+ echo "* This DHCP program need Berkeley packet filter(bpf). *";\
+ echo "* To use DHCP, your kernel must be rebuilt with bpf, and *";\
+ echo "* make bpf devices on /dev directory. *";\
+ echo "* Please read some info file with \`pkg_info dhcp-1.3b'. *";\
+ echo "**********************************************************";\
+fi