import ISC dhcp-3.0.3 onto the vendor branch
This commit is contained in:
parent
6f870d5eef
commit
0948fc0de2
|
@ -0,0 +1,20 @@
|
|||
# Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Internet Systems Consortium, Inc.
|
||||
# 950 Charter Street
|
||||
# Redwood City, CA 94063
|
||||
# <info@isc.org>
|
||||
# http://www.isc.org/
|
|
@ -1,42 +1,32 @@
|
|||
# Makefile
|
||||
#
|
||||
# Copyright (c) 2002 Internet Software Consortium.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# 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. Neither the name of Internet Software Consortium nor the names
|
||||
# of its contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
# Internet Systems Consortium, Inc.
|
||||
# 950 Charter Street
|
||||
# Redwood City, CA 94063
|
||||
# <info@isc.org>
|
||||
# http://www.isc.org/
|
||||
#
|
||||
# This software has been written for the Internet Software Consortium
|
||||
# This software has been written for Internet Systems Consortium
|
||||
# by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
# To learn more about the Internet Software Consortium, see
|
||||
# To learn more about Internet Systems Consortium, see
|
||||
# ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
# see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
# ``http://www.nominum.com''.
|
||||
#
|
||||
|
||||
all:
|
||||
@sysname=`./configure --print-sysname`; \
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
# Makefile.conf
|
||||
#
|
||||
# Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
# Use is subject to license terms which appear in the file named
|
||||
# ISC-LICENSE that should have accompanied this file when you
|
||||
# received it. If a file named ISC-LICENSE did not accompany this
|
||||
# file, or you are not sure the one you have is correct, you may
|
||||
# obtain an applicable copy of the license at:
|
||||
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
#
|
||||
# http://www.isc.org/isc-license-1.0.html.
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# This file is part of the ISC DHCP distribution. The documentation
|
||||
# associated with this file is listed in the file DOCUMENTATION,
|
||||
# included in the top-level directory of this release.
|
||||
#
|
||||
# Support and other services are available for ISC products - see
|
||||
# http://www.isc.org for more information.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Internet Systems Consortium, Inc.
|
||||
# 950 Charter Street
|
||||
# Redwood City, CA 94063
|
||||
# <info@isc.org>
|
||||
# http://www.isc.org/
|
||||
|
||||
## Defaults...
|
||||
SCRIPT = none
|
||||
|
@ -43,6 +47,7 @@ INCDIR=/usr/local/include
|
|||
LIBS =
|
||||
COPTS = $(BINDDEF) $(CC_OPTIONS)
|
||||
DEBUG = -g
|
||||
#WARNERR = -Werror
|
||||
RANLIB = ranlib
|
||||
MKDEP = mkdep
|
||||
CLIENT_PATH = '"PATH=/usr/ucb:/usr/bin:/usr/sbin:/bin:/sbin"'
|
||||
|
@ -123,7 +128,7 @@ MINORVERSION=MinorVersion
|
|||
#LIBS = -lresolv -lsocket -lnsl -lgen
|
||||
#CC=gcc
|
||||
#COPTS = $(BINDDEF) -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
||||
# -Wno-uninitialized -Wno-char-subscripts -Wno-switch -Werror \
|
||||
# -Wno-uninitialized -Wno-char-subscripts -Wno-switch $(WARNERR) \
|
||||
# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION) \
|
||||
# $(CC_OPTIONS)
|
||||
#CF = cf/sunos5-5.h
|
||||
|
@ -199,6 +204,7 @@ MINORVERSION=MinorVersion
|
|||
## FreeBSD
|
||||
##--freebsd--
|
||||
#CF = cf/freebsd.h
|
||||
#COPTS = -O -Wall -Wno-unused $(WARNERR) $(CC_OPTIONS)
|
||||
#SCRIPT=freebsd
|
||||
##--freebsd--
|
||||
|
||||
|
@ -206,7 +212,7 @@ MINORVERSION=MinorVersion
|
|||
##--rhapsody--
|
||||
#CF = cf/rhapsody.h
|
||||
#COPTS = -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
||||
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF) $(CC_OPTIONS)
|
||||
# -Wno-uninitialized -Wno-switch $(WARNERR) -pipe $(BINDDEF) $(CC_OPTIONS)
|
||||
##SCRIPT=rhapsody
|
||||
##--rhapsody--
|
||||
|
||||
|
@ -214,7 +220,7 @@ MINORVERSION=MinorVersion
|
|||
##--darwin--
|
||||
#CF = cf/rhapsody.h
|
||||
#COPTS = -Ddarwin -Wall -Wno-unused -Wno-implicit -Wno-comment \
|
||||
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF) $(CC_OPTIONS)
|
||||
# -Wno-uninitialized -Wno-switch $(WARNERR) -pipe $(BINDDEF) $(CC_OPTIONS)
|
||||
#SCRIPT=freebsd
|
||||
##--darwin--
|
||||
|
||||
|
@ -222,30 +228,13 @@ MINORVERSION=MinorVersion
|
|||
##--netbsd--
|
||||
#CF = cf/netbsd.h
|
||||
#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-comment \
|
||||
# -Wno-uninitialized -Werror \
|
||||
# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
|
||||
# -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes \
|
||||
# -Wmissing-declarations -Wnested-externs \
|
||||
# -pipe $(BINDDEF) $(CC_OPTIONS)
|
||||
#SCRIPT=netbsd
|
||||
##MKDEP=makedepend
|
||||
##--netbsd--
|
||||
|
||||
## NetBSD nocast
|
||||
## Some versions of the arm32 gcc have a problem in cast conversions.
|
||||
## The Alpha definitely has a problem - if you pass '6' where a size_t
|
||||
## is expected, you get a warning. So on these architectures, we do
|
||||
## not ask for that sort of warning.
|
||||
##--netbsd-nocast--
|
||||
#CF = cf/netbsd.h
|
||||
#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-comment \
|
||||
# -Wno-uninitialized -Werror \
|
||||
# -Wno-uninitialized $(WARNERR) \
|
||||
# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
|
||||
# -Wwrite-strings -Wmissing-prototypes \
|
||||
# -Wmissing-declarations -Wnested-externs \
|
||||
# -pipe $(BINDDEF) $(CC_OPTIONS)
|
||||
#SCRIPT=netbsd
|
||||
##--netbsd-nocast--
|
||||
##--netbsd--
|
||||
|
||||
## Ultrix
|
||||
##--ultrix--
|
||||
|
|
|
@ -1,21 +1,26 @@
|
|||
# Makefile.dist
|
||||
#
|
||||
# Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
# Use is subject to license terms which appear in the file named
|
||||
# ISC-LICENSE that should have accompanied this file when you
|
||||
# received it. If a file named ISC-LICENSE did not accompany this
|
||||
# file, or you are not sure the one you have is correct, you may
|
||||
# obtain an applicable copy of the license at:
|
||||
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
#
|
||||
# http://www.isc.org/isc-license-1.0.html.
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# This file is part of the ISC DHCP distribution. The documentation
|
||||
# associated with this file is listed in the file DOCUMENTATION,
|
||||
# included in the top-level directory of this release.
|
||||
#
|
||||
# Support and other services are available for ISC products - see
|
||||
# http://www.isc.org for more information.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Internet Systems Consortium, Inc.
|
||||
# 950 Charter Street
|
||||
# Redwood City, CA 94063
|
||||
# <info@isc.org>
|
||||
# http://www.isc.org/
|
||||
|
||||
|
||||
SUBDIRS= common $(MINIRES) dst omapip server client relay dhcpctl
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
Internet Software Consortium DHCP Distribution
|
||||
Version 3.0.1
|
||||
Release Candidate 9
|
||||
April 28, 2002
|
||||
Internet Systems Consortium DHCP Distribution
|
||||
Version 3.0.3
|
||||
July 22, 2005
|
||||
|
||||
README FILE
|
||||
|
||||
|
@ -97,15 +96,15 @@ system.
|
|||
|
||||
RELEASE STATUS
|
||||
|
||||
This is the tenth release candidate of version 3.0.1 of the ISC DHCP
|
||||
Distribution. Development of this release is approaching the point at
|
||||
which it will be frozen, and no significant new features will be
|
||||
added.
|
||||
This is the first beta release of ISC DHCP 3.0.3. This is a maintenance
|
||||
release which seeks only to fix bugs present in versions 3.0.2 and
|
||||
earlier. No new features have or will be added in subsequent
|
||||
release candidates of this release.
|
||||
|
||||
In this release, the server and relay agent are currently fully
|
||||
functional on NetBSD, Linux systems with kernel version 2.2 or later,
|
||||
FreeBSD, OpenBSD, BSD/OS, Digital Tru64 Unix and Solaris. The
|
||||
software will also run on HP-UX, but only supports a single network
|
||||
FreeBSD, OpenBSD, BSD/OS, Digital Tru64 Unix and Solaris. The software
|
||||
will also run on AIX and HP-UX, but only supports a single network
|
||||
interface. Ports also exist for QNX, SCO, NeXTStep, and MacOS X, but
|
||||
are not in wide use, with all that implies. We are not aware of an
|
||||
easy way to get this software running on HP-UX.
|
||||
|
@ -143,17 +142,17 @@ information. On Digital Unix, type ``man pfilt''.
|
|||
To build the DHCP Distribution, unpack the compressed tar file using
|
||||
the tar utility and the gzip command - type something like:
|
||||
|
||||
zcat dhcp-3.0.1rc11.tar.gz |tar xvf -
|
||||
zcat dhcp-3.0.3.tar.gz |tar xvf -
|
||||
|
||||
On BSD/OS, you have to type gzcat, not zcat, and you may run into
|
||||
similar problems on other operating systems.
|
||||
|
||||
CONFIGURING IT
|
||||
|
||||
Now, cd to the dhcp-3.0.1rc11 subdirectory that you've just
|
||||
created and configure the source tree by typing:
|
||||
Now, cd to the dhcp-3.0.3 subdirectory that you've just created and
|
||||
configure the source tree by typing:
|
||||
|
||||
./configure
|
||||
./configure
|
||||
|
||||
If the configure utility can figure out what sort of system you're
|
||||
running on, it will create a custom Makefile for you for that
|
||||
|
@ -466,22 +465,46 @@ rather than using the ISC DHCP client. The feature set of the Solaris
|
|||
client is different (not necessarily better or worse) than that of the
|
||||
ISC client, but in most cases it will be a lot easier for you to just
|
||||
use that. Please do not ask for help in using the Solaris DHCP client
|
||||
on Internet Software Consortium mailing lists - that's why you're
|
||||
on Internet Systems Consortium mailing lists - that's why you're
|
||||
paying Sun the big bucks. If you're having a problem with the
|
||||
Solaris client interoperating with the ISC dhcp server, that's another
|
||||
matter, but please check with Sun first.
|
||||
|
||||
AIX
|
||||
|
||||
The AIX support uses the BSD socket API, which cannot differentiate on
|
||||
which network interface a broadcast packet was received; thus the DHCP
|
||||
server and relay will work only on a single interface. (They do work
|
||||
on multi-interface machines if configured to listen on only one of the
|
||||
interfaces.)
|
||||
|
||||
The ISC DHCP distribution does not include a dhclient-script for AIX--
|
||||
AIX comes with a DHCP client. Contribution of a working dhclient-script
|
||||
for AIX would be welcome.
|
||||
|
||||
SUPPORT
|
||||
|
||||
The Internet Software Consortium DHCP server is not a commercial
|
||||
product, and is not supported by the ISC. However, it has attracted a
|
||||
fairly sizable following on the Internet, which means that there are a
|
||||
lot of knowledgable users who may be able to help you if you get
|
||||
stuck. These people generally read the dhcp-server@isc.org mailing
|
||||
list.
|
||||
The Internet Systems Consortium DHCP server is developed and distributed
|
||||
by ISC in the public trust, thanks to the generous donations of its
|
||||
sponsors. ISC now also fofers commercial quality support contracts for
|
||||
ISC DHCP, more information about ISC Support Contracts can be found at
|
||||
the following URL:
|
||||
|
||||
http://www.isc.org/ops/support/
|
||||
|
||||
No donators, as yet, have asked for their dollars to be spent providing
|
||||
free support to all who ask. Please understand that we may not respond
|
||||
to support inquiries unless you have a support contract. ISC will
|
||||
continue its practice of always responding to critical items that effect
|
||||
the entire community.
|
||||
|
||||
However, ISC DHCP has attracted a fairly sizable following on the
|
||||
Internet, which means that there are a lot of knowledgable users who
|
||||
may be able to help you if you get stuck. These people generally read
|
||||
the dhcp-server@isc.org mailing list.
|
||||
|
||||
If you are going to use dhcpd, you should probably subscribe to the
|
||||
dhcp-server and dhcp-announce mailing lists. If you will be using
|
||||
dhcp-server or dhcp-announce mailing lists. If you will be using
|
||||
dhclient, you should subscribe to the dhcp-client mailing list.
|
||||
|
||||
If you need help, you should ask on the dhcp-server or dhcp-client
|
||||
|
@ -492,6 +515,12 @@ If you are having trouble with a combination of the client and server,
|
|||
send the request to dhcp-server@isc.org. Please do not cross-post to
|
||||
both lists under any circumstances.
|
||||
|
||||
WHERE TO SEND FEATURE REQUESTS: We like to hear your feedback. We may
|
||||
not respond to it all the time, but we do read it. If ISC DHCP doesn't
|
||||
work well for you, or you have an idea that would improve it for your
|
||||
use, please send your suggestion to dhcp-suggest@isc.org. This is also
|
||||
an excellent place to send patches that add new features.
|
||||
|
||||
WHERE TO REPORT BUGS: If you want the act of sending in a bug report
|
||||
to result in you getting help in the form of a fixed piece of
|
||||
software, you are asking for help. Your bug report is helpful to us,
|
||||
|
@ -499,7 +528,7 @@ but fundamentally you are making a support request, so please use the
|
|||
addresses described in the previous paragraphs. If you are _sure_ that
|
||||
your problem is a bug, and not user error, or if your bug report
|
||||
includes a patch, you can send it to dhcp-bugs@isc.org without
|
||||
subscribing. This mailing list goes into a bug tracking system, so
|
||||
subscribing. This e-mail address goes into a bug tracking system, so
|
||||
you don't need to check periodically to see if we still remember the
|
||||
bug - if you haven't been notified that the bug has been closed, we
|
||||
still consider it a bug, and still have it in the system.
|
||||
|
@ -508,8 +537,9 @@ PLEASE DO NOT REPORT BUGS IN OLD SOFTWARE RELEASES! Fetch the latest
|
|||
release and see if the bug is still in that version of the software,
|
||||
and if it's not, _then_ report it. It's okay to report bugs in the
|
||||
latest patchlevel of a major version that's not the most recent major
|
||||
version, though - for example, if you're running 2.0, you don't have
|
||||
to upgrade to 3.0 before you can report bugs.
|
||||
version, though - for example, if you're running 3.0.2, you don't have
|
||||
to upgrade to a 3.0.3rc (release candidate) or even a 3.1.x release
|
||||
before you can report bugs.
|
||||
|
||||
PLEASE DO NOT REPORT BUGS IF YOU ARE RUNNING A VERSION OF THE ISC
|
||||
DHCP DISTRIBUTION THAT YOU DIDN'T GET FROM THE ISC! Free operating
|
||||
|
@ -639,7 +669,6 @@ If you are having problems with a client whose executable is called
|
|||
dhcpcd, this is _not_ the ISC DHCP client, and we probably can't help
|
||||
you with it.
|
||||
|
||||
Please see http://www.isc.org/services/public/lists/dhcp-lists.html
|
||||
for details on how to subscribe to the ISC DHCP mailing lists.
|
||||
|
||||
Please see http://www.isc.org/sw/dhcp/ for details on how to subscribe
|
||||
to the ISC DHCP mailing lists.
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
Internet Software Consortium DHCP Distribution
|
||||
Version 3.0.1
|
||||
Release Candidate 10
|
||||
June, 2002
|
||||
Internet Systems Consortium DHCP Distribution
|
||||
Version 3.0.3
|
||||
July 22, 2005
|
||||
|
||||
Release Notes
|
||||
|
||||
|
@ -23,11 +22,9 @@ that are new since version 2.0:
|
|||
- Many bug fixes, performance enhancements, and minor new DHCP
|
||||
protocol features.
|
||||
|
||||
This is a release candidate for a minor bug fix release to follow ISC
|
||||
DHCP 3.0. The main bug fixed here is a bug in the subclass allocation
|
||||
code that could result in a memory smash. Any users of the ISC DHCP server
|
||||
who are using subclasses should seriously consider upgrading to 3.0.1
|
||||
either now or when the final 3.0.1 release comes out.
|
||||
The main bug fixed here is a bug in the subclass allocation code that
|
||||
could result in a memory smash. Any users of the ISC DHCP server who
|
||||
are using subclasses should seriously consider upgrading to 3.0.1.
|
||||
|
||||
If you are running 3.0 beta 1 and are doing dynamic DNS updates, the
|
||||
lease file is no longer forward-compatible to 3.0 final. A script
|
||||
|
@ -46,6 +43,371 @@ Murrell at BC Tel Advanced Communications. I'd like to express my
|
|||
thanks to all of these good people here, both for working on the code
|
||||
and for prodding me into improving it.
|
||||
|
||||
Changes since 3.0.3b3
|
||||
|
||||
- dhclient.conf documentation for interface {} was updated to reflect recent
|
||||
discussion on the dhcp-hackers mailing list.
|
||||
|
||||
- In response to reports that the software does not compile on GCC 4.0.0,
|
||||
-Werror was removed from Makefile.conf for all platforms that used it.
|
||||
We will address the true problem in a future release; this is a temporary
|
||||
workaround.
|
||||
|
||||
Changes since 3.0.3b2
|
||||
|
||||
- An error in code changes introduced in 3.0.3b2 was corrected, which caused
|
||||
static BOOTP clients to receive random addresses.
|
||||
|
||||
Changes since 3.0.3b1
|
||||
|
||||
- A bug was fixed in BOOTPREQUEST handling code wherein stale references to
|
||||
host records would be left behind on leases that were not allocated to the
|
||||
client currently booting (eg in the case where the host was denied booting).
|
||||
|
||||
- The dhcpd.conf.5 manpage was updated to be more clear in regards to
|
||||
multiple host declarations (thanks to Vincent McIntyre). 'Interim' style
|
||||
dynamic updates were also retouched.
|
||||
|
||||
Changes since 3.0.2
|
||||
|
||||
- A bug was fixed where a server might load balance a DHCP REQUEST to its
|
||||
peer after already choosing not to load balance the preceeding DISCOVER.
|
||||
The peer cannot allocate the originating server's lease.
|
||||
|
||||
- In the case where a secondary server lost its stable storage while the
|
||||
primary was still in communications-interrupted, and came back online,
|
||||
the lease databases would not be fully transferred to the secondary.
|
||||
This was due to the secondary errantly sending an extra UPDREQ message
|
||||
when the primary made its state transition to PARTNER-DOWN known.
|
||||
|
||||
- The package will now compile cleanly in gcc 3.3 and 3.4. As a side effect,
|
||||
lease structures will be 9 bytes smaller on all platforms. Thanks to
|
||||
Jason Vas Dias at Redhat.
|
||||
|
||||
- Interface discovery code in DISCOVER_UNCONFIGURED mode is now
|
||||
properly restricted to only detecting broadcast interfaces. Thanks
|
||||
to a patch from Jason Vas Dias at RedHat.
|
||||
|
||||
- decode_udp_ip_header was changed so that the IP address was copied out
|
||||
to a variable, rather than referenced by a pointer. This enforces 4-byte
|
||||
alignment of the 32-bit IP address value. Thanks to a patch from Dr.
|
||||
Peter Poeml.
|
||||
|
||||
- An incorrect log message was corrected thanks to a patch from
|
||||
Dr. Peter Poeml.
|
||||
|
||||
- A bug in DDNS was repaired, where if the server's first DDNS action was
|
||||
a DDNS removal rather than a DDNS update, the resolver library's
|
||||
retransmit timer and retry timer was set to the default, implying a
|
||||
15 second timeout interval. Which is a little excessive in a synchronous,
|
||||
single-threaded system. In all cases, ISC DHCP should now hold fast to
|
||||
a 1-second timeout, trying only once.
|
||||
|
||||
- The siaddr field was being improperly set to the server-identifier when
|
||||
responding to DHCP messages. RFC2131 clarified the siaddr field as
|
||||
meaning the 'next server in the bootstrap process', eg a tftp server.
|
||||
The siaddr field is now left zeroed unless next-server is configured.
|
||||
|
||||
- mockup_lease() could have returned in an error condition (or in the
|
||||
condition where no fixed-address was found matching the shared
|
||||
network) with stale references to a host record. This is probably not
|
||||
a memory leak since host records generally never die anyway.
|
||||
|
||||
- A bug was repaired where failover servers would let stale client identifiers
|
||||
persist on leases that were reallocated to new clients not sending an id.
|
||||
|
||||
- Binding scopes ("set var = value;") are now removed from leases allocated
|
||||
by failover peers if the lease had expired. This should help reduce the
|
||||
number of stale binding scopes on leases.
|
||||
|
||||
- A small memory leak was closed involving client identifiers larger than
|
||||
7 bytes, and failover.
|
||||
|
||||
- Configuring a subnet in dhcpd.conf with a subnet mask of 32 bits might
|
||||
cause an internal function to overflow heap. Thanks to Jason Vas Dias
|
||||
at Redhat.
|
||||
|
||||
- Some inconsistencies in treating numbers that the lexer parsed as 'NUMBER'
|
||||
or 'NUMBER_OR_NAME' was repaired. Hexadecimal parsing is affected, and
|
||||
should work better.
|
||||
|
||||
- In several cases, parse warnings were being issued before the lexical
|
||||
token had been advanced to the token whose value was causing an error...
|
||||
causing parse warnings to claim the problem is on the wrong token.
|
||||
|
||||
- Host declarations matching on client identifier for dynamic leases will
|
||||
no longer match fixed-address host declarations (this is now identical
|
||||
to behaviour for host records matching on hardware address).
|
||||
|
||||
Changes since 3.0.2rc3
|
||||
|
||||
- A previously undocumented configuration directive, 'local-address',
|
||||
was documented in the dhcpd.conf manpage.
|
||||
|
||||
Changes since 3.0.2rc2
|
||||
|
||||
- Two varaibles introduced in 3.0.2b1 were used without being initialized
|
||||
in the case where neither the FILE nor SNAME fields were available for
|
||||
overloading. This was repaired.
|
||||
|
||||
- A heretofore believed to be impossible corner case of the option
|
||||
overloading implementation turned out to be possible ("Unable to sort
|
||||
overloaded options after 10 tries."). The implementation was reworked
|
||||
to consider the case of an option so large it would require more than
|
||||
three chunks to fit.
|
||||
|
||||
- Many other instances of variables being used without being initialized
|
||||
were repaired.
|
||||
|
||||
- An uninitialized variable in omapi_io_destroy() led to the discovery
|
||||
that this function may result in orphaned pointers (and hence, a memory
|
||||
leak).
|
||||
|
||||
Changes since 3.0.2rc1
|
||||
|
||||
- allocate_lease() was rewritten to repair a bug in which the server would
|
||||
try to allocate an ABANDONED lease when FREE leases were available.
|
||||
|
||||
Changes since 3.0.2b1
|
||||
|
||||
- Some dhcp-eval.5 manpage formatting was repaired.
|
||||
|
||||
Changes since 3.0.1
|
||||
|
||||
- A bug was fixed in the server's 'option overloading' implementation,
|
||||
where options loaded into the 'file' and 'sname' packet fields were
|
||||
not aligned precisely as rfc2131 dictates.
|
||||
|
||||
- The FreeBSD client script was changed to support the case where a domain
|
||||
name was not provided by the server.
|
||||
|
||||
- A memory leak in 'omshell' per each command line parsed was
|
||||
repaired, thanks to a patch from Jarkko Torppa.
|
||||
|
||||
- Log functions writing to stderr were adjusted to use the STDERR_FILENO
|
||||
system definition rather than '2'. This is a no-op for 90% of platforms.
|
||||
|
||||
- One call to trace_write_packet_iov() counted the number of io vectors
|
||||
incorrectly, causing inconsistent tracefiles. This was fixed.
|
||||
|
||||
- Some expression parse failure memory leaks were closed.
|
||||
|
||||
- A host byte order problem in tracefiles was repaired.
|
||||
|
||||
- Pools configured in DHCPD for failover possessing permission lists that
|
||||
previously were assumed to not include dyanmic bootp clients are now
|
||||
a little more pessimistic. The result is, dhcpd will nag you about just
|
||||
about most pools that possess a 'allow' statement with no 'deny' that
|
||||
would definitely match a dynamic bootp client.
|
||||
|
||||
- The 'ddns-update-style' configuration warning bit now insists that
|
||||
the configuration be globally scoped.
|
||||
|
||||
- Two memory leaks in dhclient were closed thanks to a patch from Felix
|
||||
Farkas.
|
||||
|
||||
- Some minor but excellently pedantic documentation errors were fixed
|
||||
thanks to a patch from Thomas Klausner.
|
||||
|
||||
- Bugs in operator precedence in executable statements have been repaired
|
||||
once again. More legal syntaxes should be parsed legally.
|
||||
|
||||
- Failing to initialize a tracefile for any reason if a tracefile was
|
||||
specified is now a fatal error. Thanks to a patch from Albert Herranz.
|
||||
|
||||
- Corrected a bug in which the number of leases transferred as calculated
|
||||
by the failover primary and sent to peers in POOLRESP responses may be
|
||||
incorrect. This value is not believed to be used by other failover
|
||||
implementations, excepting perhaps as logged information.
|
||||
|
||||
- Corrected a bug in which 'dhcp_failover_send_poolresp()' was in fact
|
||||
sending POOLREQ messages instead of POOLRESP mesasges. This message
|
||||
was essentially ignored since failover secondaries effectively do not
|
||||
respond to POOLREQ messages.
|
||||
|
||||
- Type definitions for various bitwidths of integers in the sunos5-5
|
||||
build of ISC DHCP have been fixed. It should compile and run more
|
||||
easily when built in 64-bit for this platform.
|
||||
|
||||
- "allow known-clients;" is now a legal syntax, to avoid confusion.
|
||||
|
||||
- If one dhcp server chooses to 'load balance' a request to its failover
|
||||
peer, it first checks to see if it believes said peer has a free
|
||||
lease to allocate before ignoring the DISCOVER.
|
||||
|
||||
- log() was logging a work buffer, rather than the value returned by
|
||||
executing the statements configured by the user. In some cases,
|
||||
the work buffer and the intended results were the same. In some other
|
||||
cases, they were not. This was fixed thanks to a patch from Gunnar
|
||||
Fjone and directconnect.no.
|
||||
|
||||
- Compiler warnings for some string type conversions was fixed, thanks
|
||||
to Andreas Gustafsson.
|
||||
|
||||
- The netbsd build environments were simplified to one, in which
|
||||
-Wconversion is not used, thanks to Andreas Gustafsson.
|
||||
|
||||
- How randomness in the backoff-cutoff dhclient configuration variable
|
||||
is implemented was better documented in the manpage, and the behaviour
|
||||
of dhclient in REQUEST timeout handling was changed to match that of
|
||||
DISCOVER timeout handling.
|
||||
|
||||
- Omapi was hardened against clients that pass in null values, thanks
|
||||
to a patch from Mark Jason Dominus.
|
||||
|
||||
- A bug was fixed in dhclient that kept it from doing client-side
|
||||
ddns updates. Thanks to a patch from Andreas Gustafsson, which
|
||||
underwent some modification after review by Jason Vas Dias.
|
||||
|
||||
- Failover implementations disconnected due to the network between
|
||||
them (rather than one of the two shutting down) will now try to
|
||||
re-establish the failover connection every 5 seconds, rather than
|
||||
to simply try once and give up until one of them is restarted.
|
||||
Thanks to a patch from Ulf Ekberg from Infoblox, and field testing
|
||||
by Greger V. Teigre which led to an enhancement to it.
|
||||
|
||||
- A problem that kept DHCP Failover secondaries from tearing down
|
||||
ddns records was repaired. Thanks to a patch from Ulf Ekberg from
|
||||
Infoblox.
|
||||
|
||||
- 64bit pointer sizes are detected properly on FreeBSD now.
|
||||
|
||||
- A bug was repaired where the DHCP server would leave stale references
|
||||
to host records on leases it once thought about offering to certain
|
||||
clients. The result would be to apply host and 'known' scopes to the
|
||||
wrong clients (possibly denying booting). NOTE: The 'mis-host' patch
|
||||
that was being circulated as a workaround is not the way this bug was
|
||||
fixed. If you were a victim of this bug in 3.0.1, you are cautioned
|
||||
to proceed carefully and see if it fixes your problem.
|
||||
|
||||
- A bug was repaired in the server's DHCPINFORM handling, where it
|
||||
tried to divine the client's address from the source packet and
|
||||
would get it wrong. Thanks to Anshuman Singh Rawat.
|
||||
|
||||
- A log message was introduced to help illuminate the case where the
|
||||
server was unable to find a lease to assign to any BOOTP client.
|
||||
Thanks to Daniel Baker.
|
||||
|
||||
- A minor dhcpd.conf.5 manpage error was fixed.
|
||||
|
||||
Changes since 3.0.1rc14
|
||||
|
||||
- The global variable 'cur_time' was centralized and is now uniformly of a
|
||||
type #defined in system-dependent headers. It had previously been defined
|
||||
in one of many places as a 32-bit value, and this causes mayhem on 64-bit
|
||||
big endian systems. It probably wasn't too healthy on little endian
|
||||
systems either.
|
||||
|
||||
- A printf format string error introduced in rc14 was repaired.
|
||||
|
||||
- AIX system-dependent header file was altered to only define NO_SNPRINTF
|
||||
if the condition used to #ifdef in vsnprintf in AIX' header files
|
||||
is false.
|
||||
|
||||
- The Alpha/OSF system-dependent header file was altered to define
|
||||
NO_SNPRINTF on OS revisions older than 4.0G.
|
||||
|
||||
- omapip/test.c had string.h added to its includes.
|
||||
|
||||
Changes since 3.0.1rc13
|
||||
|
||||
! CAN-2004-0460 - CERT VU#317350: Five stack overflow exploits were closed
|
||||
in logging messages with excessively long hostnames provided by the
|
||||
clients. It is highly probable that these could have been used by
|
||||
attackers to gain arbitrary root access on systems using ISC DHCP 3.0.1
|
||||
release candidates 12 or 13. Special thanks to Gregory Duchemin for
|
||||
both finding and solving the problem.
|
||||
|
||||
! CAN-2004-0461 - CERT VU#654390: Once the above was closed, an opening
|
||||
in log_*() functions was evidented, on some specific platforms where
|
||||
vsnprintf() was not believed to be available and calls were wrapped to
|
||||
sprintf() instead. Again, credit goes to Gregory Duchemin for finding
|
||||
the problem. Calls to snprintf() are now linked to a distribution-local
|
||||
snprintf implementation, only in those cases where the architecture is
|
||||
not known to provide one (see includes/cf/[arch].h). If you experience
|
||||
linking problems with snprintf/vsnprintf or 'isc_print_' functions, this
|
||||
is where to look. This vulnerability did not exist in any previously
|
||||
published version of ISC DHCP.
|
||||
|
||||
- Compilation on hpux 11.11 was repaired.
|
||||
|
||||
- 'The cross-compile bug fix' was backed out.
|
||||
|
||||
Changes since 3.0.1rc12
|
||||
|
||||
- Fixed a bug in omapi lease lookup function, to form the hardware
|
||||
address for the hash lookup correctly, thanks to a patch from
|
||||
Richard Hirst.
|
||||
|
||||
- Fixed a bug where dhcrelay was sending relayed responses back to the
|
||||
broadcast address, but with the source's unicast mac address. Should
|
||||
now conform to rfc2131 section 4.1.
|
||||
|
||||
- Cross-compile bug fix; use $(AR) instead of ar. Thanks to Morten Brorup.
|
||||
|
||||
- Fixed a crash bug in dhclient where dhcpd servers that do not provide
|
||||
renewal times results in an FPE. As a side effect, dhclient can now
|
||||
properly handle 0xFFFFFFFF (-1) expiry times supplied by servers. Thanks
|
||||
to a patch from Burt Silverman.
|
||||
|
||||
- The 'ping timeout' debugs from rc12 were removed to -DDEBUG only,
|
||||
and reformatted to correct a compilation error on solaris platforms.
|
||||
|
||||
- A patch was applied which fixes a case where leases read from the
|
||||
leases database do not properly over-ride previously read leases.
|
||||
|
||||
- dhcpctl.3 manpage was tweaked.
|
||||
|
||||
Changes since 3.0.1rc11
|
||||
|
||||
- A patch from Steve Campbell was applied with minor modifications to
|
||||
permit reverse dns PTR record updates with values containing spaces.
|
||||
|
||||
- A patch from Florian Lohoff was applied with some modifications to
|
||||
dhcrelay. It now discards packets whose hop count exceeds 10 by default,
|
||||
and a command-line option (-c) can be used to set this threshold.
|
||||
|
||||
- A failover bug relating to identifying peers by name length instead of
|
||||
by name was fixed.
|
||||
|
||||
- Delcaring failover configs within shared-network statements should no
|
||||
longer result in error.
|
||||
|
||||
- The -nw command line option to dhclient now works.
|
||||
|
||||
- Thanks to a patch from Michael Richardson:
|
||||
- Some problems with long option processing have been fixed.
|
||||
- Some fixes to minires so that updates of KEY records will work.
|
||||
|
||||
- contrib/ms2isc was updated by Shu-Min Chang of the Intel Corporation.
|
||||
see contrib/ms2isc/readme.txt for revision notes.
|
||||
|
||||
- Dhclient no longer uses shell commands to kill another instance of
|
||||
itself, it sends the signal directly. Thanks to a patch from Martin
|
||||
Blapp.
|
||||
|
||||
- The FreeBSD dhclient-script was changed so that a failure to write to
|
||||
/etc/resolv.conf does not prematurely end the script. This keeps dhclient
|
||||
from looping infinitely when this is the case. Thanks to a patch from
|
||||
Martin Blapp.
|
||||
|
||||
- A patch from Bill Stephens was applied which resolves a problem with lease
|
||||
expiry times in failover configurations.
|
||||
|
||||
- A memory leak in configuration parsing was closed thanks to a patch from
|
||||
Steve G.
|
||||
|
||||
- The function which discovers interfaces will now skip non-broadcast or
|
||||
point-to-point interfaces, thanks to a patch from David Brownlee.
|
||||
|
||||
- Options not yet known by the dhcpd or dhclient have had their names
|
||||
changed such that they do not contain # symbols, in case they should ever
|
||||
appear in a lease file. An option that might have been named "#144" is
|
||||
now "unknown-144".
|
||||
|
||||
- Another patch from Bill Stephens which allows the ping-check timeout to
|
||||
be configured as 'ping-timeout'. Defaults to 1.
|
||||
|
||||
Changes since 3.0.1rc10
|
||||
|
||||
- Potential buffer overflows in minires repaired.
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
# Makefile.dist
|
||||
#
|
||||
# Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
# Use is subject to license terms which appear in the file named
|
||||
# ISC-LICENSE that should have accompanied this file when you
|
||||
# received it. If a file named ISC-LICENSE did not accompany this
|
||||
# file, or you are not sure the one you have is correct, you may
|
||||
# obtain an applicable copy of the license at:
|
||||
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
#
|
||||
# http://www.isc.org/isc-license-1.0.html.
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# This file is part of the ISC DHCP distribution. The documentation
|
||||
# associated with this file is listed in the file DOCUMENTATION,
|
||||
# included in the top-level directory of this release.
|
||||
#
|
||||
# Support and other services are available for ISC products - see
|
||||
# http://www.isc.org for more information.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Internet Systems Consortium, Inc.
|
||||
# 950 Charter Street
|
||||
# Redwood City, CA 94063
|
||||
# <info@isc.org>
|
||||
# http://www.isc.org/
|
||||
|
||||
CATMANPAGES = dhclient.cat8 dhclient.conf.cat5 dhclient-script.cat8 \
|
||||
dhclient.leases.cat5
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Parser for dhclient config and lease files... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: clparse.c,v 1.1.1.3 2003/02/18 16:37:54 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: clparse.c,v 1.1.1.4 2005/08/11 16:54:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -71,7 +62,6 @@ u_int32_t default_requested_options [] = {
|
|||
isc_result_t read_client_conf ()
|
||||
{
|
||||
struct client_config *config;
|
||||
struct client_state *state;
|
||||
struct interface_info *ip;
|
||||
isc_result_t status;
|
||||
|
||||
|
@ -166,8 +156,13 @@ int read_client_conf_file (const char *name, struct interface_info *ip,
|
|||
int token;
|
||||
isc_result_t status;
|
||||
|
||||
if ((file = open (name, O_RDONLY)) < 0)
|
||||
if ((file = open (name, O_RDONLY)) < 0) {
|
||||
#ifndef SMALL
|
||||
return uerr2isc (errno);
|
||||
#else
|
||||
return errno == ENOENT ? ISC_R_NOTFOUND : ISC_R_NOPERM;
|
||||
#endif
|
||||
}
|
||||
|
||||
cfile = (struct parse *)0;
|
||||
new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0);
|
||||
|
@ -251,11 +246,9 @@ void parse_client_statement (cfile, ip, config)
|
|||
int token;
|
||||
const char *val;
|
||||
struct option *option;
|
||||
struct executable_statement *stmt, **p;
|
||||
enum statement_op op;
|
||||
struct executable_statement *stmt;
|
||||
int lose;
|
||||
char *name;
|
||||
struct data_string key_id;
|
||||
enum policy policy;
|
||||
int known;
|
||||
int tmp, i;
|
||||
|
@ -276,6 +269,7 @@ void parse_client_statement (cfile, ip, config)
|
|||
}
|
||||
return;
|
||||
|
||||
#if !defined (SMALL)
|
||||
case KEY:
|
||||
next_token (&val, (unsigned *)0, cfile);
|
||||
if (ip) {
|
||||
|
@ -297,6 +291,7 @@ void parse_client_statement (cfile, ip, config)
|
|||
}
|
||||
parse_key (cfile);
|
||||
return;
|
||||
#endif
|
||||
|
||||
/* REQUIRE can either start a policy statement or a
|
||||
comma-seperated list of names of required options. */
|
||||
|
@ -438,27 +433,44 @@ void parse_client_statement (cfile, ip, config)
|
|||
case OMAPI:
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != PORT) {
|
||||
if (config != &top_level_config) {
|
||||
parse_warn (cfile,
|
||||
"omapi info must be at top level.");
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
if (token == PORT) {
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != NUMBER) {
|
||||
parse_warn (cfile,
|
||||
"invalid port number: `%s'", val);
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
tmp = atoi (val);
|
||||
if (tmp < 0 || tmp > 65535)
|
||||
parse_warn (cfile,
|
||||
"invalid omapi port %d.", tmp);
|
||||
config -> omapi_port = tmp;
|
||||
parse_semi (cfile);
|
||||
#if !defined (SMALL)
|
||||
} else if (token == KEY) {
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != STRING && !is_identifier (token)) {
|
||||
parse_warn (cfile, "expecting key name.");
|
||||
skip_to_semi (cfile);
|
||||
break;
|
||||
}
|
||||
if (omapi_auth_key_lookup_name (&config -> omapi_key,
|
||||
val) != ISC_R_SUCCESS)
|
||||
parse_warn (cfile, "unknown key %s", val);
|
||||
parse_semi (cfile);
|
||||
#endif
|
||||
} else {
|
||||
parse_warn (cfile,
|
||||
"unexpected omapi subtype: %s", val);
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != NUMBER) {
|
||||
parse_warn (cfile, "invalid port number: `%s'", val);
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
tmp = atoi (val);
|
||||
if (tmp < 0 || tmp > 65535)
|
||||
parse_warn (cfile, "invalid omapi port %d.", tmp);
|
||||
else if (config != &top_level_config)
|
||||
parse_warn (cfile,
|
||||
"omapi port only works at top level.");
|
||||
else
|
||||
config -> omapi_port = tmp;
|
||||
parse_semi (cfile);
|
||||
return;
|
||||
|
||||
case DO_FORWARD_UPDATE:
|
||||
|
@ -617,34 +629,41 @@ void parse_option_list (cfile, list)
|
|||
struct parse *cfile;
|
||||
u_int32_t **list;
|
||||
{
|
||||
int ix, i;
|
||||
int ix;
|
||||
int token;
|
||||
const char *val;
|
||||
pair p = (pair)0, q, r;
|
||||
pair p = (pair)0, q = (pair)0, r;
|
||||
struct option *option;
|
||||
|
||||
ix = 0;
|
||||
do {
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token == SEMI)
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
if (token == SEMI) {
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
break;
|
||||
}
|
||||
if (!is_identifier (token)) {
|
||||
parse_warn (cfile, "%s: expected option name.", val);
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
for (i = 0; i < 256; i++) {
|
||||
if (!strcasecmp (dhcp_options [i].name, val))
|
||||
break;
|
||||
}
|
||||
if (i == 256) {
|
||||
option = parse_option_name (cfile, 0, NULL);
|
||||
if (!option) {
|
||||
parse_warn (cfile, "%s: expected option name.", val);
|
||||
return;
|
||||
}
|
||||
if (option -> universe != &dhcp_universe) {
|
||||
parse_warn (cfile,
|
||||
"%s.%s: Only global options allowed.",
|
||||
option -> universe -> name, option->name );
|
||||
skip_to_semi (cfile);
|
||||
return;
|
||||
}
|
||||
r = new_pair (MDL);
|
||||
if (!r)
|
||||
log_fatal ("can't allocate pair for option code.");
|
||||
r -> car = (caddr_t)(long)i;
|
||||
r -> car = (caddr_t)(long)option -> code;
|
||||
r -> cdr = (pair)0;
|
||||
if (p)
|
||||
q -> cdr = r;
|
||||
|
@ -752,6 +771,8 @@ int interface_or_dummy (struct interface_info **pi, const char *name)
|
|||
struct interface_info *ip = (struct interface_info *)0;
|
||||
isc_result_t status;
|
||||
|
||||
status = ISC_R_FAILURE; /* XXXGCC -Wuninitialized */
|
||||
|
||||
/* Find the interface (if any) that matches the name. */
|
||||
for (i = interfaces; i; i = i -> next) {
|
||||
if (!strcmp (i -> name, name)) {
|
||||
|
@ -773,9 +794,7 @@ int interface_or_dummy (struct interface_info **pi, const char *name)
|
|||
/* If we didn't find an interface, make a dummy interface as
|
||||
a placeholder. */
|
||||
if (!ip) {
|
||||
isc_result_t status;
|
||||
status = interface_allocate (&ip, MDL);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
if ((status = interface_allocate (&ip, MDL)) != ISC_R_SUCCESS)
|
||||
log_fatal ("Can't record interface %s: %s",
|
||||
name, isc_result_totext (status));
|
||||
strcpy (ip -> name, name);
|
||||
|
@ -788,6 +807,8 @@ int interface_or_dummy (struct interface_info **pi, const char *name)
|
|||
}
|
||||
if (pi)
|
||||
status = interface_reference (pi, ip, MDL);
|
||||
else
|
||||
status = ISC_R_FAILURE;
|
||||
interface_dereference (&ip, MDL);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return 0;
|
||||
|
@ -832,7 +853,7 @@ void parse_client_lease_statement (cfile, is_static)
|
|||
struct parse *cfile;
|
||||
int is_static;
|
||||
{
|
||||
struct client_lease *lease, *lp, *pl;
|
||||
struct client_lease *lease, *lp, *pl, *next;
|
||||
struct interface_info *ip = (struct interface_info *)0;
|
||||
int token;
|
||||
const char *val;
|
||||
|
@ -892,17 +913,26 @@ void parse_client_lease_statement (cfile, is_static)
|
|||
lease list looking for a lease with the same address, and
|
||||
if we find it, toss it. */
|
||||
pl = (struct client_lease *)0;
|
||||
for (lp = client -> leases; lp; lp = lp -> next) {
|
||||
for (lp = client -> leases; lp; lp = next) {
|
||||
next = lp -> next;
|
||||
if (lp -> address.len == lease -> address.len &&
|
||||
!memcmp (lp -> address.iabuf, lease -> address.iabuf,
|
||||
lease -> address.len)) {
|
||||
/* If the lease we found is a static lease, and
|
||||
this one expires earlier, discard this one. */
|
||||
if (lp->is_static &&
|
||||
lp->expiry > lease->expiry) {
|
||||
destroy_client_lease(lease);
|
||||
return;
|
||||
}
|
||||
if (pl)
|
||||
pl -> next = lp -> next;
|
||||
pl -> next = next;
|
||||
else
|
||||
client -> leases = lp -> next;
|
||||
client -> leases = next;
|
||||
destroy_client_lease (lp);
|
||||
break;
|
||||
}
|
||||
} else
|
||||
pl = lp;
|
||||
}
|
||||
|
||||
/* If this is a preloaded lease, just put it on the list of recorded
|
||||
|
@ -963,13 +993,12 @@ void parse_client_lease_declaration (cfile, lease, ipp, clientp)
|
|||
{
|
||||
int token;
|
||||
const char *val;
|
||||
char *t, *n;
|
||||
struct interface_info *ip;
|
||||
struct option_cache *oc;
|
||||
struct client_state *client = (struct client_state *)0;
|
||||
struct data_string key_id;
|
||||
|
||||
switch (next_token (&val, (unsigned *)0, cfile)) {
|
||||
#if !defined (SMALL)
|
||||
case KEY:
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != STRING && !is_identifier (token)) {
|
||||
|
@ -982,6 +1011,7 @@ void parse_client_lease_declaration (cfile, lease, ipp, clientp)
|
|||
parse_warn (cfile, "unknown key %s", val);
|
||||
parse_semi (cfile);
|
||||
break;
|
||||
#endif
|
||||
case TOKEN_BOOTP:
|
||||
lease -> is_bootp = 1;
|
||||
break;
|
||||
|
@ -1157,11 +1187,6 @@ int parse_allow_deny (oc, cfile, flag)
|
|||
struct parse *cfile;
|
||||
int flag;
|
||||
{
|
||||
enum dhcp_token token;
|
||||
const char *val;
|
||||
unsigned char rf = flag;
|
||||
struct expression *data = (struct expression *)0;
|
||||
int status;
|
||||
|
||||
parse_warn (cfile, "allow/deny/ignore not permitted here.");
|
||||
skip_to_semi (cfile);
|
||||
|
|
|
@ -1,41 +1,34 @@
|
|||
.\" dhclient-script.8
|
||||
.\"
|
||||
.\" Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
.\" To learn more about the Internet Software Consortium, see
|
||||
.\" To learn more about Internet Systems Consortium, see
|
||||
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
.\" ``http://www.nominum.com''.
|
||||
.\"
|
||||
.\" $Id: dhclient-script.8,v 1.1.1.3 2003/02/18 16:37:54 drochner Exp $
|
||||
.\" $Id: dhclient-script.8,v 1.1.1.4 2005/08/11 16:54:20 drochner Exp $
|
||||
.\"
|
||||
.TH dhclient-script 8
|
||||
.SH NAME
|
||||
|
@ -60,10 +53,10 @@ No standard client script exists for some operating systems, even though
|
|||
the actual client may work, so a pioneering user may well need to create
|
||||
a new script or modify an existing one. In general, customizations specific
|
||||
to a particular computer should be done in the
|
||||
.B ETCDIR/dhclient.conf
|
||||
.B /etc/dhclient.conf
|
||||
file. If you find that you can't make such a customization without
|
||||
customizing
|
||||
.B ETCDIR/dhclient.conf
|
||||
.B /etc/dhclient.conf
|
||||
or using the enter and exit hooks, please submit a bug report.
|
||||
.SH HOOKS
|
||||
When it starts, the client script first defines a shell function,
|
||||
|
@ -75,27 +68,27 @@ the enter hook script.
|
|||
.PP
|
||||
On after defining the make_resolv_conf function, the client script checks
|
||||
for the presence of an executable
|
||||
.B ETCDIR/dhclient-enter-hooks
|
||||
.B /etc/dhclient-enter-hooks
|
||||
script, and if present, it invokes the script inline, using the Bourne
|
||||
shell '.' command. The entire environment documented under OPERATION
|
||||
is available to this script, which may modify the environment if needed
|
||||
to change the behaviour of the script. If an error occurs during the
|
||||
execution of the script, it can set the exit_status variable to a nonzero
|
||||
value, and
|
||||
.B CLIENTBINDIR/dhclient-script
|
||||
.B /sbin/dhclient-script
|
||||
will exit with that error code immediately after the client script exits.
|
||||
.PP
|
||||
After all processing has completed,
|
||||
.B CLIENTBINDIR/dhclient-script
|
||||
.B /sbin/dhclient-script
|
||||
checks for the presence of an executable
|
||||
.B ETCDIR/dhclient-exit-hooks
|
||||
.B /etc/dhclient-exit-hooks
|
||||
script, which if present is invoked using the '.' command. The exit
|
||||
status of dhclient-script will be passed to dhclient-exit-hooks in the
|
||||
exit_status shell variable, and will always be zero if the script
|
||||
succeeded at the task for which it was invoked. The rest of the
|
||||
environment as described previously for dhclient-enter-hooks is also
|
||||
present. The
|
||||
.B ETCDIR/dhclient-exit-hooks
|
||||
.B /etc/dhclient-exit-hooks
|
||||
script can modify the valid of exit_status to change the exit status
|
||||
of dhclient-script.
|
||||
.SH OPERATION
|
||||
|
@ -200,8 +193,8 @@ $new_static_routes, but current scripts do not do this.
|
|||
.SH FILES
|
||||
Each operating system should generally have its own script file,
|
||||
although the script files for similar operating systems may be similar
|
||||
or even identical. The script files included in the Internet
|
||||
Software Consortium DHCP distribution appear in the distribution tree
|
||||
or even identical. The script files included in Internet
|
||||
Systems Consortium DHCP distribution appear in the distribution tree
|
||||
under client/scripts, and bear the names of the operating systems on
|
||||
which they are intended to work.
|
||||
.SH BUGS
|
||||
|
@ -218,9 +211,9 @@ dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
|
|||
dhclient.leases(5).
|
||||
.SH AUTHOR
|
||||
.B dhclient-script(8)
|
||||
has been written for the Internet Software Consortium
|
||||
has been written for Internet Systems Consortium
|
||||
by Ted Lemon in cooperation with Vixie
|
||||
Enterprises. To learn more about the Internet Software Consortium,
|
||||
Enterprises. To learn more about Internet Systems Consortium,
|
||||
see
|
||||
.B http://www.isc.org.
|
||||
To learn more about Vixie
|
||||
|
|
|
@ -1,26 +1,31 @@
|
|||
.\" dhclient.8
|
||||
.\"
|
||||
.\" Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
.\" Use is subject to license terms which appear in the file named
|
||||
.\" ISC-LICENSE that should have accompanied this file when you
|
||||
.\" received it. If a file named ISC-LICENSE did not accompany this
|
||||
.\" file, or you are not sure the one you have is correct, you may
|
||||
.\" obtain an applicable copy of the license at:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" http://www.isc.org/isc-license-1.0.html.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" This file is part of the ISC DHCP distribution. The documentation
|
||||
.\" associated with this file is listed in the file DOCUMENTATION,
|
||||
.\" included in the top-level directory of this release.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" Support and other services are available for ISC products - see
|
||||
.\" http://www.isc.org for more information.
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" $Id: dhclient.8,v 1.1.1.3 2003/02/18 16:37:54 drochner Exp $
|
||||
.\" $Id: dhclient.8,v 1.1.1.4 2005/08/11 16:54:21 drochner Exp $
|
||||
.\"
|
||||
.TH dhclient 8
|
||||
.SH NAME
|
||||
dhclient - Dynamic Host Configuration Protocol Client
|
||||
dhclient - Dynamic Host Configuration Protocol (DHCP) Client
|
||||
.SH SYNOPSIS
|
||||
.B dhclient
|
||||
[
|
||||
|
@ -37,6 +42,9 @@ dhclient - Dynamic Host Configuration Protocol Client
|
|||
.B -1
|
||||
]
|
||||
[
|
||||
.B -o
|
||||
]
|
||||
[
|
||||
.B -r
|
||||
]
|
||||
[
|
||||
|
@ -79,10 +87,12 @@ relay
|
|||
]
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
The Internet Software Consortium DHCP Client, dhclient, provides a
|
||||
The Internet Systems Consortium DHCP Client, dhclient, provides a
|
||||
means for configuring one or more network interfaces using the Dynamic
|
||||
Host Configuration Protocol, BOOTP protocol, or if these protocols
|
||||
fail, by statically assigning an address.
|
||||
.SH SYSTEM REQUIREMENTS
|
||||
You must have the Berkeley Packet Filter (bpf) configured in your NetBSD kernel.
|
||||
.SH OPERATION
|
||||
.PP
|
||||
The DHCP protocol allows a host to contact a central server which
|
||||
|
@ -202,14 +212,21 @@ The
|
|||
flag cause dhclient to try once to get a lease. If it fails, dhclient exits
|
||||
with exit code two.
|
||||
.PP
|
||||
The
|
||||
.B -o
|
||||
flag cause dhclient to assume that it's been given a fixed lease, so once it
|
||||
installs the lease, it exits. This is really only useful on very small
|
||||
systems, and only works on a single interface at a time - if you want it to
|
||||
support multiple interfaces, run dhclient on each interface in succession.
|
||||
.PP
|
||||
The DHCP client normally gets its configuration information from
|
||||
.B ETCDIR/dhclient.conf,
|
||||
.B /etc/dhclient.conf,
|
||||
its lease database from
|
||||
.B DBDIR/dhclient.leases,
|
||||
.B /var/db/dhclient.leases,
|
||||
stores its process ID in a file called
|
||||
.B RUNDIR/dhclient.pid,
|
||||
.B /var/run/dhclient.pid,
|
||||
and configures the network interface using
|
||||
.B CLIENTBINDIR/dhclient-script
|
||||
.B /sbin/dhclient-script
|
||||
To specify different names and/or locations for these files, use the
|
||||
.B -cf,
|
||||
.B -lf,
|
||||
|
@ -218,9 +235,9 @@ and
|
|||
.B -sf
|
||||
flags, respectively, followed by the name of the file. This can be
|
||||
particularly useful if, for example,
|
||||
.B DBDIR
|
||||
.B /var/db
|
||||
or
|
||||
.B RUNDIR
|
||||
.B /var/run
|
||||
has not yet been mounted when the DHCP client is started.
|
||||
.PP
|
||||
The DHCP client normally exits if it isn't able to identify any
|
||||
|
@ -230,7 +247,7 @@ broadcast interface may be added after system startup. The
|
|||
.B -w
|
||||
flag can be used to cause the client not to exit when it doesn't find
|
||||
any such interfaces. The
|
||||
.B omshell (8)
|
||||
.B omshell (1)
|
||||
program can then be used to notify the client when a network interface
|
||||
has been added or removed, so that the client can attempt to configure an IP
|
||||
address on that interface.
|
||||
|
@ -281,17 +298,17 @@ do a DHCPRELEASE. To pause it, set its state attribute to 3. To
|
|||
resume it, set its state attribute to 4.
|
||||
.PP
|
||||
.SH FILES
|
||||
.B CLIENTBINDIR/dhclient-script,
|
||||
.B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid,
|
||||
.B DBDIR/dhclient.leases~.
|
||||
.B /sbin/dhclient-script,
|
||||
.B /etc/dhclient.conf, /var/db/dhclient.leases, /var/run/dhclient.pid,
|
||||
.B /var/db/dhclient.leases~.
|
||||
.SH SEE ALSO
|
||||
dhcpd(8), dhcrelay(8), dhclient-script (8), dhclient.conf(5),
|
||||
dhcpd(8), dhcrelay(8), dhclient-script(8), dhclient.conf(5),
|
||||
dhclient.leases(5).
|
||||
.SH AUTHOR
|
||||
.B dhclient(8)
|
||||
has been written for the Internet Software Consortium
|
||||
has been written for Internet Systems Consortium
|
||||
by Ted Lemon in cooperation with Vixie
|
||||
Enterprises. To learn more about the Internet Software Consortium,
|
||||
Enterprises. To learn more about Internet Systems Consortium,
|
||||
see
|
||||
.B http://www.isc.org
|
||||
To learn more about Vixie
|
||||
|
@ -304,7 +321,7 @@ Stanford.
|
|||
.PP
|
||||
The current version owes much to Elliot's Linux enhancements, but
|
||||
was substantially reorganized and partially rewritten by Ted Lemon
|
||||
so as to use the same networking framework that the Internet Software
|
||||
so as to use the same networking framework that the Internet Systems
|
||||
Consortium DHCP server uses. Much system-specific configuration code
|
||||
was moved into a shell script so that as support for more operating
|
||||
systems is added, it will not be necessary to port and maintain
|
||||
|
|
|
@ -3,35 +3,26 @@
|
|||
DHCP Client. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This code is based on the original client state machine that was
|
||||
* written by Elliot Poger. The code has been extensively hacked on
|
||||
|
@ -41,13 +32,12 @@
|
|||
|
||||
#ifndef lint
|
||||
static char ocopyright[] =
|
||||
"$Id: dhclient.c,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $ Copyright (c) 1995-2002 Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dhclient.c,v 1.1.1.4 2005/08/11 16:54:22 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
#include "version.h"
|
||||
|
||||
TIME cur_time;
|
||||
TIME default_lease_time = 43200; /* 12 hours... */
|
||||
TIME max_lease_time = 86400; /* 24 hours... */
|
||||
|
||||
|
@ -71,9 +61,9 @@ struct in_addr giaddr;
|
|||
assert (state_is == state_shouldbe). */
|
||||
#define ASSERT_STATE(state_is, state_shouldbe) {}
|
||||
|
||||
static char copyright[] = "Copyright 1995-2002 Internet Software Consortium.";
|
||||
static char copyright[] = "Copyright 2004-2005 Internet Systems Consortium.";
|
||||
static char arr [] = "All rights reserved.";
|
||||
static char message [] = "Internet Software Consortium DHCP Client";
|
||||
static char message [] = "Internet Systems Consortium DHCP Client";
|
||||
static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
|
||||
|
||||
u_int16_t local_port=0;
|
||||
|
@ -82,6 +72,7 @@ int no_daemon=0;
|
|||
struct string_list *client_env=NULL;
|
||||
int client_env_count=0;
|
||||
int onetry=0;
|
||||
int fixed = 0;
|
||||
int quiet=0;
|
||||
int nowait=0;
|
||||
|
||||
|
@ -89,6 +80,22 @@ static void usage PROTO ((void));
|
|||
|
||||
void do_release(struct client_state *);
|
||||
|
||||
#if !defined (SMALL)
|
||||
static isc_result_t
|
||||
verify_addr (omapi_object_t *l, omapi_addr_t *addr)
|
||||
{
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
verify_auth (omapi_object_t *p, omapi_auth_key_t *a)
|
||||
{
|
||||
if (a != top_level_config.omapi_key)
|
||||
return ISC_R_INVALIDKEY;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main (argc, argv, envp)
|
||||
int argc;
|
||||
char **argv, **envp;
|
||||
|
@ -105,7 +112,6 @@ int main (argc, argv, envp)
|
|||
omapi_object_t *listener;
|
||||
isc_result_t result;
|
||||
int persist = 0;
|
||||
int omapi_port;
|
||||
int no_dhclient_conf = 0;
|
||||
int no_dhclient_db = 0;
|
||||
int no_dhclient_pid = 0;
|
||||
|
@ -179,6 +185,8 @@ int main (argc, argv, envp)
|
|||
usage ();
|
||||
path_dhclient_script = argv [i];
|
||||
no_dhclient_script = 1;
|
||||
} else if (!strcmp (argv [i], "-o")) {
|
||||
fixed = 1;
|
||||
} else if (!strcmp (argv [i], "-1")) {
|
||||
onetry = 1;
|
||||
} else if (!strcmp (argv [i], "-q")) {
|
||||
|
@ -192,6 +200,8 @@ int main (argc, argv, envp)
|
|||
if (++i == argc)
|
||||
usage ();
|
||||
relay = argv [i];
|
||||
} else if (!strcmp (argv [i], "-nw")) {
|
||||
nowait = 1;
|
||||
} else if (!strcmp (argv [i], "-n")) {
|
||||
/* do not start up any interfaces */
|
||||
interfaces_requested = 1;
|
||||
|
@ -212,8 +222,6 @@ int main (argc, argv, envp)
|
|||
} else if (!strcmp (argv [i], "--version")) {
|
||||
log_info ("isc-dhclient-%s", DHCP_VERSION);
|
||||
exit (0);
|
||||
} else if (!strcmp (argv [i], "-nw")) {
|
||||
nowait = 1;
|
||||
} else if (argv [i][0] == '-') {
|
||||
usage ();
|
||||
} else {
|
||||
|
@ -223,8 +231,9 @@ int main (argc, argv, envp)
|
|||
log_fatal ("Can't record interface %s:%s",
|
||||
argv [i], isc_result_totext (status));
|
||||
if (strlen (argv [i]) > sizeof tmp -> name)
|
||||
log_fatal ("%s: interface name too long (max %ld)",
|
||||
argv [i], (long)strlen (argv [i]));
|
||||
log_fatal ("%s: interface name too long (max %lu)",
|
||||
argv [i],
|
||||
(unsigned long)sizeof tmp -> name);
|
||||
strcpy (tmp -> name, argv [i]);
|
||||
if (interfaces) {
|
||||
interface_reference (&tmp -> next,
|
||||
|
@ -252,17 +261,32 @@ int main (argc, argv, envp)
|
|||
|
||||
/* first kill of any currently running client */
|
||||
if (release_mode) {
|
||||
/* XXX inelegant hack to prove concept */
|
||||
char command[1024];
|
||||
FILE *pidfd;
|
||||
pid_t oldpid;
|
||||
long temp;
|
||||
int e;
|
||||
|
||||
#if !defined (NO_SNPRINTF)
|
||||
snprintf (command, 1024, "kill `cat %s`", path_dhclient_pid);
|
||||
#else
|
||||
sprintf (command, "kill `cat %s`", path_dhclient_pid);
|
||||
#endif
|
||||
system (command);
|
||||
oldpid = 0;
|
||||
if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) {
|
||||
e = fscanf(pidfd, "%ld\n", &temp);
|
||||
oldpid = (pid_t)temp;
|
||||
|
||||
if (e != 0 && e != EOF) {
|
||||
if (oldpid) {
|
||||
if (kill(oldpid, SIGTERM) == 0)
|
||||
unlink(path_dhclient_pid);
|
||||
}
|
||||
}
|
||||
fclose(pidfd);
|
||||
}
|
||||
}
|
||||
|
||||
/* This isn't the final pid, but it may be needed so that
|
||||
* /etc/rc.d/dhclient can kill the client before it's done with
|
||||
* initially configuring an interface.
|
||||
*/
|
||||
write_client_pid_file();
|
||||
|
||||
if (!quiet) {
|
||||
log_info ("%s %s", message, DHCP_VERSION);
|
||||
log_info (copyright);
|
||||
|
@ -315,6 +339,7 @@ int main (argc, argv, envp)
|
|||
/* Get the current time... */
|
||||
GET_TIME (&cur_time);
|
||||
|
||||
memset(&sockaddr_broadcast, 0, sizeof(sockaddr_broadcast));
|
||||
sockaddr_broadcast.sin_family = AF_INET;
|
||||
sockaddr_broadcast.sin_port = remote_port;
|
||||
if (server) {
|
||||
|
@ -427,6 +452,7 @@ int main (argc, argv, envp)
|
|||
if (release_mode)
|
||||
return 0;
|
||||
|
||||
#if !defined (SMALL)
|
||||
/* Start up a listener for the object management API protocol. */
|
||||
if (top_level_config.omapi_port != -1) {
|
||||
listener = (omapi_object_t *)0;
|
||||
|
@ -434,14 +460,17 @@ int main (argc, argv, envp)
|
|||
if (result != ISC_R_SUCCESS)
|
||||
log_fatal ("Can't allocate new generic object: %s\n",
|
||||
isc_result_totext (result));
|
||||
result = omapi_protocol_listen (listener,
|
||||
(unsigned)
|
||||
top_level_config.omapi_port,
|
||||
1);
|
||||
result = (omapi_protocol_listen
|
||||
(listener,
|
||||
(unsigned)top_level_config.omapi_port, 1));
|
||||
if (result == ISC_R_SUCCESS && top_level_config.omapi_key)
|
||||
result = (omapi_protocol_configure_security
|
||||
(listener, verify_addr, verify_auth));
|
||||
if (result != ISC_R_SUCCESS)
|
||||
log_fatal ("Can't start OMAPI protocol: %s",
|
||||
isc_result_totext (result));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set up the bootp packet handler... */
|
||||
bootp_packet_handler = do_packet;
|
||||
|
@ -635,7 +664,6 @@ void state_selecting (cpp)
|
|||
picked = lp;
|
||||
picked -> next = (struct client_lease *)0;
|
||||
} else {
|
||||
freeit:
|
||||
destroy_client_lease (lp);
|
||||
}
|
||||
}
|
||||
|
@ -694,7 +722,6 @@ void dhcpack (packet)
|
|||
struct client_lease *lease;
|
||||
struct option_cache *oc;
|
||||
struct data_string ds;
|
||||
int i;
|
||||
|
||||
/* If we're not receptive to an offer right now, or if the offer
|
||||
has an unrecognizable transaction id, then just drop it. */
|
||||
|
@ -784,11 +811,15 @@ void dhcpack (packet)
|
|||
|
||||
/* If it wasn't specified by the server, calculate it. */
|
||||
if (!client -> new -> renewal)
|
||||
client -> new -> renewal =
|
||||
client -> new -> expiry / 2;
|
||||
client -> new -> renewal = client -> new -> expiry / 2 + 1;
|
||||
|
||||
if (client -> new -> renewal <= 0)
|
||||
client -> new -> renewal = TIME_MAX;
|
||||
|
||||
/* Now introduce some randomness to the renewal time: */
|
||||
client -> new -> renewal = (((client -> new -> renewal + 3) * 3 / 4) +
|
||||
if (client -> new -> renewal <= TIME_MAX / 3 - 3)
|
||||
client -> new -> renewal =
|
||||
(((client -> new -> renewal + 3) * 3 / 4) +
|
||||
(random () % /* XXX NUMS */
|
||||
((client -> new -> renewal + 3) / 4)));
|
||||
|
||||
|
@ -807,14 +838,25 @@ void dhcpack (packet)
|
|||
} else
|
||||
client -> new -> rebind = 0;
|
||||
|
||||
if (!client -> new -> rebind)
|
||||
client -> new -> rebind =
|
||||
(client -> new -> expiry * 7) / 8; /* XXX NUMS */
|
||||
if (client -> new -> rebind <= 0) {
|
||||
if (client -> new -> expiry <= TIME_MAX / 7)
|
||||
client -> new -> rebind =
|
||||
client -> new -> expiry * 7 / 8;
|
||||
else
|
||||
client -> new -> rebind =
|
||||
client -> new -> expiry / 8 * 7;
|
||||
}
|
||||
|
||||
/* Make sure our randomness didn't run the renewal time past the
|
||||
rebind time. */
|
||||
if (client -> new -> renewal > client -> new -> rebind)
|
||||
client -> new -> renewal = (client -> new -> rebind * 3) / 4;
|
||||
if (client -> new -> renewal > client -> new -> rebind) {
|
||||
if (client -> new -> rebind <= TIME_MAX / 3)
|
||||
client -> new -> renewal =
|
||||
client -> new -> rebind * 3 / 4;
|
||||
else
|
||||
client -> new -> renewal =
|
||||
client -> new -> rebind / 4 * 3;
|
||||
}
|
||||
|
||||
client -> new -> expiry += cur_time;
|
||||
/* Lease lengths can never be negative. */
|
||||
|
@ -833,7 +875,6 @@ void dhcpack (packet)
|
|||
void bind_lease (client)
|
||||
struct client_state *client;
|
||||
{
|
||||
struct interface_info *ip = client -> interface;
|
||||
|
||||
/* Remember the medium. */
|
||||
client -> new -> medium = client -> medium;
|
||||
|
@ -882,6 +923,10 @@ void bind_lease (client)
|
|||
(long)(client -> active -> renewal - cur_time));
|
||||
client -> state = S_BOUND;
|
||||
reinitialize_interfaces ();
|
||||
if (fixed) {
|
||||
unlink(_PATH_DHCLIENT_PID);
|
||||
exit(0);
|
||||
}
|
||||
go_daemon ();
|
||||
if (client -> config -> do_forward_update) {
|
||||
client -> dns_update_timeout = 1;
|
||||
|
@ -899,7 +944,6 @@ void state_bound (cpp)
|
|||
void *cpp;
|
||||
{
|
||||
struct client_state *client = cpp;
|
||||
int i;
|
||||
struct option_cache *oc;
|
||||
struct data_string ds;
|
||||
|
||||
|
@ -922,6 +966,8 @@ void state_bound (cpp)
|
|||
client -> destination.len = 4;
|
||||
} else
|
||||
client -> destination = iaddr_broadcast;
|
||||
|
||||
data_string_forget (&ds, MDL);
|
||||
} else
|
||||
client -> destination = iaddr_broadcast;
|
||||
|
||||
|
@ -940,7 +986,6 @@ void state_stop (cpp)
|
|||
void *cpp;
|
||||
{
|
||||
struct client_state *client = cpp;
|
||||
int i;
|
||||
|
||||
/* Cancel all timeouts. */
|
||||
cancel_timeout (state_selecting, client);
|
||||
|
@ -1053,8 +1098,6 @@ void dhcpoffer (packet)
|
|||
int i;
|
||||
int stop_selecting;
|
||||
const char *name = packet -> packet_type ? "DHCPOFFER" : "BOOTREPLY";
|
||||
struct iaddrlist *ap;
|
||||
struct option_cache *oc;
|
||||
char obuf [1024];
|
||||
|
||||
#ifdef DEBUG_PACKET
|
||||
|
@ -1237,7 +1280,7 @@ struct client_lease *packet_to_lease (packet, client)
|
|||
break;
|
||||
lease -> server_name = dmalloc (len + 1, MDL);
|
||||
if (!lease -> server_name) {
|
||||
log_error ("dhcpoffer: no memory for filename.\n");
|
||||
log_error ("dhcpoffer: no memory for server name.\n");
|
||||
destroy_client_lease (lease);
|
||||
return (struct client_lease *)0;
|
||||
} else {
|
||||
|
@ -1384,9 +1427,9 @@ void send_discover (cpp)
|
|||
|
||||
/* If we're supposed to increase the interval, do so. If it's
|
||||
currently zero (i.e., we haven't sent any packets yet), set
|
||||
it to one; otherwise, add to it a random number between
|
||||
zero and two times itself. On average, this means that it
|
||||
will double with every transmission. */
|
||||
it to initial_interval; otherwise, add to it a random number
|
||||
between zero and two times itself. On average, this means
|
||||
that it will double with every transmission. */
|
||||
if (increase) {
|
||||
if (!client -> interval)
|
||||
client -> interval =
|
||||
|
@ -1630,7 +1673,8 @@ void send_request (cpp)
|
|||
client -> config -> backoff_cutoff)
|
||||
client -> interval =
|
||||
((client -> config -> backoff_cutoff / 2)
|
||||
+ ((random () >> 2) % client -> interval));
|
||||
+ ((random () >> 2) %
|
||||
client -> config -> backoff_cutoff));
|
||||
|
||||
/* If the backoff would take us to the expiry time, just set the
|
||||
timeout to the expiry time. */
|
||||
|
@ -1641,6 +1685,7 @@ void send_request (cpp)
|
|||
|
||||
/* If the lease T2 time has elapsed, or if we're not yet bound,
|
||||
broadcast the DHCPREQUEST rather than unicasting. */
|
||||
memset(&destination, 0, sizeof(destination));
|
||||
if (client -> state == S_REQUESTING ||
|
||||
client -> state == S_REBOOTING ||
|
||||
cur_time > client -> active -> rebind)
|
||||
|
@ -1726,6 +1771,7 @@ void send_release (cpp)
|
|||
struct sockaddr_in destination;
|
||||
struct in_addr from;
|
||||
|
||||
memset(&destination, 0, sizeof(destination));
|
||||
memcpy (&from, client -> active -> address.iabuf,
|
||||
sizeof from);
|
||||
memcpy (&destination.sin_addr.s_addr,
|
||||
|
@ -1855,7 +1901,6 @@ void make_discover (client, lease)
|
|||
struct client_lease *lease;
|
||||
{
|
||||
unsigned char discover = DHCPDISCOVER;
|
||||
int i;
|
||||
struct option_state *options = (struct option_state *)0;
|
||||
|
||||
memset (&client -> packet, 0, sizeof (client -> packet));
|
||||
|
@ -1869,10 +1914,17 @@ void make_discover (client, lease)
|
|||
/* Set up the option buffer... */
|
||||
client -> packet_length =
|
||||
cons_options ((struct packet *)0, &client -> packet,
|
||||
(struct lease *)0, client, 0,
|
||||
(struct option_state *)0, options,
|
||||
&global_scope, 0, 0, 0, (struct data_string *)0,
|
||||
(struct lease *)0, client,
|
||||
/* maximum packet size */1500,
|
||||
(struct option_state *)0,
|
||||
options,
|
||||
/* scope */ &global_scope,
|
||||
/* overload */ 0,
|
||||
/* terminate */0,
|
||||
/* bootpp */0,
|
||||
(struct data_string *)0,
|
||||
client -> config -> vendor_space_name);
|
||||
|
||||
option_state_dereference (&options, MDL);
|
||||
if (client -> packet_length < BOOTP_MIN_LEN)
|
||||
client -> packet_length = BOOTP_MIN_LEN;
|
||||
|
@ -1912,9 +1964,6 @@ void make_request (client, lease)
|
|||
struct client_lease *lease;
|
||||
{
|
||||
unsigned char request = DHCPREQUEST;
|
||||
int i, j;
|
||||
unsigned char *tmp, *digest;
|
||||
unsigned char *old_digest_loc;
|
||||
struct option_cache *oc;
|
||||
|
||||
memset (&client -> packet, 0, sizeof (client -> packet));
|
||||
|
@ -1925,6 +1974,9 @@ void make_request (client, lease)
|
|||
else
|
||||
oc = (struct option_cache *)0;
|
||||
|
||||
if (client -> sent_options)
|
||||
option_state_dereference (&client -> sent_options, MDL);
|
||||
|
||||
make_client_options (client, lease, &request, oc,
|
||||
((client -> state == S_REQUESTING ||
|
||||
client -> state == S_REBOOTING)
|
||||
|
@ -1936,11 +1988,17 @@ void make_request (client, lease)
|
|||
/* Set up the option buffer... */
|
||||
client -> packet_length =
|
||||
cons_options ((struct packet *)0, &client -> packet,
|
||||
(struct lease *)0, client, 0,
|
||||
(struct option_state *)0, client -> sent_options,
|
||||
&global_scope, 0, 0, 0, (struct data_string *)0,
|
||||
(struct lease *)0, client,
|
||||
/* maximum packet size */1500,
|
||||
(struct option_state *)0,
|
||||
client -> sent_options,
|
||||
/* scope */ &global_scope,
|
||||
/* overload */ 0,
|
||||
/* terminate */0,
|
||||
/* bootpp */0,
|
||||
(struct data_string *)0,
|
||||
client -> config -> vendor_space_name);
|
||||
option_state_dereference (&client -> sent_options, MDL);
|
||||
|
||||
if (client -> packet_length < BOOTP_MIN_LEN)
|
||||
client -> packet_length = BOOTP_MIN_LEN;
|
||||
|
||||
|
@ -1993,7 +2051,6 @@ void make_decline (client, lease)
|
|||
struct client_lease *lease;
|
||||
{
|
||||
unsigned char decline = DHCPDECLINE;
|
||||
int i;
|
||||
struct option_cache *oc;
|
||||
|
||||
struct option_state *options = (struct option_state *)0;
|
||||
|
@ -2049,7 +2106,6 @@ void make_release (client, lease)
|
|||
struct client_lease *lease;
|
||||
{
|
||||
unsigned char request = DHCPRELEASE;
|
||||
int i;
|
||||
struct option_cache *oc;
|
||||
|
||||
struct option_state *options = (struct option_state *)0;
|
||||
|
@ -2065,10 +2121,17 @@ void make_release (client, lease)
|
|||
/* Set up the option buffer... */
|
||||
client -> packet_length =
|
||||
cons_options ((struct packet *)0, &client -> packet,
|
||||
(struct lease *)0, client, 0,
|
||||
(struct option_state *)0, options,
|
||||
&global_scope, 0, 0, 0, (struct data_string *)0,
|
||||
(struct lease *)0, client,
|
||||
/* maximum packet size */1500,
|
||||
(struct option_state *)0,
|
||||
options,
|
||||
/* scope */ &global_scope,
|
||||
/* overload */ 0,
|
||||
/* terminate */0,
|
||||
/* bootpp */0,
|
||||
(struct data_string *)0,
|
||||
client -> config -> vendor_space_name);
|
||||
|
||||
if (client -> packet_length < BOOTP_MIN_LEN)
|
||||
client -> packet_length = BOOTP_MIN_LEN;
|
||||
option_state_dereference (&options, MDL);
|
||||
|
@ -2099,7 +2162,6 @@ void make_release (client, lease)
|
|||
void destroy_client_lease (lease)
|
||||
struct client_lease *lease;
|
||||
{
|
||||
int i;
|
||||
|
||||
if (lease -> server_name)
|
||||
dfree (lease -> server_name, MDL);
|
||||
|
@ -2116,11 +2178,14 @@ void rewrite_client_leases ()
|
|||
struct interface_info *ip;
|
||||
struct client_state *client;
|
||||
struct client_lease *lp;
|
||||
int fd;
|
||||
|
||||
if (leaseFile)
|
||||
fclose (leaseFile);
|
||||
leaseFile = fopen (path_dhclient_db, "w");
|
||||
if (!leaseFile) {
|
||||
fd = open (path_dhclient_db, O_WRONLY|O_CREAT|O_TRUNC, 0600);
|
||||
if (fd != -1)
|
||||
leaseFile = fdopen (fd, "w");
|
||||
if (fd == -1 || !leaseFile) {
|
||||
log_error ("can't create %s: %m", path_dhclient_db);
|
||||
return;
|
||||
}
|
||||
|
@ -2163,8 +2228,6 @@ void write_lease_option (struct option_cache *oc,
|
|||
{
|
||||
const char *name, *dot;
|
||||
struct data_string ds;
|
||||
int status;
|
||||
struct client_state *client;
|
||||
|
||||
memset (&ds, 0, sizeof ds);
|
||||
|
||||
|
@ -2195,9 +2258,7 @@ int write_client_lease (client, lease, rewrite, makesure)
|
|||
int i;
|
||||
struct tm *t;
|
||||
static int leases_written;
|
||||
struct option_cache *oc;
|
||||
struct data_string ds;
|
||||
pair *hash;
|
||||
int errors = 0;
|
||||
char *s;
|
||||
|
||||
|
@ -2214,8 +2275,12 @@ int write_client_lease (client, lease, rewrite, makesure)
|
|||
return 1;
|
||||
|
||||
if (!leaseFile) { /* XXX */
|
||||
leaseFile = fopen (path_dhclient_db, "w");
|
||||
if (!leaseFile) {
|
||||
int fd;
|
||||
|
||||
fd = open (path_dhclient_db, O_WRONLY|O_CREAT|O_TRUNC, 0600);
|
||||
if (fd != -1)
|
||||
leaseFile = fdopen (fd, "w");
|
||||
if (fd == -1 || !leaseFile) {
|
||||
log_error ("can't create %s: %m", path_dhclient_db);
|
||||
return 0;
|
||||
}
|
||||
|
@ -2433,8 +2498,6 @@ void script_write_params (client, prefix, lease)
|
|||
int i;
|
||||
struct data_string data;
|
||||
struct option_cache *oc;
|
||||
pair *hash;
|
||||
char *s, *t;
|
||||
struct envadd_state es;
|
||||
|
||||
es.client = client;
|
||||
|
@ -2511,11 +2574,9 @@ void script_write_params (client, prefix, lease)
|
|||
int script_go (client)
|
||||
struct client_state *client;
|
||||
{
|
||||
int rval;
|
||||
char *scriptName;
|
||||
char *argv [2];
|
||||
char **envp;
|
||||
char *epp [3];
|
||||
char reason [] = "REASON=NBI";
|
||||
static char client_path [] = CLIENT_PATH;
|
||||
int i;
|
||||
|
@ -2591,7 +2652,7 @@ void client_envadd (struct client_state *client,
|
|||
{
|
||||
char spbuf [1024];
|
||||
char *s;
|
||||
unsigned len, i;
|
||||
unsigned len;
|
||||
struct string_list *val;
|
||||
va_list list;
|
||||
|
||||
|
@ -2790,6 +2851,8 @@ void do_release(client)
|
|||
client -> destination.len = 4;
|
||||
} else
|
||||
client -> destination = iaddr_broadcast;
|
||||
|
||||
data_string_forget (&ds, MDL);
|
||||
} else
|
||||
client -> destination = iaddr_broadcast;
|
||||
client -> first_sending = cur_time;
|
||||
|
@ -3015,13 +3078,15 @@ void client_dns_update_timeout (void *cp)
|
|||
|
||||
isc_result_t client_dns_update (struct client_state *client, int addp, int ttl)
|
||||
{
|
||||
struct data_string ddns_fqdn, ddns_fwd_name,
|
||||
struct data_string ddns_fwd_name,
|
||||
ddns_dhcid, client_identifier;
|
||||
struct option_cache *oc;
|
||||
int ignorep;
|
||||
int result;
|
||||
isc_result_t rcode;
|
||||
|
||||
rcode = ISC_R_FAILURE; /* XXXGCC -Wuninitialized */
|
||||
|
||||
/* If we didn't send an FQDN option, we certainly aren't going to
|
||||
be doing an update. */
|
||||
if (!client -> sent_options)
|
||||
|
@ -3063,6 +3128,7 @@ isc_result_t client_dns_update (struct client_state *client, int addp, int ttl)
|
|||
&global_scope, oc, MDL))
|
||||
return ISC_R_SUCCESS;
|
||||
|
||||
#ifndef SMALL
|
||||
/* Make a dhcid string out of either the client identifier,
|
||||
if we are sending one, or the interface's MAC address,
|
||||
otherwise. */
|
||||
|
@ -3111,9 +3177,11 @@ isc_result_t client_dns_update (struct client_state *client, int addp, int ttl)
|
|||
rcode = ddns_remove_a (&ddns_fwd_name,
|
||||
client -> active -> address,
|
||||
&ddns_dhcid);
|
||||
}
|
||||
} else
|
||||
rcode = ISC_R_FAILURE;
|
||||
|
||||
data_string_forget (&ddns_fwd_name, MDL);
|
||||
data_string_forget (&ddns_dhcid, MDL);
|
||||
#endif
|
||||
return rcode;
|
||||
}
|
||||
|
|
|
@ -1,49 +1,39 @@
|
|||
.\" dhclient.conf.5
|
||||
.\" $Id: dhclient.conf.5,v 1.1.1.4 2005/08/11 16:54:23 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for Internet Software Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
.\" To learn more about the Internet Software Consortium, see
|
||||
.\" To learn more about Internet Software Consortium, see
|
||||
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
.\" ``http://www.nominum.com''.
|
||||
.\"
|
||||
.\" $Id: dhclient.conf.5,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $
|
||||
.\"
|
||||
.TH dhclient.conf 5
|
||||
.SH NAME
|
||||
dhclient.conf - DHCP client configuration file
|
||||
.SH DESCRIPTION
|
||||
The dhclient.conf file contains configuration information for
|
||||
.IR dhclient,
|
||||
the Internet Software Consortium DHCP Client.
|
||||
the Internet Systems Consortium DHCP Client.
|
||||
.PP
|
||||
The dhclient.conf file is a free-form ASCII text file. It is parsed by
|
||||
the recursive-descent parser built into dhclient. The file may contain
|
||||
|
@ -52,7 +42,7 @@ are case-insensitive. Comments may be placed anywhere within the
|
|||
file (except within quotes). Comments begin with the # character and
|
||||
end at the end of the line.
|
||||
.PP
|
||||
The dhclient.conf file can be used to configure the behaviour of the
|
||||
The dhclient.conf file can be used to configure the behavior of the
|
||||
client in a wide variety of ways: protocol timing, information
|
||||
requested from the server, information required of the server,
|
||||
defaults to use if the server does not provide certain information,
|
||||
|
@ -61,13 +51,13 @@ values to prepend or append to information provided by the server.
|
|||
The configuration file can also be preinitialized with addresses to
|
||||
use on networks that don't have DHCP servers.
|
||||
.SH PROTOCOL TIMING
|
||||
The timing behaviour of the client need not be configured by the user.
|
||||
The timing behavior of the client need not be configured by the user.
|
||||
If no timing configuration is provided by the user, a fairly
|
||||
reasonable timing behaviour will be used by default - one which
|
||||
reasonable timing behavior will be used by default - one which
|
||||
results in fairly timely updates without placing an inordinate load on
|
||||
the server.
|
||||
.PP
|
||||
The following statements can be used to adjust the timing behaviour of
|
||||
The following statements can be used to adjust the timing behavior of
|
||||
the DHCP client if required, however:
|
||||
.PP
|
||||
.I The
|
||||
|
@ -152,10 +142,11 @@ a new address. By default, the reboot timeout is ten seconds.
|
|||
.PP
|
||||
The client uses an exponential backoff algorithm with some randomness,
|
||||
so that if many clients try to configure themselves at the same time,
|
||||
they will not make their requests in lockstep. The
|
||||
they will not make their requests in lock-step. The
|
||||
.I backoff-cutoff
|
||||
statement determines the maximum amount of time that the client is
|
||||
allowed to back off. It defaults to two minutes.
|
||||
allowed to back off, the actual value will be evaluated randomly between
|
||||
1/2 to 1 1/2 times the \fItime\fR specified. It defaults to two minutes.
|
||||
.PP
|
||||
.I The
|
||||
.B initial-interval
|
||||
|
@ -187,7 +178,7 @@ are called \fIDHCP Options\fR. DHCP Options are defined in
|
|||
.B request
|
||||
.I statement
|
||||
.PP
|
||||
\fBrequest [ \fIoption\fR ] [\fB,\fI ... \fIoption\fR ]\fB;\fR
|
||||
\fBrequest \fR[ \fIoption\fR ] [\fB,\fI ... \fIoption\fR ]\fB;\fR
|
||||
.PP
|
||||
The request statement causes the client to request that any server
|
||||
responding to the client send the client its values for the specified
|
||||
|
@ -208,7 +199,7 @@ no parameters:
|
|||
.B require
|
||||
.I statement
|
||||
.PP
|
||||
\fBrequire [ \fIoption\fR ] [\fB,\fI ... \fIoption ]\fB;\fR
|
||||
\fBrequire \fR[ \fIoption\fR ] [\fB,\fI ... \fIoption ]\fB;\fR
|
||||
.PP
|
||||
The require statement lists options that must be sent in order for an
|
||||
offer to be accepted. Offers that do not contain all the listed
|
||||
|
@ -218,7 +209,7 @@ options will be ignored.
|
|||
.B send
|
||||
.I statement
|
||||
.PP
|
||||
\fBsend { [ \fIoption declaration\fR ]
|
||||
\fBsend { \fR[ \fIoption declaration\fR ]
|
||||
[\fB,\fI ... \fIoption declaration\fR ]\fB}\fR
|
||||
.PP
|
||||
The send statement causes the client to send the specified options to
|
||||
|
@ -255,7 +246,7 @@ updated. The \fIfqdn.encoded\fR option may need to be set to
|
|||
.B do-forward-updates
|
||||
.I statement
|
||||
.PP
|
||||
\fBdo-forward-updates [ \fIflag\fR ] \fB;\fR
|
||||
\fBdo-forward-updates \fR[ \fIflag\fR ] \fB;\fR
|
||||
.PP
|
||||
If you want to do DNS updates in the DHCP client
|
||||
script (see \fBdhclient-script(8)\fR) rather than having the
|
||||
|
@ -266,6 +257,29 @@ the \fBdo-forward-updates\fR statement. \fIFlag\fR should be \fBtrue\fR
|
|||
if you want the DHCP client to do the update, and \fBfalse\fR if
|
||||
you don't want the DHCP client to do the update. By default, the DHCP
|
||||
client will do the DNS update.
|
||||
.PP
|
||||
.I The
|
||||
.B omapi port
|
||||
.I statement
|
||||
.PP
|
||||
\fBomapi port \fR[ \fIport\fR ] \fB;\fR
|
||||
.PP
|
||||
The \fBomapi port\fR statement causes the DHCP client to set up an OMAPI
|
||||
listener on the specified port. Only one such port should be specified.
|
||||
The OMAPI listener will be sensitive to connections from any IP address, so
|
||||
it is important to also set up an OMAPI key to protect the client from
|
||||
unauthorized changes.
|
||||
.PP
|
||||
.I The
|
||||
.B omapi key
|
||||
.I statement
|
||||
.PP
|
||||
\fBomapi key \fR[ \fI key-id \fR ] \fB;\fR
|
||||
.PP
|
||||
The \fBomapi key\fR statement causes the DHCP client to check any incoming
|
||||
OMAPI messages to make sure that they are signed by the specified key. If
|
||||
a message is not signed by this key, it is rejected with an "invalid key"
|
||||
error.
|
||||
.SH OPTION MODIFIERS
|
||||
In some cases, a client may receive option data from the server which
|
||||
is not really appropriate for that client, or may not receive
|
||||
|
@ -278,7 +292,7 @@ needs, several option modifiers are available.
|
|||
.B default
|
||||
.I statement
|
||||
.PP
|
||||
\fBdefault [ \fIoption declaration\fR ] \fB;\fR
|
||||
\fBdefault \fR[ \fIoption declaration\fR ] \fB;\fR
|
||||
.PP
|
||||
If for some option the client should use the value supplied by
|
||||
the server, but needs to use some default value if no value was supplied
|
||||
|
@ -290,7 +304,7 @@ statement.
|
|||
.B supersede
|
||||
.I statement
|
||||
.PP
|
||||
\fBsupersede [ \fIoption declaration\fR ] \fB;\fR
|
||||
\fBsupersede \fR[ \fIoption declaration\fR ] \fB;\fR
|
||||
.PP
|
||||
If for some option the client should always use a locally-configured
|
||||
value or values rather than whatever is supplied by the server, these
|
||||
|
@ -302,7 +316,7 @@ statement.
|
|||
.B prepend
|
||||
.I statement
|
||||
.PP
|
||||
\fBprepend [ \fIoption declaration\fR ] \fB;\fR
|
||||
\fBprepend \fR[ \fIoption declaration\fR ] \fB;\fR
|
||||
.PP
|
||||
If for some set of options the client should use a value you
|
||||
supply, and then use the values supplied by
|
||||
|
@ -312,13 +326,13 @@ statement. The
|
|||
.B prepend
|
||||
statement can only be used for options which
|
||||
allow more than one value to be given. This restriction is not
|
||||
enforced - if you ignore it, the behaviour will be unpredictable.
|
||||
enforced - if you ignore it, the behavior will be unpredictable.
|
||||
.PP
|
||||
.I The
|
||||
.B append
|
||||
.I statement
|
||||
.PP
|
||||
\fBappend [ \fIoption declaration\fR ] \fB;\fR
|
||||
\fBappend \fR[ \fIoption declaration\fR ] \fB;\fR
|
||||
.PP
|
||||
If for some set of options the client should first use the values
|
||||
supplied by the server, if any, and then use values you supply, these
|
||||
|
@ -328,14 +342,14 @@ statement. The
|
|||
.B append
|
||||
statement can only be used for options which
|
||||
allow more than one value to be given. This restriction is not
|
||||
enforced - if you ignore it, the behaviour will be unpredictable.
|
||||
enforced - if you ignore it, the behavior will be unpredictable.
|
||||
.SH LEASE DECLARATIONS
|
||||
.PP
|
||||
.I The
|
||||
.B lease
|
||||
.I declaration
|
||||
.PP
|
||||
\fBlease {\fR \fIlease-declaration\fR [ ... \fIlease-declaration ] \fB}\fR
|
||||
\fBlease {\fR \fIlease-declaration\fR \fR[ ... \fIlease-declaration ] \fB}\fR
|
||||
.PP
|
||||
The DHCP client may decide after some period of time (see \fBPROTOCOL
|
||||
TIMING\fR) that it is not going to succeed in contacting a
|
||||
|
@ -446,7 +460,7 @@ automatically determine the type of network to which they are
|
|||
connected. The media setup string is a system-dependent parameter
|
||||
which is passed to the dhcp client configuration script when
|
||||
initializing the interface. On Unix and Unix-like systems, the
|
||||
argument is passed on the ifconfig command line when configuring te
|
||||
argument is passed on the ifconfig command line when configuring the
|
||||
interface.
|
||||
.PP
|
||||
The dhcp client automatically declares this parameter if it uses a
|
||||
|
@ -495,7 +509,7 @@ second also a number between 0 and 59.
|
|||
Some DHCP clients running TCP/IP roaming protocols may require that in
|
||||
addition to the lease they may acquire via DHCP, their interface also
|
||||
be configured with a predefined IP alias so that they can have a
|
||||
permanent IP address even while roaming. The Internet Software
|
||||
permanent IP address even while roaming. The Internet Systems
|
||||
Consortium DHCP client doesn't support roaming with fixed addresses
|
||||
directly, but in order to facilitate such experimentation, the dhcp
|
||||
client can be set up to configure an IP alias using the
|
||||
|
@ -523,13 +537,22 @@ the bad DHCP server and fix it.
|
|||
\fBinterface "\fIname\fB" { \fIdeclarations ... \fB }
|
||||
.PP
|
||||
A client with more than one network interface may require different
|
||||
behaviour depending on which interface is being configured. All
|
||||
behavior depending on which interface is being configured. All
|
||||
timing parameters and declarations other than lease and alias
|
||||
declarations can be enclosed in an interface declaration, and those
|
||||
parameters will then be used only for the interface that matches the
|
||||
specified name. Interfaces for which there is no interface
|
||||
declaration will use the parameters declared outside of any interface
|
||||
declaration, or the default settings.
|
||||
.PP
|
||||
.B Note well:
|
||||
ISC dhclient only maintains one list of interfaces, which is either
|
||||
determined at startup from command line arguments, or otherwise is
|
||||
autodetected. If you supplied the list of interfaces on the command
|
||||
line, this configuration clause will add the named interface to the
|
||||
list in such a way that will cause it to be configured by DHCP. Which
|
||||
may not be the result you had intended. This is an undesirable side
|
||||
effect that will be addressed in a future release.
|
||||
.PP
|
||||
\fBpseudo "\fIname\fR" "\fIreal-name\fB" { \fIdeclarations ... \fB }
|
||||
.PP
|
||||
|
@ -561,7 +584,7 @@ states where a lease has been acquired or renewed, and the states
|
|||
where a lease has expired. See \fBdhclient-script(8)\fR for more
|
||||
information.
|
||||
.PP
|
||||
\fBmedia "\fImedia setup\fB"\fI [ \fB, "\fImedia setup\fB", \fI... ]\fB;\fR
|
||||
\fBmedia "\fImedia setup\fB"\fI \fR[ \fB, "\fImedia setup\fB", \fI... ]\fB;\fR
|
||||
.PP
|
||||
The
|
||||
.B media
|
||||
|
@ -584,7 +607,7 @@ cycling through media types.
|
|||
.SH SAMPLE
|
||||
The following configuration file is used on a laptop running NetBSD
|
||||
1.3. The laptop has an IP alias of 192.5.5.213, and has one
|
||||
interface, ep0 (a 3com 3C589C). Booting intervals have been
|
||||
interface, ep0 (a 3Com 3C589C). Booting intervals have been
|
||||
shortened somewhat from the default, because the client is known to
|
||||
spend most of its time on networks with little DHCP activity. The
|
||||
laptop does roam to multiple networks.
|
||||
|
@ -627,6 +650,6 @@ RFC2131.
|
|||
.B dhclient(8)
|
||||
was written by Ted Lemon
|
||||
under a contract with Vixie Labs. Funding
|
||||
for this project was provided by the Internet Software Consortium.
|
||||
Information about the Internet Software Consortium can be found at
|
||||
for this project was provided by Internet Systems Consortium.
|
||||
Information about Internet Systems Consortium can be found at
|
||||
.B http://www.isc.org.
|
||||
|
|
|
@ -1,58 +1,46 @@
|
|||
.\" dhclient.conf.5
|
||||
.\" $Id: dhclient.leases.5,v 1.1.1.4 2005/08/11 16:54:23 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1997-2002 The Internet Software Consortium.
|
||||
.\" All rights reserved.
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1997-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie
|
||||
.\" Enterprises. To learn more about the Internet Software Consortium,
|
||||
.\" Enterprises. To learn more about Internet Systems Consortium,
|
||||
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
|
||||
.\" Enterprises, see ``http://www.vix.com''.
|
||||
.\"
|
||||
.\" $Id: dhclient.leases.5,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $
|
||||
.\"
|
||||
.TH dhclient.leases 5
|
||||
.SH NAME
|
||||
dhclient.leases - DHCP client lease database
|
||||
.SH DESCRIPTION
|
||||
The Internet Software Consortium DHCP client keeps a persistent
|
||||
The Internet Systems Consortium DHCP client keeps a persistent
|
||||
database of leases that it has acquired that are still valid. The
|
||||
database is a free-form ASCII file containing one valid declaration
|
||||
per lease. If more than one declaration appears for a given lease,
|
||||
the last one in the file is used. The file is written as a log, so
|
||||
this is not an unusual occurrance.
|
||||
this is not an unusual occurrence.
|
||||
.PP
|
||||
The format of the lease declarations is described in
|
||||
.B dhclient.conf(5).
|
||||
.SH FILES
|
||||
.B DBDIR/dhclient.leases
|
||||
.B /var/db/dhclient.leases
|
||||
.SH SEE ALSO
|
||||
dhclient(8), dhcp-options(5), dhclient.conf(5), dhcpd(8),
|
||||
dhcpd.conf(5), RFC2132, RFC2131.
|
||||
|
@ -60,6 +48,6 @@ dhcpd.conf(5), RFC2132, RFC2131.
|
|||
.B dhclient(8)
|
||||
was written by Ted Lemon
|
||||
under a contract with Vixie Labs. Funding
|
||||
for this project was provided by the Internet Software Consortium.
|
||||
Information about the Internet Software Consortium can be found at
|
||||
for this project was provided by Internet Systems Consortium.
|
||||
Information about Internet Systems Consortium can be found at
|
||||
.B http://www.isc.org.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $Id: freebsd,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $
|
||||
# $Id: freebsd,v 1.1.1.4 2005/08/11 16:54:23 drochner Exp $
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
|
@ -13,13 +13,24 @@ fi
|
|||
make_resolv_conf() {
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
if [ "x$new_domain_name" != x ]; then
|
||||
echo search $new_domain_name >/etc/resolv.conf
|
||||
( echo search $new_domain_name >/etc/resolv.conf )
|
||||
exit_status=$?
|
||||
else
|
||||
rm /etc/resolv.conf
|
||||
if [ -e /etc/resolv.conf ] ; then
|
||||
( rm /etc/resolv.conf )
|
||||
exit_status=$?
|
||||
else
|
||||
( touch /etc/resolv.conf )
|
||||
exit_status=$?
|
||||
fi
|
||||
fi
|
||||
if [ $exit_status -ne 0 ]; then
|
||||
$LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status"
|
||||
else
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
( echo nameserver $nameserver >>/etc/resolv.conf )
|
||||
done
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
echo nameserver $nameserver >>/etc/resolv.conf
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,35 @@
|
|||
# Makefile.dist
|
||||
#
|
||||
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Internet Systems Consortium, Inc.
|
||||
# 950 Charter Street
|
||||
# Redwood City, CA 94063
|
||||
# <info@isc.org>
|
||||
# http://www.isc.org/
|
||||
|
||||
CATMANPAGES = dhcp-options.cat5 dhcp-eval.cat5
|
||||
SEDMANPAGES = dhcp-options.man5 dhcp-eval.man5
|
||||
SRC = raw.c parse.c nit.c icmp.c dispatch.c conflex.c upf.c bpf.c socket.c \
|
||||
lpf.c dlpi.c packet.c tr.c ethernet.c memory.c print.c options.c \
|
||||
inet.c tree.c tables.c alloc.c fddi.c ctrace.c \
|
||||
dns.c resolv.c execute.c discover.c comapi.c
|
||||
inet.c tree.c tables.c alloc.c fddi.c ctrace.c dns.c resolv.c \
|
||||
execute.c discover.c comapi.c
|
||||
OBJ = raw.o parse.o nit.o icmp.o dispatch.o conflex.o upf.o bpf.o socket.o \
|
||||
lpf.o dlpi.o packet.o tr.o ethernet.o memory.o print.o options.o \
|
||||
inet.o tree.o tables.o alloc.o fddi.o ctrace.o \
|
||||
dns.o resolv.o execute.o discover.o comapi.o
|
||||
inet.o tree.o tables.o alloc.o fddi.o ctrace.o dns.o resolv.o \
|
||||
execute.o discover.o comapi.o
|
||||
MAN = dhcp-options.5 dhcp-eval.5
|
||||
|
||||
INCLUDES = -I$(TOP) $(BINDINC) -I$(TOP)/includes
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Memory allocation... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: alloc.c,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: alloc.c,v 1.1.1.4 2005/08/11 16:54:24 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -57,7 +48,6 @@ int option_chain_head_allocate (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
int size;
|
||||
struct option_chain_head *h;
|
||||
|
||||
if (!ptr) {
|
||||
|
@ -118,7 +108,6 @@ int option_chain_head_dereference (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
int i;
|
||||
struct option_chain_head *option_chain_head;
|
||||
pair car, cdr;
|
||||
|
||||
|
@ -170,7 +159,6 @@ int group_allocate (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
int size;
|
||||
struct group *g;
|
||||
|
||||
if (!ptr) {
|
||||
|
@ -231,7 +219,6 @@ int group_dereference (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
int i;
|
||||
struct group *group;
|
||||
|
||||
if (!ptr || !*ptr) {
|
||||
|
@ -754,7 +741,6 @@ int buffer_dereference (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
struct buffer *bp;
|
||||
|
||||
if (!ptr) {
|
||||
log_error ("%s(%d): null pointer", file, line);
|
||||
|
@ -843,7 +829,6 @@ int dns_host_entry_dereference (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
struct dns_host_entry *bp;
|
||||
|
||||
if (!ptr || !*ptr) {
|
||||
log_error ("%s(%d): null pointer", file, line);
|
||||
|
@ -1046,7 +1031,6 @@ int packet_allocate (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
int size;
|
||||
struct packet *p;
|
||||
|
||||
if (!ptr) {
|
||||
|
@ -1166,7 +1150,6 @@ int dns_zone_allocate (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
int size;
|
||||
struct dns_zone *d;
|
||||
|
||||
if (!ptr) {
|
||||
|
|
|
@ -3,42 +3,29 @@
|
|||
BPF socket interface code, originally contributed by Archie Cobbs. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software was contributed to the Internet Software Consortium
|
||||
* by Archie Cobbs, and is now maintained by Ted Lemon in cooperation
|
||||
* with Nominum, Inc. To learn more about the Internet Software
|
||||
* Consortium, see ``http://www.isc.org/''. To learn more about Vixie
|
||||
* Enterprises, see ``http://www.vix.com''. To learn more about
|
||||
* Nominum, Inc., see ``http://www.nominum.com''.
|
||||
* This software was contributed to Internet Systems Consortium
|
||||
* by Archie Cobbs.
|
||||
*
|
||||
* Patches for FDDI support on Digital Unix were written by Bill
|
||||
* Stapleton, and maintained for a while by Mike Meredith before he
|
||||
|
@ -47,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: bpf.c,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: bpf.c,v 1.1.1.4 2005/08/11 16:54:24 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -66,6 +53,7 @@ static char copyright[] =
|
|||
# endif
|
||||
# endif
|
||||
|
||||
#include <paths.h>
|
||||
#include <netinet/in_systm.h>
|
||||
#include "includes/netinet/ip.h"
|
||||
#include "includes/netinet/udp.h"
|
||||
|
@ -98,16 +86,24 @@ int if_register_bpf (info)
|
|||
struct interface_info *info;
|
||||
{
|
||||
int sock;
|
||||
char filename[50];
|
||||
int b;
|
||||
u_int bufsize;
|
||||
|
||||
/* Open a BPF device */
|
||||
for (b = 0; 1; b++) {
|
||||
#ifndef NO_SNPRINTF
|
||||
snprintf(filename, sizeof(filename), BPF_FORMAT, b);
|
||||
#ifdef _PATH_BPF
|
||||
const char *filename = _PATH_BPF;
|
||||
sock = open (filename, O_RDWR, 0);
|
||||
if (sock < 0)
|
||||
log_fatal ("No bpf devices.%s%s%s",
|
||||
" Please read the README",
|
||||
" section for your operating",
|
||||
" system.");
|
||||
|
||||
#else
|
||||
char filename[50];
|
||||
int b;
|
||||
for (b = 0; 1; b++) {
|
||||
/* %Audit% 31 bytes max. %2004.06.17,Safe% */
|
||||
sprintf(filename, BPF_FORMAT, b);
|
||||
#endif
|
||||
sock = open (filename, O_RDWR, 0);
|
||||
if (sock < 0) {
|
||||
if (errno == EBUSY) {
|
||||
|
@ -124,6 +120,12 @@ int if_register_bpf (info)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set the BPF buffer size to 32k */
|
||||
bufsize = 32768;
|
||||
if (ioctl (sock, BIOCSBLEN, &bufsize) < 0)
|
||||
log_error ("Can't set bpf buffer to %d: %m", bufsize);
|
||||
|
||||
/* Set the BPF device to point at this interface. */
|
||||
if (ioctl (sock, BIOCSETIF, info -> ifp) < 0)
|
||||
|
@ -210,7 +212,7 @@ struct bpf_insn dhcp_bpf_filter [] = {
|
|||
BPF_STMT(BPF_RET+BPF_K, 0),
|
||||
};
|
||||
|
||||
#if defined (DEC_FDDI)
|
||||
#if defined(DEC_FDDI) || defined(NETBSD_FDDI)
|
||||
struct bpf_insn *bpf_fddi_filter;
|
||||
#endif
|
||||
|
||||
|
@ -238,12 +240,14 @@ void if_register_receive (info)
|
|||
{
|
||||
int flag = 1;
|
||||
struct bpf_version v;
|
||||
u_int32_t addr;
|
||||
struct bpf_program p;
|
||||
#ifdef NEED_OSF_PFILT_HACKS
|
||||
u_int32_t bits;
|
||||
#ifdef DEC_FDDI
|
||||
#endif
|
||||
u_int32_t len;
|
||||
#if defined(DEC_FDDI) || defined(NETBSD_FDDI)
|
||||
int link_layer;
|
||||
#endif /* DEC_FDDI */
|
||||
#endif /* DEC_FDDI || NETBSD_FDDI */
|
||||
|
||||
/* Open a BPF device and hang it on this interface... */
|
||||
info -> rfdesc = if_register_bpf (info);
|
||||
|
@ -278,8 +282,9 @@ void if_register_receive (info)
|
|||
log_fatal ("Can't set ENBATCH|ENCOPYALL|ENBPFHDR: %m");
|
||||
#endif
|
||||
/* Get the required BPF buffer length from the kernel. */
|
||||
if (ioctl (info -> rfdesc, BIOCGBLEN, &info -> rbuf_max) < 0)
|
||||
if (ioctl (info -> rfdesc, BIOCGBLEN, &len) < 0)
|
||||
log_fatal ("Can't get bpf buffer length: %m");
|
||||
info -> rbuf_max = len;
|
||||
info -> rbuf = dmalloc (info -> rbuf_max, MDL);
|
||||
if (!info -> rbuf)
|
||||
log_fatal ("Can't allocate %ld bytes for bpf input buffer.",
|
||||
|
@ -290,7 +295,7 @@ void if_register_receive (info)
|
|||
/* Set up the bpf filter program structure. */
|
||||
p.bf_len = dhcp_bpf_filter_len;
|
||||
|
||||
#ifdef DEC_FDDI
|
||||
#if defined(DEC_FDDI) || defined(NETBSD_FDDI)
|
||||
/* See if this is an FDDI interface, flag it for later. */
|
||||
if (ioctl(info -> rfdesc, BIOCGDLT, &link_layer) >= 0 &&
|
||||
link_layer == DLT_FDDI) {
|
||||
|
@ -314,7 +319,7 @@ void if_register_receive (info)
|
|||
}
|
||||
p.bf_insns = bpf_fddi_filter;
|
||||
} else
|
||||
#endif /* DEC_FDDI */
|
||||
#endif /* DEC_FDDI || NETBSD_FDDI */
|
||||
p.bf_insns = dhcp_bpf_filter;
|
||||
|
||||
/* Patch the server port into the BPF program...
|
||||
|
@ -368,7 +373,6 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
|
|||
double ip [32];
|
||||
struct iovec iov [3];
|
||||
int result;
|
||||
int fudge;
|
||||
|
||||
if (!strcmp (interface -> name, "fallback"))
|
||||
return send_fallback (interface, packet, raw,
|
||||
|
@ -407,6 +411,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|||
int length = 0;
|
||||
int offset = 0;
|
||||
struct bpf_hdr hdr;
|
||||
unsigned paylen;
|
||||
|
||||
/* All this complexity is because BPF doesn't guarantee
|
||||
that only one packet will be returned at a time. We're
|
||||
|
@ -446,6 +451,10 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Adjust for any padding BPF inserted between the packets. */
|
||||
interface -> rbuf_offset =
|
||||
BPF_WORDALIGN (interface -> rbuf_offset);
|
||||
|
||||
/* Copy out a bpf header... */
|
||||
memcpy (&hdr, &interface -> rbuf [interface -> rbuf_offset],
|
||||
sizeof hdr);
|
||||
|
@ -494,8 +503,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|||
interface -> rbuf,
|
||||
interface -> rbuf_offset,
|
||||
from,
|
||||
(unsigned char *)0,
|
||||
hdr.bh_caplen);
|
||||
hdr.bh_caplen, &paylen);
|
||||
|
||||
/* If the IP or UDP checksum was bad, skip the packet... */
|
||||
if (offset < 0) {
|
||||
|
@ -519,11 +527,11 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|||
|
||||
/* Copy out the data in the packet... */
|
||||
memcpy (buf, interface -> rbuf + interface -> rbuf_offset,
|
||||
hdr.bh_caplen);
|
||||
paylen);
|
||||
interface -> rbuf_offset =
|
||||
BPF_WORDALIGN (interface -> rbuf_offset +
|
||||
hdr.bh_caplen);
|
||||
return hdr.bh_caplen;
|
||||
return paylen;
|
||||
} while (!length);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
OMAPI object interfaces for the DHCP server. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1999-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -50,7 +41,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: comapi.c,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $ Copyright (c) 1999-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: comapi.c,v 1.1.1.4 2005/08/11 16:54:24 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -152,7 +143,6 @@ isc_result_t dhcp_group_set_value (omapi_object_t *h,
|
|||
{
|
||||
struct group_object *group;
|
||||
isc_result_t status;
|
||||
int foo;
|
||||
|
||||
if (h -> type != dhcp_type_group)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -226,7 +216,6 @@ isc_result_t dhcp_group_get_value (omapi_object_t *h, omapi_object_t *id,
|
|||
{
|
||||
struct group_object *group;
|
||||
isc_result_t status;
|
||||
struct data_string ip_addrs;
|
||||
|
||||
if (h -> type != dhcp_type_group)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -249,7 +238,6 @@ isc_result_t dhcp_group_get_value (omapi_object_t *h, omapi_object_t *id,
|
|||
isc_result_t dhcp_group_destroy (omapi_object_t *h, const char *file, int line)
|
||||
{
|
||||
struct group_object *group, *t;
|
||||
isc_result_t status;
|
||||
|
||||
if (h -> type != dhcp_type_group)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -280,7 +268,7 @@ isc_result_t dhcp_group_destroy (omapi_object_t *h, const char *file, int line)
|
|||
isc_result_t dhcp_group_signal_handler (omapi_object_t *h,
|
||||
const char *name, va_list ap)
|
||||
{
|
||||
struct group_object *group, *t;
|
||||
struct group_object *group;
|
||||
isc_result_t status;
|
||||
int updatep = 0;
|
||||
|
||||
|
@ -333,6 +321,7 @@ isc_result_t dhcp_group_stuff_values (omapi_object_t *c,
|
|||
return ISC_R_INVALIDARG;
|
||||
group = (struct group_object *)h;
|
||||
|
||||
#if !defined (SMALL)
|
||||
/* Write out all the values. */
|
||||
if (group -> name) {
|
||||
status = omapi_connection_put_name (c, "name");
|
||||
|
@ -342,6 +331,7 @@ isc_result_t dhcp_group_stuff_values (omapi_object_t *c,
|
|||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Write out the inner object, if any. */
|
||||
if (h -> inner && h -> inner -> type -> stuff_values) {
|
||||
|
@ -462,7 +452,6 @@ isc_result_t dhcp_control_set_value (omapi_object_t *h,
|
|||
{
|
||||
dhcp_control_object_t *control;
|
||||
isc_result_t status;
|
||||
int foo;
|
||||
unsigned long newstate;
|
||||
|
||||
if (h -> type != dhcp_type_control)
|
||||
|
@ -497,7 +486,6 @@ isc_result_t dhcp_control_get_value (omapi_object_t *h, omapi_object_t *id,
|
|||
{
|
||||
dhcp_control_object_t *control;
|
||||
isc_result_t status;
|
||||
struct data_string ip_addrs;
|
||||
|
||||
if (h -> type != dhcp_type_control)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -520,8 +508,6 @@ isc_result_t dhcp_control_get_value (omapi_object_t *h, omapi_object_t *id,
|
|||
isc_result_t dhcp_control_destroy (omapi_object_t *h,
|
||||
const char *file, int line)
|
||||
{
|
||||
dhcp_control_object_t *control, *t;
|
||||
isc_result_t status;
|
||||
|
||||
if (h -> type != dhcp_type_control)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -533,9 +519,8 @@ isc_result_t dhcp_control_destroy (omapi_object_t *h,
|
|||
isc_result_t dhcp_control_signal_handler (omapi_object_t *h,
|
||||
const char *name, va_list ap)
|
||||
{
|
||||
dhcp_control_object_t *control, *t;
|
||||
dhcp_control_object_t *control;
|
||||
isc_result_t status;
|
||||
int updatep = 0;
|
||||
|
||||
if (h -> type != dhcp_type_control)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -562,6 +547,7 @@ isc_result_t dhcp_control_stuff_values (omapi_object_t *c,
|
|||
return ISC_R_INVALIDARG;
|
||||
control = (dhcp_control_object_t *)h;
|
||||
|
||||
#ifndef SMALL
|
||||
/* Write out all the values. */
|
||||
status = omapi_connection_put_name (c, "state");
|
||||
if (status != ISC_R_SUCCESS)
|
||||
|
@ -572,6 +558,7 @@ isc_result_t dhcp_control_stuff_values (omapi_object_t *c,
|
|||
status = omapi_connection_put_uint32 (c, control -> state);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
#endif
|
||||
|
||||
/* Write out the inner object, if any. */
|
||||
if (h -> inner && h -> inner -> type -> stuff_values) {
|
||||
|
@ -589,7 +576,6 @@ isc_result_t dhcp_control_lookup (omapi_object_t **lp,
|
|||
{
|
||||
omapi_value_t *tv = (omapi_value_t *)0;
|
||||
isc_result_t status;
|
||||
dhcp_control_object_t *control;
|
||||
|
||||
/* First see if we were sent a handle. */
|
||||
if (ref) {
|
||||
|
@ -638,7 +624,6 @@ isc_result_t dhcp_subnet_set_value (omapi_object_t *h,
|
|||
{
|
||||
struct subnet *subnet;
|
||||
isc_result_t status;
|
||||
int foo;
|
||||
|
||||
if (h -> type != dhcp_type_subnet)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -684,7 +669,6 @@ isc_result_t dhcp_subnet_get_value (omapi_object_t *h, omapi_object_t *id,
|
|||
isc_result_t dhcp_subnet_destroy (omapi_object_t *h, const char *file, int line)
|
||||
{
|
||||
struct subnet *subnet;
|
||||
isc_result_t status;
|
||||
|
||||
if (h -> type != dhcp_type_subnet)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -761,9 +745,6 @@ isc_result_t dhcp_subnet_lookup (omapi_object_t **lp,
|
|||
omapi_object_t *id,
|
||||
omapi_object_t *ref)
|
||||
{
|
||||
omapi_value_t *tv = (omapi_value_t *)0;
|
||||
isc_result_t status;
|
||||
struct subnet *subnet;
|
||||
|
||||
/* Can't look up subnets yet. */
|
||||
|
||||
|
@ -793,7 +774,6 @@ isc_result_t dhcp_shared_network_set_value (omapi_object_t *h,
|
|||
{
|
||||
struct shared_network *shared_network;
|
||||
isc_result_t status;
|
||||
int foo;
|
||||
|
||||
if (h -> type != dhcp_type_shared_network)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -841,7 +821,6 @@ isc_result_t dhcp_shared_network_destroy (omapi_object_t *h,
|
|||
const char *file, int line)
|
||||
{
|
||||
struct shared_network *shared_network;
|
||||
isc_result_t status;
|
||||
|
||||
if (h -> type != dhcp_type_shared_network)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -931,9 +910,6 @@ isc_result_t dhcp_shared_network_lookup (omapi_object_t **lp,
|
|||
omapi_object_t *id,
|
||||
omapi_object_t *ref)
|
||||
{
|
||||
omapi_value_t *tv = (omapi_value_t *)0;
|
||||
isc_result_t status;
|
||||
struct shared_network *shared_network;
|
||||
|
||||
/* Can't look up shared_networks yet. */
|
||||
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Lexical scanner for dhcpd config file... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: conflex.c,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: conflex.c,v 1.1.1.4 2005/08/11 16:54:24 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -312,9 +303,12 @@ static enum dhcp_token read_string (cfile)
|
|||
int i;
|
||||
int bs = 0;
|
||||
int c;
|
||||
int value;
|
||||
int hex;
|
||||
int value = 0;
|
||||
int hex = 0;
|
||||
|
||||
value = 0; /* XXXGCC -Wuninitialized */
|
||||
hex = 0; /* XXXGCC -Wuninitialized */
|
||||
|
||||
for (i = 0; i < sizeof cfile -> tokbuf; i++) {
|
||||
again:
|
||||
c = get_char (cfile);
|
||||
|
@ -419,22 +413,62 @@ static enum dhcp_token read_number (c, cfile)
|
|||
int c;
|
||||
struct parse *cfile;
|
||||
{
|
||||
#ifdef OLD_LEXER
|
||||
int seenx = 0;
|
||||
#endif
|
||||
int i = 0;
|
||||
int token = NUMBER;
|
||||
|
||||
cfile -> tokbuf [i++] = c;
|
||||
for (; i < sizeof cfile -> tokbuf; i++) {
|
||||
c = get_char (cfile);
|
||||
if (!seenx && c == 'x') {
|
||||
seenx = 1;
|
||||
|
||||
#ifndef OLD_LEXER
|
||||
} else if (isascii (c) && !isxdigit (c) &&
|
||||
(c == '-' || c == '_' || isalpha (c))) {
|
||||
token = NAME;
|
||||
} else if (isascii (c) && !isdigit (c) && isxdigit (c)) {
|
||||
token = NUMBER_OR_NAME;
|
||||
#endif
|
||||
/* Promote NUMBER -> NUMBER_OR_NAME -> NAME, never demote.
|
||||
* Except in the case of '0x' syntax hex, which gets called
|
||||
* a NAME at '0x', and returned to NUMBER_OR_NAME once it's
|
||||
* verified to be at least 0xf or less.
|
||||
*/
|
||||
switch(isascii(c) ? token : BREAK) {
|
||||
case NUMBER:
|
||||
if(isdigit(c))
|
||||
break;
|
||||
/* FALLTHROUGH */
|
||||
case NUMBER_OR_NAME:
|
||||
if(isxdigit(c)) {
|
||||
token = NUMBER_OR_NAME;
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case NAME:
|
||||
if((i == 2) && isxdigit(c) &&
|
||||
(cfile->tokbuf[0] == '0') &&
|
||||
((cfile->tokbuf[1] == 'x') ||
|
||||
(cfile->tokbuf[1] == 'X'))) {
|
||||
token = NUMBER_OR_NAME;
|
||||
break;
|
||||
} else if(((c == '-') || (c == '_') || isalnum(c))) {
|
||||
token = NAME;
|
||||
break;
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case BREAK:
|
||||
/* At this point c is either EOF or part of the next
|
||||
* token. If not EOF, rewind the file one byte so
|
||||
* the next token is read from there.
|
||||
*/
|
||||
if(c != EOF) {
|
||||
cfile->bufix--;
|
||||
cfile->ugflag = 1;
|
||||
}
|
||||
goto end_read;
|
||||
|
||||
default:
|
||||
log_fatal("read_number():%s:%d: impossible case", MDL);
|
||||
}
|
||||
#else /* OLD_LEXER */
|
||||
if (!seenx && (c == 'x') {
|
||||
seenx = 1;
|
||||
} else if (!isascii (c) || !isxdigit (c)) {
|
||||
if (c != EOF) {
|
||||
cfile -> bufix--;
|
||||
|
@ -442,16 +476,22 @@ static enum dhcp_token read_number (c, cfile)
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif /* OLD_LEXER */
|
||||
|
||||
cfile -> tokbuf [i] = c;
|
||||
}
|
||||
|
||||
if (i == sizeof cfile -> tokbuf) {
|
||||
parse_warn (cfile,
|
||||
"numeric token larger than internal buffer");
|
||||
--i;
|
||||
}
|
||||
|
||||
end_read:
|
||||
cfile -> tokbuf [i] = 0;
|
||||
cfile -> tlen = i;
|
||||
cfile -> tval = cfile -> tokbuf;
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
|
@ -493,7 +533,7 @@ static enum dhcp_token intern (atom, dfv)
|
|||
if (!isascii (atom [0]))
|
||||
return dfv;
|
||||
|
||||
switch (tolower (atom [0])) {
|
||||
switch (tolower ((unsigned char)atom [0])) {
|
||||
case '-':
|
||||
if (atom [1] == 0)
|
||||
return MINUS;
|
||||
|
@ -654,7 +694,7 @@ static enum dhcp_token intern (atom, dfv)
|
|||
}
|
||||
break;
|
||||
case 'e':
|
||||
if (isascii (atom [1]) && tolower (atom [1]) == 'x') {
|
||||
if (tolower ((unsigned char)atom [1]) == 'x') {
|
||||
if (!strcasecmp (atom + 2, "tract-int"))
|
||||
return EXTRACT_INT;
|
||||
if (!strcasecmp (atom + 2, "ists"))
|
||||
|
@ -751,8 +791,13 @@ static enum dhcp_token intern (atom, dfv)
|
|||
return IGNORE;
|
||||
break;
|
||||
case 'k':
|
||||
if (!strcasecmp (atom + 1, "nown"))
|
||||
return KNOWN;
|
||||
if (!strncasecmp (atom + 1, "nown", 4)) {
|
||||
if (!strcasecmp (atom + 5, "-clients"))
|
||||
return KNOWN_CLIENTS;
|
||||
if (!atom[5])
|
||||
return KNOWN;
|
||||
break;
|
||||
}
|
||||
if (!strcasecmp (atom + 1, "ey"))
|
||||
return KEY;
|
||||
break;
|
||||
|
|
|
@ -3,42 +3,38 @@
|
|||
Subroutines that support dhcp tracing... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 2001-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon, as part of a project for Nominum, Inc. To learn more
|
||||
* about the Internet Software Consortium, see http://www.isc.org/. To
|
||||
* about Internet Systems Consortium, see http://www.isc.org/. To
|
||||
* learn more about Nominum, Inc., see ``http://www.nominum.com''.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: ctrace.c,v 1.1.1.3 2005/08/11 16:54:25 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
||||
#if defined (TRACING)
|
||||
|
@ -155,6 +151,7 @@ void trace_inpacket_stash (struct interface_info *interface,
|
|||
return;
|
||||
tip.from_port = from_port;
|
||||
tip.from = from;
|
||||
tip.from.len = htonl (tip.from.len);
|
||||
if (hfrom) {
|
||||
tip.hfrom = *hfrom;
|
||||
tip.havehfrom = 1;
|
||||
|
@ -182,6 +179,7 @@ void trace_inpacket_input (trace_type_t *ttype, unsigned len, char *buf)
|
|||
}
|
||||
tip = (trace_inpacket_t *)buf;
|
||||
index = ntohl (tip -> index);
|
||||
tip -> from.len = ntohl (tip -> from.len);
|
||||
|
||||
if (index > interface_count ||
|
||||
index < 0 ||
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
.\" dhcp-eval.5
|
||||
.\" $Id: dhcp-eval.5,v 1.1.1.4 2005/08/11 16:54:25 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
.\" To learn more about the Internet Software Consortium, see
|
||||
.\" To learn more about Internet Systems Consortium, see
|
||||
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
.\" ``http://www.nominum.com''.
|
||||
|
@ -38,7 +31,7 @@
|
|||
.SH NAME
|
||||
dhcp-eval - ISC DHCP conditional evaluation
|
||||
.SH DESCRIPTION
|
||||
The Internet Software Consortium DHCP client and server both provide
|
||||
The Internet Systems Consortium DHCP client and server both provide
|
||||
the ability to perform conditional behavior depending on the contents
|
||||
of packets they receive. The syntax for specifying this conditional
|
||||
behaviour is documented here.
|
||||
|
@ -194,7 +187,7 @@ bytes. \fIOffset\fR and \fIlength\fR are both numeric expressions.
|
|||
If \fIdata-expr\fR, \fIoffset\fR or \fIlength\fR evaluate to null,
|
||||
then the result is also null. If \fIoffset\fR is greater than or
|
||||
equal to the length of the evaluated data, then a zero-length data
|
||||
string is returned. If \fIlength\fI is greater then the remaining
|
||||
string is returned. If \fIlength\fR is greater than the remaining
|
||||
length of the evaluated data after \fIoffset\fR, then a data string
|
||||
containing all data from \fIoffset\fR to the end of the evaluated data
|
||||
is returned.
|
||||
|
@ -253,12 +246,12 @@ contents packet as in the \fBsubstring\fR operator.
|
|||
.RS 0.25i
|
||||
A string, enclosed in quotes, may be specified as a data expression,
|
||||
and returns the text between the quotes, encoded in ASCII. The
|
||||
backslash ('\\') character is treated specially, as in C programming:
|
||||
'\\t' means TAB, '\\r' means carriage return, '\\n' means newline, and
|
||||
'\\b' means bell. Any octal value can be specified with '\\nnn',
|
||||
where nnn is any positive octal number less than 0400. Any
|
||||
hexadecimal value can be specified with '\xnn', where nn is any
|
||||
positive hexadecimal number less than 0xff.
|
||||
backslash ('\e') character is treated specially, as in C programming: '\et'
|
||||
means TAB, '\er' means carriage return, '\\n' means newline, and '\eb' means
|
||||
bell. Any octal value can be specified with '\ennn', where nnn is any
|
||||
positive octal number less than 0400. Any hexadecimal value can be
|
||||
specified with '\exnn', where nn is any positive hexadecimal number less
|
||||
than or equal to 0xff.
|
||||
.RE
|
||||
.PP
|
||||
.I colon-separated hexadecimal list
|
||||
|
@ -324,6 +317,7 @@ Numeric-expr is evaluated and encoded as a data string of the
|
|||
specified width, in network byte order (most significant byte first).
|
||||
If the numeric expression evaluates to the null value, the result is
|
||||
also null.
|
||||
.RE
|
||||
.PP
|
||||
.B pick-first-value (\fIdata-expr1\fR [ ... \fIexpr\fRn ] \fB)\fR
|
||||
.RS 0.25i
|
||||
|
@ -453,7 +447,7 @@ right hand side of the RR and the ttl that should be applied to the
|
|||
record. The simplest example of the use of the function can be found
|
||||
in the reference section of the dhcpd.conf file, where events are
|
||||
described. In this example several statements are being used to make
|
||||
the arguments to the \fBdns-update\f\R.
|
||||
the arguments to the \fBdns-update\fR.
|
||||
.PP
|
||||
In the example, the first argument to the first \f\Bdns-update\fR
|
||||
expression is a data expression that evaluates to the A RR type. The
|
||||
|
@ -477,8 +471,8 @@ of the client to which the address is being leased.
|
|||
dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcp-eval(5), dhcpd(8),
|
||||
dhclient(8), RFC2132, RFC2131.
|
||||
.SH AUTHOR
|
||||
The Internet Software Consortium DHCP Distribution was written by Ted
|
||||
The Internet Systems Consortium DHCP Distribution was written by Ted
|
||||
Lemon under a contract with Vixie Labs. Funding for
|
||||
this project was provided through the Internet Software Consortium.
|
||||
Information about the Internet Software Consortium can be found at
|
||||
this project was provided through Internet Systems Consortium.
|
||||
Information about Internet Systems Consortium can be found at
|
||||
.B http://www.isc.org.
|
||||
|
|
|
@ -1,42 +1,32 @@
|
|||
.\" dhcp-options.5
|
||||
.\" $Id: dhcp-options.5,v 1.1.1.4 2005/08/11 16:54:26 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
.\" To learn more about the Internet Software Consortium, see
|
||||
.\" To learn more about Internet Systems Consortium, see
|
||||
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
.\" ``http://www.nominum.com''.
|
||||
.\"
|
||||
.\" $Id: dhcp-options.5,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $
|
||||
.\"
|
||||
.TH dhcpd-options 5
|
||||
.SH NAME
|
||||
dhcp-options - Dynamic Host Configuration Protocol options
|
||||
|
@ -221,7 +211,7 @@ sending TCP segments. The minimum value is 1.
|
|||
.B option \fBdhcp-client-identifier\fR \fIstring\fR\fB;\fR
|
||||
.RS 0.25i
|
||||
.PP
|
||||
This option can be used to specify the a DHCP client identifier in a
|
||||
This option can be used to specify a DHCP client identifier in a
|
||||
host declaration, so that dhcpd can find the host record by matching
|
||||
against the client identifier.
|
||||
.PP
|
||||
|
@ -411,8 +401,8 @@ RFC2132.
|
|||
\fIip-address\fR... ]\fB;\fR
|
||||
.RS 0.25i
|
||||
.PP
|
||||
The Finger server option specifies a list of Finger available to the
|
||||
client. Servers should be listed in order of preference.
|
||||
The Finger server option specifies a list of Finger servers available
|
||||
to the client. Servers should be listed in order of preference.
|
||||
.RE
|
||||
.PP
|
||||
.B option \fBfont-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
|
||||
|
@ -481,8 +471,8 @@ forwarding, and a value of true means enable IP forwarding.
|
|||
\fIip-address\fR... ]\fB;\fR
|
||||
.RS 0.25i
|
||||
.PP
|
||||
The IRC server option specifies a list of IRC available to the
|
||||
client. Servers should be listed in order of preference.
|
||||
The IRC server option specifies a list of IRC servers available
|
||||
to the client. Servers should be listed in order of preference.
|
||||
.RE
|
||||
.PP
|
||||
.B option \fBlog-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
|
||||
|
@ -589,7 +579,7 @@ Possible node types are:
|
|||
B-node: Broadcast - no WINS
|
||||
.TP
|
||||
.I 2
|
||||
P-node: Peer - WINS only.
|
||||
P-node: Peer - WINS only
|
||||
.TP
|
||||
.I 4
|
||||
M-node: Mixed - broadcast, then WINS
|
||||
|
@ -644,8 +634,8 @@ preference.
|
|||
\fIip-address\fR... ]\fB;\fR
|
||||
.RS 0.25i
|
||||
.PP
|
||||
The NNTP server option specifies a list of NNTP available to the
|
||||
client. Servers should be listed in order of preference.
|
||||
The NNTP server option specifies a list of NNTP servesr available
|
||||
to the client. Servers should be listed in order of preference.
|
||||
.RE
|
||||
.PP
|
||||
.B option \fBnon-local-source-routing\fR \fIflag\fR\fB;\fR
|
||||
|
@ -729,8 +719,8 @@ See STD 3 (RFC1122) for further information.
|
|||
.B option \fBpop-server\fR \fIip-address\fR [\fB,\fR \fIip-address\fR... ]\fB;\fR
|
||||
.RS 0.25i
|
||||
.PP
|
||||
The POP3 server option specifies a list of POP3 available to the
|
||||
client. Servers should be listed in order of preference.
|
||||
The POP3 server option specifies a list of POP3 servers available
|
||||
to the client. Servers should be listed in order of preference.
|
||||
.RE
|
||||
.PP
|
||||
.B option \fBresource-location-servers\fR \fIip-address\fR
|
||||
|
@ -901,8 +891,8 @@ This specifies the IP address of the client's swap server.
|
|||
.B option \fBtcp-keepalive-garbage\fR \fIflag\fR\fB;\fR
|
||||
.RS 0.25i
|
||||
.PP
|
||||
This option specifies the whether or not the client should send TCP
|
||||
keepalive messages with a octet of garbage for compatibility with
|
||||
This option specifies whether or not the client should send TCP
|
||||
keepalive messages with an octet of garbage for compatibility with
|
||||
older implementations. A value of false indicates that a garbage octet
|
||||
should not be sent. A value of true indicates that a garbage octet
|
||||
should be sent.
|
||||
|
@ -982,12 +972,12 @@ this identifier, usually as a text string.
|
|||
This option is used by some DHCP clients to identify the vendor
|
||||
type and possibly the configuration of a DHCP client. The information
|
||||
is a string of bytes whose contents are specific to the vendor and are
|
||||
not specified in a standard. To see what vendor class identifier a
|
||||
not specified in a standard. To see what vendor class identifier
|
||||
clients are sending, you can write the following in your DHCP server
|
||||
configuration file:
|
||||
.nf
|
||||
.PP
|
||||
set vendor-class option vendor-class-identifier;
|
||||
set vendor-string = option vendor-class-identifier;
|
||||
.fi
|
||||
.PP
|
||||
This will result in all entries in the DHCP server lease database file
|
||||
|
@ -995,14 +985,14 @@ for clients that sent vendor-class-identifier options having a set
|
|||
statement that looks something like this:
|
||||
.nf
|
||||
.PP
|
||||
set vendor-class "SUNW.Ultra-5_10";
|
||||
set vendor-string = "SUNW.Ultra-5_10";
|
||||
.fi
|
||||
.PP
|
||||
The vendor-class-identifier option is normally used by the DHCP server
|
||||
to determine the options that are returned in the
|
||||
.B vendor-encapsulated-options
|
||||
option. Please see the VENDOR ENCAPSULATED OPTIONS section of the
|
||||
dhcpd.conf manual page for further information.
|
||||
option. Please see the VENDOR ENCAPSULATED OPTIONS section later in this
|
||||
manual page for further information.
|
||||
.RE
|
||||
.PP
|
||||
.B option \fBvendor-encapsulated-options\fR \fIstring\fR\fB;\fR
|
||||
|
@ -1019,16 +1009,15 @@ that basis.
|
|||
Some default behaviours for well-known DHCP client vendors (currently,
|
||||
the Microsoft Windows 2000 DHCP client) are configured automatically,
|
||||
but otherwise this must be configured manually - see the VENDOR
|
||||
ENCAPSULATED OPTIONS section of the \fIdhcpd.conf\fI manual page for
|
||||
details.
|
||||
ENCAPSULATED OPTIONS section later in this manual page for details.
|
||||
.RE
|
||||
.PP
|
||||
.B option \fBwww-server\fR \fIip-address\fR [\fB,\fR
|
||||
\fIip-address\fR... ]\fB;\fR
|
||||
.RS 0.25i
|
||||
.PP
|
||||
The WWW server option specifies a list of WWW available to the
|
||||
client. Servers should be listed in order of preference.
|
||||
The WWW server option specifies a list of WWW servers available
|
||||
to the client. Servers should be listed in order of preference.
|
||||
.RE
|
||||
.PP
|
||||
.B option \fBx-display-manager\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
|
||||
|
@ -1223,7 +1212,7 @@ utility uses this value as Primary DSS server when configuring a
|
|||
secondary DSS server.
|
||||
.RE
|
||||
.SH DEFINING NEW OPTIONS
|
||||
The Internet Software Consortium DHCP client and server provide the
|
||||
The Internet Systems Consortium DHCP client and server provide the
|
||||
capability to define new options. Each DHCP option has a name, a
|
||||
code, and a structure. The name is used by you to refer to the
|
||||
option. The code is a number, used by the DHCP server and client to
|
||||
|
@ -1519,8 +1508,8 @@ option.
|
|||
dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcp-eval(5), dhcpd(8),
|
||||
dhclient(8), RFC2132, RFC2131, draft-ietf-dhc-agent-options-??.txt.
|
||||
.SH AUTHOR
|
||||
The Internet Software Consortium DHCP Distribution was written by Ted
|
||||
The Internet Systems Consortium DHCP Distribution was written by Ted
|
||||
Lemon under a contract with Vixie Labs. Funding for
|
||||
this project was provided through the Internet Software Consortium.
|
||||
Information about the Internet Software Consortium can be found at
|
||||
this project was provided through Internet Systems Consortium.
|
||||
Information about Internet Systems Consortium can be found at
|
||||
.B http://www.isc.org.
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Network input dispatcher... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: discover.c,v 1.1.1.3 2003/02/18 16:37:55 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: discover.c,v 1.1.1.4 2005/08/11 16:54:26 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -84,6 +75,16 @@ isc_result_t interface_setup ()
|
|||
isc_result_t status;
|
||||
status = omapi_object_type_register (&dhcp_type_interface,
|
||||
"interface",
|
||||
#ifdef SMALL
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
#else
|
||||
dhcp_interface_set_value,
|
||||
dhcp_interface_get_value,
|
||||
dhcp_interface_destroy,
|
||||
|
@ -92,6 +93,7 @@ isc_result_t interface_setup ()
|
|||
dhcp_interface_lookup,
|
||||
dhcp_interface_create,
|
||||
dhcp_interface_remove,
|
||||
#endif
|
||||
0, 0, 0,
|
||||
sizeof (struct interface_info),
|
||||
interface_initialize, RC_MISC);
|
||||
|
@ -133,16 +135,14 @@ isc_result_t interface_initialize (omapi_object_t *ipo,
|
|||
void discover_interfaces (state)
|
||||
int state;
|
||||
{
|
||||
struct interface_info *tmp, *ip;
|
||||
struct interface_info *tmp;
|
||||
struct interface_info *last, *next;
|
||||
char buf [2048];
|
||||
struct ifconf ic;
|
||||
struct ifreq ifr;
|
||||
int i;
|
||||
int sock;
|
||||
int address_count = 0;
|
||||
struct subnet *subnet;
|
||||
struct shared_network *share;
|
||||
struct sockaddr_in foo;
|
||||
int ir;
|
||||
struct ifreq *tif;
|
||||
|
@ -258,10 +258,12 @@ void discover_interfaces (state)
|
|||
if (!strcmp (tmp -> name, ifp -> ifr_name))
|
||||
break;
|
||||
|
||||
/* Skip loopback, point-to-point and down interfaces,
|
||||
except don't skip down interfaces if we're trying to
|
||||
get a list of configurable interfaces. */
|
||||
if (((ifr.ifr_flags & IFF_LOOPBACK ||
|
||||
/* Skip non broadcast interfaces (plus loopback and
|
||||
point-to-point in case an OS incorrectly marks them
|
||||
as broadcast). Also skip down interfaces unless we're
|
||||
trying to get a list of configurable interfaces. */
|
||||
if (((!(ifr.ifr_flags & IFF_BROADCAST) ||
|
||||
ifr.ifr_flags & IFF_LOOPBACK ||
|
||||
ifr.ifr_flags & IFF_POINTOPOINT) && !tmp) ||
|
||||
(!(ifr.ifr_flags & IFF_UP) &&
|
||||
state != DISCOVER_UNCONFIGURED))
|
||||
|
@ -296,7 +298,15 @@ void discover_interfaces (state)
|
|||
#else
|
||||
tmp -> hw_address.hlen = 6; /* XXX!!! */
|
||||
#endif
|
||||
tmp -> hw_address.hbuf [0] = HTYPE_ETHER; /* XXX */
|
||||
if (foo -> sdl_type == IFT_ETHER) {
|
||||
tmp -> hw_address.hbuf [0] = HTYPE_ETHER;
|
||||
#if defined (DEC_FDDI) || defined(NETBSD_FDDI)
|
||||
} else if (foo -> sdl_type == IFT_FDDI) {
|
||||
tmp -> hw_address.hbuf [0] = HTYPE_FDDI;
|
||||
#endif
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
memcpy (&tmp -> hw_address.hbuf [1],
|
||||
LLADDR (foo), tmp -> hw_address.hlen);
|
||||
tmp -> hw_address.hlen++; /* for type. */
|
||||
|
@ -305,10 +315,11 @@ void discover_interfaces (state)
|
|||
|
||||
if (ifp -> ifr_addr.sa_family == AF_INET) {
|
||||
struct iaddr addr;
|
||||
void *ptr;
|
||||
|
||||
/* Get a pointer to the address... */
|
||||
memcpy (&foo, &ifp -> ifr_addr,
|
||||
sizeof ifp -> ifr_addr);
|
||||
ptr = &ifp -> ifr_addr;
|
||||
memcpy (&foo, ptr, sizeof ifp -> ifr_addr);
|
||||
|
||||
/* We don't want the loopback interface. */
|
||||
if (foo.sin_addr.s_addr == htonl (INADDR_LOOPBACK) &&
|
||||
|
@ -399,6 +410,18 @@ void discover_interfaces (state)
|
|||
if (tmp)
|
||||
continue;
|
||||
|
||||
strncpy (ifr.ifr_name, name, IFNAMSIZ);
|
||||
|
||||
/* Skip non broadcast interfaces (plus loopback and
|
||||
* point-to-point in case an OS incorrectly marks them
|
||||
* as broadcast).
|
||||
*/
|
||||
if ((ioctl (sock, SIOCGIFFLAGS, &ifr) < 0) ||
|
||||
(!(ifr.ifr_flags & IFF_BROADCAST)) ||
|
||||
(ifr.ifr_flags & IFF_LOOPBACK ) ||
|
||||
(ifr.ifr_flags & IFF_POINTOPOINT))
|
||||
continue;
|
||||
|
||||
/* Otherwise, allocate one. */
|
||||
tmp = (struct interface_info *)0;
|
||||
status = interface_allocate (&tmp, MDL);
|
||||
|
@ -768,14 +791,6 @@ isc_result_t got_one (h)
|
|||
if (result == 0)
|
||||
return ISC_R_UNEXPECTED;
|
||||
|
||||
/* If we didn't at least get the fixed portion of the BOOTP
|
||||
packet, drop the packet. We're allowing packets with no
|
||||
sname or filename, because we're aware of at least one
|
||||
client that sends such packets, but this definitely falls
|
||||
into the category of being forgiving. */
|
||||
if (result < DHCP_FIXED_NON_UDP - DHCP_SNAME_LEN - DHCP_FILE_LEN)
|
||||
return ISC_R_UNEXPECTED;
|
||||
|
||||
if (bootp_packet_handler) {
|
||||
ifrom.len = 4;
|
||||
memcpy (ifrom.iabuf, &from.sin_addr, ifrom.len);
|
||||
|
@ -791,6 +806,7 @@ isc_result_t got_one (h)
|
|||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
#if !defined (SMALL)
|
||||
isc_result_t dhcp_interface_set_value (omapi_object_t *h,
|
||||
omapi_object_t *id,
|
||||
omapi_data_string_t *name,
|
||||
|
@ -798,7 +814,6 @@ isc_result_t dhcp_interface_set_value (omapi_object_t *h,
|
|||
{
|
||||
struct interface_info *interface;
|
||||
isc_result_t status;
|
||||
int foo;
|
||||
|
||||
if (h -> type != dhcp_type_interface)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -841,7 +856,6 @@ isc_result_t dhcp_interface_destroy (omapi_object_t *h,
|
|||
const char *file, int line)
|
||||
{
|
||||
struct interface_info *interface;
|
||||
isc_result_t status;
|
||||
|
||||
if (h -> type != dhcp_type_interface)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
@ -871,8 +885,6 @@ isc_result_t dhcp_interface_signal_handler (omapi_object_t *h,
|
|||
const char *name, va_list ap)
|
||||
{
|
||||
struct interface_info *ip, *interface;
|
||||
struct client_config *config;
|
||||
struct client_state *client;
|
||||
isc_result_t status;
|
||||
|
||||
if (h -> type != dhcp_type_interface)
|
||||
|
@ -1038,6 +1050,7 @@ isc_result_t dhcp_interface_create (omapi_object_t **lp,
|
|||
interface_dereference (&hp, MDL);
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
isc_result_t dhcp_interface_remove (omapi_object_t *lp,
|
||||
omapi_object_t *id)
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Network input dispatcher... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: dispatch.c,v 1.1.1.2 2003/02/18 16:37:55 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dispatch.c,v 1.1.1.3 2005/08/11 16:54:26 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Data Link Provider Interface (DLPI) network interface code. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software was written for the Internet Software Consortium
|
||||
* This software was written for Internet Systems Consortium
|
||||
* by Eric James Negaard, <lmdejn@lmd.ericsson.se>. To learn more about
|
||||
* the Internet Software Consortium, see ``http://www.isc.org''.
|
||||
* Internet Systems Consortium, see ``http://www.isc.org''.
|
||||
*
|
||||
* Joost Mulders has also done considerable work in debugging the DLPI API
|
||||
* support on Solaris and getting this code to work properly on a variety
|
||||
|
@ -88,7 +79,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: dlpi.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dlpi.c,v 1.1.1.3 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -688,7 +679,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|||
length -= offset;
|
||||
#endif
|
||||
offset = decode_udp_ip_header (interface, dbuf, bufix,
|
||||
from, (unsigned char *)0, length);
|
||||
from, length);
|
||||
|
||||
/* If the IP or UDP checksum was bad, skip the packet... */
|
||||
if (offset < 0) {
|
||||
|
|
|
@ -3,46 +3,37 @@
|
|||
Domain Name Service subroutines. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 2001-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: dns.c,v 1.1.1.3 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 2001-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: dns.c,v 1.1.1.4 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -136,7 +127,6 @@ dns_zone_hash_t *dns_zone_hash;
|
|||
isc_result_t find_tsig_key (ns_tsig_key **key, const char *zname,
|
||||
struct dns_zone *zone)
|
||||
{
|
||||
isc_result_t status;
|
||||
ns_tsig_key *tkey;
|
||||
|
||||
if (!zone)
|
||||
|
@ -210,7 +200,6 @@ isc_result_t enter_dns_zone (struct dns_zone *zone)
|
|||
|
||||
isc_result_t dns_zone_lookup (struct dns_zone **zone, const char *name)
|
||||
{
|
||||
struct dns_zone *tz = (struct dns_zone *)0;
|
||||
int len;
|
||||
char *tname = (char *)0;
|
||||
isc_result_t status;
|
||||
|
@ -219,6 +208,9 @@ isc_result_t dns_zone_lookup (struct dns_zone **zone, const char *name)
|
|||
return ISC_R_NOTFOUND;
|
||||
|
||||
len = strlen (name);
|
||||
if (len == 0)
|
||||
return ISC_R_NOTFOUND;
|
||||
|
||||
if (name [len - 1] != '.') {
|
||||
tname = dmalloc ((unsigned)len + 2, MDL);
|
||||
if (!tname)
|
||||
|
@ -243,7 +235,6 @@ int dns_zone_dereference (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
int i;
|
||||
struct dns_zone *dns_zone;
|
||||
|
||||
if (!ptr || !*ptr) {
|
||||
|
@ -276,8 +267,10 @@ int dns_zone_dereference (ptr, file, line)
|
|||
|
||||
if (dns_zone -> name)
|
||||
dfree (dns_zone -> name, file, line);
|
||||
#if !defined (SMALL)
|
||||
if (dns_zone -> key)
|
||||
omapi_auth_key_dereference (&dns_zone -> key, file, line);
|
||||
#endif
|
||||
if (dns_zone -> primary)
|
||||
option_cache_dereference (&dns_zone -> primary, file, line);
|
||||
if (dns_zone -> secondary)
|
||||
|
@ -406,9 +399,7 @@ void repudiate_zone (struct dns_zone **zone)
|
|||
void cache_found_zone (ns_class class,
|
||||
char *zname, struct in_addr *addrs, int naddrs)
|
||||
{
|
||||
isc_result_t status = ISC_R_NOTFOUND;
|
||||
struct dns_zone *zone = (struct dns_zone *)0;
|
||||
struct data_string nsaddrs;
|
||||
int ix = strlen (zname);
|
||||
|
||||
if (zname [ix - 1] == '.')
|
||||
|
@ -539,15 +530,11 @@ isc_result_t ddns_update_a (struct data_string *ddns_fwd_name,
|
|||
|
||||
if (ddns_addr.len != 4)
|
||||
return ISC_R_INVALIDARG;
|
||||
#ifndef NO_SNPRINTF
|
||||
snprintf (ddns_address, 16, "%d.%d.%d.%d",
|
||||
|
||||
/* %Audit% Cannot exceed 16 bytes. %2004.06.17,Safe% */
|
||||
sprintf (ddns_address, "%u.%u.%u.%u",
|
||||
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
|
||||
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
|
||||
#else
|
||||
sprintf (ddns_address, "%d.%d.%d.%d",
|
||||
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
|
||||
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* When a DHCP client or server intends to update an A RR, it first
|
||||
|
@ -793,16 +780,10 @@ isc_result_t ddns_remove_a (struct data_string *ddns_fwd_name,
|
|||
if (ddns_addr.len != 4)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
||||
#ifndef NO_SNPRINTF
|
||||
snprintf (ddns_address, 16, "%d.%d.%d.%d",
|
||||
/* %Audit% Cannot exceed 16 bytes. %2004.06.17,Safe% */
|
||||
sprintf (ddns_address, "%u.%u.%u.%u",
|
||||
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
|
||||
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
|
||||
#else
|
||||
sprintf (ddns_address, "%d.%d.%d.%d",
|
||||
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
|
||||
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The entity chosen to handle the A record for this client (either the
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Packet assembly code, originally contributed by Archie Cobbs. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: ethernet.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: ethernet.c,v 1.1.1.3 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Support for executable statements. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: execute.c,v 1.1.1.3 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1998-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: execute.c,v 1.1.1.4 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -63,8 +54,6 @@ int execute_statements (result, packet, lease, client_state,
|
|||
struct executable_statement *r, *e, *next;
|
||||
int rc;
|
||||
int status;
|
||||
unsigned long num;
|
||||
struct binding_scope *outer;
|
||||
struct binding *binding;
|
||||
struct data_string ds;
|
||||
struct binding_scope *ns;
|
||||
|
@ -292,7 +281,6 @@ int execute_statements (result, packet, lease, client_state,
|
|||
binding -> next = (*scope) -> bindings;
|
||||
(*scope) -> bindings = binding;
|
||||
} else {
|
||||
badalloc:
|
||||
dfree (binding, MDL);
|
||||
binding = (struct binding *)0;
|
||||
}
|
||||
|
@ -355,6 +343,7 @@ int execute_statements (result, packet, lease, client_state,
|
|||
log_debug ("exec: let %s", r -> data.let.name);
|
||||
#endif
|
||||
ns = (struct binding_scope *)0;
|
||||
binding = (struct binding *)0;
|
||||
binding_scope_allocate (&ns, MDL);
|
||||
e = r;
|
||||
|
||||
|
@ -379,7 +368,9 @@ int execute_statements (result, packet, lease, client_state,
|
|||
goto blb;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
binding = NULL;
|
||||
|
||||
if (ns && binding) {
|
||||
status = (evaluate_expression
|
||||
(&binding -> value, packet, lease,
|
||||
|
@ -429,19 +420,19 @@ int execute_statements (result, packet, lease, client_state,
|
|||
switch (r -> data.log.priority) {
|
||||
case log_priority_fatal:
|
||||
log_fatal ("%.*s", (int)ds.len,
|
||||
ds.buffer -> data);
|
||||
ds.data);
|
||||
break;
|
||||
case log_priority_error:
|
||||
log_error ("%.*s", (int)ds.len,
|
||||
ds.buffer -> data);
|
||||
ds.data);
|
||||
break;
|
||||
case log_priority_debug:
|
||||
log_debug ("%.*s", (int)ds.len,
|
||||
ds.buffer -> data);
|
||||
ds.data);
|
||||
break;
|
||||
case log_priority_info:
|
||||
log_info ("%.*s", (int)ds.len,
|
||||
ds.buffer -> data);
|
||||
ds.data);
|
||||
break;
|
||||
}
|
||||
data_string_forget (&ds, MDL);
|
||||
|
@ -533,7 +524,6 @@ int executable_statement_dereference (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
struct executable_statement *bp;
|
||||
|
||||
if (!ptr || !*ptr) {
|
||||
log_error ("%s(%d): null pointer", file, line);
|
||||
|
@ -657,14 +647,14 @@ void write_statements (file, statements, indent)
|
|||
int indent;
|
||||
{
|
||||
struct executable_statement *r, *x;
|
||||
int result;
|
||||
int status;
|
||||
const char *s, *t, *dot;
|
||||
int col;
|
||||
|
||||
if (!statements)
|
||||
return;
|
||||
|
||||
col = 0; /* XXXGCC -Wuninitialized */
|
||||
|
||||
for (r = statements; r; r = r -> next) {
|
||||
switch (r -> op) {
|
||||
case statements_statement:
|
||||
|
@ -859,7 +849,7 @@ void write_statements (file, statements, indent)
|
|||
case log_statement:
|
||||
indent_spaces (file, indent);
|
||||
fprintf (file, "log ");
|
||||
col = token_print_indent (file, col, indent + 4,
|
||||
col = token_print_indent (file, indent + 4, indent + 4,
|
||||
"", "", "(");
|
||||
switch (r -> data.log.priority) {
|
||||
case log_priority_fatal:
|
||||
|
@ -913,10 +903,8 @@ int find_matching_case (struct executable_statement **ep,
|
|||
{
|
||||
int status, sub;
|
||||
struct executable_statement *s;
|
||||
unsigned long foo;
|
||||
|
||||
if (is_data_expression (expr)) {
|
||||
struct executable_statement *e;
|
||||
struct data_string cd, ds;
|
||||
memset (&ds, 0, sizeof ds);
|
||||
memset (&cd, 0, sizeof cd);
|
||||
|
@ -990,7 +978,6 @@ int executable_statement_foreach (struct executable_statement *stmt,
|
|||
{
|
||||
struct executable_statement *foo;
|
||||
int ok = 0;
|
||||
int result;
|
||||
|
||||
for (foo = stmt; foo; foo = foo -> next) {
|
||||
if ((*callback) (foo, vp, condp) != 0)
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Packet assembly code, originally contributed by Archie Cobbs. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,14 +34,22 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: fddi.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: fddi.c,v 1.1.1.3 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
||||
#if defined (DEC_FDDI) || defined (NETBSD_FDDI)
|
||||
#if defined (DEC_FDDI)
|
||||
#include <netinet/if_fddi.h>
|
||||
#include <net/if_llc.h>
|
||||
#endif /* DEC_FDDI */
|
||||
|
||||
#if defined (NETBSD_FDDI)
|
||||
#include <net/if_fddi.h>
|
||||
#include <net/if_llc.h>
|
||||
#define LLC_SNAP_LEN LLC_SNAPFRAMELEN
|
||||
#endif /* NETBSD_FDDI */
|
||||
|
||||
#if defined (PACKET_ASSEMBLY) || defined (PACKET_DECODING)
|
||||
#include "includes/netinet/if_ether.h"
|
||||
|
@ -59,11 +58,8 @@ static char copyright[] =
|
|||
#if defined (PACKET_ASSEMBLY)
|
||||
/* Assemble an hardware header... */
|
||||
|
||||
void assemble_fddi_header (interface, buf, bufix, to)
|
||||
struct interface_info *interface;
|
||||
unsigned char *buf;
|
||||
unsigned *bufix;
|
||||
struct hardware *to;
|
||||
void assemble_fddi_header (struct interface_info *interface,
|
||||
unsigned char *buf, unsigned *bufix, struct hardware *to)
|
||||
{
|
||||
struct fddi_header fh;
|
||||
struct llc lh;
|
||||
|
@ -77,6 +73,7 @@ void assemble_fddi_header (interface, buf, bufix, to)
|
|||
memcpy (&buf [*bufix], &fh, sizeof fh);
|
||||
*bufix += sizeof fh;
|
||||
|
||||
memset (&lh, 0, sizeof lh);
|
||||
lh.llc_dsap = LLC_SNAP_LSAP;
|
||||
lh.llc_ssap = LLC_SNAP_LSAP;
|
||||
lh.llc_un.type_snap.control = LLC_UI;
|
||||
|
@ -89,18 +86,17 @@ void assemble_fddi_header (interface, buf, bufix, to)
|
|||
#ifdef PACKET_DECODING
|
||||
/* Decode a hardware header... */
|
||||
|
||||
ssize_t decode_fddi_header (interface, buf, bufix, from)
|
||||
struct interface_info *interface;
|
||||
unsigned char *buf;
|
||||
unsigned bufix;
|
||||
struct hardware *from;
|
||||
ssize_t decode_fddi_header (struct interface_info *interface,
|
||||
unsigned char *buf, unsigned bufix, struct hardware *from)
|
||||
{
|
||||
struct fddi_header fh;
|
||||
struct llc lh;
|
||||
|
||||
|
||||
memcpy(&fh, buf + bufix, FDDI_HEADER_SIZE);
|
||||
|
||||
from -> hbuf [0] = HTYPE_FDDI;
|
||||
from -> hlen = (sizeof fh.fddi_shost) + 1;
|
||||
memcpy (&from -> hbuf [1], fh.fddi_shost, sizeof fh.fddi_shost);
|
||||
return FDDI_HEADER_SIZE + LLC_SNAP_LEN;
|
||||
}
|
||||
#endif /* PACKET_DECODING */
|
||||
#endif /* DEC_FDDI */
|
||||
#endif /* DEC_FDDI || NETBSD_FDDI */
|
||||
|
|
|
@ -4,39 +4,30 @@
|
|||
responses. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -44,7 +35,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: icmp.c,v 1.1.1.3 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: icmp.c,v 1.1.1.4 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -70,11 +61,7 @@ void icmp_startup (routep, handler)
|
|||
{
|
||||
struct protoent *proto;
|
||||
int protocol = 1;
|
||||
struct sockaddr_in from;
|
||||
int fd;
|
||||
int state;
|
||||
struct icmp_state *new;
|
||||
omapi_object_t *h;
|
||||
isc_result_t result;
|
||||
|
||||
/* Only initialize icmp once. */
|
||||
|
@ -293,7 +280,6 @@ isc_result_t icmp_echoreply (h)
|
|||
void trace_icmp_input_input (trace_type_t *ttype, unsigned length, char *buf)
|
||||
{
|
||||
struct iaddr *ia;
|
||||
unsigned len;
|
||||
u_int8_t *icbuf;
|
||||
ia = (struct iaddr *)buf;
|
||||
ia->len = ntohl(ia->len);
|
||||
|
|
|
@ -4,39 +4,30 @@
|
|||
way... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -44,7 +35,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: inet.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: inet.c,v 1.1.1.3 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -58,6 +49,12 @@ struct iaddr subnet_number (addr, mask)
|
|||
int i;
|
||||
struct iaddr rv;
|
||||
|
||||
if (addr.len > sizeof(addr.iabuf))
|
||||
log_fatal("subnet_number():%s:%d: Invalid addr length.", MDL);
|
||||
if (addr.len != mask.len)
|
||||
log_fatal("subnet_number():%s:%d: Addr/mask length mismatch.",
|
||||
MDL);
|
||||
|
||||
rv.len = 0;
|
||||
|
||||
/* Both addresses must have the same length... */
|
||||
|
@ -84,6 +81,12 @@ struct iaddr ip_addr (subnet, mask, host_address)
|
|||
struct iaddr rv;
|
||||
unsigned char habuf [sizeof swaddr];
|
||||
|
||||
if (subnet.len > sizeof(subnet.iabuf))
|
||||
log_fatal("ip_addr():%s:%d: Invalid addr length.", MDL);
|
||||
if (subnet.len != mask.len)
|
||||
log_fatal("ip_addr():%s:%d: Addr/mask length mismatch.",
|
||||
MDL);
|
||||
|
||||
swaddr = htonl (host_address);
|
||||
memcpy (habuf, &swaddr, sizeof swaddr);
|
||||
|
||||
|
@ -121,9 +124,15 @@ struct iaddr broadcast_addr (subnet, mask)
|
|||
struct iaddr subnet;
|
||||
struct iaddr mask;
|
||||
{
|
||||
int i, j, k;
|
||||
int i;
|
||||
struct iaddr rv;
|
||||
|
||||
if (subnet.len > sizeof(subnet.iabuf))
|
||||
log_fatal("broadcast_addr():%s:%d: Invalid addr length.", MDL);
|
||||
if (subnet.len != mask.len)
|
||||
log_fatal("broadcast_addr():%s:%d: Addr/mask length mismatch.",
|
||||
MDL);
|
||||
|
||||
if (subnet.len != mask.len) {
|
||||
rv.len = 0;
|
||||
return rv;
|
||||
|
@ -145,6 +154,12 @@ u_int32_t host_addr (addr, mask)
|
|||
u_int32_t swaddr;
|
||||
struct iaddr rv;
|
||||
|
||||
if (addr.len > sizeof(addr.iabuf))
|
||||
log_fatal("host_addr():%s:%d: Invalid addr length.", MDL);
|
||||
if (addr.len != mask.len)
|
||||
log_fatal("host_addr():%s:%d: Addr/mask length mismatch.",
|
||||
MDL);
|
||||
|
||||
rv.len = 0;
|
||||
|
||||
/* Mask out the network bits... */
|
||||
|
@ -162,6 +177,9 @@ u_int32_t host_addr (addr, mask)
|
|||
int addr_eq (addr1, addr2)
|
||||
struct iaddr addr1, addr2;
|
||||
{
|
||||
if (addr1.len > sizeof(addr1.iabuf))
|
||||
log_fatal("addr_eq():%s:%d: Invalid addr length.", MDL);
|
||||
|
||||
if (addr1.len != addr2.len)
|
||||
return 0;
|
||||
return memcmp (addr1.iabuf, addr2.iabuf, addr1.len) == 0;
|
||||
|
@ -174,22 +192,8 @@ char *piaddr (addr)
|
|||
char *s = pbuf;
|
||||
int i;
|
||||
|
||||
if (addr.len == 0) {
|
||||
strcpy (s, "<null address>");
|
||||
}
|
||||
for (i = 0; i < addr.len; i++) {
|
||||
sprintf (s, "%s%d", i ? "." : "", addr.iabuf [i]);
|
||||
s += strlen (s);
|
||||
}
|
||||
return pbuf;
|
||||
}
|
||||
|
||||
char *piaddr1 (addr)
|
||||
struct iaddr addr;
|
||||
{
|
||||
static char pbuf [4 * 16];
|
||||
char *s = pbuf;
|
||||
int i;
|
||||
if (addr.len > sizeof(addr.iabuf))
|
||||
log_fatal("piaddr():%s:%d: Address length too long.", MDL);
|
||||
|
||||
if (addr.len == 0) {
|
||||
strcpy (s, "<null address>");
|
||||
|
@ -204,39 +208,40 @@ char *piaddr1 (addr)
|
|||
char *piaddrmask (struct iaddr addr, struct iaddr mask,
|
||||
const char *file, int line)
|
||||
{
|
||||
char *s, *t;
|
||||
int i, mw;
|
||||
unsigned len;
|
||||
char *s, tbuf[sizeof("255.255.255.255/32")];
|
||||
int mw;
|
||||
unsigned i, oct, bit;
|
||||
|
||||
for (i = 0; i < 32; i++) {
|
||||
if (!mask.iabuf [3 - i / 8])
|
||||
i += 7;
|
||||
else if (mask.iabuf [3 - i / 8] & (1 << (i % 8)))
|
||||
if (addr.len != 4)
|
||||
log_fatal("piaddrmask():%s:%d: Address length %d invalid",
|
||||
MDL, addr.len);
|
||||
if (addr.len != mask.len)
|
||||
log_fatal("piaddrmask():%s:%d: Address and mask size mismatch",
|
||||
MDL);
|
||||
|
||||
/* Determine netmask width in bits. */
|
||||
for (mw = 32; mw > 0; ) {
|
||||
oct = (mw - 1) / 8;
|
||||
bit = 0x80 >> ((mw - 1) % 8);
|
||||
if (!mask.iabuf [oct])
|
||||
mw -= 8;
|
||||
else if (mask.iabuf [oct] & bit)
|
||||
break;
|
||||
}
|
||||
mw = 32 - i;
|
||||
len = mw > 9 ? 2 : 1;
|
||||
len += 4; /* three dots and a slash. */
|
||||
for (i = 0; i < (mw / 8) + 1; i++) {
|
||||
if (addr.iabuf [i] > 99)
|
||||
len += 3;
|
||||
else if (addr.iabuf [i] > 9)
|
||||
len += 2;
|
||||
else
|
||||
len++;
|
||||
mw--;
|
||||
}
|
||||
s = dmalloc (len + 1, file, line);
|
||||
|
||||
s = tbuf;
|
||||
for (i = 0 ; i <= oct ; i++) {
|
||||
sprintf(s, "%s%d", i ? "." : "", addr.iabuf[i]);
|
||||
s += strlen(s);
|
||||
}
|
||||
sprintf(s, "/%d", mw);
|
||||
|
||||
s = dmalloc (strlen(tbuf) + 1, file, line);
|
||||
if (!s)
|
||||
return s;
|
||||
t = s;
|
||||
sprintf (t, "%d", addr.iabuf [0]);
|
||||
t += strlen (t);
|
||||
for (i = 1; i < (mw / 8) + 1; i++) {
|
||||
sprintf (t, ".%d", addr.iabuf [i]);
|
||||
t += strlen (t);
|
||||
}
|
||||
*t++ = '/';
|
||||
sprintf (t, "%d", mw);
|
||||
strcpy(s, tbuf);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,40 +4,31 @@
|
|||
Support Services in Vancouver, B.C. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: lpf.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: lpf.c,v 1.1.1.3 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -369,7 +360,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|||
|
||||
/* Decode the IP and UDP headers... */
|
||||
offset = decode_udp_ip_header (interface, ibuf, bufix, from,
|
||||
(unsigned char *)0, (unsigned)length);
|
||||
(unsigned)length);
|
||||
|
||||
/* If the IP or UDP checksum was bad, skip the packet... */
|
||||
if (offset < 0)
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Memory-resident database... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: memory.c,v 1.1.1.3 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: memory.c,v 1.1.1.4 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -93,8 +84,7 @@ isc_result_t delete_group (struct group_object *group, int writep)
|
|||
|
||||
isc_result_t supersede_group (struct group_object *group, int writep)
|
||||
{
|
||||
struct group_object *t, *u;
|
||||
isc_result_t status;
|
||||
struct group_object *t;
|
||||
|
||||
/* Register the group in the group name hash table,
|
||||
so we can look it up later. */
|
||||
|
@ -151,7 +141,6 @@ isc_result_t supersede_group (struct group_object *group, int writep)
|
|||
int clone_group (struct group **gp, struct group *group,
|
||||
const char *file, int line)
|
||||
{
|
||||
isc_result_t status;
|
||||
struct group *g = (struct group *)0;
|
||||
|
||||
/* Normally gp should contain the null pointer, but for convenience
|
||||
|
|
|
@ -4,39 +4,30 @@
|
|||
with one crucial tidbit of help from Stu Grossmen. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -44,7 +35,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: nit.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: nit.c,v 1.1.1.3 2005/08/11 16:54:27 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -379,7 +370,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|||
|
||||
/* Decode the IP and UDP headers... */
|
||||
offset = decode_udp_ip_header (interface, ibuf, bufix,
|
||||
from, (unsigned char *)0, length);
|
||||
from, length);
|
||||
|
||||
/* If the IP or UDP checksum was bad, skip the packet... */
|
||||
if (offset < 0)
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
DHCP options parsing and reassembly. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: options.c,v 1.1.1.3 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: options.c,v 1.1.1.4 2005/08/11 16:54:28 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#define DHCP_OPTION_DATA
|
||||
|
@ -52,16 +43,11 @@ static char copyright[] =
|
|||
|
||||
struct option *vendor_cfg_option;
|
||||
|
||||
static void do_option_set PROTO ((pair *,
|
||||
struct option_cache *,
|
||||
enum statement_op));
|
||||
|
||||
/* Parse all available options out of the specified packet. */
|
||||
|
||||
int parse_options (packet)
|
||||
struct packet *packet;
|
||||
{
|
||||
int i;
|
||||
struct option_cache *op = (struct option_cache *)0;
|
||||
|
||||
/* Allocate a new option state. */
|
||||
|
@ -121,8 +107,6 @@ int parse_option_buffer (options, buffer, length, universe)
|
|||
unsigned length;
|
||||
struct universe *universe;
|
||||
{
|
||||
unsigned char *t;
|
||||
const unsigned char *end = buffer + length;
|
||||
unsigned len, offset;
|
||||
int code;
|
||||
struct option_cache *op = (struct option_cache *)0;
|
||||
|
@ -166,15 +150,36 @@ int parse_option_buffer (options, buffer, length, universe)
|
|||
the parse fails, or the option isn't an encapsulation (by
|
||||
far the most common case), or the option isn't entirely
|
||||
an encapsulation, keep the raw data as well. */
|
||||
if (!((universe -> options [code] -> format [0] == 'e' ||
|
||||
if (universe -> options [code] &&
|
||||
!((universe -> options [code] -> format [0] == 'e' ||
|
||||
universe -> options [code] -> format [0] == 'E') &&
|
||||
(parse_encapsulated_suboptions
|
||||
(options, universe -> options [code],
|
||||
buffer + offset + 2, len,
|
||||
universe, (const char *)0)))) {
|
||||
save_option_buffer (universe, options, bp,
|
||||
&bp -> data [offset + 2], len,
|
||||
universe -> options [code], 1);
|
||||
op = lookup_option (universe, options, code);
|
||||
if (op) {
|
||||
struct data_string new;
|
||||
memset (&new, 0, sizeof new);
|
||||
if (!buffer_allocate (&new.buffer, op -> data.len + len,
|
||||
MDL)) {
|
||||
log_error ("parse_option_buffer: No memory.");
|
||||
return 0;
|
||||
}
|
||||
memcpy (new.buffer -> data, op -> data.data,
|
||||
op -> data.len);
|
||||
memcpy (&new.buffer -> data [op -> data.len],
|
||||
&bp -> data [offset + 2], len);
|
||||
new.len = op -> data.len + len;
|
||||
new.data = new.buffer -> data;
|
||||
data_string_forget (&op -> data, MDL);
|
||||
data_string_copy (&op -> data, &new, MDL);
|
||||
data_string_forget (&new, MDL);
|
||||
} else {
|
||||
save_option_buffer (universe, options, bp,
|
||||
&bp -> data [offset + 2], len,
|
||||
universe -> options [code], 1);
|
||||
}
|
||||
}
|
||||
offset += len + 2;
|
||||
}
|
||||
|
@ -265,7 +270,6 @@ int fqdn_universe_decode (struct option_state *options,
|
|||
const unsigned char *buffer,
|
||||
unsigned length, struct universe *u)
|
||||
{
|
||||
char *name;
|
||||
struct buffer *bp = (struct buffer *)0;
|
||||
|
||||
/* FQDN options have to be at least four bytes long. */
|
||||
|
@ -455,6 +459,8 @@ int cons_options (inpacket, outpacket, lease, client_state,
|
|||
unsigned char buffer [4096]; /* Really big buffer... */
|
||||
unsigned main_buffer_size;
|
||||
unsigned mainbufix, bufix, agentix;
|
||||
int fileix;
|
||||
int snameix;
|
||||
unsigned option_size;
|
||||
unsigned length;
|
||||
int i;
|
||||
|
@ -462,7 +468,8 @@ int cons_options (inpacket, outpacket, lease, client_state,
|
|||
struct data_string ds;
|
||||
pair pp, *hash;
|
||||
int need_endopt = 0;
|
||||
int have_sso = 0;
|
||||
int ocount = 0;
|
||||
int ofbuf1=0, ofbuf2=0;
|
||||
|
||||
memset (&ds, 0, sizeof ds);
|
||||
|
||||
|
@ -470,14 +477,18 @@ int cons_options (inpacket, outpacket, lease, client_state,
|
|||
and no alternate maximum message size has been specified, take the
|
||||
one in the packet. */
|
||||
|
||||
if (!mms && inpacket &&
|
||||
if (inpacket &&
|
||||
(op = lookup_option (&dhcp_universe, inpacket -> options,
|
||||
DHO_DHCP_MAX_MESSAGE_SIZE))) {
|
||||
evaluate_option_cache (&ds, inpacket,
|
||||
lease, client_state, in_options,
|
||||
cfg_options, scope, op, MDL);
|
||||
if (ds.len >= sizeof (u_int16_t))
|
||||
mms = getUShort (ds.data);
|
||||
if (ds.len >= sizeof (u_int16_t)) {
|
||||
i = getUShort (ds.data);
|
||||
|
||||
if(!mms || (i < mms))
|
||||
mms = i;
|
||||
}
|
||||
data_string_forget (&ds, MDL);
|
||||
}
|
||||
|
||||
|
@ -610,18 +621,35 @@ int cons_options (inpacket, outpacket, lease, client_state,
|
|||
DHO_VENDOR_ENCAPSULATED_OPTIONS;
|
||||
}
|
||||
|
||||
/* Figure out the overload buffer offset(s). */
|
||||
if (overload) {
|
||||
ofbuf1 = main_buffer_size - 4;
|
||||
if (overload == 3)
|
||||
ofbuf2 = main_buffer_size - 4 + DHCP_FILE_LEN;
|
||||
}
|
||||
|
||||
/* Copy the options into the big buffer... */
|
||||
option_size = store_options (buffer,
|
||||
(main_buffer_size - 7 +
|
||||
option_size = store_options (&ocount, buffer,
|
||||
(main_buffer_size - 4 +
|
||||
((overload & 1) ? DHCP_FILE_LEN : 0) +
|
||||
((overload & 2) ? DHCP_SNAME_LEN : 0)),
|
||||
inpacket, lease, client_state,
|
||||
in_options, cfg_options, scope,
|
||||
priority_list, priority_len,
|
||||
main_buffer_size,
|
||||
(main_buffer_size +
|
||||
((overload & 1) ? DHCP_FILE_LEN : 0)),
|
||||
terminate, vuname);
|
||||
ofbuf1, ofbuf2, terminate, vuname);
|
||||
/* If store_options failed. */
|
||||
if (option_size == 0)
|
||||
return 0;
|
||||
if (overload) {
|
||||
if (ocount == 1 && (overload & 1))
|
||||
overload = 1;
|
||||
else if (ocount == 1 && (overload & 2))
|
||||
overload = 2;
|
||||
else if (ocount == 3)
|
||||
overload = 3;
|
||||
else
|
||||
overload = 0;
|
||||
}
|
||||
|
||||
/* Put the cookie up front... */
|
||||
memcpy (outpacket -> options, DHCP_OPTIONS_COOKIE, 4);
|
||||
|
@ -631,70 +659,43 @@ int cons_options (inpacket, outpacket, lease, client_state,
|
|||
option at the beginning. If we can, though, just store the
|
||||
whole thing in the packet's option buffer and leave it at
|
||||
that. */
|
||||
if (option_size <= main_buffer_size - mainbufix) {
|
||||
memcpy (&outpacket -> options [mainbufix],
|
||||
buffer, option_size);
|
||||
mainbufix += option_size;
|
||||
agentix = mainbufix;
|
||||
if (mainbufix < main_buffer_size)
|
||||
need_endopt = 1;
|
||||
length = DHCP_FIXED_NON_UDP + mainbufix;
|
||||
} else {
|
||||
memcpy (&outpacket -> options [mainbufix],
|
||||
buffer, option_size);
|
||||
mainbufix += option_size;
|
||||
if (overload) {
|
||||
outpacket -> options [mainbufix++] = DHO_DHCP_OPTION_OVERLOAD;
|
||||
outpacket -> options [mainbufix++] = 1;
|
||||
if (option_size > main_buffer_size - mainbufix + DHCP_FILE_LEN)
|
||||
outpacket -> options [mainbufix++] = 3;
|
||||
else
|
||||
outpacket -> options [mainbufix++] = 1;
|
||||
outpacket -> options [mainbufix++] = overload;
|
||||
|
||||
memcpy (&outpacket -> options [mainbufix],
|
||||
buffer, main_buffer_size - mainbufix);
|
||||
length = DHCP_FIXED_NON_UDP + main_buffer_size;
|
||||
agentix = main_buffer_size;
|
||||
|
||||
bufix = main_buffer_size - mainbufix;
|
||||
if (overload & 1) {
|
||||
if (option_size - bufix <= DHCP_FILE_LEN) {
|
||||
memcpy (outpacket -> file,
|
||||
&buffer [bufix], option_size - bufix);
|
||||
mainbufix = option_size - bufix;
|
||||
if (mainbufix < DHCP_FILE_LEN)
|
||||
outpacket -> file [mainbufix++]
|
||||
= DHO_END;
|
||||
while (mainbufix < DHCP_FILE_LEN)
|
||||
outpacket -> file [mainbufix++]
|
||||
= DHO_PAD;
|
||||
memcpy (outpacket -> file,
|
||||
&buffer [ofbuf1], DHCP_FILE_LEN);
|
||||
}
|
||||
if (overload & 2) {
|
||||
if (ofbuf2) {
|
||||
memcpy (outpacket -> sname, &buffer [ofbuf2],
|
||||
DHCP_SNAME_LEN);
|
||||
} else {
|
||||
memcpy (outpacket -> file,
|
||||
&buffer [bufix], DHCP_FILE_LEN);
|
||||
bufix += DHCP_FILE_LEN;
|
||||
memcpy (outpacket -> sname, &buffer [ofbuf1],
|
||||
DHCP_SNAME_LEN);
|
||||
}
|
||||
}
|
||||
if ((overload & 2) && option_size < bufix) {
|
||||
memcpy (outpacket -> sname,
|
||||
&buffer [bufix], option_size - bufix);
|
||||
|
||||
mainbufix = option_size - bufix;
|
||||
if (mainbufix < DHCP_SNAME_LEN)
|
||||
outpacket -> file [mainbufix++]
|
||||
= DHO_END;
|
||||
while (mainbufix < DHCP_SNAME_LEN)
|
||||
outpacket -> file [mainbufix++]
|
||||
= DHO_PAD;
|
||||
}
|
||||
}
|
||||
agentix = mainbufix;
|
||||
if (mainbufix < main_buffer_size)
|
||||
need_endopt = 1;
|
||||
length = DHCP_FIXED_NON_UDP + mainbufix;
|
||||
|
||||
/* Now hack in the agent options if there are any. */
|
||||
priority_list [0] = DHO_DHCP_AGENT_OPTIONS;
|
||||
priority_len = 1;
|
||||
agentix +=
|
||||
store_options (&outpacket -> options [agentix],
|
||||
store_options (0, &outpacket -> options [agentix],
|
||||
1500 - DHCP_FIXED_LEN - agentix,
|
||||
inpacket, lease, client_state,
|
||||
in_options, cfg_options, scope,
|
||||
priority_list, priority_len,
|
||||
1500 - DHCP_FIXED_LEN - agentix,
|
||||
1500 - DHCP_FIXED_LEN - agentix, 0, (char *)0);
|
||||
0, 0, 0, (char *)0);
|
||||
|
||||
/* Tack a DHO_END option onto the packet if we need to. */
|
||||
if (agentix < 1500 - DHCP_FIXED_LEN && need_endopt)
|
||||
|
@ -707,9 +708,10 @@ int cons_options (inpacket, outpacket, lease, client_state,
|
|||
|
||||
/* Store all the requested options into the requested buffer. */
|
||||
|
||||
int store_options (buffer, buflen, packet, lease, client_state,
|
||||
int store_options (ocount, buffer, buflen, packet, lease, client_state,
|
||||
in_options, cfg_options, scope, priority_list, priority_len,
|
||||
first_cutoff, second_cutoff, terminate, vuname)
|
||||
int *ocount;
|
||||
unsigned char *buffer;
|
||||
unsigned buflen;
|
||||
struct packet *packet;
|
||||
|
@ -724,14 +726,30 @@ int store_options (buffer, buflen, packet, lease, client_state,
|
|||
int terminate;
|
||||
const char *vuname;
|
||||
{
|
||||
int bufix = 0;
|
||||
int bufix = 0, six = 0, tix = 0;
|
||||
int i;
|
||||
int ix;
|
||||
int tto;
|
||||
int bufend, sbufend;
|
||||
struct data_string od;
|
||||
struct option_cache *oc;
|
||||
unsigned code;
|
||||
int optstart;
|
||||
|
||||
if (first_cutoff) {
|
||||
if (first_cutoff >= buflen)
|
||||
log_fatal("%s:%d:store_options: Invalid first cutoff.", MDL);
|
||||
|
||||
bufend = first_cutoff;
|
||||
} else
|
||||
bufend = buflen;
|
||||
|
||||
if (second_cutoff) {
|
||||
if (second_cutoff >= buflen)
|
||||
log_fatal("%s:%d:store_options: Invalid second cutoff.", MDL);
|
||||
|
||||
sbufend = second_cutoff;
|
||||
} else
|
||||
sbufend = buflen;
|
||||
|
||||
memset (&od, 0, sizeof od);
|
||||
|
||||
|
@ -758,10 +776,11 @@ int store_options (buffer, buflen, packet, lease, client_state,
|
|||
/* Number of bytes left to store (some may already
|
||||
have been stored by a previous pass). */
|
||||
unsigned length;
|
||||
int optstart;
|
||||
int optstart, soptstart, toptstart;
|
||||
struct universe *u;
|
||||
int have_encapsulation = 0;
|
||||
struct data_string encapsulation;
|
||||
int splitup;
|
||||
|
||||
memset (&encapsulation, 0, sizeof encapsulation);
|
||||
|
||||
|
@ -784,7 +803,6 @@ int store_options (buffer, buflen, packet, lease, client_state,
|
|||
if (u -> options [code] &&
|
||||
((u -> options [code] -> format [0] == 'E' && !oc) ||
|
||||
u -> options [code] -> format [0] == 'e')) {
|
||||
int uix;
|
||||
static char *s, *t;
|
||||
struct option_cache *tmp;
|
||||
struct data_string name;
|
||||
|
@ -898,47 +916,118 @@ int store_options (buffer, buflen, packet, lease, client_state,
|
|||
in any case, if the option data will cross a buffer
|
||||
boundary, split it across that boundary. */
|
||||
|
||||
|
||||
if (length > 255)
|
||||
splitup = 1;
|
||||
else
|
||||
splitup = 0;
|
||||
|
||||
ix = 0;
|
||||
optstart = bufix;
|
||||
soptstart = six;
|
||||
toptstart = tix;
|
||||
while (length) {
|
||||
unsigned char incr = length > 255 ? 255 : length;
|
||||
int consumed = 0;
|
||||
|
||||
/* If this hunk of the buffer will cross a
|
||||
boundary, only go up to the boundary in this
|
||||
pass. */
|
||||
if (bufix < first_cutoff &&
|
||||
bufix + incr > first_cutoff)
|
||||
incr = first_cutoff - bufix;
|
||||
else if (bufix < second_cutoff &&
|
||||
bufix + incr > second_cutoff)
|
||||
incr = second_cutoff - bufix;
|
||||
|
||||
/* If this option is going to overflow the buffer,
|
||||
skip it. */
|
||||
if (bufix + 2 + incr > buflen) {
|
||||
bufix = optstart;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Everything looks good - copy it in! */
|
||||
buffer [bufix] = code;
|
||||
buffer [bufix + 1] = incr;
|
||||
if (tto && incr == length) {
|
||||
memcpy (buffer + bufix + 2,
|
||||
od.data + ix, (unsigned)(incr - 1));
|
||||
buffer [bufix + 2 + incr - 1] = 0;
|
||||
unsigned incr = length;
|
||||
int *pix;
|
||||
char *base;
|
||||
|
||||
/* Try to fit it in the options buffer. */
|
||||
if (!splitup &&
|
||||
((!six && !tix && (i == priority_len - 1) &&
|
||||
(bufix + 2 + length < bufend)) ||
|
||||
(bufix + 5 + length < bufend))) {
|
||||
base = buffer;
|
||||
pix = &bufix;
|
||||
/* Try to fit it in the second buffer. */
|
||||
} else if (!splitup && first_cutoff &&
|
||||
(first_cutoff + six + 3 + length < sbufend)) {
|
||||
base = &buffer[first_cutoff];
|
||||
pix = &six;
|
||||
/* Try to fit it in the third buffer. */
|
||||
} else if (!splitup && second_cutoff &&
|
||||
(second_cutoff + tix + 3 + length < buflen)) {
|
||||
base = &buffer[second_cutoff];
|
||||
pix = &tix;
|
||||
/* Split the option up into the remaining space. */
|
||||
} else {
|
||||
memcpy (buffer + bufix + 2,
|
||||
splitup = 1;
|
||||
|
||||
/* Use any remaining options space. */
|
||||
if (bufix + 6 < bufend) {
|
||||
incr = bufend - bufix - 5;
|
||||
base = buffer;
|
||||
pix = &bufix;
|
||||
/* Use any remaining first_cutoff space. */
|
||||
} else if (first_cutoff &&
|
||||
(first_cutoff + six + 4 < sbufend)) {
|
||||
incr = sbufend - (first_cutoff + six) - 3;
|
||||
base = &buffer[first_cutoff];
|
||||
pix = &six;
|
||||
/* Use any remaining second_cutoff space. */
|
||||
} else if (second_cutoff &&
|
||||
(second_cutoff + tix + 4 < buflen)) {
|
||||
incr = buflen - (second_cutoff + tix) - 3;
|
||||
base = &buffer[second_cutoff];
|
||||
pix = &tix;
|
||||
/* Give up, roll back this option. */
|
||||
} else {
|
||||
bufix = optstart;
|
||||
six = soptstart;
|
||||
tix = toptstart;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (incr > length)
|
||||
incr = length;
|
||||
if (incr > 255)
|
||||
incr = 255;
|
||||
|
||||
/* Everything looks good - copy it in! */
|
||||
base [*pix] = code;
|
||||
base [*pix + 1] = (unsigned char)incr;
|
||||
if (tto && incr == length) {
|
||||
if (incr > 1)
|
||||
memcpy (base + *pix + 2,
|
||||
od.data + ix, (unsigned)(incr - 1));
|
||||
base [*pix + 2 + incr - 1] = 0;
|
||||
} else {
|
||||
memcpy (base + *pix + 2,
|
||||
od.data + ix, (unsigned)incr);
|
||||
}
|
||||
length -= incr;
|
||||
ix += incr;
|
||||
bufix += 2 + incr;
|
||||
*pix += 2 + incr;
|
||||
}
|
||||
data_string_forget (&od, MDL);
|
||||
}
|
||||
|
||||
/* If we can overload, and we have, then PAD and END those spaces. */
|
||||
if (first_cutoff && six) {
|
||||
if ((first_cutoff + six + 1) < sbufend)
|
||||
memset (&buffer[first_cutoff + six + 1], DHO_PAD,
|
||||
sbufend - (first_cutoff + six + 1));
|
||||
else if (first_cutoff + six >= sbufend)
|
||||
log_fatal("Second buffer overflow in overloaded options.");
|
||||
|
||||
buffer[first_cutoff + six] = DHO_END;
|
||||
*ocount |= 1; /* So that caller knows there's data there. */
|
||||
}
|
||||
|
||||
if (second_cutoff && tix) {
|
||||
if (second_cutoff + tix + 1 < buflen) {
|
||||
memset (&buffer[second_cutoff + tix + 1], DHO_PAD,
|
||||
buflen - (second_cutoff + tix + 1));
|
||||
} else if (second_cutoff + tix >= buflen)
|
||||
log_fatal("Third buffer overflow in overloaded options.");
|
||||
|
||||
buffer[second_cutoff + tix] = DHO_END;
|
||||
*ocount |= 2; /* So that caller knows there's data there. */
|
||||
}
|
||||
|
||||
if ((six || tix) && (bufix + 3 > bufend))
|
||||
log_fatal("Not enough space for option overload option.");
|
||||
|
||||
return bufix;
|
||||
}
|
||||
|
||||
|
@ -1243,7 +1332,7 @@ void set_option (universe, options, option, op)
|
|||
case eval_statement:
|
||||
case break_statement:
|
||||
default:
|
||||
log_error ("bogus statement type in do_option_set.");
|
||||
log_error ("bogus statement type in set_option.");
|
||||
break;
|
||||
|
||||
case default_option_statement:
|
||||
|
@ -1726,7 +1815,6 @@ int nwip_option_space_encapsulate (result, packet, lease, client_state,
|
|||
{
|
||||
pair ocp;
|
||||
int status;
|
||||
int i;
|
||||
static struct option_cache *no_nwip;
|
||||
struct data_string ds;
|
||||
struct option_chain_head *head;
|
||||
|
@ -1740,7 +1828,6 @@ int nwip_option_space_encapsulate (result, packet, lease, client_state,
|
|||
|
||||
status = 0;
|
||||
for (ocp = head -> first; ocp; ocp = ocp -> cdr) {
|
||||
struct option_cache *oc = (struct option_cache *)(ocp -> car);
|
||||
if (store_option (result, universe, packet,
|
||||
lease, client_state, in_options,
|
||||
cfg_options, scope,
|
||||
|
@ -1926,7 +2013,6 @@ void suboption_foreach (struct packet *packet, struct lease *lease,
|
|||
{
|
||||
struct universe *universe = find_option_universe (oc -> option,
|
||||
vsname);
|
||||
int i;
|
||||
|
||||
if (universe -> foreach)
|
||||
(*universe -> foreach) (packet, lease, client_state,
|
||||
|
@ -1976,7 +2062,6 @@ void save_linked_option (universe, options, oc)
|
|||
struct option_cache *oc;
|
||||
{
|
||||
pair *tail;
|
||||
pair np = (pair )0;
|
||||
struct option_chain_head *head;
|
||||
|
||||
if (universe -> index >= options -> universe_count)
|
||||
|
@ -2148,7 +2233,6 @@ void do_packet (interface, packet, len, from_port, from, hfrom)
|
|||
struct iaddr from;
|
||||
struct hardware *hfrom;
|
||||
{
|
||||
int i;
|
||||
struct option_cache *op;
|
||||
struct packet *decoded_packet;
|
||||
#if defined (DEBUG_MEMORY_LEAKAGE)
|
||||
|
|
|
@ -3,35 +3,26 @@
|
|||
Packet assembly code, originally contributed by Archie Cobbs. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This code was originally contributed by Archie Cobbs, and is still
|
||||
* very similar to that contribution, although the packet checksum code
|
||||
|
@ -42,7 +33,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: packet.c,v 1.1.1.2 2003/02/18 16:37:56 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: packet.c,v 1.1.1.3 2005/08/11 16:54:28 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -124,7 +115,7 @@ void assemble_hw_header (interface, buf, bufix, to)
|
|||
assemble_tr_header (interface, buf, bufix, to);
|
||||
else
|
||||
#endif
|
||||
#if defined (DEC_FDDI)
|
||||
#if defined (DEC_FDDI) || defined (NETBSD_FDDI)
|
||||
if (interface -> hw_address.hbuf [0] == HTYPE_FDDI)
|
||||
assemble_fddi_header (interface, buf, bufix, to);
|
||||
else
|
||||
|
@ -156,7 +147,7 @@ void assemble_udp_ip_header (interface, buf, bufix,
|
|||
ip.ip_len = htons(sizeof(ip) + sizeof(udp) + len);
|
||||
ip.ip_id = 0;
|
||||
ip.ip_off = 0;
|
||||
ip.ip_ttl = 16;
|
||||
ip.ip_ttl = 32;
|
||||
ip.ip_p = IPPROTO_UDP;
|
||||
ip.ip_sum = 0;
|
||||
ip.ip_src.s_addr = from;
|
||||
|
@ -209,7 +200,7 @@ ssize_t decode_hw_header (interface, buf, bufix, from)
|
|||
return decode_tr_header (interface, buf, bufix, from);
|
||||
else
|
||||
#endif
|
||||
#if defined (DEC_FDDI)
|
||||
#if defined (DEC_FDDI) || defined (NETBSD_FDDI)
|
||||
if (interface -> hw_address.hbuf [0] == HTYPE_FDDI)
|
||||
return decode_fddi_header (interface, buf, bufix, from);
|
||||
else
|
||||
|
@ -219,15 +210,16 @@ ssize_t decode_hw_header (interface, buf, bufix, from)
|
|||
|
||||
/* UDP header and IP header decoded together for convenience. */
|
||||
|
||||
ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
|
||||
ssize_t decode_udp_ip_header (interface, buf, bufix, from, buflen, rbuflen)
|
||||
struct interface_info *interface;
|
||||
unsigned char *buf;
|
||||
unsigned bufix;
|
||||
struct sockaddr_in *from;
|
||||
unsigned char *data;
|
||||
unsigned buflen;
|
||||
unsigned *rbuflen;
|
||||
{
|
||||
struct ip *ip;
|
||||
unsigned char *data;
|
||||
struct ip ip;
|
||||
struct udphdr *udp;
|
||||
u_int32_t ip_len = (buf [bufix] & 0xf) << 2;
|
||||
u_int32_t sum, usum;
|
||||
|
@ -241,12 +233,13 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
|
|||
unsigned ulen;
|
||||
int ignore = 0;
|
||||
|
||||
ip = (struct ip *)(buf + bufix);
|
||||
memcpy(&ip, buf + bufix, sizeof (struct ip));
|
||||
udp = (struct udphdr *)(buf + bufix + ip_len);
|
||||
len = 0; /* XXXGCC -Wuninitialized */
|
||||
|
||||
#ifdef USERLAND_FILTER
|
||||
/* Is it a UDP packet? */
|
||||
if (ip -> ip_p != IPPROTO_UDP)
|
||||
if (ip.ip_p != IPPROTO_UDP)
|
||||
return -1;
|
||||
|
||||
/* Is it to the port we're serving? */
|
||||
|
@ -275,46 +268,44 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
|
|||
}
|
||||
|
||||
/* Check the IP packet length. */
|
||||
if (ntohs (ip -> ip_len) != buflen) {
|
||||
if ((ntohs (ip -> ip_len + 2) & ~1) == buflen)
|
||||
if (ntohs (ip.ip_len) != buflen) {
|
||||
if ((ntohs (ip.ip_len + 2) & ~1) == buflen)
|
||||
ignore = 1;
|
||||
else
|
||||
log_debug ("ip length %d disagrees with bytes received %d.",
|
||||
ntohs (ip -> ip_len), buflen);
|
||||
ntohs (ip.ip_len), buflen);
|
||||
}
|
||||
|
||||
/* Copy out the IP source address... */
|
||||
memcpy (&from -> sin_addr, &ip -> ip_src, 4);
|
||||
memcpy (&from -> sin_addr, &ip.ip_src, 4);
|
||||
|
||||
/* Compute UDP checksums, including the ``pseudo-header'', the UDP
|
||||
header and the data. If the UDP checksum field is zero, we're
|
||||
not supposed to do a checksum. */
|
||||
|
||||
if (!data) {
|
||||
data = buf + bufix + ip_len + sizeof *udp;
|
||||
len = ulen - sizeof *udp;
|
||||
++udp_packets_length_checked;
|
||||
if (len + data > buf + bufix + buflen) {
|
||||
++udp_packets_length_overflow;
|
||||
if (udp_packets_length_checked > 4 &&
|
||||
(udp_packets_length_checked /
|
||||
udp_packets_length_overflow) < 2) {
|
||||
log_info ("%d udp packets in %d too long - dropped",
|
||||
udp_packets_length_overflow,
|
||||
udp_packets_length_checked);
|
||||
udp_packets_length_overflow =
|
||||
udp_packets_length_checked = 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (len + data < buf + bufix + buflen &&
|
||||
len + data != buf + bufix + buflen && !ignore)
|
||||
log_debug ("accepting packet with data after udp payload.");
|
||||
if (len + data > buf + bufix + buflen) {
|
||||
log_debug ("dropping packet with bogus uh_ulen %ld",
|
||||
(long)(len + sizeof *udp));
|
||||
return -1;
|
||||
data = buf + bufix + ip_len + sizeof *udp;
|
||||
len = ulen - sizeof *udp;
|
||||
++udp_packets_length_checked;
|
||||
if (len + data > buf + bufix + buflen) {
|
||||
++udp_packets_length_overflow;
|
||||
if (udp_packets_length_checked > 4 &&
|
||||
(udp_packets_length_checked /
|
||||
udp_packets_length_overflow) < 2) {
|
||||
log_info ("%d udp packets in %d too long - dropped",
|
||||
udp_packets_length_overflow,
|
||||
udp_packets_length_checked);
|
||||
udp_packets_length_overflow =
|
||||
udp_packets_length_checked = 0;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
if (len + data < buf + bufix + buflen &&
|
||||
len + data != buf + bufix + buflen && !ignore)
|
||||
log_debug ("accepting packet with data after udp payload.");
|
||||
if (len + data > buf + bufix + buflen) {
|
||||
log_debug ("dropping packet with bogus uh_ulen %ld",
|
||||
(long)(len + sizeof *udp));
|
||||
return -1;
|
||||
}
|
||||
|
||||
usum = udp -> uh_sum;
|
||||
|
@ -323,8 +314,8 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
|
|||
sum = wrapsum (checksum ((unsigned char *)udp, sizeof *udp,
|
||||
checksum (data, len,
|
||||
checksum ((unsigned char *)
|
||||
&ip -> ip_src,
|
||||
2 * sizeof ip -> ip_src,
|
||||
&ip.ip_src,
|
||||
2 * sizeof ip.ip_src,
|
||||
IPPROTO_UDP +
|
||||
(u_int32_t)ulen))));
|
||||
|
||||
|
@ -343,6 +334,7 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen)
|
|||
/* Copy out the port... */
|
||||
memcpy (&from -> sin_port, &udp -> uh_sport, sizeof udp -> uh_sport);
|
||||
|
||||
*rbuflen = ntohs (ip.ip_len) - ip_len - sizeof *udp;
|
||||
return ip_len + sizeof *udp;
|
||||
}
|
||||
#endif /* PACKET_DECODING */
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Common parser code for dhcpd and dhclient. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: parse.c,v 1.1.1.3 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: parse.c,v 1.1.1.4 2005/08/11 16:54:26 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -284,8 +275,11 @@ int parse_ip_addr_or_hostname (expr, cfile, uniform)
|
|||
name = parse_host_name (cfile);
|
||||
if (!name)
|
||||
return 0;
|
||||
if (!make_host_lookup (expr, name))
|
||||
if (!make_host_lookup (expr, name)) {
|
||||
dfree(name, MDL);
|
||||
return 0;
|
||||
}
|
||||
dfree(name, MDL);
|
||||
if (!uniform) {
|
||||
if (!make_limit (&x, *expr, 4))
|
||||
return 0;
|
||||
|
@ -317,8 +311,6 @@ int parse_ip_addr (cfile, addr)
|
|||
struct parse *cfile;
|
||||
struct iaddr *addr;
|
||||
{
|
||||
const char *val;
|
||||
enum dhcp_token token;
|
||||
|
||||
addr -> len = 4;
|
||||
if (parse_numeric_aggregate (cfile, addr -> iabuf,
|
||||
|
@ -544,7 +536,7 @@ void convert_num (cfile, buf, str, base, size)
|
|||
if (ptr [1] == 'x') {
|
||||
base = 16;
|
||||
ptr += 2;
|
||||
} else if (isascii (ptr [1]) && isdigit (ptr [1])) {
|
||||
} else if (isdigit ((unsigned char)ptr [1])) {
|
||||
base = 8;
|
||||
ptr += 1;
|
||||
} else {
|
||||
|
@ -655,7 +647,6 @@ void convert_num (cfile, buf, str, base, size)
|
|||
TIME parse_date (cfile)
|
||||
struct parse *cfile;
|
||||
{
|
||||
struct tm tm;
|
||||
int guess;
|
||||
int tzoff, wday, year, mon, mday, hour, min, sec;
|
||||
const char *val;
|
||||
|
@ -726,7 +717,7 @@ TIME parse_date (cfile)
|
|||
return (TIME)0;
|
||||
}
|
||||
|
||||
/* Month... */
|
||||
/* Day of month... */
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != NUMBER) {
|
||||
parse_warn (cfile, "numeric day of month expected.");
|
||||
|
@ -1027,7 +1018,6 @@ int parse_option_code_definition (cfile, option)
|
|||
char tokbuf [128];
|
||||
unsigned tokix = 0;
|
||||
char type;
|
||||
int code;
|
||||
int is_signed;
|
||||
char *s;
|
||||
int has_encapsulation = 0;
|
||||
|
@ -1516,7 +1506,6 @@ int parse_executable_statement (result, cfile, lose, case_context)
|
|||
{
|
||||
enum dhcp_token token;
|
||||
const char *val;
|
||||
struct executable_statement base;
|
||||
struct class *cta;
|
||||
struct option *option;
|
||||
struct option_cache *cache;
|
||||
|
@ -1819,7 +1808,6 @@ int parse_executable_statement (result, cfile, lose, case_context)
|
|||
if (token != NAME && token != NUMBER_OR_NAME) {
|
||||
parse_warn (cfile,
|
||||
"%s can't be a variable name", val);
|
||||
badunset:
|
||||
skip_to_semi (cfile);
|
||||
*lose = 1;
|
||||
return 0;
|
||||
|
@ -1997,6 +1985,7 @@ int parse_executable_statement (result, cfile, lose, case_context)
|
|||
return 1;
|
||||
|
||||
/* Also not really a statement, but same idea as above. */
|
||||
#if !defined (SMALL)
|
||||
case KEY:
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (!parse_key (cfile)) {
|
||||
|
@ -2004,6 +1993,7 @@ int parse_executable_statement (result, cfile, lose, case_context)
|
|||
return 0;
|
||||
}
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
default:
|
||||
if (config_universe && is_identifier (token)) {
|
||||
|
@ -2140,6 +2130,7 @@ int parse_zone (struct dns_zone *zone, struct parse *cfile)
|
|||
}
|
||||
break;
|
||||
|
||||
#if !defined (SMALL)
|
||||
case KEY:
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
|
@ -2163,7 +2154,8 @@ int parse_zone (struct dns_zone *zone, struct parse *cfile)
|
|||
if (!parse_semi (cfile))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
#endif
|
||||
|
||||
default:
|
||||
done = 1;
|
||||
break;
|
||||
|
@ -2186,6 +2178,7 @@ int parse_zone (struct dns_zone *zone, struct parse *cfile)
|
|||
secret-definition :== SECRET base64val |
|
||||
SECRET STRING */
|
||||
|
||||
#if !defined (SMALL)
|
||||
int parse_key (struct parse *cfile)
|
||||
{
|
||||
int token;
|
||||
|
@ -2325,6 +2318,7 @@ int parse_key (struct parse *cfile)
|
|||
omapi_auth_key_dereference (&key, MDL);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* on-statement :== event-types LBRACE executable-statements RBRACE
|
||||
|
@ -2713,6 +2707,7 @@ int parse_data_expression (expr, cfile, lose)
|
|||
if (!is_data_expression (*expr) &&
|
||||
(*expr) -> op != expr_variable_reference &&
|
||||
(*expr) -> op != expr_funcall) {
|
||||
expression_dereference (expr, MDL);
|
||||
parse_warn (cfile, "Expecting a data expression.");
|
||||
*lose = 1;
|
||||
return 0;
|
||||
|
@ -2739,6 +2734,7 @@ int parse_numeric_expression (expr, cfile, lose)
|
|||
if (!is_numeric_expression (*expr) &&
|
||||
(*expr) -> op != expr_variable_reference &&
|
||||
(*expr) -> op != expr_funcall) {
|
||||
expression_dereference (expr, MDL);
|
||||
parse_warn (cfile, "Expecting a numeric expression.");
|
||||
*lose = 1;
|
||||
return 0;
|
||||
|
@ -2773,6 +2769,7 @@ int parse_dns_expression (expr, cfile, lose)
|
|||
if (!is_dns_expression (*expr) &&
|
||||
(*expr) -> op != expr_variable_reference &&
|
||||
(*expr) -> op != expr_funcall) {
|
||||
expression_dereference (expr, MDL);
|
||||
parse_warn (cfile, "Expecting a dns update subexpression.");
|
||||
*lose = 1;
|
||||
return 0;
|
||||
|
@ -2791,16 +2788,12 @@ int parse_non_binary (expr, cfile, lose, context)
|
|||
enum dhcp_token token;
|
||||
const char *val;
|
||||
struct collection *col;
|
||||
struct option *option;
|
||||
struct expression *nexp, **ep;
|
||||
int known;
|
||||
enum expr_op opcode;
|
||||
const char *s;
|
||||
char *cptr;
|
||||
struct executable_statement *stmt;
|
||||
int i;
|
||||
unsigned long u;
|
||||
isc_result_t status, code;
|
||||
unsigned len;
|
||||
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
|
@ -3288,7 +3281,6 @@ int parse_non_binary (expr, cfile, lose, context)
|
|||
parse_warn
|
||||
(cfile,
|
||||
"expecting dns expression.");
|
||||
badnstrans:
|
||||
expression_dereference (expr, MDL);
|
||||
*lose = 1;
|
||||
return 0;
|
||||
|
@ -4039,8 +4031,40 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
|
|||
goto new_rhs;
|
||||
}
|
||||
|
||||
/* If the next binary operator is of greater precedence than the
|
||||
* current operator, then rhs we have parsed so far is actually
|
||||
* the lhs of the next operator. To get this value, we have to
|
||||
* recurse.
|
||||
*/
|
||||
if (binop != expr_none && next_op != expr_none &&
|
||||
op_precedence (binop, next_op) < 0) {
|
||||
|
||||
/* Eat the subexpression operator token, which we pass to
|
||||
* parse_expression...we only peek()'d earlier.
|
||||
*/
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
|
||||
/* Continue parsing of the right hand side with that token. */
|
||||
tmp = rhs;
|
||||
rhs = (struct expression *)0;
|
||||
if (!parse_expression (&rhs, cfile, lose, op_context (next_op),
|
||||
&tmp, next_op)) {
|
||||
if (!*lose) {
|
||||
parse_warn (cfile,
|
||||
"expecting a subexpression");
|
||||
*lose = 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
next_op = expr_none;
|
||||
}
|
||||
|
||||
if (binop != expr_none) {
|
||||
if (expression_context (rhs) != expression_context (lhs)) {
|
||||
rhs_context = expression_context(rhs);
|
||||
lhs_context = expression_context(lhs);
|
||||
|
||||
if ((rhs_context != context_any) && (lhs_context != context_any) &&
|
||||
(rhs_context != lhs_context)) {
|
||||
parse_warn (cfile, "illegal expression relating different types");
|
||||
skip_to_semi (cfile);
|
||||
expression_dereference (&rhs, MDL);
|
||||
|
@ -4052,9 +4076,10 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
|
|||
switch(binop) {
|
||||
case expr_not_equal:
|
||||
case expr_equal:
|
||||
if ((expression_context(rhs) != context_data_or_numeric) &&
|
||||
(expression_context(rhs) != context_data) &&
|
||||
(expression_context(rhs) != context_numeric)) {
|
||||
if ((rhs_context != context_data_or_numeric) &&
|
||||
(rhs_context != context_data) &&
|
||||
(rhs_context != context_numeric) &&
|
||||
(rhs_context != context_any)) {
|
||||
parse_warn (cfile, "expecting data/numeric expression");
|
||||
skip_to_semi (cfile);
|
||||
expression_dereference (&rhs, MDL);
|
||||
|
@ -4065,7 +4090,8 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
|
|||
|
||||
case expr_and:
|
||||
case expr_or:
|
||||
if (expression_context(rhs) != context_boolean) {
|
||||
if ((rhs_context != context_boolean) &&
|
||||
(rhs_context != context_any)) {
|
||||
parse_warn (cfile, "expecting boolean expressions");
|
||||
skip_to_semi (cfile);
|
||||
expression_dereference (&rhs, MDL);
|
||||
|
@ -4082,7 +4108,8 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
|
|||
case expr_binary_and:
|
||||
case expr_binary_or:
|
||||
case expr_binary_xor:
|
||||
if (expression_context(rhs) != context_numeric) {
|
||||
if ((rhs_context != context_numeric) &&
|
||||
(rhs_context != context_any)) {
|
||||
parse_warn (cfile, "expecting numeric expressions");
|
||||
skip_to_semi (cfile);
|
||||
expression_dereference (&rhs, MDL);
|
||||
|
@ -4115,27 +4142,6 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
|
|||
/* Eat the operator token - we now know it was a binary operator... */
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
|
||||
/* If the binary operator we saw previously has a lower precedence
|
||||
than the next operator, then the rhs we just parsed for that
|
||||
operator is actually the lhs of the operator with the higher
|
||||
precedence - to get the real rhs, we need to recurse on the
|
||||
new operator. */
|
||||
if (binop != expr_none &&
|
||||
op_precedence (binop, next_op) < 0) {
|
||||
tmp = rhs;
|
||||
rhs = (struct expression *)0;
|
||||
if (!parse_expression (&rhs, cfile, lose, op_context (next_op),
|
||||
&tmp, next_op)) {
|
||||
if (!*lose) {
|
||||
parse_warn (cfile,
|
||||
"expecting a subexpression");
|
||||
*lose = 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
next_op = expr_none;
|
||||
}
|
||||
|
||||
/* Now combine the LHS and the RHS using binop. */
|
||||
tmp = (struct expression *)0;
|
||||
if (!expression_allocate (&tmp, MDL))
|
||||
|
@ -4182,8 +4188,6 @@ int parse_option_statement (result, cfile, lookups, option, op)
|
|||
struct expression *expr = (struct expression *)0;
|
||||
struct expression *tmp;
|
||||
int lose;
|
||||
struct executable_statement *stmt;
|
||||
int ftt = 1;
|
||||
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
if (token == SEMI) {
|
||||
|
@ -4301,23 +4305,21 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
struct expression *t = (struct expression *)0;
|
||||
unsigned char buf [4];
|
||||
unsigned len;
|
||||
unsigned char *ob;
|
||||
struct iaddr addr;
|
||||
int num;
|
||||
const char *f, *g;
|
||||
struct enumeration_value *e;
|
||||
|
||||
switch (**fmt) {
|
||||
case 'U':
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
token = next_token (&val, &len, cfile);
|
||||
if (!is_identifier (token)) {
|
||||
if ((*fmt) [1] != 'o') {
|
||||
parse_warn (cfile, "expecting identifier.");
|
||||
skip_to_semi (cfile);
|
||||
if (token != SEMI)
|
||||
skip_to_semi (cfile);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
token = next_token (&val, &len, cfile);
|
||||
if (!make_const_data (&t, (const unsigned char *)val,
|
||||
len, 1, 1, MDL))
|
||||
log_fatal ("No memory for %s", val);
|
||||
|
@ -4342,18 +4344,21 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
return 0;
|
||||
}
|
||||
t -> op = expr_const_data;
|
||||
} else if (token == STRING) {
|
||||
token = next_token (&val, &len, cfile);
|
||||
if (!make_const_data (&t, (const unsigned char *)val,
|
||||
len, 1, 1, MDL))
|
||||
log_fatal ("No memory for \"%s\"", val);
|
||||
} else {
|
||||
if ((*fmt) [1] != 'o') {
|
||||
token = next_token (&val, &len, cfile);
|
||||
|
||||
if(token == STRING) {
|
||||
if (!make_const_data (&t,
|
||||
(const unsigned char *)val,
|
||||
len, 1, 1, MDL))
|
||||
log_fatal ("No memory for \"%s\"", val);
|
||||
} else if ((*fmt) [1] != 'o') {
|
||||
parse_warn (cfile, "expecting string %s.",
|
||||
"or hexadecimal data");
|
||||
skip_to_semi (cfile);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -4368,7 +4373,7 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
goto make_string;
|
||||
|
||||
case 't': /* Text string... */
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
token = next_token (&val, &len, cfile);
|
||||
if (token != STRING && !is_identifier (token)) {
|
||||
if ((*fmt) [1] != 'o') {
|
||||
parse_warn (cfile, "expecting string.");
|
||||
|
@ -4377,7 +4382,6 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
token = next_token (&val, &len, cfile);
|
||||
make_string:
|
||||
if (!make_const_data (&t, (const unsigned char *)val,
|
||||
len, 1, 1, MDL))
|
||||
|
@ -4424,10 +4428,9 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
break;
|
||||
|
||||
case 'T': /* Lease interval. */
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (token != INFINITE)
|
||||
goto check_number;
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
putLong (buf, -1);
|
||||
if (!make_const_data (&t, buf, 4, 0, 1, MDL))
|
||||
return 0;
|
||||
|
@ -4435,9 +4438,9 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
|
||||
case 'L': /* Unsigned 32-bit integer... */
|
||||
case 'l': /* Signed 32-bit integer... */
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
check_number:
|
||||
if (token != NUMBER) {
|
||||
if ((token != NUMBER) && (token != NUMBER_OR_NAME)) {
|
||||
need_number:
|
||||
if ((*fmt) [1] != 'o') {
|
||||
parse_warn (cfile, "expecting number.");
|
||||
|
@ -4446,7 +4449,6 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
convert_num (cfile, buf, val, 0, 32);
|
||||
if (!make_const_data (&t, buf, 4, 0, 1, MDL))
|
||||
return 0;
|
||||
|
@ -4454,10 +4456,9 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
|
||||
case 's': /* Signed 16-bit integer. */
|
||||
case 'S': /* Unsigned 16-bit integer. */
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
if (token != NUMBER)
|
||||
goto need_number;
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if ((token != NUMBER) && (token != NUMBER_OR_NAME))
|
||||
goto need_number;
|
||||
convert_num (cfile, buf, val, 0, 16);
|
||||
if (!make_const_data (&t, buf, 2, 0, 1, MDL))
|
||||
return 0;
|
||||
|
@ -4465,17 +4466,16 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
|
||||
case 'b': /* Signed 8-bit integer. */
|
||||
case 'B': /* Unsigned 8-bit integer. */
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
if (token != NUMBER)
|
||||
goto need_number;
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if ((token != NUMBER) && (token != NUMBER_OR_NAME))
|
||||
goto need_number;
|
||||
convert_num (cfile, buf, val, 0, 8);
|
||||
if (!make_const_data (&t, buf, 1, 0, 1, MDL))
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case 'f': /* Boolean flag. */
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (!is_identifier (token)) {
|
||||
if ((*fmt) [1] != 'o')
|
||||
parse_warn (cfile, "expecting identifier.");
|
||||
|
@ -4499,7 +4499,6 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
|
|||
parse_warn (cfile, "expecting boolean.");
|
||||
goto bad_flag;
|
||||
}
|
||||
token = next_token (&val, (unsigned *)0, cfile);
|
||||
if (!make_const_data (&t, buf, 1, 0, 1, MDL))
|
||||
return 0;
|
||||
break;
|
||||
|
@ -4547,7 +4546,6 @@ int parse_option_decl (oc, cfile)
|
|||
/* Set a flag if this is an array of a simple type (i.e.,
|
||||
not an array of pairs of IP addresses, or something
|
||||
like that. */
|
||||
int uniform = option -> format [1] == 'A';
|
||||
|
||||
for (fmt = option -> format; *fmt; fmt++) {
|
||||
if (*fmt == 'A')
|
||||
|
@ -4639,7 +4637,8 @@ int parse_option_decl (oc, cfile)
|
|||
case 'l': /* Signed 32-bit integer... */
|
||||
token = next_token (&val,
|
||||
(unsigned *)0, cfile);
|
||||
if (token != NUMBER) {
|
||||
if ((token != NUMBER) &&
|
||||
(token != NUMBER_OR_NAME)) {
|
||||
need_number:
|
||||
parse_warn (cfile,
|
||||
"expecting number.");
|
||||
|
@ -4656,7 +4655,8 @@ int parse_option_decl (oc, cfile)
|
|||
case 'S': /* Unsigned 16-bit integer. */
|
||||
token = next_token (&val,
|
||||
(unsigned *)0, cfile);
|
||||
if (token != NUMBER)
|
||||
if ((token != NUMBER) &&
|
||||
(token != NUMBER_OR_NAME))
|
||||
goto need_number;
|
||||
convert_num (cfile, buf, val, 0, 16);
|
||||
len = 2;
|
||||
|
@ -4667,7 +4667,8 @@ int parse_option_decl (oc, cfile)
|
|||
case 'B': /* Unsigned 8-bit integer. */
|
||||
token = next_token (&val,
|
||||
(unsigned *)0, cfile);
|
||||
if (token != NUMBER)
|
||||
if ((token != NUMBER) &&
|
||||
(token != NUMBER_OR_NAME))
|
||||
goto need_number;
|
||||
convert_num (cfile, buf, val, 0, 8);
|
||||
len = 1;
|
||||
|
@ -4744,7 +4745,6 @@ int parse_X (cfile, buf, max)
|
|||
int token;
|
||||
const char *val;
|
||||
unsigned len;
|
||||
u_int8_t *s;
|
||||
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
if (token == NUMBER_OR_NAME || token == NUMBER) {
|
||||
|
@ -4795,16 +4795,17 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
|
|||
unsigned i, lix;
|
||||
|
||||
do_percentm (mbuf, fmt);
|
||||
#ifndef NO_SNPRINTF
|
||||
/* %Audit% This is log output. %2004.06.17,Safe%
|
||||
* If we truncate we hope the user can get a hint from the log.
|
||||
*/
|
||||
snprintf (fbuf, sizeof fbuf, "%s line %d: %s",
|
||||
cfile -> tlname, cfile -> lexline, mbuf);
|
||||
#else
|
||||
sprintf (fbuf, "%s line %d: %s",
|
||||
cfile -> tlname, cfile -> lexline, mbuf);
|
||||
#endif
|
||||
|
||||
va_start (list, fmt);
|
||||
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
|
||||
|
||||
fmt = fbuf;
|
||||
vsnprintf (mbuf, sizeof mbuf, fmt, list);
|
||||
|
||||
va_end (list);
|
||||
|
||||
lix = 0;
|
||||
|
@ -4813,7 +4814,7 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
|
|||
if (lix < (sizeof lexbuf) - 1)
|
||||
lexbuf [lix++] = ' ';
|
||||
if (cfile -> token_line [i] == '\t') {
|
||||
for (lix;
|
||||
for (/*lix*/;
|
||||
lix < (sizeof lexbuf) - 1 && (lix & 7); lix++)
|
||||
lexbuf [lix] = ' ';
|
||||
}
|
||||
|
@ -4828,13 +4829,14 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
|
|||
#endif
|
||||
|
||||
if (log_perror) {
|
||||
write (2, mbuf, strlen (mbuf));
|
||||
write (2, "\n", 1);
|
||||
write (2, cfile -> token_line, strlen (cfile -> token_line));
|
||||
write (2, "\n", 1);
|
||||
write (STDERR_FILENO, mbuf, strlen (mbuf));
|
||||
write (STDERR_FILENO, "\n", 1);
|
||||
write (STDERR_FILENO, cfile -> token_line,
|
||||
strlen (cfile -> token_line));
|
||||
write (STDERR_FILENO, "\n", 1);
|
||||
if (cfile -> lexchar < 81)
|
||||
write (2, lexbuf, lix);
|
||||
write (2, "^\n", 2);
|
||||
write (STDERR_FILENO, lexbuf, lix);
|
||||
write (STDERR_FILENO, "^\n", 2);
|
||||
}
|
||||
|
||||
cfile -> warnings_occurred = 1;
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Turn data structures into printable text. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: print.c,v 1.1.1.3 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: print.c,v 1.1.1.4 2005/08/11 16:54:28 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -57,7 +48,7 @@ char *quotify_string (const char *s, const char *file, int line)
|
|||
for (sp = s; sp && *sp; sp++) {
|
||||
if (*sp == ' ')
|
||||
len++;
|
||||
else if (!isascii (*sp) || !isprint (*sp))
|
||||
else if (!isascii (*sp) || !isprint ((unsigned char)*sp))
|
||||
len += 4;
|
||||
else if (*sp == '"' || *sp == '\\')
|
||||
len += 2;
|
||||
|
@ -71,7 +62,7 @@ char *quotify_string (const char *s, const char *file, int line)
|
|||
for (sp = s; sp && *sp; sp++) {
|
||||
if (*sp == ' ')
|
||||
*nsp++ = ' ';
|
||||
else if (!isascii (*sp) || !isprint (*sp)) {
|
||||
else if (!isascii (*sp) || !isprint ((unsigned char)*sp)) {
|
||||
sprintf (nsp, "\\%03o",
|
||||
*(const unsigned char *)sp);
|
||||
nsp += 4;
|
||||
|
@ -223,7 +214,7 @@ void print_lease (lease)
|
|||
lease -> host ? lease -> host -> name : "<none>");
|
||||
}
|
||||
|
||||
#if defined (DEBUG)
|
||||
#if defined (DEBUG_PACKET)
|
||||
void dump_packet_option (struct option_cache *oc,
|
||||
struct packet *packet,
|
||||
struct lease *lease,
|
||||
|
@ -304,20 +295,47 @@ void dump_raw (buf, len)
|
|||
char lbuf [80];
|
||||
int lbix = 0;
|
||||
|
||||
lbuf [0] = 0;
|
||||
/*
|
||||
1 2 3 4 5 6 7
|
||||
01234567890123456789012345678901234567890123456789012345678901234567890123
|
||||
280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .................
|
||||
*/
|
||||
|
||||
memset(lbuf, ' ', 79);
|
||||
lbuf [79] = 0;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
if ((i & 15) == 0) {
|
||||
if (lbix)
|
||||
log_info (lbuf);
|
||||
sprintf (lbuf, "%03x:", i);
|
||||
lbix = 4;
|
||||
if (lbix) {
|
||||
lbuf[53]=' ';
|
||||
lbuf[54]=' ';
|
||||
lbuf[55]=' ';
|
||||
lbuf[73]='\0';
|
||||
log_info ("%s", lbuf);
|
||||
}
|
||||
memset(lbuf, ' ', 79);
|
||||
lbuf [79] = 0;
|
||||
sprintf (lbuf, "%03x:", i);
|
||||
lbix = 4;
|
||||
} else if ((i & 7) == 0)
|
||||
lbuf [lbix++] = ' ';
|
||||
|
||||
if(isprint(buf[i])) {
|
||||
lbuf[56+(i%16)]=buf[i];
|
||||
} else {
|
||||
lbuf[56+(i%16)]='.';
|
||||
}
|
||||
|
||||
sprintf (&lbuf [lbix], " %02x", buf [i]);
|
||||
lbix += 3;
|
||||
lbuf[lbix]=' ';
|
||||
|
||||
}
|
||||
log_info (lbuf);
|
||||
lbuf[53]=' ';
|
||||
lbuf[54]=' ';
|
||||
lbuf[55]=' ';
|
||||
lbuf[73]='\0';
|
||||
log_info ("%s", lbuf);
|
||||
}
|
||||
|
||||
void hash_dump (table)
|
||||
|
@ -337,7 +355,7 @@ void hash_dump (table)
|
|||
if (bp -> len)
|
||||
dump_raw (bp -> name, bp -> len);
|
||||
else
|
||||
log_info ((const char *)bp -> name);
|
||||
log_info ("%s", (const char *)bp -> name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -396,8 +414,13 @@ char *print_dotted_quads (len, data)
|
|||
|
||||
i = 0;
|
||||
|
||||
/* %Audit% Loop bounds checks to 21 bytes. %2004.06.17,Safe%
|
||||
* The sprintf can't exceed 18 bytes, and since the loop enforces
|
||||
* 21 bytes of space per iteration at no time can we exit the
|
||||
* loop without at least 3 bytes spare.
|
||||
*/
|
||||
do {
|
||||
sprintf (s, "%d.%d.%d.%d, ",
|
||||
sprintf (s, "%u.%u.%u.%u, ",
|
||||
data [i], data [i + 1], data [i + 2], data [i + 3]);
|
||||
s += strlen (s);
|
||||
i += 4;
|
||||
|
@ -1020,7 +1043,6 @@ int token_print_indent_concat (FILE *file, int col, int indent,
|
|||
const char *suffix, ...)
|
||||
{
|
||||
va_list list;
|
||||
char *buf;
|
||||
unsigned len;
|
||||
char *s, *t, *u;
|
||||
|
||||
|
@ -1058,7 +1080,6 @@ int token_indent_data_string (FILE *file, int col, int indent,
|
|||
struct data_string *data)
|
||||
{
|
||||
int i;
|
||||
char *buf;
|
||||
char obuf [3];
|
||||
|
||||
/* See if this is just ASCII. */
|
||||
|
@ -1248,6 +1269,9 @@ void print_dns_status (int status, ns_updque *uq)
|
|||
case T_TXT:
|
||||
en = "TXT";
|
||||
break;
|
||||
case T_KEY:
|
||||
en = "KEY";
|
||||
break;
|
||||
case T_CNAME:
|
||||
en = "CNAME";
|
||||
break;
|
||||
|
@ -1268,13 +1292,19 @@ void print_dns_status (int status, ns_updque *uq)
|
|||
if (s + 1 < end)
|
||||
*s++ = '"';
|
||||
}
|
||||
if (s + u -> r_size < end) {
|
||||
memcpy (s, u -> r_data, u -> r_size);
|
||||
s += u -> r_size;
|
||||
if (u -> r_type == T_TXT) {
|
||||
if (s + 1 < end)
|
||||
*s++ = '"';
|
||||
}
|
||||
if(u->r_type == T_KEY) {
|
||||
strcat(s, "<keydata>");
|
||||
s+=strlen("<keydata>");
|
||||
}
|
||||
else {
|
||||
if (s + u -> r_size < end) {
|
||||
memcpy (s, u -> r_data, u -> r_size);
|
||||
s += u -> r_size;
|
||||
if (u -> r_type == T_TXT) {
|
||||
if (s + 1 < end)
|
||||
*s++ = '"';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (position) {
|
||||
|
|
|
@ -16,39 +16,30 @@
|
|||
Sigh. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -56,7 +47,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: raw.c,v 1.1.1.2 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: raw.c,v 1.1.1.3 2005/08/11 16:54:28 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -74,10 +65,10 @@ void if_register_send (info)
|
|||
int flag;
|
||||
|
||||
/* Set up the address we're going to connect to. */
|
||||
memset (&name, 0, sizeof (name));
|
||||
name.sin_family = AF_INET;
|
||||
name.sin_port = local_port;
|
||||
name.sin_addr.s_addr = htonl (INADDR_BROADCAST);
|
||||
memset (name.sin_zero, 0, sizeof (name.sin_zero));
|
||||
|
||||
/* List addresses on which we're listening. */
|
||||
if (!quiet_interface_discovery)
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Parser for /etc/resolv.conf file. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: resolv.c,v 1.1.1.2 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: resolv.c,v 1.1.1.3 2005/08/11 16:54:28 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -59,10 +50,8 @@ void read_resolv_conf (parse_time)
|
|||
struct parse *cfile;
|
||||
const char *val;
|
||||
int token;
|
||||
int declaration = 0;
|
||||
struct name_server *sp, *sl, *ns;
|
||||
struct domain_search_list *dp, *dl, *nd;
|
||||
struct iaddr *iaddr;
|
||||
|
||||
if ((file = open (path_resolv_conf, O_RDONLY)) < 0) {
|
||||
log_error ("Can't open %s: %m", path_resolv_conf);
|
||||
|
@ -134,6 +123,7 @@ void read_resolv_conf (parse_time)
|
|||
piaddr (iaddr));
|
||||
ns -> next = (struct name_server *)0;
|
||||
*sp = ns;
|
||||
memset (&ns->addr, 0, sizeof ns->addr);
|
||||
memcpy (&ns -> addr.sin_addr,
|
||||
iaddr.iabuf, iaddr.len);
|
||||
#ifdef HAVE_SA_LEN
|
||||
|
@ -141,8 +131,6 @@ void read_resolv_conf (parse_time)
|
|||
#endif
|
||||
ns -> addr.sin_family = AF_INET;
|
||||
ns -> addr.sin_port = htons (53);
|
||||
memset (ns -> addr.sin_zero, 0,
|
||||
sizeof ns -> addr.sin_zero);
|
||||
}
|
||||
ns -> rcdate = parse_time;
|
||||
skip_to_semi (cfile);
|
||||
|
@ -189,7 +177,6 @@ void read_resolv_conf (parse_time)
|
|||
|
||||
struct name_server *first_name_server ()
|
||||
{
|
||||
FILE *rc;
|
||||
static TIME rcdate;
|
||||
struct stat st;
|
||||
|
||||
|
@ -200,8 +187,6 @@ struct name_server *first_name_server ()
|
|||
return (struct name_server *)0;
|
||||
}
|
||||
if (st.st_mtime > rcdate) {
|
||||
char rcbuf [512];
|
||||
char *s, *t, *u;
|
||||
rcdate = cur_time + 1;
|
||||
|
||||
read_resolv_conf (rcdate);
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
BSD socket interface code... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -51,7 +42,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: socket.c,v 1.1.1.3 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: socket.c,v 1.1.1.4 2005/08/11 16:54:28 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -64,7 +55,13 @@ static char copyright[] =
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (USE_SOCKET_SEND) || defined (USE_SOCKET_FALLBACK)
|
||||
#if 0
|
||||
#ifndef USE_SOCKET_RECEIVE
|
||||
static int once = 0;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Reinitializes the specified interface after an address change. This
|
||||
is not required for packet-filter APIs. */
|
||||
|
@ -105,6 +102,10 @@ int if_register_socket (info)
|
|||
struct sockaddr_in name;
|
||||
int sock;
|
||||
int flag;
|
||||
#ifndef SMALL
|
||||
char *buf;
|
||||
char *policy = "out bypass";
|
||||
#endif
|
||||
|
||||
#if !defined (HAVE_SO_BINDTODEVICE) && !defined (USE_FALLBACK)
|
||||
/* Make sure only one interface is registered. */
|
||||
|
@ -131,6 +132,15 @@ int if_register_socket (info)
|
|||
(char *)&flag, sizeof flag) < 0)
|
||||
log_fatal ("Can't set SO_REUSEADDR option on dhcp socket: %m");
|
||||
|
||||
#ifndef SMALL
|
||||
/* Set a per-socket IPsec policy to prevent encryption. */
|
||||
buf = ipsec_set_policy(policy, strlen(policy));
|
||||
if (setsockopt (sock, IPPROTO_IP, IP_IPSEC_POLICY, buf,
|
||||
ipsec_get_policylen(buf)) < 0 && errno != ENOPROTOOPT)
|
||||
log_fatal ("Can't set IPsec policy on dhcp socket: %m");
|
||||
free (buf);
|
||||
#endif
|
||||
|
||||
/* Set the BROADCAST option so that we can broadcast DHCP responses.
|
||||
We shouldn't do this for fallback devices, and we can detect that
|
||||
a device is a fallback because it has no ifp structure. */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,40 +4,31 @@
|
|||
Contributed in May of 1999 by Andrew Chittenden */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: tr.c,v 1.1.1.2 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: tr.c,v 1.1.1.3 2005/08/11 16:54:29 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Routines for manipulating parse trees... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: tree.c,v 1.1.1.3 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: tree.c,v 1.1.1.4 2005/08/11 16:54:29 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -258,7 +249,6 @@ int make_limit (new, expr, limit)
|
|||
struct expression *expr;
|
||||
int limit;
|
||||
{
|
||||
struct expression *rv;
|
||||
|
||||
/* Allocate a node to enforce a limit on evaluation. */
|
||||
if (!expression_allocate (new, MDL))
|
||||
|
@ -653,11 +643,12 @@ int evaluate_dns_expression (result, packet, lease, client_state, in_options,
|
|||
struct binding_scope **scope;
|
||||
struct expression *expr;
|
||||
{
|
||||
ns_updrec *foo;
|
||||
unsigned long ttl = 0;
|
||||
char *tname;
|
||||
struct data_string name, data;
|
||||
int r0, r1, r2, r3;
|
||||
int r0, r1, r2;
|
||||
|
||||
tname = NULL; /* XXXGCC -Wuninitialized */
|
||||
|
||||
if (!result || *result) {
|
||||
log_error ("evaluate_dns_expression called with non-null %s",
|
||||
|
@ -711,8 +702,10 @@ int evaluate_dns_expression (result, packet, lease, client_state, in_options,
|
|||
in_options, cfg_options, scope,
|
||||
expr -> data.ns_add.rrdata, MDL);
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
r2 = 0;
|
||||
tname = NULL;
|
||||
}
|
||||
if (r0 && r1 && (r2 || expr -> op != expr_ns_add)) {
|
||||
*result = minires_mkupdrec (((expr -> op == expr_ns_add ||
|
||||
expr -> op == expr_ns_delete)
|
||||
|
@ -744,10 +737,13 @@ int evaluate_dns_expression (result, packet, lease, client_state, in_options,
|
|||
goto dpngood;
|
||||
(*result) -> r_data =
|
||||
(*result) -> r_data_ephem;
|
||||
/*%Audit% 16 bytes max. %2004.06.17,Safe%*/
|
||||
sprintf ((char *)(*result) -> r_data_ephem,
|
||||
"%d.%d.%d.%d",
|
||||
data.data [0], data.data [1],
|
||||
data.data [2], data.data [3]);
|
||||
"%u.%u.%u.%u",
|
||||
data.data [0] & 0xff,
|
||||
data.data [1] & 0xff,
|
||||
data.data [2] & 0xff,
|
||||
data.data [3] & 0xff);
|
||||
(*result) -> r_size =
|
||||
strlen ((const char *)
|
||||
(*result) -> r_data);
|
||||
|
@ -907,10 +903,7 @@ int evaluate_boolean_expression (result, packet, lease, client_state,
|
|||
struct binding_scope **scope;
|
||||
struct expression *expr;
|
||||
{
|
||||
struct data_string left, right;
|
||||
struct data_string rrtype, rrname, rrdata;
|
||||
unsigned long ttl;
|
||||
int srrtype, srrname, srrdata, sttl;
|
||||
struct data_string left;
|
||||
int bleft, bright;
|
||||
int sleft, sright;
|
||||
struct binding *binding;
|
||||
|
@ -1279,13 +1272,14 @@ int evaluate_data_expression (result, packet, lease, client_state,
|
|||
int line;
|
||||
{
|
||||
struct data_string data, other;
|
||||
unsigned long offset, len, i;
|
||||
unsigned long offset, len;
|
||||
int s0, s1, s2, s3;
|
||||
int status;
|
||||
struct binding *binding;
|
||||
char *s;
|
||||
struct binding_value *bv;
|
||||
|
||||
status = 0; /* XXXGCC -Wuninitialized */
|
||||
|
||||
switch (expr -> op) {
|
||||
/* Extract N bytes starting at byte M of a data string. */
|
||||
case expr_substring:
|
||||
|
@ -1719,6 +1713,7 @@ int evaluate_data_expression (result, packet, lease, client_state,
|
|||
if (len != 8 && len != 16 && len != 32) {
|
||||
log_info ("binary_to_ascii: %s %ld!",
|
||||
"invalid width", len);
|
||||
status = 0;
|
||||
goto b2a_out;
|
||||
}
|
||||
len /= 8;
|
||||
|
@ -1829,7 +1824,6 @@ int evaluate_data_expression (result, packet, lease, client_state,
|
|||
MDL);
|
||||
|
||||
if (s0 && s1) {
|
||||
char *upper;
|
||||
int i;
|
||||
|
||||
/* The buffer must be a multiple of the number's
|
||||
|
@ -3107,18 +3101,20 @@ static int op_val (op)
|
|||
|
||||
case expr_equal:
|
||||
case expr_not_equal:
|
||||
return 4;
|
||||
|
||||
case expr_or:
|
||||
case expr_and:
|
||||
return 3;
|
||||
|
||||
case expr_and:
|
||||
case expr_add:
|
||||
case expr_subtract:
|
||||
return 2;
|
||||
|
||||
case expr_multiply:
|
||||
case expr_divide:
|
||||
case expr_remainder:
|
||||
return 1;
|
||||
|
||||
case expr_or:
|
||||
case expr_add:
|
||||
case expr_subtract:
|
||||
return 2;
|
||||
}
|
||||
return 100;
|
||||
}
|
||||
|
@ -3126,7 +3122,6 @@ static int op_val (op)
|
|||
int op_precedence (op1, op2)
|
||||
enum expr_op op1, op2;
|
||||
{
|
||||
int ov1, ov2;
|
||||
|
||||
return op_val (op1) - op_val (op2);
|
||||
}
|
||||
|
@ -3741,7 +3736,6 @@ int binding_scope_dereference (ptr, file, line)
|
|||
const char *file;
|
||||
int line;
|
||||
{
|
||||
int i;
|
||||
struct binding_scope *binding_scope;
|
||||
|
||||
if (!ptr || !*ptr) {
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Ultrix PacketFilter interface code. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -43,7 +34,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: upf.c,v 1.1.1.2 2003/02/18 16:37:57 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: upf.c,v 1.1.1.3 2005/08/11 16:54:29 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
|
@ -88,11 +79,9 @@ int if_register_upf (info)
|
|||
|
||||
/* Open a UPF device */
|
||||
for (b = 0; 1; b++) {
|
||||
#ifndef NO_SNPRINTF
|
||||
snprintf(filename, sizeof(filename), "/dev/pf/pfilt%d", b);
|
||||
#else
|
||||
/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
|
||||
sprintf(filename, "/dev/pf/pfilt%d", b);
|
||||
#endif
|
||||
|
||||
sock = open (filename, O_RDWR, 0);
|
||||
if (sock < 0) {
|
||||
if (errno == EBUSY) {
|
||||
|
@ -332,7 +321,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|||
|
||||
/* Decode the IP and UDP headers... */
|
||||
offset = decode_udp_ip_header (interface, ibuf, bufix,
|
||||
from, (unsigned char *)0, length);
|
||||
from, length);
|
||||
|
||||
/* If the IP or UDP checksum was bad, skip the packet... */
|
||||
if (offset < 0)
|
||||
|
|
|
@ -70,6 +70,26 @@ if [ "$sysname" = "" ]; then
|
|||
OSF1)
|
||||
if [ $machine = 'alpha' ]; then
|
||||
sysname=alphaosf
|
||||
# OSF1 has libc snprintf/vsnprintf support as of 4.0F. There is
|
||||
# no v4 & v5 portable compile-time way of knowing the system's
|
||||
# version (we can #include a version-identing file, but it is only
|
||||
# present in v5).
|
||||
#
|
||||
# So we rely on a system command, 'sizer', and default to
|
||||
# no-snprintf if we can't find it.
|
||||
if [ -x /usr/sbin/sizer ] ; then
|
||||
release=`/usr/sbin/sizer -v | cut -d ' ' -f 4 | cut -c 2-`
|
||||
major=`echo $release | cut -d . -f 1`
|
||||
minor=`echo $release | cut -d . -f 2`
|
||||
incr=`echo $minor | sed 's/[0-9]//g' | tr '[A-Z]' '[0-9]'`
|
||||
minor=`echo $minor | sed 's/[A-Z]//g'`
|
||||
|
||||
if [ $major -gt 4 -o \
|
||||
$major -eq 4 -a $minor -gt 0 -o \
|
||||
$major -eq 4 -a $minor -eq 0 -a $incr -gt 5 ]; then
|
||||
copts="$copts -DHAVE_SNPRINTF"
|
||||
fi
|
||||
fi
|
||||
fi;;
|
||||
Linux)
|
||||
release=`uname -r`
|
||||
|
@ -114,14 +134,7 @@ if [ "$sysname" = "" ]; then
|
|||
fi;;
|
||||
esac;;
|
||||
NetBSD)
|
||||
hw=`uname -m`
|
||||
case $hw in
|
||||
arm32) sysname=netbsd-nocast;;
|
||||
alpha) sysname=netbsd-nocast;;
|
||||
sparc) sysname=netbsd-nocast;;
|
||||
sparc64) sysname=netbsd-nocast;;
|
||||
*) sysname=netbsd;;
|
||||
esac;;
|
||||
sysname=netbsd;;
|
||||
OpenBSD)
|
||||
sysname=openbsd;;
|
||||
FreeBSD)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Summary: The Internet Software Consortium (ISC) DHCP server
|
||||
Summary: The Internet Systems Consortium (ISC) DHCP server
|
||||
Name: dhcp
|
||||
%define version 3.1
|
||||
%define version 3.0.2
|
||||
Version: %{version}
|
||||
Release: 2tac
|
||||
Group: System Environment/Daemons
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
# Author: Shu-Min Chang
|
||||
#
|
||||
# Copyright(c) 2002 Intel Corporation. All rights reserved
|
||||
# Copyright(c) 2003 Intel Corporation. All rights reserved
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
|
@ -94,6 +94,8 @@ Pressley for being the DHCP reference book :).
|
|||
|
||||
Usage: $ARGV -s <Srv> -o <Out> [-p <Pri> [-k <key>]] [-f <Fo>]
|
||||
|
||||
Version: 1.0.1
|
||||
|
||||
ENDOFHELP
|
||||
|
||||
###################### Begin Main Program ####################################
|
||||
|
@ -349,10 +351,20 @@ sub GetScopes ($) {
|
|||
|
||||
if (!Registry::GetRegKeyVal ("\\\\$Server\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\DHCPServer\\Configuration\\Subnets\\$Subnets[$i]\\ExcludedIpRanges", \$RegVal)) {
|
||||
@SExclusionRanges = Registry::ExtractExclusionRanges($RegVal);
|
||||
|
||||
# for (my $j=2; $j<=$#SExclusionRanges; $j+=2) {
|
||||
# if (unpack("L",$SExclusionRanges[$j]) < unpack("L",$SExclusionRanges[$j-2])) {
|
||||
# print ("\n******** Subnet exclusion ranges out of order ********\n");
|
||||
# }
|
||||
# }
|
||||
|
||||
@SExclusionRanges = sort(@SExclusionRanges);
|
||||
|
||||
# print "\n\tExclusion Ranges: ";
|
||||
# for (my $j=0; $j<=$#SExclusionRanges; $j+=2) {
|
||||
# print "\n\t\t$SExclusionRanges[$j] - $SExclusionRanges[$j+1]";
|
||||
# print "\n\t\t",Registry::ExtractIp($SExclusionRanges[$j])," - ",Registry::ExtractIp($SExclusionRanges[$j+1]);
|
||||
# }
|
||||
|
||||
}
|
||||
@InclusionRanges = FindInclusionRanges ($SStartAddress, $SEndAddress, @SExclusionRanges);
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
Copyright: please read the top of the source code.
|
||||
|
||||
Usage:
|
||||
Objective: please read the help screen by executing the program without any
|
||||
parameter.
|
||||
|
||||
Revision:
|
||||
SMC: Shu-Min Chang
|
||||
|
||||
Who When What
|
||||
--- ------ --------------------------------------------------------------------
|
||||
SMC 021107 Initial release Version 1.0 to ISC DHCP repository
|
||||
SMC 030129 Fixed inclusion range calculation by sorting exclusion before
|
||||
passing to FindInclusionRanges
|
||||
SMC 030228 release 1.0.1 to ISC DHCP repository
|
|
@ -1,20 +1,25 @@
|
|||
# Makefile.dist
|
||||
#
|
||||
# Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
# Use is subject to license terms which appear in the file named
|
||||
# ISC-LICENSE that should have accompanied this file when you
|
||||
# received it. If a file named ISC-LICENSE did not accompany this
|
||||
# file, or you are not sure the one you have is correct, you may
|
||||
# obtain an applicable copy of the license at:
|
||||
# Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
#
|
||||
# http://www.isc.org/isc-license-1.0.html.
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# This file is part of the ISC DHCP distribution. The documentation
|
||||
# associated with this file is listed in the file DOCUMENTATION,
|
||||
# included in the top-level directory of this release.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Support and other services are available for ISC products - see
|
||||
# http://www.isc.org for more information.
|
||||
# Internet Systems Consortium, Inc.
|
||||
# 950 Charter Street
|
||||
# Redwood City, CA 94063
|
||||
# <info@isc.org>
|
||||
# http://www.isc.org/
|
||||
#
|
||||
|
||||
CATMANPAGES = dhcpctl.cat3 omshell.cat1
|
||||
|
@ -73,7 +78,7 @@ depend:
|
|||
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
|
||||
|
||||
clean:
|
||||
-rm -f $(OBJ) test.o svtest cltest.o cltest
|
||||
-rm -f $(OBJ) omshell.o omshell cltest.o cltest
|
||||
|
||||
realclean: clean
|
||||
-rm -f libdhcpctl.a *~ $(CATMANPAGES) $(SEDMANPAGES)
|
||||
|
|
|
@ -3,44 +3,40 @@
|
|||
The dhcpctl callback object. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1999-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: callback.c,v 1.1.1.3 2005/08/11 16:54:30 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <omapip/omapip_p.h>
|
||||
#include "dhcpctl.h"
|
||||
|
||||
|
@ -63,7 +59,6 @@ dhcpctl_status dhcpctl_set_callback (dhcpctl_handle h, void *data,
|
|||
{
|
||||
dhcpctl_callback_object_t *callback;
|
||||
omapi_object_t *inner;
|
||||
isc_result_t status;
|
||||
|
||||
callback = dmalloc (sizeof *callback, MDL);
|
||||
if (!callback)
|
||||
|
@ -166,7 +161,6 @@ isc_result_t dhcpctl_callback_stuff_values (omapi_object_t *c,
|
|||
omapi_object_t *id,
|
||||
omapi_object_t *p)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (p -> type != dhcpctl_callback_type)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
|
|
@ -2,40 +2,37 @@
|
|||
|
||||
Example program that uses the dhcpctl library. */
|
||||
|
||||
/* Copyright (C) 2000-2002 Internet Software Consortium
|
||||
* All rights reserved.
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 2000-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software was contributed to the Internet Software Consortium
|
||||
* This software was contributed to Internet Systems Consortium
|
||||
* by Brian Murrell.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char ocopyright[] =
|
||||
"$Id: cltest.c,v 1.1.1.3 2005/08/11 16:54:30 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -2,29 +2,48 @@
|
|||
.\"
|
||||
.\" Project: DHCP
|
||||
.\" File: dhcpctl.3
|
||||
.\" RCSId: $Id: dhcpctl.3,v 1.1.1.1 2001/08/03 11:35:34 drochner Exp $
|
||||
.\" RCSId: $Id: dhcpctl.3,v 1.1.1.2 2005/08/11 16:54:30 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 2000 Nominum, Inc.
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 2000-2003 by Internet Software Consortium
|
||||
.\" Copyright (c) 2000 Nominum, Inc.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" Description: dhcpctl man page.
|
||||
.\"
|
||||
.\"
|
||||
.Dd Nov 15, 2000
|
||||
.Dd November 15, 2000
|
||||
.Dt DHCPCTL 3
|
||||
.Os DHCP 3
|
||||
.Os
|
||||
.ds vT DHCP Programmer's Manual
|
||||
.\"
|
||||
.\"
|
||||
.\"
|
||||
.Sh NAME
|
||||
.Nm dhcpctl_initialize
|
||||
.Nd dhcpctl library initialization.
|
||||
.Nd dhcpctl library initialization
|
||||
.\"
|
||||
.\"
|
||||
.\"
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <dhcpctl/dhcpctl.h>
|
||||
.Fd
|
||||
.Ft dhcpctl_status
|
||||
.Fo dhcpctl_initialize
|
||||
.Fa void
|
||||
|
@ -325,6 +344,8 @@ values must all match what the server uses and are defined in its
|
|||
configuration file. The created object is returned through the first parameter
|
||||
and must be used as the 4th parameter to
|
||||
.Fn dhcpctl_connect .
|
||||
Note that the 'secret' value must not be base64 encoded, which is different
|
||||
from how the value appears in the dhcpd.conf file.
|
||||
.\"
|
||||
.\"
|
||||
.\"
|
||||
|
@ -460,11 +481,13 @@ int main (int argc, char **argv) {
|
|||
}
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.SH SEE ALSO
|
||||
omapi(3), omshell(3), dhcpd(8), dhclient(8), dhcpd.conf(5), dhclient.conf(5).
|
||||
.SH AUTHOR
|
||||
.B dhcpctl
|
||||
was written by Ted Lemon of Nominum, Inc. Information about Nominum
|
||||
and support contracts for DHCP and BIND can be found at
|
||||
.B http://www.nominum.com. This preliminary documentation was
|
||||
written by James Brister of Nominum, Inc.
|
||||
.Xr omshell 1 ,
|
||||
.\" .Xr omapi 3 ,
|
||||
.Xr dhclient.conf 5 ,
|
||||
.Xr dhcpd.conf 5 ,
|
||||
.Xr dhclient 8 ,
|
||||
.Xr dhcpd 8
|
||||
.Sh AUTHORS
|
||||
.Nm
|
||||
was written by Ted Lemon of Nominum, Inc.
|
||||
This preliminary documentation was written by James Brister of Nominum, Inc.
|
||||
|
|
|
@ -3,44 +3,40 @@
|
|||
Subroutines providing general support for objects. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1999-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: dhcpctl.c,v 1.1.1.4 2005/08/11 16:54:30 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <omapip/omapip_p.h>
|
||||
#include "dhcpctl.h"
|
||||
|
||||
|
@ -105,7 +101,6 @@ dhcpctl_status dhcpctl_connect (dhcpctl_handle *connection,
|
|||
dhcpctl_handle authinfo)
|
||||
{
|
||||
isc_result_t status;
|
||||
dhcpctl_status waitstatus;
|
||||
|
||||
status = omapi_generic_new (connection, MDL);
|
||||
if (status != ISC_R_SUCCESS) {
|
||||
|
@ -175,7 +170,6 @@ dhcpctl_status dhcpctl_get_value (dhcpctl_data_string *result,
|
|||
{
|
||||
isc_result_t status;
|
||||
omapi_value_t *tv = (omapi_value_t *)0;
|
||||
omapi_data_string_t *value = (omapi_data_string_t *)0;
|
||||
unsigned len;
|
||||
int ip;
|
||||
|
||||
|
@ -267,7 +261,6 @@ dhcpctl_status dhcpctl_set_value (dhcpctl_handle h, dhcpctl_data_string value,
|
|||
isc_result_t status;
|
||||
omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
|
||||
omapi_data_string_t *name = (omapi_data_string_t *)0;
|
||||
int len;
|
||||
|
||||
status = omapi_data_string_new (&name, strlen (value_name), MDL);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
|
@ -301,7 +294,6 @@ dhcpctl_status dhcpctl_set_string_value (dhcpctl_handle h, const char *value,
|
|||
isc_result_t status;
|
||||
omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
|
||||
omapi_data_string_t *name = (omapi_data_string_t *)0;
|
||||
int len;
|
||||
|
||||
status = omapi_data_string_new (&name, strlen (value_name), MDL);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
|
@ -390,7 +382,6 @@ dhcpctl_status dhcpctl_set_boolean_value (dhcpctl_handle h, int value,
|
|||
isc_result_t status;
|
||||
omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
|
||||
omapi_data_string_t *name = (omapi_data_string_t *)0;
|
||||
int len;
|
||||
|
||||
status = omapi_data_string_new (&name, strlen (value_name), MDL);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
|
@ -420,7 +411,6 @@ dhcpctl_status dhcpctl_set_int_value (dhcpctl_handle h, int value,
|
|||
isc_result_t status;
|
||||
omapi_typed_data_t *tv = (omapi_typed_data_t *)0;
|
||||
omapi_data_string_t *name = (omapi_data_string_t *)0;
|
||||
int len;
|
||||
|
||||
status = omapi_data_string_new (&name, strlen (value_name), MDL);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
|
|
|
@ -1,41 +1,32 @@
|
|||
/* dhcpctl.h
|
||||
/* $Id: dhcpctl.h,v 1.1.1.3 2005/08/11 16:54:30 drochner Exp $
|
||||
|
||||
Subroutines providing general support for objects. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1999-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
.\" omshell.1
|
||||
.\" $Id: omshell.1,v 1.1.1.3 2005/08/11 16:54:30 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2001-2002 Internet Software Consortium.
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 2001-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
.\" To learn more about the Internet Software Consortium, see
|
||||
.\" To learn more about Internet Systems Consortium, see
|
||||
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
.\" ``http://www.nominum.com''.
|
||||
|
|
|
@ -3,44 +3,40 @@
|
|||
Examine and modify omapi objects. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 2001-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: omshell.c,v 1.1.1.4 2005/08/11 16:54:30 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <stdio.h>
|
||||
|
@ -86,11 +82,9 @@ int main (int argc, char **argv, char **envp)
|
|||
dhcpctl_handle connection;
|
||||
dhcpctl_handle authenticator;
|
||||
dhcpctl_handle oh;
|
||||
dhcpctl_data_string cid, ip_addr;
|
||||
dhcpctl_data_string result, groupname, identifier;
|
||||
struct data_string secret;
|
||||
const char *name = 0, *algorithm = "hmac-md5";
|
||||
int i, j;
|
||||
int i;
|
||||
int port = 7911;
|
||||
const char *server = "127.0.0.1";
|
||||
struct parse *cfile;
|
||||
|
@ -715,6 +709,7 @@ int main (int argc, char **argv, char **envp)
|
|||
|
||||
break;
|
||||
}
|
||||
end_parse (&cfile);
|
||||
} while (1);
|
||||
|
||||
exit (0);
|
||||
|
|
|
@ -3,44 +3,40 @@
|
|||
The dhcpctl remote object. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999-2003 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1999-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: remote.c,v 1.1.1.3 2005/08/11 16:54:30 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <omapip/omapip_p.h>
|
||||
#include "dhcpctl.h"
|
||||
|
||||
|
@ -126,7 +122,7 @@ dhcpctl_status dhcpctl_new_object (dhcpctl_handle *h,
|
|||
isc_result_t status;
|
||||
|
||||
m = (dhcpctl_remote_object_t *)0;
|
||||
status = omapi_object_allocate ((omapi_object_t **)&m,
|
||||
status = omapi_object_allocate ((void *)&m,
|
||||
dhcpctl_remote_type, 0, MDL);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
|
@ -139,7 +135,7 @@ dhcpctl_status dhcpctl_new_object (dhcpctl_handle *h,
|
|||
}
|
||||
status = omapi_object_reference (&m -> inner, g, MDL);
|
||||
if (status != ISC_R_SUCCESS) {
|
||||
omapi_object_dereference ((omapi_object_t **)&m, MDL);
|
||||
omapi_object_dereference ((void *)&m, MDL);
|
||||
omapi_object_dereference (&g, MDL);
|
||||
return status;
|
||||
}
|
||||
|
@ -147,7 +143,7 @@ dhcpctl_status dhcpctl_new_object (dhcpctl_handle *h,
|
|||
(omapi_object_t *)m, MDL);
|
||||
|
||||
if (status != ISC_R_SUCCESS) {
|
||||
omapi_object_dereference ((omapi_object_t **)&m, MDL);
|
||||
omapi_object_dereference ((void *)&m, MDL);
|
||||
omapi_object_dereference (&g, MDL);
|
||||
return status;
|
||||
}
|
||||
|
@ -156,13 +152,13 @@ dhcpctl_status dhcpctl_new_object (dhcpctl_handle *h,
|
|||
omapi_datatype_string,
|
||||
object_type);
|
||||
if (status != ISC_R_SUCCESS) {
|
||||
omapi_object_dereference ((omapi_object_t **)&m, MDL);
|
||||
omapi_object_dereference ((void *)&m, MDL);
|
||||
omapi_object_dereference (&g, MDL);
|
||||
return status;
|
||||
}
|
||||
|
||||
status = omapi_object_reference (h, (omapi_object_t *)m, MDL);
|
||||
omapi_object_dereference ((omapi_object_t **)&m, MDL);
|
||||
omapi_object_dereference ((void *)&m, MDL);
|
||||
omapi_object_dereference (&g, MDL);
|
||||
if (status != ISC_R_SUCCESS)
|
||||
return status;
|
||||
|
@ -358,7 +354,6 @@ isc_result_t dhcpctl_remote_stuff_values (omapi_object_t *c,
|
|||
omapi_object_t *id,
|
||||
omapi_object_t *p)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (p -> type != dhcpctl_remote_type)
|
||||
return ISC_R_INVALIDARG;
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
.\" dhclient-script.8
|
||||
.\" $Id: dhclient-script.8,v 1.1.1.2 2005/08/11 16:54:34 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996-2001 Internet Software Consortium.
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
.\" To learn more about the Internet Software Consortium, see
|
||||
.\" To learn more about Internet Systems Consortium, see
|
||||
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
.\" ``http://www.nominum.com''.
|
||||
|
@ -220,7 +213,7 @@ $new_routers
|
|||
類似したオペレーティングシステムに対するスクリプトファイルは
|
||||
似ていたり全く同じかもしれませんが、一般には、
|
||||
各オペレーティングシステム用に各々のスクリプトファイルがあるべきです。
|
||||
Internet Software Consortium の DHCP 配布に含まれるスクリプトファイルは、
|
||||
Internet Systems Consortium の DHCP 配布に含まれるスクリプトファイルは、
|
||||
client/scripts 以下の配布ツリーにあり、
|
||||
動作対象オペレーティングシステム名になっています。
|
||||
.SH バグ
|
||||
|
@ -239,9 +232,9 @@ dhclient.conf(5), dhclient.leases(5), dhclient(8)
|
|||
.SH 作者
|
||||
.B dhclient-script(8)
|
||||
は Ted Lemon が
|
||||
Vixie Enterprises と協力して Internet Software Consortium のために
|
||||
Vixie Enterprises と協力して Internet Systems Consortium のために
|
||||
書きました。
|
||||
Internet Software Consortium についてより詳しくは、
|
||||
Internet Systems Consortium についてより詳しくは、
|
||||
.B http://www.isc.org
|
||||
をご覧ください。
|
||||
Vixie Enterprises についてより詳しくは、
|
||||
|
|
|
@ -1,20 +1,25 @@
|
|||
.\" dhclient.8
|
||||
.\" $Id: dhclient.8,v 1.1.1.2 2005/08/11 16:54:35 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
.\" Use is subject to license terms which appear in the file named
|
||||
.\" ISC-LICENSE that should have accompanied this file when you
|
||||
.\" received it. If a file named ISC-LICENSE did not accompany this
|
||||
.\" file, or you are not sure the one you have is correct, you may
|
||||
.\" obtain an applicable copy of the license at:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" http://www.isc.org/isc-license-1.0.html.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" This file is part of the ISC DHCP distribution. The documentation
|
||||
.\" associated with this file is listed in the file DOCUMENTATION,
|
||||
.\" included in the top-level directory of this release.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" Support and other services are available for ISC products - see
|
||||
.\" http://www.isc.org for more information.
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" Portions copyright (c) 2000 David E. O'Brien.
|
||||
.\" All rights reserved.
|
||||
|
@ -91,7 +96,7 @@ relay
|
|||
]
|
||||
]
|
||||
.SH 解説
|
||||
Internet Software Consortium の DHCP クライアントである dhclient
|
||||
Internet Systems Consortium の DHCP クライアントである dhclient
|
||||
は動的ホスト設定プロトコル (DHCP: Dynamic Host Configuration Protocol)
|
||||
または BOOTP プロトコルを用いて、あるいは
|
||||
これらのプロトコルが失敗した場合にはアドレスを静的に割り当てて、
|
||||
|
@ -334,9 +339,9 @@ dhclient.conf(5), dhclient.leases(5), dhclient-script(8)
|
|||
.SH 作者
|
||||
.B dhclient(8)
|
||||
は Ted Lemon が
|
||||
Vixie Enterprises と協力して Internet Software Consortium のために
|
||||
Vixie Enterprises と協力して Internet Systems Consortium のために
|
||||
書きました。
|
||||
Internet Software Consortium についてより詳しくは、
|
||||
Internet Systems Consortium についてより詳しくは、
|
||||
.B http://www.isc.org
|
||||
をご覧ください。
|
||||
Vixie Enterprises についてより詳しくは、
|
||||
|
@ -348,7 +353,7 @@ Stanford
|
|||
Linux での利用に際し大幅に修正、改良を行いました。
|
||||
.PP
|
||||
現在のバージョンは、Elliot による Linux での改良に負うところが大きいですが、
|
||||
Internet Software Consortium の DHCP サーバが使うものと同じ
|
||||
Internet Systems Consortium の DHCP サーバが使うものと同じ
|
||||
ネットワーキングフレームワークを用いるように、Ted Lemon が
|
||||
大幅な再編成や部分的な書き換えを行いました。
|
||||
システム特有の設定コードの大部分はシェルスクリプトに移されたので、
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
.\" dhclient.conf.5
|
||||
.\" $Id: dhclient.conf.5,v 1.1.1.2 2005/08/11 16:54:35 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996-2001 Internet Software Consortium.
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
.\" To learn more about the Internet Software Consortium, see
|
||||
.\" To learn more about Internet Systems Consortium, see
|
||||
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
.\" ``http://www.nominum.com''.
|
||||
|
@ -45,7 +38,7 @@
|
|||
dhclient.conf - DHCP クライアント設定ファイル
|
||||
.SH 解説
|
||||
dhclient.conf ファイルには
|
||||
Internet Software Consortium の DHCP クライアントである
|
||||
Internet Systems Consortium の DHCP クライアントである
|
||||
.IR dhclient
|
||||
の設定情報が含まれます。
|
||||
.PP
|
||||
|
@ -495,7 +488,7 @@ day
|
|||
DHCP クライアントが TCP/IP ローミング (roaming) プロトコルを実行して
|
||||
いる場合、DHCP を用いて得られるリースだけでなく、事前に定義された
|
||||
IP エイリアスも、自分が使用するインタフェースに設定する必要がある
|
||||
場合があります。Internet Software Consortium 版 DHCP クライアントは、
|
||||
場合があります。Internet Systems Consortium 版 DHCP クライアントは、
|
||||
固定アドレス直接指定のローミングをサポートしていませんが、その種の実験
|
||||
ができるように、この dhcp クライアントは、
|
||||
.B alias
|
||||
|
@ -626,7 +619,7 @@ RFC2131
|
|||
.SH 作者
|
||||
.B dhclient(8)
|
||||
は Vixie Labs との契約のもとで Ted Lemon が書きました。
|
||||
本プロジェクトの基金は Internet Software Consortium が提供しました。
|
||||
Internet Software Consortium に関する情報は、
|
||||
本プロジェクトの基金は Internet Systems Consortium が提供しました。
|
||||
Internet Systems Consortium に関する情報は、
|
||||
.B http://www.isc.org
|
||||
にあります。
|
||||
|
|
|
@ -1,38 +1,29 @@
|
|||
.\" dhclient.conf.5
|
||||
.\" $Id: dhclient.leases.5,v 1.1.1.2 2005/08/11 16:54:35 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1997 The Internet Software Consortium.
|
||||
.\" All rights reserved.
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1997-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie
|
||||
.\" Enterprises. To learn more about the Internet Software Consortium,
|
||||
.\" Enterprises. To learn more about Internet Systems Consortium,
|
||||
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
|
||||
.\" Enterprises, see ``http://www.vix.com''.
|
||||
.\"
|
||||
|
@ -44,7 +35,7 @@
|
|||
.SH 名称
|
||||
dhclient.leases - DHCP クライアントのリースデータベース
|
||||
.SH 解説
|
||||
Internet Software Consortium の DHCP クライアントは、
|
||||
Internet Systems Consortium の DHCP クライアントは、
|
||||
獲得したリースのうちまだ有効であるものを管理するための、
|
||||
永続的なデータベースを保持します。
|
||||
このデータベースは、自由形式の ASCII ファイルであり、
|
||||
|
@ -65,7 +56,7 @@ RFC2132, RFC2131
|
|||
.SH 作者
|
||||
.B dhclient(8)
|
||||
は、Vixie Labs との契約のもとで、Ted Lemon が記述しました。
|
||||
本プロジェクトの資金は、Internet Software Consortium が提供しました。
|
||||
Internet Software Consortium に関する情報は、
|
||||
本プロジェクトの資金は、Internet Systems Consortium が提供しました。
|
||||
Internet Systems Consortium に関する情報は、
|
||||
.B http://www.isc.org
|
||||
にあります。
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
.\" dhcp-eval.5
|
||||
.\" $Id: dhcp-eval.5,v 1.1.1.2 2005/08/11 16:54:35 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996-2001 Internet Software Consortium.
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
.\" To learn more about the Internet Software Consortium, see
|
||||
.\" To learn more about Internet Systems Consortium, see
|
||||
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
.\" ``http://www.nominum.com''.
|
||||
|
@ -39,7 +32,7 @@
|
|||
.SH 名称
|
||||
dhcp-eval - ISC DHCP における条件付き評価
|
||||
.SH 解説
|
||||
Internet Software Consortium の DHCP クライアントとサーバは、どちらも
|
||||
Internet Systems Consortium の DHCP クライアントとサーバは、どちらも
|
||||
受信するパケットに依存した条件付き動作を行う能力を持ちます。
|
||||
条件付き動作の文法をここに示します。
|
||||
.SH 参照: 条件付き動作
|
||||
|
@ -487,9 +480,9 @@ PTR
|
|||
dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcp-eval(5), dhcpd(8),
|
||||
dhclient(8), RFC2132, RFC2131
|
||||
.SH 作者
|
||||
Internet Software Consortium DHCP Distribution
|
||||
Internet Systems Consortium DHCP Distribution
|
||||
は、Vixie Labs との契約のもとで、Ted Lemon が記述しました。
|
||||
本プロジェクトの資金は、Internet Software Consortium が提供しました。
|
||||
Internet Software Consortium に関する情報は、
|
||||
本プロジェクトの資金は、Internet Systems Consortium が提供しました。
|
||||
Internet Systems Consortium に関する情報は、
|
||||
.B http://www.isc.org
|
||||
にあります。
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
.\" dhcp-options.5
|
||||
.\" $Id: dhcp-options.5,v 1.1.1.2 2005/08/11 16:54:35 drochner Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996-2001 Internet Software Consortium.
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
.\"
|
||||
.\" 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. Neither the name of The Internet Software Consortium nor the names
|
||||
.\" of its contributors may be used to endorse or promote products derived
|
||||
.\" from this software without specific prior written permission.
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" This software has been written for the Internet Software Consortium
|
||||
.\" Internet Systems Consortium, Inc.
|
||||
.\" 950 Charter Street
|
||||
.\" Redwood City, CA 94063
|
||||
.\" <info@isc.org>
|
||||
.\" http://www.isc.org/
|
||||
.\"
|
||||
.\" This software has been written for Internet Systems Consortium
|
||||
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
.\" To learn more about the Internet Software Consortium, see
|
||||
.\" To learn more about Internet Systems Consortium, see
|
||||
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
.\" ``http://www.nominum.com''.
|
||||
|
@ -1275,7 +1268,7 @@ NetWare/IP
|
|||
.RE
|
||||
.SH 新規オプションの定義
|
||||
.\" metal
|
||||
Internet Software Consortium DHCP クライアントとサーバは、
|
||||
Internet Systems Consortium DHCP クライアントとサーバは、
|
||||
新規オプションを定義する機構も提供しています。
|
||||
それぞれの DHCP オプションは、名前とコード、構造を持っています。
|
||||
名前は、使用者がオプションを参照するのに使用されます。
|
||||
|
@ -1580,9 +1573,9 @@ DHCP
|
|||
dhclient.conf(5), dhcp-eval(5),
|
||||
dhclient(8), RFC2132, RFC2131
|
||||
.SH 作者
|
||||
Internet Software Consortium DHCP Distribution
|
||||
Internet Systems Consortium DHCP Distribution
|
||||
は、Vixie Labs との契約のもとで、Ted Lemon が記述しました。
|
||||
本プロジェクトの資金は、Internet Software Consortium が提供しました。
|
||||
Internet Software Consortium に関する情報は、
|
||||
本プロジェクトの資金は、Internet Systems Consortium が提供しました。
|
||||
Internet Systems Consortium に関する情報は、
|
||||
.B http://www.isc.org
|
||||
にあります。
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,21 +1,25 @@
|
|||
# Makefile.dist
|
||||
#
|
||||
# Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
# Use is subject to license terms which appear in the file named
|
||||
# ISC-LICENSE that should have accompanied this file when you
|
||||
# received it. If a file named ISC-LICENSE did not accompany this
|
||||
# file, or you are not sure the one you have is correct, you may
|
||||
# obtain an applicable copy of the license at:
|
||||
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
#
|
||||
# http://www.isc.org/isc-license-1.0.html.
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# This file is part of the ISC DHCP distribution. The documentation
|
||||
# associated with this file is listed in the file DOCUMENTATION,
|
||||
# included in the top-level directory of this release.
|
||||
#
|
||||
# Support and other services are available for ISC products - see
|
||||
# http://www.isc.org for more information.
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Internet Systems Consortium, Inc.
|
||||
# 950 Charter Street
|
||||
# Redwood City, CA 94063
|
||||
# <info@isc.org>
|
||||
# http://www.isc.org/
|
||||
|
||||
SRC = dst_support.c dst_api.c hmac_link.c md5_dgst.c base64.c prandom.c
|
||||
OBJ = dst_support.o dst_api.o hmac_link.o md5_dgst.o base64.o prandom.o
|
||||
|
|
|
@ -1,18 +1,24 @@
|
|||
/*
|
||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -41,7 +47,7 @@
|
|||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: base64.c,v 1.1.1.1 2001/08/03 11:35:34 drochner Exp $";
|
||||
static const char rcsid[] = "$Id: base64.c,v 1.1.1.2 2005/08/11 16:54:35 drochner Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LINT
|
||||
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_api.c,v 1.1.1.2 2003/02/18 16:37:58 drochner Exp $";
|
||||
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_api.c,v 1.1.1.3 2005/08/11 16:54:38 drochner Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -562,7 +562,7 @@ dst_s_read_public_key(const char *in_name, const unsigned in_id, int in_alg)
|
|||
enckey[--len] = '\0';
|
||||
|
||||
/* remove leading spaces */
|
||||
for (notspace = (char *) enckey; isspace(*notspace); len--)
|
||||
for (notspace = enckey; isspace((unsigned char)*notspace); len--)
|
||||
notspace++;
|
||||
|
||||
dlen = b64_pton(notspace, deckey, sizeof(deckey));
|
||||
|
@ -866,7 +866,7 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, unsigned in_id,
|
|||
len = cnt;
|
||||
p = in_buff;
|
||||
|
||||
if (!dst_s_verify_str((const char **) &p, "Private-key-format: v")) {
|
||||
if (!dst_s_verify_str((void *) &p, "Private-key-format: v")) {
|
||||
EREPORT(("dst_s_read_private_key_file(): Not a Key file/Decrypt failed %s\n", name));
|
||||
goto fail;
|
||||
}
|
||||
|
@ -884,7 +884,7 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, unsigned in_id,
|
|||
|
||||
while (*p++ != '\n') ; /* skip to end of line */
|
||||
|
||||
if (!dst_s_verify_str((const char **) &p, "Algorithm: "))
|
||||
if (!dst_s_verify_str((void *) &p, "Algorithm: "))
|
||||
goto fail;
|
||||
|
||||
if (sscanf((char *)p, "%d", &alg) != 1)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_support.c,v 1.1.1.2 2003/02/18 16:37:58 drochner Exp $";
|
||||
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_support.c,v 1.1.1.3 2005/08/11 16:54:38 drochner Exp $";
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifdef HMAC_MD5
|
||||
#ifndef LINT
|
||||
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/hmac_link.c,v 1.1.1.2 2003/02/18 16:37:58 drochner Exp $";
|
||||
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/hmac_link.c,v 1.1.1.3 2005/08/11 16:54:38 drochner Exp $";
|
||||
#endif
|
||||
/*
|
||||
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
|
||||
|
|
|
@ -224,73 +224,73 @@ register ULONG *X;
|
|||
D=c->D;
|
||||
|
||||
/* Round 0 */
|
||||
R0(A,B,C,D,X[ 0], 7,0xd76aa478L);
|
||||
R0(D,A,B,C,X[ 1],12,0xe8c7b756L);
|
||||
R0(C,D,A,B,X[ 2],17,0x242070dbL);
|
||||
R0(B,C,D,A,X[ 3],22,0xc1bdceeeL);
|
||||
R0(A,B,C,D,X[ 4], 7,0xf57c0fafL);
|
||||
R0(D,A,B,C,X[ 5],12,0x4787c62aL);
|
||||
R0(C,D,A,B,X[ 6],17,0xa8304613L);
|
||||
R0(B,C,D,A,X[ 7],22,0xfd469501L);
|
||||
R0(A,B,C,D,X[ 8], 7,0x698098d8L);
|
||||
R0(D,A,B,C,X[ 9],12,0x8b44f7afL);
|
||||
R0(C,D,A,B,X[10],17,0xffff5bb1L);
|
||||
R0(B,C,D,A,X[11],22,0x895cd7beL);
|
||||
R0(A,B,C,D,X[12], 7,0x6b901122L);
|
||||
R0(D,A,B,C,X[13],12,0xfd987193L);
|
||||
R0(C,D,A,B,X[14],17,0xa679438eL);
|
||||
R0(B,C,D,A,X[15],22,0x49b40821L);
|
||||
LOCL_R0(A,B,C,D,X[ 0], 7,0xd76aa478L);
|
||||
LOCL_R0(D,A,B,C,X[ 1],12,0xe8c7b756L);
|
||||
LOCL_R0(C,D,A,B,X[ 2],17,0x242070dbL);
|
||||
LOCL_R0(B,C,D,A,X[ 3],22,0xc1bdceeeL);
|
||||
LOCL_R0(A,B,C,D,X[ 4], 7,0xf57c0fafL);
|
||||
LOCL_R0(D,A,B,C,X[ 5],12,0x4787c62aL);
|
||||
LOCL_R0(C,D,A,B,X[ 6],17,0xa8304613L);
|
||||
LOCL_R0(B,C,D,A,X[ 7],22,0xfd469501L);
|
||||
LOCL_R0(A,B,C,D,X[ 8], 7,0x698098d8L);
|
||||
LOCL_R0(D,A,B,C,X[ 9],12,0x8b44f7afL);
|
||||
LOCL_R0(C,D,A,B,X[10],17,0xffff5bb1L);
|
||||
LOCL_R0(B,C,D,A,X[11],22,0x895cd7beL);
|
||||
LOCL_R0(A,B,C,D,X[12], 7,0x6b901122L);
|
||||
LOCL_R0(D,A,B,C,X[13],12,0xfd987193L);
|
||||
LOCL_R0(C,D,A,B,X[14],17,0xa679438eL);
|
||||
LOCL_R0(B,C,D,A,X[15],22,0x49b40821L);
|
||||
/* Round 1 */
|
||||
R1(A,B,C,D,X[ 1], 5,0xf61e2562L);
|
||||
R1(D,A,B,C,X[ 6], 9,0xc040b340L);
|
||||
R1(C,D,A,B,X[11],14,0x265e5a51L);
|
||||
R1(B,C,D,A,X[ 0],20,0xe9b6c7aaL);
|
||||
R1(A,B,C,D,X[ 5], 5,0xd62f105dL);
|
||||
R1(D,A,B,C,X[10], 9,0x02441453L);
|
||||
R1(C,D,A,B,X[15],14,0xd8a1e681L);
|
||||
R1(B,C,D,A,X[ 4],20,0xe7d3fbc8L);
|
||||
R1(A,B,C,D,X[ 9], 5,0x21e1cde6L);
|
||||
R1(D,A,B,C,X[14], 9,0xc33707d6L);
|
||||
R1(C,D,A,B,X[ 3],14,0xf4d50d87L);
|
||||
R1(B,C,D,A,X[ 8],20,0x455a14edL);
|
||||
R1(A,B,C,D,X[13], 5,0xa9e3e905L);
|
||||
R1(D,A,B,C,X[ 2], 9,0xfcefa3f8L);
|
||||
R1(C,D,A,B,X[ 7],14,0x676f02d9L);
|
||||
R1(B,C,D,A,X[12],20,0x8d2a4c8aL);
|
||||
LOCL_R1(A,B,C,D,X[ 1], 5,0xf61e2562L);
|
||||
LOCL_R1(D,A,B,C,X[ 6], 9,0xc040b340L);
|
||||
LOCL_R1(C,D,A,B,X[11],14,0x265e5a51L);
|
||||
LOCL_R1(B,C,D,A,X[ 0],20,0xe9b6c7aaL);
|
||||
LOCL_R1(A,B,C,D,X[ 5], 5,0xd62f105dL);
|
||||
LOCL_R1(D,A,B,C,X[10], 9,0x02441453L);
|
||||
LOCL_R1(C,D,A,B,X[15],14,0xd8a1e681L);
|
||||
LOCL_R1(B,C,D,A,X[ 4],20,0xe7d3fbc8L);
|
||||
LOCL_R1(A,B,C,D,X[ 9], 5,0x21e1cde6L);
|
||||
LOCL_R1(D,A,B,C,X[14], 9,0xc33707d6L);
|
||||
LOCL_R1(C,D,A,B,X[ 3],14,0xf4d50d87L);
|
||||
LOCL_R1(B,C,D,A,X[ 8],20,0x455a14edL);
|
||||
LOCL_R1(A,B,C,D,X[13], 5,0xa9e3e905L);
|
||||
LOCL_R1(D,A,B,C,X[ 2], 9,0xfcefa3f8L);
|
||||
LOCL_R1(C,D,A,B,X[ 7],14,0x676f02d9L);
|
||||
LOCL_R1(B,C,D,A,X[12],20,0x8d2a4c8aL);
|
||||
/* Round 2 */
|
||||
R2(A,B,C,D,X[ 5], 4,0xfffa3942L);
|
||||
R2(D,A,B,C,X[ 8],11,0x8771f681L);
|
||||
R2(C,D,A,B,X[11],16,0x6d9d6122L);
|
||||
R2(B,C,D,A,X[14],23,0xfde5380cL);
|
||||
R2(A,B,C,D,X[ 1], 4,0xa4beea44L);
|
||||
R2(D,A,B,C,X[ 4],11,0x4bdecfa9L);
|
||||
R2(C,D,A,B,X[ 7],16,0xf6bb4b60L);
|
||||
R2(B,C,D,A,X[10],23,0xbebfbc70L);
|
||||
R2(A,B,C,D,X[13], 4,0x289b7ec6L);
|
||||
R2(D,A,B,C,X[ 0],11,0xeaa127faL);
|
||||
R2(C,D,A,B,X[ 3],16,0xd4ef3085L);
|
||||
R2(B,C,D,A,X[ 6],23,0x04881d05L);
|
||||
R2(A,B,C,D,X[ 9], 4,0xd9d4d039L);
|
||||
R2(D,A,B,C,X[12],11,0xe6db99e5L);
|
||||
R2(C,D,A,B,X[15],16,0x1fa27cf8L);
|
||||
R2(B,C,D,A,X[ 2],23,0xc4ac5665L);
|
||||
LOCL_R2(A,B,C,D,X[ 5], 4,0xfffa3942L);
|
||||
LOCL_R2(D,A,B,C,X[ 8],11,0x8771f681L);
|
||||
LOCL_R2(C,D,A,B,X[11],16,0x6d9d6122L);
|
||||
LOCL_R2(B,C,D,A,X[14],23,0xfde5380cL);
|
||||
LOCL_R2(A,B,C,D,X[ 1], 4,0xa4beea44L);
|
||||
LOCL_R2(D,A,B,C,X[ 4],11,0x4bdecfa9L);
|
||||
LOCL_R2(C,D,A,B,X[ 7],16,0xf6bb4b60L);
|
||||
LOCL_R2(B,C,D,A,X[10],23,0xbebfbc70L);
|
||||
LOCL_R2(A,B,C,D,X[13], 4,0x289b7ec6L);
|
||||
LOCL_R2(D,A,B,C,X[ 0],11,0xeaa127faL);
|
||||
LOCL_R2(C,D,A,B,X[ 3],16,0xd4ef3085L);
|
||||
LOCL_R2(B,C,D,A,X[ 6],23,0x04881d05L);
|
||||
LOCL_R2(A,B,C,D,X[ 9], 4,0xd9d4d039L);
|
||||
LOCL_R2(D,A,B,C,X[12],11,0xe6db99e5L);
|
||||
LOCL_R2(C,D,A,B,X[15],16,0x1fa27cf8L);
|
||||
LOCL_R2(B,C,D,A,X[ 2],23,0xc4ac5665L);
|
||||
/* Round 3 */
|
||||
R3(A,B,C,D,X[ 0], 6,0xf4292244L);
|
||||
R3(D,A,B,C,X[ 7],10,0x432aff97L);
|
||||
R3(C,D,A,B,X[14],15,0xab9423a7L);
|
||||
R3(B,C,D,A,X[ 5],21,0xfc93a039L);
|
||||
R3(A,B,C,D,X[12], 6,0x655b59c3L);
|
||||
R3(D,A,B,C,X[ 3],10,0x8f0ccc92L);
|
||||
R3(C,D,A,B,X[10],15,0xffeff47dL);
|
||||
R3(B,C,D,A,X[ 1],21,0x85845dd1L);
|
||||
R3(A,B,C,D,X[ 8], 6,0x6fa87e4fL);
|
||||
R3(D,A,B,C,X[15],10,0xfe2ce6e0L);
|
||||
R3(C,D,A,B,X[ 6],15,0xa3014314L);
|
||||
R3(B,C,D,A,X[13],21,0x4e0811a1L);
|
||||
R3(A,B,C,D,X[ 4], 6,0xf7537e82L);
|
||||
R3(D,A,B,C,X[11],10,0xbd3af235L);
|
||||
R3(C,D,A,B,X[ 2],15,0x2ad7d2bbL);
|
||||
R3(B,C,D,A,X[ 9],21,0xeb86d391L);
|
||||
LOCL_R3(A,B,C,D,X[ 0], 6,0xf4292244L);
|
||||
LOCL_R3(D,A,B,C,X[ 7],10,0x432aff97L);
|
||||
LOCL_R3(C,D,A,B,X[14],15,0xab9423a7L);
|
||||
LOCL_R3(B,C,D,A,X[ 5],21,0xfc93a039L);
|
||||
LOCL_R3(A,B,C,D,X[12], 6,0x655b59c3L);
|
||||
LOCL_R3(D,A,B,C,X[ 3],10,0x8f0ccc92L);
|
||||
LOCL_R3(C,D,A,B,X[10],15,0xffeff47dL);
|
||||
LOCL_R3(B,C,D,A,X[ 1],21,0x85845dd1L);
|
||||
LOCL_R3(A,B,C,D,X[ 8], 6,0x6fa87e4fL);
|
||||
LOCL_R3(D,A,B,C,X[15],10,0xfe2ce6e0L);
|
||||
LOCL_R3(C,D,A,B,X[ 6],15,0xa3014314L);
|
||||
LOCL_R3(B,C,D,A,X[13],21,0x4e0811a1L);
|
||||
LOCL_R3(A,B,C,D,X[ 4], 6,0xf7537e82L);
|
||||
LOCL_R3(D,A,B,C,X[11],10,0xbd3af235L);
|
||||
LOCL_R3(C,D,A,B,X[ 2],15,0x2ad7d2bbL);
|
||||
LOCL_R3(B,C,D,A,X[ 9],21,0xeb86d391L);
|
||||
|
||||
c->A+=A&0xffffffffL;
|
||||
c->B+=B&0xffffffffL;
|
||||
|
|
|
@ -168,23 +168,22 @@
|
|||
#define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
|
||||
#endif
|
||||
|
||||
|
||||
#define R0(a,b,c,d,k,s,t) { \
|
||||
#define LOCL_R0(a,b,c,d,k,s,t) { \
|
||||
a+=((k)+(t)+F((b),(c),(d))); \
|
||||
a=ROTATE(a,s); \
|
||||
a+=b; };\
|
||||
|
||||
#define R1(a,b,c,d,k,s,t) { \
|
||||
#define LOCL_R1(a,b,c,d,k,s,t) { \
|
||||
a+=((k)+(t)+G((b),(c),(d))); \
|
||||
a=ROTATE(a,s); \
|
||||
a+=b; };
|
||||
|
||||
#define R2(a,b,c,d,k,s,t) { \
|
||||
#define LOCL_R2(a,b,c,d,k,s,t) { \
|
||||
a+=((k)+(t)+H((b),(c),(d))); \
|
||||
a=ROTATE(a,s); \
|
||||
a+=b; };
|
||||
|
||||
#define R3(a,b,c,d,k,s,t) { \
|
||||
#define LOCL_R3(a,b,c,d,k,s,t) { \
|
||||
a+=((k)+(t)+I((b),(c),(d))); \
|
||||
a=ROTATE(a,s); \
|
||||
a+=b; };
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#ifndef LINT
|
||||
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/prandom.c,v 1.1.1.2 2003/02/18 16:37:58 drochner Exp $";
|
||||
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/prandom.c,v 1.1.1.3 2005/08/11 16:54:39 drochner Exp $";
|
||||
#endif
|
||||
/*
|
||||
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
|
||||
|
@ -335,7 +335,7 @@ unix_cmd(dst_work *work)
|
|||
cnt += do_time(work);
|
||||
}
|
||||
while ((n = fread(buffer, sizeof(char), sizeof(buffer), pipe)) > 0)
|
||||
NULL; /* drain the pipe */
|
||||
; /* drain the pipe */
|
||||
pclose(pipe);
|
||||
return (cnt); /* read how many bytes where read in */
|
||||
}
|
||||
|
|
|
@ -10,11 +10,7 @@
|
|||
* 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
|
||||
* 3. 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.
|
||||
*
|
||||
|
@ -32,24 +28,30 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 by Internet Software Consortium.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
* SOFTWARE.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: nameser.h,v 1.1.1.1 2001/08/03 11:35:35 drochner Exp $
|
||||
* $Id: nameser.h,v 1.1.1.2 2005/08/11 16:54:42 drochner Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ARPA_NAMESER_H_
|
||||
|
|
|
@ -9,11 +9,7 @@
|
|||
* 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
|
||||
* 3. 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.
|
||||
*
|
||||
|
@ -32,7 +28,7 @@
|
|||
|
||||
/*
|
||||
* from nameser.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id: nameser_compat.h,v 1.1.1.1 2001/08/03 11:35:35 drochner Exp $
|
||||
* $Id: nameser_compat.h,v 1.1.1.2 2005/08/11 16:54:41 drochner Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ARPA_NAMESER_COMPAT_
|
||||
|
|
|
@ -4,39 +4,30 @@
|
|||
|
||||
/*
|
||||
* Copyright (c) 1995 RadioMail Corporation. All rights reserved.
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software was written for RadioMail Corporation by Ted Lemon
|
||||
* under a contract with Vixie Enterprises. Further modifications have
|
||||
* been made for the Internet Software Consortium under a contract
|
||||
* been made for Internet Systems Consortium under a contract
|
||||
* with Vixie Laboratories.
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Configuration file for IBM's AIX operating system. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 The Internet Software Consortium. All rights reserved.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -85,8 +76,13 @@ extern int h_errno;
|
|||
#define VA_start(list, last) va_start (list)
|
||||
#define va_dcl
|
||||
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
/* The vsnprint function definition in /usr/include/ appears to use this
|
||||
* as a key for wether or not it should be declared. Seems reasoanble for
|
||||
* us to use the same key.
|
||||
*/
|
||||
#if (_XOPEN_SOURCE != 500)
|
||||
#define NO_SNPRINTF
|
||||
#endif
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for DEC Alpha/OSF1... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -78,6 +69,14 @@ typedef unsigned long u_int64_t;
|
|||
#define va_dcl
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
|
||||
/* Our reports say that OSF/1 versions 4.0G and later have v/snprintf
|
||||
* implementations. 4.0F and previous do not. This is detected at
|
||||
* ./configure time from 'sizer -v'.
|
||||
*/
|
||||
#ifndef HAVE_SNPRINTF
|
||||
# define NO_SNPRINTF
|
||||
#endif
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
|
||||
#endif
|
||||
|
@ -100,10 +99,6 @@ typedef unsigned long u_int64_t;
|
|||
#define jdref(x) (x)
|
||||
#define jrefproto jmp_buf
|
||||
|
||||
/* OSF/1 doesn't support limited sprintfs. */
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#define NEED_OSF_PFILT_HACKS
|
||||
#define BPF_FORMAT "/dev/pf/pfilt%d"
|
||||
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for BSDI BSD/OS... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
|
|
@ -4,39 +4,30 @@
|
|||
doesn't work yet, so don't get too excited! */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -77,7 +68,8 @@
|
|||
#define VA_DOTDOTDOT ...
|
||||
#define va_dcl
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
|
||||
/* XXX: System is not believed to have vsnprintf. Someone please verify. */
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for FreeBSD... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -68,6 +59,11 @@ extern int h_errno;
|
|||
#define va_dcl
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
|
||||
#if defined(__alpha__) || defined(__amd64__) || defined(__ia64__) || \
|
||||
defined(__sparc64__)
|
||||
# define PTRSIZE_64BIT
|
||||
#endif
|
||||
|
||||
#ifndef _PATH_DHCPD_PID
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
|
||||
#endif
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Configuration file for HP-UX */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -90,9 +81,6 @@ extern int h_errno;
|
|||
#define VA_start(list, last) va_start (list)
|
||||
#endif
|
||||
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#define USE_SOCKETS 1
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
@ -139,3 +127,8 @@ const char *files[] = {
|
|||
NULL
|
||||
};
|
||||
#endif /* NEED_PRAND_CONF */
|
||||
|
||||
/* these are #defined somewhere in /usr/include headers. */
|
||||
#undef NO
|
||||
#undef SERVER
|
||||
|
||||
|
|
|
@ -1,34 +1,26 @@
|
|||
/* irix.h */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1999 The Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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
|
||||
* INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*/
|
||||
|
||||
#define int8_t char
|
||||
|
@ -75,7 +67,7 @@ extern int h_errno;
|
|||
#define VA_start(list, last) va_start (list, last)
|
||||
#define va_dcl
|
||||
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
/* XXX: System is not believed to have snprintf/vsnprintf. Please verify. */
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
|
|
|
@ -5,39 +5,30 @@
|
|||
Based on a configuration originally supplied by Jonathan Stone. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -105,9 +96,6 @@ extern int h_errno;
|
|||
#define VA_start(list, last) va_start (list, last)
|
||||
#define va_dcl
|
||||
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#define VOIDPTR void *
|
||||
|
||||
#define EOL '\n'
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for NetBSD... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -82,6 +73,14 @@ extern int h_errno;
|
|||
#define _PATH_DHCLIENT_DB "/var/db/dhclient.leases"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If building "SMALL" (e.g. for an installation disk), do not configure
|
||||
* for DNS update functionality -- overrides default set in ../site.h.
|
||||
*/
|
||||
#if defined(SMALL) && defined(NSUPDATE)
|
||||
#undef NSUPDATE
|
||||
#endif
|
||||
|
||||
#define EOL '\n'
|
||||
#define VOIDPTR void *
|
||||
|
||||
|
@ -95,9 +94,12 @@ extern int h_errno;
|
|||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
# define USE_BPF
|
||||
# define NETBSD_FDDI
|
||||
# define FDDI_HEADER_SIZE 16
|
||||
# include <net/if_types.h>
|
||||
#endif
|
||||
|
||||
#if defined (__alpha__) || defined (__sparc64__)
|
||||
#ifdef _LP64
|
||||
#define PTRSIZE_64BIT
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for NEXTSTEP 3 & 4 (tested on 4.2PR2)... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -97,9 +88,10 @@ extern int h_errno;
|
|||
#define VA_DOTDOTDOT ...
|
||||
#define VA_start(list, last) va_start (list, last)
|
||||
#define va_dcl
|
||||
|
||||
/* NeXT lacks snprintf */
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
/* Porting::
|
||||
You must define the default network API for your port. This
|
||||
will depend on whether one of the existing APIs will work for
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for OpenBSD... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for QNX... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -117,7 +108,6 @@ typedef int socklen_t;
|
|||
|
||||
#ifndef __QNXNTO__
|
||||
# define NO_SNPRINTF
|
||||
# define vsnprintf( buf, size, fmt, list ) vsprintf( buf, fbuf, list )
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for NetBSD... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2001 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
|
|
@ -9,39 +9,30 @@
|
|||
probably worth looking at the config files for working ports as well. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -180,10 +171,10 @@ extern int h_errno;
|
|||
sprintf functions which will deposit a limited number of characters
|
||||
into the buffer; that limit is provided in an extra argument.
|
||||
If your system doesn't support this functionality, you must include
|
||||
the definitions below: */
|
||||
the definition below for a dhcp-distribution-local version to be
|
||||
built and used: */
|
||||
|
||||
#if 0
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
#endif
|
||||
|
||||
|
|
|
@ -5,39 +5,30 @@
|
|||
Based on changes contributed by Gerald Rosenberg. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -114,7 +105,6 @@ extern int h_errno;
|
|||
#define va_dcl
|
||||
|
||||
/* SCO doesn't support limited sprintfs. */
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
/* By default, use BSD Socket API for receiving and sending packets.
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for SunOS 4 (tested on 4.1.4)... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2001 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -129,7 +120,6 @@ extern int h_errno;
|
|||
#endif /* !__GNUC__*/
|
||||
|
||||
/* SunOS doesn't support limited sprintfs. */
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
/* SunOS doesn't supply strerror... */
|
||||
|
|
|
@ -3,53 +3,40 @@
|
|||
System dependencies for Solaris 2.x (tested on 2.5 with gcc)... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
*/
|
||||
|
||||
/* Basic Integer Types not defined in SunOS headers... */
|
||||
/* SunOS defines uint*_t and int*_t, but not u_int*_t. */
|
||||
|
||||
#define int8_t char
|
||||
#define int16_t short
|
||||
#define int32_t long
|
||||
|
||||
#define u_int8_t unsigned char
|
||||
#define u_int16_t unsigned short
|
||||
#define u_int32_t unsigned long
|
||||
typedef uint8_t u_int8_t;
|
||||
typedef uint16_t u_int16_t;
|
||||
typedef uint32_t u_int32_t;
|
||||
|
||||
/* The jmp_buf type is an array on Solaris, so we can't dereference it
|
||||
and must declare it differently. */
|
||||
|
@ -116,10 +103,6 @@ extern int h_errno;
|
|||
#define VA_start(list, last) va_start (list)
|
||||
#endif /* !__GNUC__*/
|
||||
|
||||
/* Solaris doesn't support limited sprintfs. */
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#define NEED_INET_ATON
|
||||
|
||||
#if defined (USE_DEFAULT_NETWORK)
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
System dependencies for Ultrix 4.2 (tested on 4.2a+multicast)... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -93,8 +84,10 @@ extern int h_errno;
|
|||
#include <varargs.h>
|
||||
#define VA_DOTDOTDOT va_alist
|
||||
#define VA_start(list, last) va_start (list)
|
||||
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
|
||||
|
||||
/* XXX: System is not thought to support snprintf/vsnprintf. Please verify. */
|
||||
#define NO_SNPRINTF
|
||||
|
||||
#define NEED_INET_ATON
|
||||
|
||||
#define INADDR_LOOPBACK ((u_int32_t)0x7f000001)
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Definitions for dhcp tracing facility... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 2001-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon, as part of a project for Nominum, Inc. To learn more
|
||||
* about the Internet Software Consortium, see http://www.isc.org/. To
|
||||
* about Internet Systems Consortium, see http://www.isc.org/. To
|
||||
* learn more about Nominum, Inc., see ``http://www.nominum.com''.
|
||||
*/
|
||||
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Protocol structures... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995-2001 The Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises. To learn more
|
||||
* about the Internet Software Consortium, see ``http://www.isc.org''.
|
||||
* about Internet Systems Consortium, see ``http://www.isc.org''.
|
||||
* To learn more about Vixie Enterprises, see ``http://www.vix.com''.
|
||||
*/
|
||||
|
||||
|
@ -158,7 +149,16 @@ struct dhcp_packet {
|
|||
#define DHO_USER_CLASS 77
|
||||
#define DHO_FQDN 81
|
||||
#define DHO_DHCP_AGENT_OPTIONS 82
|
||||
|
||||
/* Options 93, 94, and 97 are define in the Intel Preboot Execution
|
||||
Environment (PXE) specification, version 2.1, September 20, 1999,
|
||||
page 19. */
|
||||
#define DHO_PXE_CLIENT_ARCH_ID 93
|
||||
#define DHO_PXE_CLIENT_NETIF_ID 94
|
||||
#define DHO_PXE_UUID 97
|
||||
|
||||
#define DHO_SUBNET_SELECTION 118 /* RFC3011! */
|
||||
|
||||
/* The DHO_AUTHENTICATE option is not a standard yet, so I've
|
||||
allocated an option out of the "local" option space for it on a
|
||||
temporary basis. Once an option code number is assigned, I will
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Definitions for dhcpd... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2001 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -44,6 +35,9 @@
|
|||
#ifndef __CYGWIN32__
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#ifndef SMALL
|
||||
#include <netinet6/ipsec.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <arpa/inet.h>
|
||||
|
@ -264,15 +258,14 @@ typedef struct {
|
|||
} dhcp_control_object_t;
|
||||
|
||||
/* Lease states: */
|
||||
typedef enum {
|
||||
FTS_FREE = 1,
|
||||
FTS_ACTIVE = 2,
|
||||
FTS_EXPIRED = 3,
|
||||
FTS_RELEASED = 4,
|
||||
FTS_ABANDONED = 5,
|
||||
FTS_RESET = 6,
|
||||
FTS_BACKUP = 7
|
||||
} binding_state_t;
|
||||
#define FTS_FREE 1
|
||||
#define FTS_ACTIVE 2
|
||||
#define FTS_EXPIRED 3
|
||||
#define FTS_RELEASED 4
|
||||
#define FTS_ABANDONED 5
|
||||
#define FTS_RESET 6
|
||||
#define FTS_BACKUP 7
|
||||
typedef u_int8_t binding_state_t;
|
||||
|
||||
/* FTS_LAST is the highest value that is valid for a lease binding state. */
|
||||
#define FTS_LAST FTS_BACKUP
|
||||
|
@ -315,9 +308,9 @@ struct lease {
|
|||
# define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
|
||||
UNICAST_BROADCAST_HACK)
|
||||
|
||||
binding_state_t __attribute__ ((mode (__byte__))) binding_state;
|
||||
binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
|
||||
binding_state_t __attribute__ ((mode (__byte__))) desired_binding_state;
|
||||
binding_state_t binding_state;
|
||||
binding_state_t next_binding_state;
|
||||
binding_state_t desired_binding_state;
|
||||
|
||||
struct lease_state *state;
|
||||
|
||||
|
@ -420,6 +413,11 @@ struct lease_state {
|
|||
#define SV_UPDATE_STATIC_LEASES 43
|
||||
#define SV_LOG_FACILITY 44
|
||||
#define SV_DO_FORWARD_UPDATES 45
|
||||
#define SV_PING_TIMEOUT 46
|
||||
|
||||
#if !defined (DEFAULT_PING_TIMEOUT)
|
||||
# define DEFAULT_PING_TIMEOUT 1
|
||||
#endif
|
||||
|
||||
#if !defined (DEFAULT_DEFAULT_LEASE_TIME)
|
||||
# define DEFAULT_DEFAULT_LEASE_TIME 43200
|
||||
|
@ -719,12 +717,15 @@ struct client_config {
|
|||
|
||||
struct iaddrlist *reject_list; /* Servers to reject. */
|
||||
|
||||
int omapi_port; /* port on which to accept OMAPI
|
||||
connections, or -1 for no
|
||||
listener. */
|
||||
int do_forward_update; /* If nonzero, and if we have the
|
||||
information we need, update the
|
||||
A record for the address we get. */
|
||||
|
||||
omapi_auth_key_t *omapi_key; /* Key to use for authenticating
|
||||
OMAPI connections. */
|
||||
int omapi_port; /* Port on which to listen for OMAPI
|
||||
connections. */
|
||||
|
||||
};
|
||||
|
||||
/* Per-interface state used in the dhcp client... */
|
||||
|
@ -977,7 +978,7 @@ int cons_options PROTO ((struct packet *, struct dhcp_packet *, struct lease *,
|
|||
int, int, int, struct data_string *, const char *));
|
||||
int fqdn_universe_decode (struct option_state *,
|
||||
const unsigned char *, unsigned, struct universe *);
|
||||
int store_options PROTO ((unsigned char *, unsigned, struct packet *,
|
||||
int store_options PROTO ((int *, unsigned char *, unsigned, struct packet *,
|
||||
struct lease *, struct client_state *,
|
||||
struct option_state *,
|
||||
struct option_state *, struct binding_scope **,
|
||||
|
@ -1372,7 +1373,7 @@ void dhcpdecline PROTO ((struct packet *, int));
|
|||
void dhcpinform PROTO ((struct packet *, int));
|
||||
void nak_lease PROTO ((struct packet *, struct iaddr *cip));
|
||||
void ack_lease PROTO ((struct packet *, struct lease *,
|
||||
unsigned int, TIME, char *, int));
|
||||
unsigned int, TIME, char *, int, struct host_decl *));
|
||||
void dhcp_reply PROTO ((struct lease *));
|
||||
int find_lease PROTO ((struct lease **, struct packet *,
|
||||
struct shared_network *, int *, int *, struct lease *,
|
||||
|
@ -1832,7 +1833,6 @@ u_int32_t host_addr PROTO ((struct iaddr, struct iaddr));
|
|||
int addr_eq PROTO ((struct iaddr, struct iaddr));
|
||||
char *piaddr PROTO ((struct iaddr));
|
||||
char *piaddrmask (struct iaddr, struct iaddr, const char *, int);
|
||||
char *piaddr1 PROTO ((struct iaddr));
|
||||
|
||||
/* dhclient.c */
|
||||
extern const char *path_dhclient_conf;
|
||||
|
@ -1934,7 +1934,7 @@ ssize_t decode_hw_header PROTO ((struct interface_info *, unsigned char *,
|
|||
unsigned, struct hardware *));
|
||||
ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
|
||||
unsigned, struct sockaddr_in *,
|
||||
unsigned char *, unsigned));
|
||||
unsigned, unsigned *));
|
||||
|
||||
/* ethernet.c */
|
||||
void assemble_ethernet_header PROTO ((struct interface_info *, unsigned char *,
|
||||
|
@ -2035,6 +2035,14 @@ int icmp_readsocket PROTO ((omapi_object_t *));
|
|||
int icmp_echorequest PROTO ((struct iaddr *));
|
||||
isc_result_t icmp_echoreply PROTO ((omapi_object_t *));
|
||||
|
||||
/* fddi.c */
|
||||
#if defined (PACKET_ASSEMBLY) || defined (PACKET_DECODING)
|
||||
void assemble_fddi_header (struct interface_info *,
|
||||
unsigned char *, unsigned *, struct hardware *);
|
||||
ssize_t decode_fddi_header (struct interface_info *,
|
||||
unsigned char *, unsigned, struct hardware *);
|
||||
#endif /* PACKET_ASSEMBLY || PACKET_DECODING */
|
||||
|
||||
/* dns.c */
|
||||
#if defined (NSUPDATE)
|
||||
isc_result_t find_tsig_key (ns_tsig_key **, const char *, struct dns_zone *);
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Tokens for config file lexer and parser. */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-2002 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -316,7 +307,8 @@ enum dhcp_token {
|
|||
REMOVE = 611,
|
||||
REFRESH = 612,
|
||||
DOMAIN_NAME = 613,
|
||||
DO_FORWARD_UPDATE = 614
|
||||
DO_FORWARD_UPDATE = 614,
|
||||
KNOWN_CLIENTS = 615
|
||||
};
|
||||
|
||||
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Definitions for address trees... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2001 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 2000-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
@ -316,6 +307,8 @@ typedef struct _dhcp_failover_state {
|
|||
queue. */
|
||||
int pool_count; /* Number of pools referencing this
|
||||
failover state object. */
|
||||
int curUPD; /* If an UPDREQ* message is in motion,
|
||||
this value indicates which one. */
|
||||
} dhcp_failover_state_t;
|
||||
|
||||
#define DHCP_FAILOVER_VERSION 1
|
||||
|
|
|
@ -3,39 +3,30 @@
|
|||
Portable definitions for internet addresses */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996-1999 Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* 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. Neither the name of The Internet Software Consortium nor the names
|
||||
* of its contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
||||
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM 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 INTERNET SOFTWARE CONSORTIUM 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.
|
||||
* Internet Systems Consortium, Inc.
|
||||
* 950 Charter Street
|
||||
* Redwood City, CA 94063
|
||||
* <info@isc.org>
|
||||
* http://www.isc.org/
|
||||
*
|
||||
* This software has been written for the Internet Software Consortium
|
||||
* This software has been written for Internet Systems Consortium
|
||||
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
|
||||
* To learn more about the Internet Software Consortium, see
|
||||
* To learn more about Internet Systems Consortium, see
|
||||
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
|
||||
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
|
||||
* ``http://www.nominum.com''.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue