Re-import wide-dhcp to a more suitable location. Also change the port
to one that works. Submitted by: Yoshiro MIHIRA <sanpei@yy.cs.keio.ac.jp>
This commit is contained in:
parent
140bf89a7a
commit
6370b94892
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=3061
24 changed files with 724 additions and 0 deletions
44
net-mgmt/wide-dhcp/Makefile
Normal file
44
net-mgmt/wide-dhcp/Makefile
Normal file
|
@ -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>
|
2
net-mgmt/wide-dhcp/distinfo
Normal file
2
net-mgmt/wide-dhcp/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
MD5 (dhcp-1.3beta.tar.gz) = 904e97022f52ee1935fe89f6a30f4637
|
||||
MD5 (tzfile.h) = 02d5c432e95d2a2680f3e6aa874ba36c
|
26
net-mgmt/wide-dhcp/files/patch-aa
Normal file
26
net-mgmt/wide-dhcp/files/patch-aa
Normal file
|
@ -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
|
109
net-mgmt/wide-dhcp/files/patch-ac
Normal file
109
net-mgmt/wide-dhcp/files/patch-ac
Normal file
|
@ -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);
|
30
net-mgmt/wide-dhcp/files/patch-ae
Normal file
30
net-mgmt/wide-dhcp/files/patch-ae
Normal file
|
@ -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
|
25
net-mgmt/wide-dhcp/files/patch-ag
Normal file
25
net-mgmt/wide-dhcp/files/patch-ag
Normal file
|
@ -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
|
21
net-mgmt/wide-dhcp/files/patch-aq
Normal file
21
net-mgmt/wide-dhcp/files/patch-aq
Normal file
|
@ -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
|
22
net-mgmt/wide-dhcp/files/patch-as
Normal file
22
net-mgmt/wide-dhcp/files/patch-as
Normal file
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
1
net-mgmt/wide-dhcp/pkg-comment
Normal file
1
net-mgmt/wide-dhcp/pkg-comment
Normal file
|
@ -0,0 +1 @@
|
|||
Dynamic Host Configuration Protocol, WIDE-Implimentation.
|
48
net-mgmt/wide-dhcp/pkg-descr
Normal file
48
net-mgmt/wide-dhcp/pkg-descr
Normal file
|
@ -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)
|
21
net-mgmt/wide-dhcp/pkg-plist
Normal file
21
net-mgmt/wide-dhcp/pkg-plist
Normal file
|
@ -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
|
13
net-mgmt/wide-dhcp/pkg-req
Normal file
13
net-mgmt/wide-dhcp/pkg-req
Normal file
|
@ -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
|
44
net/wide-dhcp/Makefile
Normal file
44
net/wide-dhcp/Makefile
Normal file
|
@ -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>
|
2
net/wide-dhcp/distinfo
Normal file
2
net/wide-dhcp/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
MD5 (dhcp-1.3beta.tar.gz) = 904e97022f52ee1935fe89f6a30f4637
|
||||
MD5 (tzfile.h) = 02d5c432e95d2a2680f3e6aa874ba36c
|
26
net/wide-dhcp/files/patch-aa
Normal file
26
net/wide-dhcp/files/patch-aa
Normal file
|
@ -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
|
109
net/wide-dhcp/files/patch-ac
Normal file
109
net/wide-dhcp/files/patch-ac
Normal file
|
@ -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);
|
30
net/wide-dhcp/files/patch-ae
Normal file
30
net/wide-dhcp/files/patch-ae
Normal file
|
@ -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
|
25
net/wide-dhcp/files/patch-ag
Normal file
25
net/wide-dhcp/files/patch-ag
Normal file
|
@ -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
|
21
net/wide-dhcp/files/patch-aq
Normal file
21
net/wide-dhcp/files/patch-aq
Normal file
|
@ -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
|
22
net/wide-dhcp/files/patch-as
Normal file
22
net/wide-dhcp/files/patch-as
Normal file
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
1
net/wide-dhcp/pkg-comment
Normal file
1
net/wide-dhcp/pkg-comment
Normal file
|
@ -0,0 +1 @@
|
|||
Dynamic Host Configuration Protocol, WIDE-Implimentation.
|
48
net/wide-dhcp/pkg-descr
Normal file
48
net/wide-dhcp/pkg-descr
Normal file
|
@ -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)
|
21
net/wide-dhcp/pkg-plist
Normal file
21
net/wide-dhcp/pkg-plist
Normal file
|
@ -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
|
13
net/wide-dhcp/pkg-req
Normal file
13
net/wide-dhcp/pkg-req
Normal file
|
@ -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
|
Loading…
Reference in a new issue