diff -rcN dhcp-1.4.0p3/README dhcp-1.4.0p4/README
*** dhcp-1.4.0p3/README	Wed Dec 24 18:58:00 1997
--- dhcp-1.4.0p4/README	Wed Jan 27 11:52:38 1999
***************
*** 12,20 ****
  
     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>
--- 12,19 ----
  
     See "Copyright" included in this directory.
  
!    Also, portions of this software may fall under other copyrights.
!    Those copyrights are included corresponded source code files.
  
  
  <Package>
***************
*** 69,196 ****
  	RFC2132.
     [4] R. Droms, "Interoperation Between DHCP and BOOTP",
  	RFC1534.
- 
- 
- <Additional Copyrights>
- 
- ***** 1 *****
- 
- Copyright (c) 1987, 1989 Regents of the University of California.  All
- rights reserved.
- 
- This code is derived from software contributed to Berkeley by Arthur
- David Olson of the National Cancer Institute.
- 
- 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 by the University of California,
-    Berkeley and its contributors.
- 4. Neither the name of the University nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
- 
- THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- 
- ***** 2 *****
- 
- Copyright (c) 1990, 1992 The Regents of the University of California.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that: (1) source code
- distributions retain the above copyright notice and this paragraph in
- its entirety, (2) distributions including binary code include the above
- copyright notice and this paragraph in its entirety in the
- documentation or other materials provided with the distribution, and
- (3) all advertising materials mentioning features or use of this
- software display the following acknowledgement: ``This product
- includes software developed by the University of California, Lawrence
- Berkeley Laboratory and its contributors.'' Neither the name of the
- University nor the names of its contributors may be used to endorse or
- promote products derived from this software without specific prior
- written permission.  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE.
- 
- ***** 3 *****
- 
- Copyright (c) 1983, 1989 The Regents of the University of California.
- 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.
- 3. All advertising materials mentioning features or use of this software
-    must display the following acknowledgement:
-      This product includes software developed by the University of
-      California, Berkeley and its contributors.
- 4. Neither the name of the University nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
- 
- THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- 
- ***** 4 *****
- 
- Copyright (c) 1988 by Carnegie Mellon.
- 
- Permission to use, copy, modify, and distribute this program for any
- purpose and without fee is hereby granted, provided that this copyright
- and permission notice appear on all copies and supporting documentation,
- the name of Carnegie Mellon not be used in advertising or publicity
- pertaining to distribution of the program without specific prior
- permission, and notice be given in supporting documentation that copying
- and distribution is by permission of Carnegie Mellon and Stanford
- University.  Carnegie Mellon makes no representations about the
- suitability of this software for any purpose.  It is provided "as is"
- without express or implied warranty.
- 
- ***** 5 *****
- 
- Copyright (c) 1988 by Carnegie Mellon.
- 
- Permission to use, copy, modify, and distribute this program for any
- purpose and without fee is hereby granted, provided that this copyright
- and permission notice appear on all copies and supporting documentation,
- the name of Carnegie Mellon not be used in advertising or publicity
- pertaining to distribution of the program without specific prior
- permission, and notice be given in supporting documentation that copying
- and distribution is by permission of Carnegie Mellon.  Carnegie Mellon
- makes no representations about the suitability of this software for any
- purpose.  It is provided "as is" without express or implied warranty.
- 
- *************
--- 68,70 ----
diff -rcN dhcp-1.4.0p3/README.jis dhcp-1.4.0p4/README.jis
*** dhcp-1.4.0p3/README.jis	Wed Dec 24 18:56:39 1997
--- dhcp-1.4.0p4/README.jis	Wed Jan 27 11:51:45 1999
***************
*** 12,19 ****
  
    $BK\%G%#%l%/%H%j$K4^$^$l$k(B"Copyright"$B%U%!%$%k$r;2>H$7$F2<$5$$!#(B
  
!   $B$^$?K\%W%m%0%i%`$N0lIt$O!"$3$N%U%!%$%k$N:G8e$K$"$k(BCopyright$B$K=>$$$^(B
!   $B$9!#$J$*3F(BCopyright$B$O3:Ev$9$k%=!<%9%U%!%$%k$K4^$^$l$F$$$^$9!#(B
  
  
  <$B%Q%C%1!<%8(B>
--- 12,19 ----
  
    $BK\%G%#%l%/%H%j$K4^$^$l$k(B"Copyright"$B%U%!%$%k$r;2>H$7$F2<$5$$!#(B
  
!   $B$^$?K\%W%m%0%i%`$N0lIt$O!"%i%$%;%s%9=jM-<T$,0[$J$k$b$N$b$"$j$^$9!#$=(B
!   $B$N>l9g!"3:Ev$9$k%=!<%9%U%!%$%k$K8DJL$N(BCopyright$B$,4^$^$l$F$$$^$9!#(B
  
  
  <$B%Q%C%1!<%8(B>
***************
*** 69,262 ****
    [5] $BIZ1JL@9((B, $B;{2,J8CK(B, $BB<0f(B $B=c(B, "$BF0E*%[%9%H@_Dj%W%m%H%3%k(B(DHCP)$B$N<BAu$H(B
        $BI>2A(B", $B>pJs=hM}3X2q(B $B%^%k%A%a%G%#%"DL?.$HJ,;6=hM}8&5f2qM=9F=8(B, 1993$BG/(B
        11$B7n(B.
- 
- <$B$=$NB>$N(BCopyright>
- 
- ***** 1 *****
- 
- Copyright (c) 1987, 1989 Regents of the University of California.  All
- rights reserved.
- 
- This code is derived from software contributed to Berkeley by Arthur
- David Olson of the National Cancer Institute.
- 
- 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 by the University of California,
-    Berkeley and its contributors.
- 4. Neither the name of the University nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
- 
- THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- 
- ***** 2 *****
- 
- Copyright (c) 1990, 1992 The Regents of the University of California.
- All rights reserved.
- 
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that: (1) source code
- distributions retain the above copyright notice and this paragraph in
- its entirety, (2) distributions including binary code include the above
- copyright notice and this paragraph in its entirety in the
- documentation or other materials provided with the distribution, and
- (3) all advertising materials mentioning features or use of this
- software display the following acknowledgement: ``This product
- includes software developed by the University of California, Lawrence
- Berkeley Laboratory and its contributors.'' Neither the name of the
- University nor the names of its contributors may be used to endorse or
- promote products derived from this software without specific prior
- written permission.  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE.
- 
- ***** 3 *****
- 
- Copyright (c) 1983, 1989 The Regents of the University of California.
- 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.
- 3. All advertising materials mentioning features or use of this software
-    must display the following acknowledgement:
-      This product includes software developed by the University of
-      California, Berkeley and its contributors.
- 4. Neither the name of the University nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
- 
- THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- 
- ***** 4 *****
- 
- Copyright (c) 1988 by Carnegie Mellon.
- 
- Permission to use, copy, modify, and distribute this program for any
- purpose and without fee is hereby granted, provided that this copyright
- and permission notice appear on all copies and supporting documentation,
- the name of Carnegie Mellon not be used in advertising or publicity
- pertaining to distribution of the program without specific prior
- permission, and notice be given in supporting documentation that copying
- and distribution is by permission of Carnegie Mellon and Stanford
- University.  Carnegie Mellon makes no representations about the
- suitability of this software for any purpose.  It is provided "as is"
- without express or implied warranty.
- 
- ***** 5 *****
- 
- Copyright (c) 1988 by Carnegie Mellon.
- 
- Permission to use, copy, modify, and distribute this program for any
- purpose and without fee is hereby granted, provided that this copyright
- and permission notice appear on all copies and supporting documentation,
- the name of Carnegie Mellon not be used in advertising or publicity
- pertaining to distribution of the program without specific prior
- permission, and notice be given in supporting documentation that copying
- and distribution is by permission of Carnegie Mellon.  Carnegie Mellon
- makes no representations about the suitability of this software for any
- purpose.  It is provided "as is" without express or implied warranty.
- 
- ***** 6 *****
- 
- Copyright (c) 1983, 1989, 1991, 1993
-      The Regents of the University of California.  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.
- 3. All advertising materials mentioning features or use of this software
-    must display the following acknowledgement:
-      This product includes software developed by the University of
-      California, Berkeley and its contributors.
- 4. Neither the name of the University nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
- 
- THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- 
- ***** 7 *****
- 
- Copyright (c) 1984, 1993
-      The Regents of the University of California.  All rights reserved.
- 
- This code is derived from software contributed to Berkeley by
- Sun Microsystems, 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 by the University of
-      California, Berkeley and its contributors.
- 4. Neither the name of the University nor the names of its contributors
-    may be used to endorse or promote products derived from this software
-    without specific prior written permission.
- 
- THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
--- 69,71 ----
diff -rcN dhcp-1.4.0p3/client/Makefile.FreeBSD dhcp-1.4.0p4/client/Makefile.FreeBSD
*** dhcp-1.4.0p3/client/Makefile.FreeBSD	Thu Sep 10 09:08:15 1998
--- dhcp-1.4.0p4/client/Makefile.FreeBSD	Fri Jan  1 23:21:32 1999
***************
*** 2,13 ****
  OBJ = dhcpc_subr.o flushroute.o getmac.o common_subr.o dhcpc.o
  
  CC = cc
! CFLAGS += -O -I. -I../server -DRETRY_FOREVER #-DMOBILE_IP -DDEBUG
! LDFLAGS = -lkvm
  
! SBIN = 		/usr/local/sbin
! LIBEXEC =	/usr/local/libexec
! MAN =		/usr/local/man
  CP =		/bin/cp
  RM =		/bin/rm
  GZIP =		/usr/bin/gzip
--- 2,14 ----
  OBJ = dhcpc_subr.o flushroute.o getmac.o common_subr.o dhcpc.o
  
  CC = cc
! CFLAGS = -O2 -I. -I../server -DRETRY_FOREVER #-DMOBILE_IP -DDEBUG
! LDFLAGS =
  
! PREFIX =	/usr/local
! SBIN = 		$(PREFIX)/sbin
! LIBEXEC =	$(PREFIX)/libexec
! MAN =		$(PREFIX)/man
  CP =		/bin/cp
  RM =		/bin/rm
  GZIP =		/usr/bin/gzip
diff -rcN dhcp-1.4.0p3/client/Makefile.bsdi dhcp-1.4.0p4/client/Makefile.bsdi
*** dhcp-1.4.0p3/client/Makefile.bsdi	Thu Sep 10 09:07:37 1998
--- dhcp-1.4.0p4/client/Makefile.bsdi	Fri Jan  1 19:10:18 1999
***************
*** 3,9 ****
  
  INSTALL = install
  CC = shlicc2
! CFLAGS = -O -I. -I../server -DRETRY_FOREVER #-DMOBILE_IP -DDEBUG -DVIP
  LDFLAGS = -lkvm
  
  BIN =		/usr/contrib/bin
--- 3,9 ----
  
  INSTALL = install
  CC = shlicc2
! CFLAGS = -O -I. -I../server -DRETRY_FOREVER #-DMOBILE_IP -DDEBUG
  LDFLAGS = -lkvm
  
  BIN =		/usr/contrib/bin
diff -rcN dhcp-1.4.0p3/client/dhcpc.8 dhcp-1.4.0p4/client/dhcpc.8
*** dhcp-1.4.0p3/client/dhcpc.8	Thu Apr 24 09:08:23 1997
--- dhcp-1.4.0p4/client/dhcpc.8	Sun Jan 10 13:54:01 1999
***************
*** 1,7 ****
  .TH DHCPC 8 "April 23, 1997"
  .SH NAME
  .B dhcpc
! \- DHCP client (finite state machine version)
  .SH SYNOPSIS
  .B dhcpc
  [
--- 1,7 ----
  .TH DHCPC 8 "April 23, 1997"
  .SH NAME
  .B dhcpc
! \- DHCP client
  .SH SYNOPSIS
  .B dhcpc
  [
***************
*** 26,35 ****
  requests server to assign the same address as before.
  To get the same address,
  .B dhcpc
! creates file named "/etc/dhcp_cache".  This file name could be
! configured when it is compiled.  But it is required that the file must
! remains after the host reboot.  For example, the /tmp directory is not
! appropriate for this purpose.
  .LP
  If the
  .B \-d
--- 26,36 ----
  requests server to assign the same address as before.
  To get the same address,
  .B dhcpc
! creates file named /etc/dhcpc_cache.interface
! (or /var/db/dhcpc_cache.interface for BSD/OS and FreeBSD).  This
! file name could be configured when it is compiled.  But it is required
! that the file must remains after the host reboot.  For example, the
! /tmp directory is not appropriate for this purpose.
  .LP
  If the
  .B \-d
***************
*** 64,71 ****
  .SH FILES
  .PD 0
  .TP 20
! .B /etc/dhcp_cache
! The file to record previously assigned informations
  .PD
  .SH SEE ALSO
  R. Droms,
--- 65,75 ----
  .SH FILES
  .PD 0
  .TP 20
! .B /var/db/dhcpc_cache.interface
! The file to record previously assigned informations (for BSD/OS and FreeBSD)
! .TP
! .B /etc/dhcpc_cache.interface
! The file to record previously assigned informations (for others)
  .PD
  .SH SEE ALSO
  R. Droms,
diff -rcN dhcp-1.4.0p3/client/dhcpc.8.jis dhcp-1.4.0p4/client/dhcpc.8.jis
*** dhcp-1.4.0p3/client/dhcpc.8.jis	Thu Apr 24 09:12:10 1997
--- dhcp-1.4.0p4/client/dhcpc.8.jis	Sun Jan 10 13:54:29 1999
***************
*** 2,8 ****
  DHCPC(8)							DHCPC(8)
  
  $BL>(B$BL>>N(B$B>N(B
!      ddhhccppcc - DHCP$B%/%i%$%"%s%H(B (finite state machine$BHG(B)
  
  $B7A(B$B7A<0(B$B<0(B
       ddhhccppcc [--dd] i_n_t_e_r_f_a_c_e_
--- 2,8 ----
  DHCPC(8)							DHCPC(8)
  
  $BL>(B$BL>>N(B$B>N(B
!      ddhhccppcc - DHCP$B%/%i%$%"%s%H(B
  
  $B7A(B$B7A<0(B$B<0(B
       ddhhccppcc [--dd] i_n_t_e_r_f_a_c_e_
***************
*** 16,24 ****
  
       ddhhccppcc$B$O(BRFC$B$N5,Dj$K=>$$!"%[%9%H$N(Bshutdown$B$N8e$K:F5/F0$5$l$?>l9g!"(B
       $BA02s$HF1$8%"%I%l%9$r3d$jEv$F$F$b$i$&$h$&$K%5!<%P$KMW5a$9$k!#$=(B
!      $B$N$?$a$K(B/etc/dhcp_cache$B$H$$$&%U%!%$%k$r:n@.$9$k!#$3$N%U%!%$%k$N(B
!      $B0LCV$O%3%s%Q%$%k;~$KJQ992DG=$@$,!"(Breboot$B$7$F$b>C5n$5$l$J$$$3$H(B
!      $B$,MW5a$5$l$k!#(B
  
       --dd$B%*%W%7%g%s$,;XDj$5$l$k$H!"(Bddhhccppcc$B$O%U%)%"%0%i%&%s%I$G%G%P%C%0(B
       $B%b!<%I$H$7$FF0:n$9$k!#(B
--- 16,25 ----
  
       ddhhccppcc$B$O(BRFC$B$N5,Dj$K=>$$!"%[%9%H$N(Bshutdown$B$N8e$K:F5/F0$5$l$?>l9g!"(B
       $BA02s$HF1$8%"%I%l%9$r3d$jEv$F$F$b$i$&$h$&$K%5!<%P$KMW5a$9$k!#$=(B
!      $B$N$?$a$K(B/etc/dhcpc_cache.i_n_t_e_r_f_a_c_e_(BSD/OS$B$d(BFreeBSD$B$O(B
!      /var/db/dhcpc_cache.i_n_t_e_r_f_a_c_e_)$B$H$$$&%U%!%$%k$r:n@.$9$k!#$3$N%U%!(B
!      $B%$%k$N0LCV$O%3%s%Q%$%k;~$KJQ992DG=$@$,!"(Breboot$B$7$F$b>C5n$5$l$J(B
!      $B$$$3$H$,MW5a$5$l$k!#(B
  
       --dd$B%*%W%7%g%s$,;XDj$5$l$k$H!"(Bddhhccppcc$B$O%U%)%"%0%i%&%s%I$G%G%P%C%0(B
       $B%b!<%I$H$7$FF0:n$9$k!#(B
***************
*** 37,43 ****
       $B%9$N=i4|2=(B)$B$r9T$J$C$F$+$i=*N;$9$k!#(B
  
  $B4X(B$B4XO"(B$BO"%U(B$B%U%!(B$B%!%$(B$B%$%k(B$B%k(B
!      //eettcc//ddhhccpp__ccaacchhee		$B%Q%i%a!<%?J]B8%U%!%$%k(B
  
  $B4X(B$B4XO"(B$BO";v(B$B;v9`(B$B9`(B
       R. Droms, D_y_n_a_m_i_c_ H_o_s_t_ C_o_n_f_i_g_u_r_a_t_i_o_n_ P_r_o_t_o_c_o_l_,
--- 38,47 ----
       $B%9$N=i4|2=(B)$B$r9T$J$C$F$+$i=*N;$9$k!#(B
  
  $B4X(B$B4XO"(B$BO"%U(B$B%U%!(B$B%!%$(B$B%$%k(B$B%k(B
!      //vvaarr//ddbb//ddhhccppcc__ccaacchhee..i_n_t_e_r_f_a_c_e_	$B%Q%i%a!<%?J]B8%U%!%$%k(B
! 					(BSD/OS, FreeBSD)
!      //eettcc//ddhhccppcc__ccaacchhee..i_n_t_e_r_f_a_c_e_		$B%Q%i%a!<%?J]B8%U%!%$%k(B
! 					($B$=$NB>(B)
  
  $B4X(B$B4XO"(B$BO";v(B$B;v9`(B$B9`(B
       R. Droms, D_y_n_a_m_i_c_ H_o_s_t_ C_o_n_f_i_g_u_r_a_t_i_o_n_ P_r_o_t_o_c_o_l_,
diff -rcN dhcp-1.4.0p3/client/dhcpc.c dhcp-1.4.0p4/client/dhcpc.c
*** dhcp-1.4.0p3/client/dhcpc.c	Thu Sep 10 08:54:19 1998
--- dhcp-1.4.0p4/client/dhcpc.c	Fri Jan  1 22:20:08 1999
***************
*** 53,58 ****
--- 53,64 ----
  #ifndef sun
  #include <net/bpf.h>
  #endif
+ #ifdef __FreeBSD__
+ #include <osreldate.h>
+ #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
+ #include <net/if_var.h>
+ #endif
+ #endif
  #include <netinet/in.h>
  #include <netinet/in_systm.h>
  #include <netinet/if_ether.h>
***************
*** 249,257 ****
  #ifndef DEBUG
    if (config_if(&intface, &addr, &mask, &brdaddr) == 0) {
      set_route(paramp);
- #ifdef VIP
-     (void) sndcamt();
- #endif
    }
  #endif
  
--- 255,260 ----
diff -rcN dhcp-1.4.0p3/client/dhcpc_subr.c dhcp-1.4.0p4/client/dhcpc_subr.c
*** dhcp-1.4.0p3/client/dhcpc_subr.c	Thu Sep 10 09:06:39 1998
--- dhcp-1.4.0p4/client/dhcpc_subr.c	Fri Jan  1 23:21:08 1999
***************
*** 64,69 ****
--- 64,75 ----
  #ifdef __osf__
  #include <net/pfilt.h>
  #endif
+ #ifdef __FreeBSD__
+ #include <osreldate.h>
+ #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
+ #include <net/if_var.h>
+ #endif
+ #endif
  #include <netinet/in.h>
  #include <netinet/in_systm.h>
  #include <netinet/if_ether.h>
***************
*** 71,79 ****
  #include <netinet/ip.h>
  #include <netinet/udp.h>
  #include <arpa/inet.h>
! #ifdef VIP
! #include <netinet/vip.h>
! #endif
  
  #include "dhcp.h"
  #include "common.h"
--- 77,84 ----
  #include <netinet/ip.h>
  #include <netinet/udp.h>
  #include <arpa/inet.h>
! #include <arpa/nameser.h>
! #include <resolv.h>
  
  #include "dhcp.h"
  #include "common.h"
***************
*** 1516,1522 ****
--- 1521,1529 ----
    }
    bzero(&ridreq, sizeof(struct ifreq));
    strncpy(ridreq.ifr_name, ifp->name, sizeof(ridreq.ifr_name));
+ #ifdef __bsdi__
    SIN(ridreq.ifr_addr)->sin_family = AF_INET;
+ #endif
    ioctl(sockfd, SIOCDIFADDR, (caddr_t) &ridreq);
    close(sockfd);
  
***************
*** 1666,1672 ****
  
    bzero(&ridreq, sizeof(struct ifreq));
    strncpy(ridreq.ifr_name, ifp->name, sizeof(ridreq.ifr_name));
! #if defined(__bsdi__)
    SIN(ridreq.ifr_addr)->sin_family = AF_INET;
  #endif
    ioctl(sockfd, SIOCDIFADDR, (caddr_t) &ridreq);
--- 1673,1679 ----
  
    bzero(&ridreq, sizeof(struct ifreq));
    strncpy(ridreq.ifr_name, ifp->name, sizeof(ridreq.ifr_name));
! #ifdef __bsdi__
    SIN(ridreq.ifr_addr)->sin_family = AF_INET;
  #endif
    ioctl(sockfd, SIOCDIFADDR, (caddr_t) &ridreq);
***************
*** 1792,1798 ****
    struct dhcp_param *param;
  {
    int sockfd = 0;
! #if !defined(__bsdi__) && !defined(__FreeBSD__) && !defined(__osf__)
  #define  ortentry  rtentry
  #endif
    struct ortentry rt;
--- 1799,1805 ----
    struct dhcp_param *param;
  {
    int sockfd = 0;
! #if !defined(__osf__)
  #define  ortentry  rtentry
  #endif
    struct ortentry rt;
***************
*** 1810,1838 ****
    /*
     * set default route
     */
!   if (ISSET(param->got_option, ROUTER) &&
!       param->router != NULL && param->router->addr != NULL) {
!     bzero(&rt, sizeof(struct ortentry));
!     bzero(&dst, sizeof(struct sockaddr));
!     bzero(&gateway, sizeof(struct sockaddr));
!     rt.rt_flags = RTF_UP | RTF_GATEWAY;
! #if defined(__bsdi__) || defined(__FreeBSD__)
!     ((struct sockaddr_in *) &dst)->sin_len = sizeof(struct sockaddr_in);
! #endif
!     ((struct sockaddr_in *) &dst)->sin_family = AF_INET;
!     ((struct sockaddr_in *) &dst)->sin_addr.s_addr = INADDR_ANY;
! #if defined(__bsdi__) || defined(__FreeBSD__)
!     ((struct sockaddr_in *) &gateway)->sin_len = sizeof(struct sockaddr_in);
! #endif
!     ((struct sockaddr_in *) &gateway)->sin_family = AF_INET;
!     ((struct sockaddr_in *) &gateway)->sin_addr.s_addr =
!       param->router->addr->s_addr;
!     rt.rt_dst = dst;
!     rt.rt_gateway = gateway;
!     if (ioctl(sockfd, SIOCADDRT, &rt) < 0) {
!       syslog(LOG_WARNING, "SIOCADDRT (default route): %m");
!       close(sockfd);
!     }
    }
  
    close(sockfd);
--- 1817,1840 ----
    /*
     * set default route
     */
!   if (!ISSET(param->got_option, ROUTER) ||
!       param->router == NULL || param->router->addr == NULL)
!     return;
! 
!   bzero(&rt, sizeof(struct ortentry));
!   bzero(&dst, sizeof(struct sockaddr));
!   bzero(&gateway, sizeof(struct sockaddr));
!   rt.rt_flags = RTF_UP | RTF_GATEWAY;
!   ((struct sockaddr_in *) &dst)->sin_family = AF_INET;
!   ((struct sockaddr_in *) &dst)->sin_addr.s_addr = INADDR_ANY;
!   ((struct sockaddr_in *) &gateway)->sin_family = AF_INET;
!   ((struct sockaddr_in *) &gateway)->sin_addr.s_addr =
!     param->router->addr->s_addr;
!   rt.rt_dst = dst;
!   rt.rt_gateway = gateway;
!   if (ioctl(sockfd, SIOCADDRT, &rt) < 0) {
!     syslog(LOG_WARNING, "SIOCADDRT (default route): %m");
!     close(sockfd);
    }
  
    close(sockfd);
***************
*** 1856,1861 ****
--- 1858,1867 ----
    register char *cp = m_rtmsg.m_space;
    register int l;
  
+   if (param == NULL || !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));
***************
*** 3216,3252 ****
    buf += OPTLEN(buf) + 1;
    return(0);
  }
- 
- #ifdef VIP
- int
- sndcamt()
- {
- 	int	s;
- 	int	mode;
- 
- 	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- 		perror("socket");
- 		return -1;
- 	}
- 	if (ioctl(s, SIOCGVIPMODE, &mode) < 0) {
- 		perror("ioctl(SIOCGVIPMODE)");
- 		return -1;
- 	}
- 	if (mode != VIPMODE_ON)
- 		return 0;
- 	if (ioctl(s, SIOCSNDCAMT, 0) < 0) {
- 		perror("ioctl(SIOCSNDCAMT)");
- 		return -1;
- 	}
- 	return 0;
- }
- #endif
- 
- /*
-  * Local Variables:
-  * c-basic-offset: 2
-  * c-indent-level: 2
-  * c-continued-statement-offset: 2
-  * c-brace-imaginary-offset: 0
-  * End:
-  */
--- 3222,3224 ----
diff -rcN dhcp-1.4.0p3/client/dhcpc_subr.h dhcp-1.4.0p4/client/dhcpc_subr.h
*** dhcp-1.4.0p3/client/dhcpc_subr.h	Tue May 27 08:59:38 1997
--- dhcp-1.4.0p4/client/dhcpc_subr.h	Fri Jan  1 19:27:21 1999
***************
*** 67,75 ****
  void  set_declinfo();
  void  set_relinfo();
  void  make_discover();
- #ifdef VIP
- int	sndcamt();
- #endif
  
  /*
   * flushroutes() is included in flushroute.c
--- 67,72 ----
diff -rcN dhcp-1.4.0p3/client/flushroute.c dhcp-1.4.0p4/client/flushroute.c
*** dhcp-1.4.0p3/client/flushroute.c	Tue Apr 14 20:14:33 1998
--- dhcp-1.4.0p4/client/flushroute.c	Fri Jan  1 22:34:12 1999
***************
*** 85,90 ****
--- 85,91 ----
  #include <errno.h>
  #include <string.h>
  #include <sys/param.h> 
+ #include <sys/time.h> 
  #include <sys/socket.h>
  #include <sys/sysctl.h>
  #include <sys/ioctl.h>
diff -rcN dhcp-1.4.0p3/db_sample/intro.dhcp dhcp-1.4.0p4/db_sample/intro.dhcp
*** dhcp-1.4.0p3/db_sample/intro.dhcp	Thu Sep 26 11:52:20 1996
--- dhcp-1.4.0p4/db_sample/intro.dhcp	Fri Jan  1 22:29:59 1999
***************
*** 29,38 ****
  
  The first symbol of each entry is an index string to the entry.  The
  index is used to quote, and also used in database file
! ("/etc/dhcpdb.bind") to maintain the assignment of IP address.  You
! can use any character as index except ':'.  The remains is list of
! fields, which have a form of key=value.  And each fields are separated
! by ':'.  The following are simple example;
  
  -- begin of sample
  
--- 29,39 ----
  
  The first symbol of each entry is an index string to the entry.  The
  index is used to quote, and also used in database file
! ("/etc/dhcpdb.bind" [/var/db/dhcpdb.bind for BSD/OS and FreeBSD]) to
! maintain the assignment of IP address.  You can use any character as
! index except ':'.  The remains is list of fields, which have a form
! of key=value.  And each fields are separated by ':'.  The following
! are simple example;
  
  -- begin of sample
  
diff -rcN dhcp-1.4.0p3/db_sample/intro.dhcp.jis dhcp-1.4.0p4/db_sample/intro.dhcp.jis
*** dhcp-1.4.0p3/db_sample/intro.dhcp.jis	Thu Sep 26 11:50:27 1996
--- dhcp-1.4.0p4/db_sample/intro.dhcp.jis	Fri Jan  1 22:32:47 1999
***************
*** 29,38 ****
  
  $B3F%(%s%H%j$N:G=i$N%7%s%\%k$O!"$=$N%(%s%H%j$K$?$$$9$k(BIndex$B$H$J$kJ8;zNs(B
  $B$G$"$k!#$3$l$O8e$G(Btblc$B$G;2>H$9$k;~$KMxMQ$5$l$?$j!"%5!<%P$,%"%I%l%9$N3d(B
! $B$jEv$F$r4IM}$9$k$?$a$N%G!<%?%Y!<%9(B(/etc/dhcpdb.bind)$B$G$b(BIndex$B$H$7$F;H(B
! $BMQ$5$l$F$$$k!#(BIndex$B$K$O(B':'$B0J30$NG$0U$NJ8;z$r;HMQ$7$F$h$$!#3F%(%s%H%j$N(B
! $B;D$jItJ,$O!"(Bkey=value$B7A<0$N%U%#!<%k%I$NNs$G$"$j!"3F%U%#!<%k%I$O(B':'$B$G6h(B
! $B@Z$i$l$F$$$k!#0J2<$K!"4JC1$JNc$r<($9!#(B
  
  -- begin of sample
  
--- 29,39 ----
  
  $B3F%(%s%H%j$N:G=i$N%7%s%\%k$O!"$=$N%(%s%H%j$K$?$$$9$k(BIndex$B$H$J$kJ8;zNs(B
  $B$G$"$k!#$3$l$O8e$G(Btblc$B$G;2>H$9$k;~$KMxMQ$5$l$?$j!"%5!<%P$,%"%I%l%9$N3d(B
! $B$jEv$F$r4IM}$9$k$?$a$N%G!<%?%Y!<%9(B(/etc/dhcpdb.bind [BSD/OS$B$d(BFreeBSD$B$G(B
! $B$O(B/var/db/dhcpdb.bind])$B$G$b(BIndex$B$H$7$F;HMQ$5$l$F$$$k!#(BIndex$B$K$O(B':'$B0J30(B
! $B$NG$0U$NJ8;z$r;HMQ$7$F$h$$!#3F%(%s%H%j$N;D$jItJ,$O!"(Bkey=value$B7A<0$N(B
! $B%U%#!<%k%I$NNs$G$"$j!"3F%U%#!<%k%I$O(B':'$B$G6h@Z$i$l$F$$$k!#0J2<$K!"4JC1(B
! $B$JNc$r<($9!#(B
  
  -- begin of sample
  
diff -rcN dhcp-1.4.0p3/relay/Makefile.FreeBSD dhcp-1.4.0p4/relay/Makefile.FreeBSD
*** dhcp-1.4.0p3/relay/Makefile.FreeBSD	Thu Sep 11 10:10:42 1997
--- dhcp-1.4.0p4/relay/Makefile.FreeBSD	Fri Jan  1 19:25:43 1999
***************
*** 1,11 ****
  OBJ = relay.o getmac.o common_subr.o interface.o
  
  CC = cc
! CFLAGS += -O -I. -I../server
! LDFLAGS = -lkvm
! SBIN =		/usr/local/sbin
! LIBEXEC = 	/usr/local/libexec
! MAN =		/usr/local/man
  CP =		/bin/cp
  RM =		/bin/rm
  GZIP =		/usr/bin/gzip
--- 1,13 ----
  OBJ = relay.o getmac.o common_subr.o interface.o
  
  CC = cc
! CFLAGS = -O2 -I. -I../server
! LDFLAGS =
! 
! PREFIX =	/usr/local
! SBIN =		${PREFIX}/sbin
! LIBEXEC = 	${PREFIX}/libexec
! MAN =		${PREFIX}/man
  CP =		/bin/cp
  RM =		/bin/rm
  GZIP =		/usr/bin/gzip
diff -rcN dhcp-1.4.0p3/relay/relay.c dhcp-1.4.0p4/relay/relay.c
*** dhcp-1.4.0p3/relay/relay.c	Mon Jul  7 17:10:02 1997
--- dhcp-1.4.0p4/relay/relay.c	Fri Jan  1 19:28:04 1999
***************
*** 58,63 ****
--- 58,69 ----
  #include <sys/socket.h>
  
  #include <net/if.h>
+ #ifdef __FreeBSD__
+ #include <osreldate.h>
+ #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
+ #include <net/if_var.h>
+ #endif
+ #endif
  #ifdef sun
  #include <net/nit.h>
  #include <net/nit_if.h>
diff -rcN dhcp-1.4.0p3/server/Makefile.FreeBSD dhcp-1.4.0p4/server/Makefile.FreeBSD
*** dhcp-1.4.0p3/server/Makefile.FreeBSD	Fri Jan 30 18:03:57 1998
--- dhcp-1.4.0p4/server/Makefile.FreeBSD	Tue Jan 26 19:13:13 1999
***************
*** 2,12 ****
        interface.o delarp.o
  
  CC = cc
! CFLAGS += -O -I. #-DMAC_FILTER #-DCOMPAT_RFC1541 #-DNOICMPCHK
! LDFLAGS = -lkvm
! SBIN =		/usr/local/sbin
! LIBEXEC =	/usr/local/libexec
! MAN =		/usr/local/man
  CP =		/bin/cp
  RM =		/bin/rm
  GZIP =		/usr/bin/gzip
--- 2,14 ----
        interface.o delarp.o
  
  CC = cc
! CFLAGS = -O2 -I. #-DMAC_FILTER #-DCOMPAT_RFC1541 #-DNOICMPCHK
! LDFLAGS =
! 
! PREFIX =	/usr/local
! SBIN =		${PREFIX}/sbin
! LIBEXEC =	${PREFIX}/libexec
! MAN =		${PREFIX}/man
  CP =		/bin/cp
  RM =		/bin/rm
  GZIP =		/usr/bin/gzip
diff -rcN dhcp-1.4.0p3/server/common_subr.c dhcp-1.4.0p4/server/common_subr.c
*** dhcp-1.4.0p3/server/common_subr.c	Mon Jul  7 17:03:39 1997
--- dhcp-1.4.0p4/server/common_subr.c	Fri Jan  1 22:23:55 1999
***************
*** 60,65 ****
--- 60,71 ----
  #ifndef sun
  #include <net/bpf.h>
  #endif
+ #ifdef __FreeBSD__
+ #include <osreldate.h>
+ #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
+ #include <net/if_var.h>
+ #endif
+ #endif
  #include <netinet/in_systm.h>
  #include <netinet/in.h>
  #include <netinet/ip.h>
diff -rcN dhcp-1.4.0p3/server/common_subr.h dhcp-1.4.0p4/server/common_subr.h
*** dhcp-1.4.0p3/server/common_subr.h	Tue Sep  8 20:55:51 1998
--- dhcp-1.4.0p4/server/common_subr.h	Tue Jan  5 16:30:23 1999
***************
*** 37,43 ****
   * WIDE project has the rights to redistribute these changes.
   */
  
! #define WIDEDHCP_VERS    "1.4.0p3"
  
  struct ps_udph {              /* pseudo udp header for checksum */
    struct in_addr srcip,
--- 37,43 ----
   * WIDE project has the rights to redistribute these changes.
   */
  
! #define WIDEDHCP_VERS    "1.4.0p4"
  
  struct ps_udph {              /* pseudo udp header for checksum */
    struct in_addr srcip,
***************
*** 81,84 ****
--- 81,90 ----
  #else
  #define ether_write   write
  #define ether_writev  writev
+ #endif
+ 
+ #ifdef __FreeBSD__
+ #if (__FreeBSD_version < 199608) || (__FreeBSD_version == 199612) || (__FreeBSD_version > 199703 && __FreeBSD_version < 219999)
+ #define FreeBSD_BUG
+ #endif
  #endif
diff -rcN dhcp-1.4.0p3/server/database.c dhcp-1.4.0p4/server/database.c
*** dhcp-1.4.0p3/server/database.c	Fri Feb 20 23:48:53 1998
--- dhcp-1.4.0p4/server/database.c	Fri Jan  1 22:35:33 1999
***************
*** 124,129 ****
--- 124,130 ----
  {
    struct hash_member *resptr = NULL;
  
+   unlink(ADDRPOOL_DUMP);
    if ((dump_fp = freopen(ADDRPOOL_DUMP, "w+", dump_fp)) == NULL) {
      syslog(LOG_WARNING,
  	   "Cannot reopen the address pool dump file \"%s\"", ADDRPOOL_DUMP);
diff -rcN dhcp-1.4.0p3/server/delarp.c dhcp-1.4.0p4/server/delarp.c
*** dhcp-1.4.0p3/server/delarp.c	Thu Sep 11 10:28:58 1997
--- dhcp-1.4.0p4/server/delarp.c	Fri Jan  1 19:28:38 1999
***************
*** 43,53 ****
--- 43,62 ----
  
  #include <sys/param.h>
  #include <sys/socket.h>
+ #ifdef __FreeBSD__
+ #include <osreldate.h>
+ #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
+ #include <sys/time.h>
+ #endif
+ #endif
  
  #include <net/if.h>
  #if !defined(sun) && !defined(sony_news)
  #include <net/if_dl.h>
  #include <net/if_types.h>
+ #endif
+ #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
+ #include <net/if_var.h>
  #endif
  #include <net/route.h>
  
diff -rcN dhcp-1.4.0p3/server/dhcpdb.relay.5 dhcp-1.4.0p4/server/dhcpdb.relay.5
*** dhcp-1.4.0p3/server/dhcpdb.relay.5	Thu Apr 24 09:02:38 1997
--- dhcp-1.4.0p4/server/dhcpdb.relay.5	Fri Jan  1 22:33:17 1999
***************
*** 45,51 ****
  .PD 0
  .TP 25
  .B /etc/dhcpdb.bind
! Database about bindings (/var/db/dhcpdb.bind for BSD/OS)
  .TP
  .B /etc/dhcpdb.pool
  Address Pool database
--- 45,51 ----
  .PD 0
  .TP 25
  .B /etc/dhcpdb.bind
! Database about bindings (/var/db/dhcpdb.bind for BSD/OS and FreeBSD)
  .TP
  .B /etc/dhcpdb.pool
  Address Pool database
diff -rcN dhcp-1.4.0p3/server/dhcps.8 dhcp-1.4.0p4/server/dhcps.8
*** dhcp-1.4.0p3/server/dhcps.8	Thu Apr 24 09:01:18 1997
--- dhcp-1.4.0p4/server/dhcps.8	Fri Jan  1 22:28:25 1999
***************
*** 36,43 ****
  "binding".
  .B dhcps
  manages these with files, /etc/dhcpdb.pool and /etc/dhcpdb.bind
! (/var/db/dhcpdb.bind for BSD/OS).  It is possible to change these path
! with command line option.
  .LP
  Also
  .B dhcps
--- 36,43 ----
  "binding".
  .B dhcps
  manages these with files, /etc/dhcpdb.pool and /etc/dhcpdb.bind
! (/var/db/dhcpdb.bind for BSD/OS and FreeBSD).  It is possible to change
! these path with command line option.
  .LP
  Also
  .B dhcps
diff -rcN dhcp-1.4.0p3/server/dhcps.c dhcp-1.4.0p4/server/dhcps.c
*** dhcp-1.4.0p3/server/dhcps.c	Sun Jul 19 11:16:53 1998
--- dhcp-1.4.0p4/server/dhcps.c	Fri Jan  1 19:22:27 1999
***************
*** 61,66 ****
--- 61,72 ----
  #ifndef sun
  #include <net/bpf.h>
  #endif
+ #ifdef __FreeBSD__
+ #include <osreldate.h>
+ #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
+ #include <net/if_var.h>
+ #endif
+ #endif
  #include <netinet/in_systm.h>
  #include <netinet/in.h>
  #include <netinet/ip.h>
***************
*** 1438,1445 ****
      reqopt = OPTBODY(option);
      reqoptlen = OPTLEN(option);
      for (i = 0; i < reqoptlen; i++) {
!       if (isclr(inserted, *(reqopt + i))) {
! 	if (insert_opt(res, lease, *(reqopt + i), inserted, PASSIVE) == E_NOMORE) {
  	  errno = 0;
  	  syslog(LOG_INFO, "No more space left to insert options to DHCP%s",
  		 (msgtype == DHCPOFFER) ? "OFFER" : "ACK");
--- 1444,1451 ----
      reqopt = OPTBODY(option);
      reqoptlen = OPTLEN(option);
      for (i = 0; i < reqoptlen; i++) {
!       if (isclr(inserted, (u_char) *(reqopt + i))) {
! 	if (insert_opt(res, lease, (u_char) *(reqopt + i), inserted, PASSIVE) == E_NOMORE) {
  	  errno = 0;
  	  syslog(LOG_INFO, "No more space left to insert options to DHCP%s",
  		 (msgtype == DHCPOFFER) ? "OFFER" : "ACK");
diff -rcN dhcp-1.4.0p3/server/getmac.c dhcp-1.4.0p4/server/getmac.c
*** dhcp-1.4.0p3/server/getmac.c	Thu Sep 11 10:27:06 1997
--- dhcp-1.4.0p4/server/getmac.c	Thu Jan 28 01:18:26 1999
***************
*** 21,28 ****
   * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
   * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   */
- #if !defined(sony_news) && !defined(__osf__)
- 
  #ifdef lint
  static char rcsid[] =
      "@(#) $Header: myetheraddr.c,v 1.6 92/03/17 18:43:30 leres Exp $ (LBL)";
--- 21,26 ----
***************
*** 31,37 ****
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
- #include <nlist.h>
  #include <syslog.h>
  #include <errno.h>
  
--- 29,34 ----
***************
*** 39,67 ****
  #include <sys/param.h>
  #include <sys/time.h>
  #include <sys/proc.h>
- #include <kvm.h>
- #include <fcntl.h>
  
  #include <sys/socket.h>
  #include <net/if.h>
! #ifdef __FreeBSD__
  #include <osreldate.h>
  #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
  #include <net/if_var.h>
  #endif
! #endif
  
  #include <netinet/in.h>
  #include <netinet/in_var.h>
  #include <netinet/if_ether.h>
  #include <arpa/inet.h>
  
! /* Cast a struct sockaddr to a sockaddr_in */
! #define SATOSIN(sa) ((struct sockaddr_in *)(sa))
  
  /* Determine if "bits" is set in "flag" */
  #define ALLSET(flag, bits) (((flag) & (bits)) == (bits))
  
  static struct nlist nl[] = {
  #define N_IFNET 0
  	{ "_ifnet" },
--- 36,162 ----
  #include <sys/param.h>
  #include <sys/time.h>
  #include <sys/proc.h>
  
  #include <sys/socket.h>
  #include <net/if.h>
! 
! #if defined(__FreeBSD__) || defined(__bsdi__)
! #if defined(__FreeBSD__)
  #include <osreldate.h>
  #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
  #include <net/if_var.h>
  #endif
! #endif /* defined(__FreeBSD__) */
! #include <sys/sysctl.h>
! #include <net/route.h>
! #include <net/if_dl.h>
  
+ #else /* defined(__FreeBSD__) || defined(__bsdi__) */
+ 
+ #include <nlist.h>
+ #include <kvm.h>
+ #include <fcntl.h>
  #include <netinet/in.h>
  #include <netinet/in_var.h>
  #include <netinet/if_ether.h>
  #include <arpa/inet.h>
  
! #endif /* defined(__FreeBSD__) || defined(__bsdi__) */
  
  /* Determine if "bits" is set in "flag" */
  #define ALLSET(flag, bits) (((flag) & (bits)) == (bits))
  
+ #if defined(__FreeBSD__) || defined(__bsdi__)
+ 
+ int
+ getmac(ifname, result)
+   char *ifname;
+   char *result;
+ {
+   int flags;
+   struct  if_msghdr *ifm, *nextifm;
+   struct  ifa_msghdr *ifam;
+   struct  sockaddr_dl *sdl;
+   char    *buf, *lim, *next;
+   size_t needed;
+   int mib[6];
+ 
+   mib[0] = CTL_NET;
+   mib[1] = PF_ROUTE;
+   mib[2] = 0;
+   mib[3] = AF_INET;
+   mib[4] = NET_RT_IFLIST;
+   mib[5] = 0;
+ 
+   if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) {
+     syslog(LOG_ERR, "iflist-sysctl-estimate error in getmac(): %m");
+     return(-1);
+   }     
+   if ((buf = malloc(needed)) == NULL) {
+     syslog(LOG_ERR, "malloc error in getmac(): %m");
+     return(-1);
+   }
+   if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
+     syslog(LOG_ERR, "iflist-sysctl error in getmac(): %m");                
+     return(-1);
+   }
+   lim = buf + needed;
+ 
+   next = buf;
+   while (next < lim) {
+ 
+     ifm = (struct if_msghdr *)next;
+                 
+     if (ifm->ifm_type == RTM_IFINFO) {
+       sdl = (struct sockaddr_dl *)(ifm + 1);
+       flags = ifm->ifm_flags;
+     } else {
+       syslog(LOG_ERR, "out of sync parsing NET_RT_IFLIST");
+       syslog(LOG_ERR, "expected %d, got %d", RTM_IFINFO, ifm->ifm_type);
+       syslog(LOG_ERR, "msglen = %d", ifm->ifm_msglen);
+       syslog(LOG_ERR, "buf:%p, next:%p, lim:%p", buf, next, lim);
+       return (-1);
+     }
+ 
+     next += ifm->ifm_msglen;
+     ifam = NULL;
+     while (next < lim) {
+ 
+       nextifm = (struct if_msghdr *)next;
+ 
+       if (nextifm->ifm_type != RTM_NEWADDR)
+         break;
+ 
+       if (ifam == NULL)
+         ifam = (struct ifa_msghdr *)nextifm;
+ 
+         next += nextifm->ifm_msglen;
+     }
+ 
+     /* Only look at configured, broadcast interfaces */
+     if (!ALLSET(flags, IFF_UP | IFF_BROADCAST))
+       continue;
+ 
+     /* Only look at the specified interface */
+     if ( strlen(ifname) != sdl->sdl_nlen)
+       continue; /* not same len */
+     if (strncmp(ifname, sdl->sdl_data, sdl->sdl_nlen) != 0)
+       continue; /* not same name */
+ 
+     /* found */
+     bcopy(LLADDR(sdl), result, 6);
+     free(buf);
+     return(0);
+   }
+   /* not found */
+   free(buf);
+   errno = 0;
+   syslog(LOG_ERR, "getmac() failed");
+   return(-1);
+ }
+ 
+ #else /* defined(__FreeBSD__) || defined(__bsdi__) */
+ 
  static struct nlist nl[] = {
  #define N_IFNET 0
  	{ "_ifnet" },
***************
*** 110,120 ****
  
    ac = &arpcom;
    ifp = &arpcom.ac_if;
- #if defined(__bsdi__) || defined(__FreeBSD__)
-   ep = arpcom.ac_enaddr;
- #else
    ep = arpcom.ac_enaddr.ether_addr_octet;
- #endif
    ifa = &ifaddr.ifa;
    in = &ifaddr.in;
  
--- 205,211 ----
***************
*** 156,159 ****
    syslog(LOG_ERR, "getmac() is failed");
    return(-1);
  }
! #endif
--- 247,250 ----
    syslog(LOG_ERR, "getmac() is failed");
    return(-1);
  }
! #endif /* defined(__FreeBSD__) || defined(__bsdi__) */
diff -rcN dhcp-1.4.0p3/server/getmac.c.bsdi dhcp-1.4.0p4/server/getmac.c.bsdi
*** dhcp-1.4.0p3/server/getmac.c.bsdi	Sun Nov 16 10:33:19 1997
--- dhcp-1.4.0p4/server/getmac.c.bsdi	Thu Jan  1 09:00:00 1970
***************
*** 1,68 ****
- /*
-  * Modified by Akihiro Tominaga. (tomy@sfc.wide.ad.jp)
-  */
- /*
-  * Copyright (c) 1990, 1992 The Regents of the University of California.
-  * All rights reserved.
-  *
-  * Redistribution and use in source and binary forms, with or without
-  * modification, are permitted provided that: (1) source code distributions
-  * retain the above copyright notice and this paragraph in its entirety, (2)
-  * distributions including binary code include the above copyright notice and
-  * this paragraph in its entirety in the documentation or other materials
-  * provided with the distribution, and (3) all advertising materials mentioning
-  * features or use of this software display the following acknowledgement:
-  * ``This product includes software developed by the University of California,
-  * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
-  * the University nor the names of its contributors may be used to endorse
-  * or promote products derived from this software without specific prior
-  * written permission.
-  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
-  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-  */
- #if !defined(sony_news) && !defined(__osf__)
- 
- #ifdef lint
- static char rcsid[] =
-     "@(#) $Header: myetheraddr.c,v 1.6 92/03/17 18:43:30 leres Exp $ (LBL)";
- #endif
- 
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ifaddrs.h>
- #include <sys/types.h>
- #include <sys/param.h>
- #include <sys/socket.h>
- #include <net/if.h>
- #include <net/if_dl.h>
- 
- 
- int
- getmac(ifname, result)
-   char *ifname;
-   char *result;
- {
-   struct ifaddrs *ifa; 
-   struct sockaddr_dl *sdl;
-   struct ifaddrs *ifaddrs;
- 
-   getifaddrs(&ifaddrs);
-   for (ifa = ifaddrs; ifa != NULL; ifa = ifa->ifa_next) {
- 
-     if (strcmp(ifa->ifa_name, ifname) != 0)
-       continue;
- 
-     if (ifa->ifa_addr->sa_family == AF_LINK) {
-       sdl = (struct sockaddr_dl *)ifa->ifa_addr;
-         if (sdl->sdl_alen > 0) {       
- 	  bcopy(LLADDR(sdl), result, sdl->sdl_alen);
- 	  return(0);
-       }
-     }
-   }
-   /* not found */
-   return(-1);
- }
- #endif
--- 0 ----
diff -rcN dhcp-1.4.0p3/server/interface.c dhcp-1.4.0p4/server/interface.c
*** dhcp-1.4.0p3/server/interface.c	Tue Jun  4 12:28:59 1996
--- dhcp-1.4.0p4/server/interface.c	Fri Jan  1 22:22:46 1999
***************
*** 51,56 ****
--- 51,62 ----
  #include <sys/socket.h>
  #include <sys/param.h>
  #include <net/if.h>
+ #ifdef __FreeBSD__
+ #include <osreldate.h>
+ #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
+ #include <net/if_var.h>
+ #endif
+ #endif
  #ifdef sun
  #include <net/nit.h>
  #include <net/nit_if.h>
diff -rcN dhcp-1.4.0p3/tools/Makefile.FreeBSD dhcp-1.4.0p4/tools/Makefile.FreeBSD
*** dhcp-1.4.0p3/tools/Makefile.FreeBSD	Thu Sep 11 09:08:04 1997
--- dhcp-1.4.0p4/tools/Makefile.FreeBSD	Fri Jan  1 19:31:45 1999
***************
*** 1,16 ****
! CC = gcc
! CFLAGS = -O -I. -I../server
! SBIN =		/usr/local/sbin
! LIBEXEC =	/usr/local/libexec
! MAN =		/usr/local/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
--- 1,22 ----
! CC = cc
! CFLAGS = -O2 -I. -I../server
! 
! PREFIX =	/usr/local
! SBIN =		${PREFIX}/sbin
! LIBEXEC =	${PREFIX}/libexec
! MAN =		${PREFIX}/man
! 
! CP =		/bin/cp
! RM =		/bin/rm
! GZIP =		/usr/bin/gzip
  
  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 -rcN dhcp-1.4.0p3/tools/dhcpm.c dhcp-1.4.0p4/tools/dhcpm.c
*** dhcp-1.4.0p3/tools/dhcpm.c	Tue Sep  8 20:54:04 1998
--- dhcp-1.4.0p4/tools/dhcpm.c	Fri Jan  1 22:23:09 1999
***************
*** 49,54 ****
--- 49,60 ----
  #include <sys/param.h>
  
  #include <net/if.h>
+ #ifdef __FreeBSD__
+ #include <osreldate.h>
+ #if (__FreeBSD_version == 199702) || (__FreeBSD_version >= 300000)
+ #include <net/if_var.h>
+ #endif
+ #endif
  #include <net/bpf.h>
  #ifdef __osf__
  #include <net/pfilt.h>
