Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Mar 1996 21:30:41 +0900
From:      MIHIRA Yoshiro (=?ISO-2022-JP?B?GyRCOzBKP0ExTzobKEI=?= ) <sanpei@yy.cs.keio.ac.jp>
To:        asami@cs.berkeley.edu (Satoshi Asami)
Cc:        ports@FreeBSD.org
Subject:   Re: ported WIDE dhcp to FreeBSD 2.1R 
Message-ID:  <199603211230.VAA02191@lavender.yy.cs.keio.ac.jp>
In-Reply-To: Your message of "Thu, 21 Mar 1996 03:13:16 PST"
References:  <199603211113.DAA05923@silvia.HIP.Berkeley.EDU> 

next in thread | previous in thread | raw e-mail | index | archive | help
>By the way, I'm thinking of renaming it to "net/wide-dhcp" since there 
>now exists a "net/isc-dhcp" port.  Is that ok for you?
>  N ports/net/dhcp/Makefile
>  N ports/net/dhcp/files/md5
>  N ports/net/dhcp/patches/patch-aa
>  N ports/net/dhcp/pkg/PLIST
>  N ports/net/dhcp/pkg/COMMENT
>  N ports/net/dhcp/pkg/DESCR
from: dhcp/Makefile
>MAINTAINER=     pst@FreeBSD.ORG

  But this WIDE-DHCP ports is not mine. I found my DHCP ports file
in ftp://ftp.freebsd.org/FreeBSD/incoming/dhcp.tar.gz

  From time stamp of two port collection are close; mine is
`Jan.,22' and Paul Traina is `Jan., 23', I think that my ports file
was rejected.

  But there are 2 problems in pst's WIDE DHCP port.

  First, there is no information about dhcp in
`FreeBSD/FreeBSD-current/ports/INDEX' file.

# maybe by some mistakes...

  Second dhcp server program ported by pst has problems. It can't
reply correctly via bpf.

  I patched to dhcps.c below (needless to say, in my ports file). In
FreeBSD, program using bpf does not need htons. (But I don't know
why does it not need..... in BSD/OS, htons was needed)

  I hope only that DHCP server/client program run exactly in FreeBSD :-)
I don't mind who make DHCP ports collection.

yours.
Yoshiro MIHIRA
Keio Univ. Japan

--- server/dhcps.c.orig	Mon Nov  6 16:18:19 1995
+++ server/dhcps.c	Thu Jan 11 10:56:53 1996
@@ -1901,7 +1901,11 @@
     snd.ether->ether_shost[i] = ifp->haddr[i];
 #endif
   }
+#ifdef __FreeBSD__
+  snd.ether->ether_type = ETHERTYPE_IP;
+#else
   snd.ether->ether_type = htons(ETHERTYPE_IP);
+#endif
 
   if (sbufvec[1].iov_base == NULL) {
     if (ether_write(ifp->fd, sbufvec[0].iov_base, sbufvec[0].iov_len) < 0) {
@@ -2215,7 +2219,11 @@
 #endif
     }
   }
+#ifdef __FreeBSD__
+  snd.ether->ether_type = ETHERTYPE_IP;
+#else
   snd.ether->ether_type = htons(ETHERTYPE_IP);
+#endif
 
   buflen = DFLTBOOTPLEN + UDPHL + IPHL + ETHERHL;
   if (ether_write(ifp->fd, (char *)snd.ether, buflen) < 0) {
@@ -2877,7 +2885,7 @@
     return(GOOD);
   }
 
-#ifdef BSDOS
+#if defined(BSDOS) || (__FreeBSD__ == 2)
   delarp(ip);
 #else
   delarp(ip, sockfd);





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603211230.VAA02191>