now synced as of tag V3-0-3-BETA-1.
# Makefile
#
-# Copyright (c) 2000 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`; \
# Makefile.conf
#
-# Copyright (c) 1996-2000 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
## FreeBSD
##--freebsd--
#CF = cf/freebsd.h
+#COPTS = -O -Wall -Wno-unused -Werror $(CC_OPTIONS)
#SCRIPT=freebsd
##--freebsd--
#CF = cf/rhapsody.h
#COPTS = -Ddarwin -Wall -Wno-unused -Wno-implicit -Wno-comment \
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF) $(CC_OPTIONS)
-##SCRIPT=rhapsody
+#SCRIPT=freebsd
##--darwin--
## NetBSD
#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 \
-# -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--
# Makefile.dist
#
-# 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) 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
- Internet Software Consortium DHCP Distribution
- Version 3.1 - DEVELOPMENT
- May 26, 2002
+ Internet Systems Consortium DHCP Distribution
+ Version 3.1 - HEAD
+ March 3, 2005
- README FILE
+ README FILE
You should read this file carefully before trying to install or use
the ISC DHCP Distribution.
RELEASE STATUS
-This is the second beta release of version 3.0 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 a snapshot of the ISC DHCP project's CVS HEAD prior to release
+version 3.1.x. This is highly experimental code which has not been
+publically released, nor properly tested. It contains a large number of
+new features, and with it most likely many bugs.
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.
To build the DHCP Distribution, unpack the compressed tar file using
the tar utility and the gzip command - type something like:
- zcat dhcp-3.0rc3.tar.gz |tar xvf -
+ zcat dhcp-3.1-HEAD.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.0rc3 subdirectory that you've just
-created and configure the source tree by typing:
+Now, cd to the dhcp-3.1-HEAD 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
problems for Linux 2.1/2.2: the "SO_ATTACH_FILTER undeclared" problem
and the "protocol not configured" problem.
- LINUX: IF_TR.H NOT FOUND
-
-When you compile the distribution on Linux, you may get an error
-message indicating that the include file if_tr.h could not be found.
-If this happens, go into includes/cf/linux.h and delete the line that
-defined HAVE_TR_SUPPORT, or look into installing a new version of libc
-that includes the if_tr.h file. We will be working on removing this
-problem in the future, but for now, if you run into it, this should be
-a viable workaround.
-
LINUX: SO_ATTACH_FILTER UNDECLARED
In addition, there is a minor issue that we will mention here because
can't communicate with its clients, you should #define BROKEN_FREEBSD_BPF
in site.h and recompile.
+Modern versions of FreeBSD include the ISC DHCP 3.0 client as part of
+the base system, and the full distribution (for the DHCP server and
+relay agent) is available from the Ports Collection in
+/usr/ports/net/isc-dhcp3, or as a package on FreeBSD installation
+CDROMs.
+
NeXTSTEP
The NeXTSTEP support uses the NeXTSTEP Berkeley Packet Filter
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
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,
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.
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
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.
- Internet Software Consortium DHCP Distribution
- Version 3.1, Working Branch
+ Internet Systems Consortium DHCP Distribution
+ Version 3.1 - HEAD
+ March 3, 2005
- Release Notes
-
-This is a development snapshot of Version 3 of the Internet Software
-Consortium DHCP Distribution.
+ Release Notes
NEW FEATURES
- Many bug fixes, performance enhancements, and minor new DHCP
protocol features.
-This release has been beta tested quite thorougly, and we think it is
-substantially more robust at this time than 2.0pl5. The release
-candidate is expected to be free of serious bugs, but it's called a
-release candidate because we want people to try it and find any last
-real problems before we call it done. We do not expect to add
-anything other than documentation and any remaining bug fixes to the
-3.0 release.
-
-The 3.0 Release Candidate 1 lease file is not backwards compatible
-with the 3.0 Beta 1 lease file, so if you have to go back, you will
-have to convert your lease files back to the 3.0 Beta 1 format - if
-you try to run a 3.0 Beta 1 server on a 3.0 lease file, it will
-cheerfully delete all your leases.
+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
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 (New Features)
+
+- A workaround for certain STSN servers that send a mangled domain-name
+ option was introduced for dhclient. The client will now accept corrupted
+ server responses, if they contain a valid DHCP_MESSAGE_TYPE (OFFER, ACK,
+ or NAK). The server will continue to not accept corrupt client packets.
+
+- Support for 'reserved' (static) and BOOTP leases via failover was
+ introduced.
+
+- Support for adding, removing, and managing class and subclass statements
+ via OMAPI.
+
+- 'make install' now creates the initial zero-length dhcpd.leases file if
+ one does not already exist on the system.
+
+X The 'www-server' option was documented. This should probably be
+ backported to V3-RELEASE-BRANCH.
+
+
+ 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.
+
+- A change to the linux client script to use /bin/bash, since /bin/sh may
+ not be bash.
+
+- Some missing va_end cleanups thanks to a patch from Thomas Klausner.
+
+- A correction of boolean parsing syntax validation - some illegal syntaxes
+ that worked before are now detected and produce errs, some legal syntaxes
+ that errored before will now work properly.
+
+- Some search-and-replace errors that caused some options to change their
+ names was repaired.
+
+- Shu-min Chang of the Intel corporation has contributed a perl script and
+ module that converts the MS NT4 DHCP configuration to a ISC DHCP3
+ configuration file.
+
+- Applied the remainder of the dhcpctl memory leak patch provided by Bill
+ Squier at ReefEdge, Inc. (groo@reefedge.com).
+
+- Missing non-optional failover peer configurations will now result in a soft
+ error rather than a null dereference.
+
+ Changes since 3.0.1rc9
+
+- A format string was corrected to fix compiler warnings.
+
+- A number of spelling corrections were made in the man pages.
+
+- The dhclient.conf.5 man page was changed to refer to do-forward-updates
+ rather than a configuration option that doesn't exist.
+
+- A FreeBSD-specific bug in the interface removal handling was fixed.
+
+- A Linux-specific Token Ring detection problem was fixed.
+
+- Hashes removed from as-yet-unknown agent options, having those options
+ appear in reality before we know about them will no longer produce
+ self-corrupting lease databases.
+
+- dhclient will use the proper port numbers now when using the -g option.
+
+- A order-of-operations bug with 2 match clauses in 1 class statement is
+ fixed thanks to a patch from Andrew Matheson.
+
+- Compilation problems on Solaris were fixed.
+
+- Compilation problems when built with DEBUG or DEBUG_PACKET were repaired.
+
+- A fix to the dhcp ack process which makes certain group options will be
+ included in the first DHCPOFFER message was made thanks to a patch from
+ Ling Gou.
+
+- A few memory leaks were repaired thanks to patches from Bill Squier at
+ ReefEdge, Inc. (groo@reefedge.com).
+
+- A fix for shared-networks that sometimes give clients options for the
+ wrong subnets (in particular, 'option routers') was applied, thanks to
+ Ted Lemon for the patch.
+
+- Omshell's handling of dotted octets as values was changed such that dots
+ one after the other produce zero values in the integer string.
+
+ Changes since 3.0.1rc8
+
+- Fix a format string vulnerability in the server that could lead to a
+ remote root compromise (discovered by NGSEC Research Team, www.ngsec.com).
+
+- Add additional support for NetBSD/sparc64.
+
+- Fix a bug in the command-line parsing of the client. Also, resolve
+ a memory leak.
+
+- Add better support for shells other than bash in the Linux client
+ script.
+
+- Various build fixes for modern versions of FreeBSD and Linux.
+
+- Fix a bad bounds check when printing binding state names.
+
+- Clarify documentation about fixed-address and multiple addresses.
+
+- Fix a typo in the authoritative error message.
+
+- Make a log entry when we can't write a billing class.
+
+- Use conversion targets that are the right size on all architectures.
+
+- Increment the hop count when relaying.
+
+- Log a message when lease state is changed through OMAPI.
+
+- Don't rerun the shared_network when evaluating the pool.
+
+- Fix a reversed test in the parser.
+
+- Change the type of rbuf_max.
+
+- Make FTS_LAST a manifest constant to quiet warnings.
+
+ Changes since 3.0.1rc7
+
+- Fix two compiler warnings that are generated when compiling on Solaris
+ with gcc. These stop the build, even though they weren't actually
+ errors, because we prefer that our builds generate no warnings.
+
+ Changes since 3.0.1rc6
+
+- Don't allow a lease that's in the EXPIRED, RELEASED or RESET state
+ to be renewed.
+
+- Implement lease stealing for cases where the primary has fewer leases
+ than the secondary, as called for by the standard.
+
+- Add a fudge factor to the lease expiry acceptance code, (suggested
+ by Kevin Miller of CMU).
+
+- Fix a bug in permit_list_match that made it much too willing to say
+ that two permit lists matched.
+
+- Unless DEBUG_DNS_UPDATES is defined, print more user-friendly (and
+ also more compact) messages about DNS updates.
+
+- Fix a bug in generating wire-format domain names for the FQDN option.
+
+- Fix a bug where the FQDN option would not be returned if the client
+ requested it, contrary to the standard.
+
+- On Darwin, use the FreeBSD DHCP client script.
+
+- On NetBSD/sparc, don't check for casting warnings.
+
+- Add a flag in the DHCP client to disable updating the client's A
+ record when sending an FQDN option indicating that the client is
+ going to update its A record.
+
+- In the client, don't attempt a DNS update until one second after
+ configuring the new IP address, and if the update times out, keep
+ trying until a response, positive or negative, is received from the
+ DNS server.
+
+- Fix an uninitialized memory bug in the DHCP client.
+
+- Apply some FreeBSD-specific bug fixes suggested by Murray Stokely.
+
+- Fix a bug in ns_parserr(), where it was returning the wrong sort
+ of result code in some cases (suggested by Ben Harris of the
+ NetBSD project).
+
+- Fix a bug in is_identifier(), where it was checking against EOF
+ instead of the END_OF_FILE token (also suggested by Ben Harris).
+
+- Fix a bug where if an option universe contained no options, the
+ DHCP server could dump core (Walter Steiner).
+
+- Fix a bug in the handling of encapsulated options.
+
+- Fix a bug that prevented NWIP suboptions from being processed.
+
+- Delete the FTS_BOOTP and FTS_RESERVED states and implement them
+ as modifier flags to the FTS_ACTIVE state, as called for in the
+ failover protocol standard.
+
+- Fix bugs in the pool merging code that resulted in references and
+ dereferences of null pointers. This bug had no impact unless the
+ POINTER_DEBUG flag was defined.
+
+- In the server, added a do-forward-updates flag that can be used to
+ disable forward updates in all cases, so that sites that want the
+ clients to take sole responsibility for updating their A record can
+ do so.
+
+- Make it possible to disable optimization of PTR record updates.
+
+ Changes since 3.0.1rc5
+
+- Include some new documentation and changes provided by Karl Auer.
+
+- Add a workaround for some Lexmark printers that send a double-NUL-
+ terminated host-name option, which would break DNS updates.
+
+- Fix an off-by-one error in the MAC-address checking code for
+ DHCPRELEASE that was added in 3.0.1rc5.
+
+- Fix a bug where client-specific information was not being discarded
+ from the lease when it expired or was released, resulting in
+ problems if the lease was reallocated to a different client.
+
+- If more than one allocation pool is specified that has the same set
+ of constraints as another allocation pool on the same shared
+ network, merge the two pools.
+
+- Don't print an error in fallback_discard, since this just causes
+ confusion and does not appear to be helping to encourage anyone to
+ fix this bug.
+
+ Changes since 3.0.1rc4
+
+- Fix a bug that would cause the DHCP server to spin if asked to parse
+ a certain kind of incorrect statement.
+
+- Fix a related bug that would prevent an error from being reported in
+ the same case.
+
+- Additional documentation.
+
+- Make sure that the hardware address matches the lease when
+ processing a DHCPRELEASE message.
+
+ Changes since 3.0.1rc3
+
+- A minor bug fix in the arguments to a logging function call.
+- Documentation update for dhcpd.conf.
+
+ Changes since 3.0.1rc2
+
+- Allow the primary to send a POOLREQ message. This isn't what the current
+ failover draft says to do, so we may have to back it out if I can't get the
+ authors to relent, but the scheme for balancing that's specified in the
+ current draft seems needlessly hairy, so I'm floating a trial balloon.
+ The rc1 code did not implement the method described in the draft either.
+
+ Changes since 3.0.1rc1
+
+- Treat NXDOMAIN and NXRRSET as success when we are trying to delete a
+ domain or RRSET. This allows the DHCP server to forget about a name
+ it added to the DNS once it's been removed, even if the DHCP server
+ wasn't the one that removed it.
+
+- Install defaults for failover maximum outstanding updates and maximum
+ silent time. This prevents problems that might occur if these values
+ were not configured.
+
+- Don't do DDNS deletes if ddns-update-style is none.
+
+- Return relay agent information options in DHCPNAK. This prevents DHCPNAK
+ messages from being dropped when the relay agent information option contains
+ routing information.
+
+- Fix a problem where coming up in recover wouldn't result in an update
+ request being sent.
+
+- Add some more chatty messages when we start a recovery update and when it's
+ done.
+
+- Fix a possible problem where some state might have been left around
+ after the peer lost contact and regained contact about how many updates
+ were pending.
+
+- Don't nix a lease update because of a lease conflict. This test has
+ never (as far as I know) prevented a mistake, and it appears to cause
+ problems with failover.
+
+- Add support in rc history code for keeping a selective history, rather
+ than a history of all references and dereferences. This code is only used
+ when extensive additional debugging is enabled.
+
+ Changes since 3.0
+
+- Make allocators for hash tables. As a side effect, this fixes a memory
+ smash in the subclass allocation code.
+
+- Fix a small bug in omshell where if you try to close an object when
+ no object is open, it dumps core.
+
+- Fix an obscure coredump that could occur on shutdown.
+
+- Fix a bug in the recording of host declaration rubouts in the lease file.
+
+- Fix two potential spins in the host deletion code.
+
+- Fix a core dump that would happen if an application tried to update
+ a host object attribute with a null value.
+
+ Changes since 3.0 Release Candidate 12
+
+- Fix a memory leak in the evaluation code.
+
+- Fix an obscure core dump.
+
+- Print a couple of new warnings when parsing the configuration file
+ when crucial information is left out.
+
+- Log "no free leases" as an error.
+
+- Documentation updates.
+
+ Changes since 3.0 Release Candidate 11
+
+- Always return a subnet selection option if one is sent.
+
+- Fix a warning that was being printed because an automatic data
+ structure wasn't zeroed.
+
+- Fix some failover state transitions that were being handled
+ incorrectly.
+
+- When supersede_lease is called on a lease whose end time has already
+ expired, but for which a state transition has not yet been done, do
+ a state transition. This fixes the case where if the secondary
+ allocated a lease to a client and the lease "expired" while the
+ secondary was in partner-down, no expiry event would actually
+ happen, so the lease would remain active until the primary was
+ restarted.
+
+ Changes since 3.0 Release Candidate 10
+
+- Fix a bug that was preventing released leases from changing state
+ in failover-enabled pools.
+
+- Fix a core dump in the client identifier finder code (for host
+ declarations).
+
+- Finish fixing a bug where bogus data would sometimes get logged to
+ the dhclient.leases file because it was opened as descriptor 2.
+
+- Fix the Linux dhclient-script according to suggestions made by
+ several people on the dhcp-client mailing list.
+
+- Log successful DNS updates at LOG_INFO, not LOG_ERROR.
+
+- Print an error message and refuse to run if a failover peer is
+ defined but not referenced by any pools.
+
+- Correct a confusing error message in failover.
+
Changes since 3.0 Release Candidate 9
- Fix a bug in lease allocation for Dynamic BOOTP clients.
- Clean up the memory allocation/reference history printer.
-- Support input of dotted quads and colon-seperated hex lists as
+- Support input of dotted quads and colon-separated hex lists as
attribute values in omshell.
-- Fix a typo in the linux interface discovery code.
+- Fix a typo in the Linux interface discovery code.
- Conditionalize a piece of trace code that wasn't conditional.
- Fix compile problem on SunOS 4.x
-- If a signature algorithm is not termined with '.', terminate it so
+- If a signature algorithm is not terminated with '.', terminate it so
that comparisons between fully-qualified names will work
consistently.
- Change the conditions under which a DHCPRELEASE is actually
committed to be consistent with lease binding states rather than
- using the lease end time. THis may fix some problems with the
+ using the lease end time. This may fix some problems with the
billing class code.
- Fix a bug where lease updates would fail on Digital Unix (and maybe
given a lease where the hardware address was correct but the client
identifier was not, resulting in a lease conflict message.
-- Fix a problem where the server could write out a colon-seperated
+- Fix a problem where the server could write out a colon-separated
hex list as a value for a variable, which would then not parse.
The fix is to always write strings as quoted strings, with any
non-printable characters quoted as octal escape sequences. So
# Makefile.dist
#
-# 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.
-#
-# 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
Parser for dhclient config and lease files... */
/*
- * 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''.
#ifndef lint
static char copyright[] =
-"$Id: clparse.c,v 1.63 2001/06/27 00:29:27 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: clparse.c,v 1.64 2005/03/17 20:14:55 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
top_level_config.script_name = path_dhclient_script;
top_level_config.requested_options = default_requested_options;
top_level_config.omapi_port = -1;
+ top_level_config.do_forward_update = 1;
group_allocate (&top_level_config.on_receipt, MDL);
if (!top_level_config.on_receipt)
parse_semi (cfile);
return;
+ case DO_FORWARD_UPDATE:
+ token = next_token (&val, (unsigned *)0, cfile);
+ token = next_token (&val, (unsigned *)0, cfile);
+ if (!strcasecmp (val, "on") ||
+ !strcasecmp (val, "true"))
+ config -> do_forward_update = 1;
+ else if (!strcasecmp (val, "off") ||
+ !strcasecmp (val, "false"))
+ config -> do_forward_update = 0;
+ else {
+ parse_warn (cfile, "expecting boolean value.");
+ skip_to_semi (cfile);
+ return;
+ }
+ parse_semi (cfile);
+ return;
+
case REBOOT:
token = next_token (&val, (unsigned *)0, cfile);
parse_lease_time (cfile, &config -> reboot_timeout);
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;
/* 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);
}
if (pi)
status = interface_reference (pi, ip, MDL);
+ else
+ status = ISC_R_FAILURE;
interface_dereference (&ip, MDL);
if (status != ISC_R_SUCCESS)
return 0;
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;
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 (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
.\" dhclient-script.8
.\"
-.\" 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''.
.\"
-.\" $Id: dhclient-script.8,v 1.9 2002/05/27 03:50:20 murray Exp $
+.\" $Id: dhclient-script.8,v 1.10 2005/03/17 20:14:55 dhankins Exp $
.\"
.TH dhclient-script 8
.SH NAME
of dhclient-script.
.SH OPERATION
When dhclient needs to invoke the client configuration script, it
-writes a shell script into /tmp which defines a variety of variables.
+defines a set of variables in the environment, and then invokes
+.B CLIENTBINDIR/dhclient-script.
In all cases, $reason is set to the name of the reason why the script
has been invoked. The following reasons are currently defined:
MEDIUM, PREINIT, BOUND, RENEW, REBIND, REBOOT, EXPIRE, FAIL and TIMEOUT.
likely to need to be set up. A new /etc/resolv.conf needs to be
created, using the values of $new_domain_name and
$new_domain_name_servers (which may list more than one server,
-seperated by spaces). A default route should be set using
+separated by spaces). A default route should be set using
$new_routers, and static routes may need to be set up using
$new_static_routes.
.PP
.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
dhclient.leases(5).
.SH AUTHOR
.B dhclient-script(8)
-has been written for the Internet Software Consortium
-by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
-Enterprises. To learn more about the Internet Software Consortium,
+has been written for Internet Systems Consortium
+by Ted Lemon in cooperation with Vixie
+Enterprises. To learn more about Internet Systems Consortium,
see
-.B http://www.vix.com/isc.
+.B http://www.isc.org.
To learn more about Vixie
Enterprises, see
.B http://www.vix.com.
.\" dhclient.8
.\"
-.\" 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.
+.\"
+.\" Internet Systems Consortium, Inc.
+.\" 950 Charter Street
+.\" Redwood City, CA 94063
+.\" <info@isc.org>
+.\" http://www.isc.org/
.\"
.\" Support and other services are available for ISC products - see
.\" http://www.isc.org for more information.
.\"
-.\" $Id: dhclient.8,v 1.16 2002/06/08 08:22:09 murray Exp $
+.\" $Id: dhclient.8,v 1.17 2005/03/17 20:14:55 dhankins Exp $
.\"
.TH dhclient 8
.SH NAME
]
]
.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.
.B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid,
.B DBDIR/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
.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
DHCP Client. */
/*
- * Copyright (c) 1995-2001 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
#ifndef lint
static char ocopyright[] =
-"$Id: dhclient.c,v 1.131 2001/08/10 10:47:33 mellon Exp $ Copyright (c) 1995-2001 Internet Software Consortium. All rights reserved.\n";
+"$Id: dhclient.c,v 1.132 2005/03/17 20:14:55 dhankins 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... */
assert (state_is == state_shouldbe). */
#define ASSERT_STATE(state_is, state_shouldbe) {}
-static char copyright[] = "Copyright 1995-2001 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;
-u_int16_t remote_port;
-int no_daemon;
-struct string_list *client_env;
-int client_env_count;
-int onetry;
-int quiet;
-int nowait;
+u_int16_t local_port=0;
+u_int16_t remote_port=0;
+int no_daemon=0;
+struct string_list *client_env=NULL;
+int client_env_count=0;
+int onetry=0;
+int quiet=0;
+int nowait=0;
static void usage PROTO ((void));
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;
} else if (!strcmp (argv [i], "-w")) {
/* do not exit if there are no broadcast interfaces. */
persist = 1;
- } else if (argv [i][0] == '-') {
- usage ();
} else if (!strcmp (argv [i], "-e")) {
struct string_list *tmp;
if (++i == argc)
} else if (!strcmp (argv [i], "--version")) {
log_info ("isc-dhclient-%s", DHCP_VERSION);
exit (0);
- } else if (!strcmp (argv [i], "-nw")) {
- nowait = 1;
- } else {
+ } else if (argv [i][0] == '-') {
+ usage ();
+ } else {
struct interface_info *tmp = (struct interface_info *)0;
status = interface_allocate (&tmp, MDL);
if (status != ISC_R_SUCCESS)
/* first kill of any currently running client */
if (release_mode) {
- /* XXX inelegant hack to prove concept */
- char command[1024];
-
-#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);
+ FILE *pidfd;
+ pid_t oldpid;
+ long temp;
+ int e;
+
+ 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);
+ }
}
if (!quiet) {
/* Default to the DHCP/BOOTP port. */
if (!local_port) {
+ /* If we're faking a relay agent, and we're not using loopback,
+ use the server port, not the client port. */
if (relay && giaddr.s_addr != htonl (INADDR_LOOPBACK)) {
- local_port = htons (67);
+ local_port = htons(67);
} else {
ent = getservbyname ("dhcpc", "udp");
if (!ent)
}
/* If we're faking a relay agent, and we're not using loopback,
- use the server port, not the client port. */
+ we're using the server port, not the client port. */
if (relay && giaddr.s_addr != htonl (INADDR_LOOPBACK)) {
- local_port = htons (ntohs (local_port) - 1);
remote_port = local_port;
} else
remote_port = htons (ntohs (local_port) - 1); /* XXX */
-
+
/* Get the current time... */
GET_TIME (&cur_time);
/* 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)));
} 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. */
client -> state = S_BOUND;
reinitialize_interfaces ();
go_daemon ();
- client_dns_update (client, 1);
+ if (client -> config -> do_forward_update) {
+ client -> dns_update_timeout = 1;
+ add_timeout (cur_time + 1, client_dns_update_timeout,
+ client, 0, 0);
+ }
}
/* state_bound is called when we've successfully bound to a particular
client -> destination.len = 4;
} else
client -> destination = iaddr_broadcast;
+
+ data_string_forget (&ds, MDL);
} else
client -> destination = iaddr_broadcast;
memcpy (lease -> address.iabuf, &packet -> raw -> yiaddr,
lease -> address.len);
+ memset (&data, 0, sizeof data);
+
if (client -> config -> vendor_space_name) {
i = DHO_VENDOR_ENCAPSULATED_OPTIONS;
/* See if there was a vendor encapsulation option. */
oc = lookup_option (&dhcp_universe, lease -> options, i);
- memset (&data, 0, sizeof data);
if (oc &&
client -> config -> vendor_space_name &&
evaluate_option_cache (&data, packet,
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 {
/* 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 =
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. */
/* 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;
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)
/* 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);
+
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
(struct option_state *)0, options,
&global_scope, 0, 0, 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;
option_state_dereference (&options, MDL);
/* 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);
client -> destination.len = 4;
} else
client -> destination = iaddr_broadcast;
+
+ data_string_forget (&ds, MDL);
} else
client -> destination = iaddr_broadcast;
client -> first_sending = cur_time;
case server_shutdown:
if (client -> active &&
client -> active -> expiry > cur_time) {
- client_dns_update (client, 0);
+ if (client -> config -> do_forward_update)
+ client_dns_update (client, 0, 0);
do_release (client);
}
break;
return ISC_R_SUCCESS;
}
+/* Called after a timeout if the DNS update failed on the previous try.
+ Retries the update, and if it times out, schedules a retry after
+ ten times as long of a wait. */
+
+void client_dns_update_timeout (void *cp)
+{
+ struct client_state *client = cp;
+ isc_result_t status;
+
+ if (client -> active) {
+ status = client_dns_update (client, 1,
+ (client -> active -> renewal -
+ cur_time));
+ if (status == ISC_R_TIMEDOUT) {
+ client -> dns_update_timeout *= 10;
+ add_timeout (cur_time + client -> dns_update_timeout,
+ client_dns_update_timeout, client, 0, 0);
+ }
+ }
+}
+
/* See if we should do a DNS update, and if so, do it. */
-void client_dns_update (struct client_state *client, int addp)
+isc_result_t client_dns_update (struct client_state *client, int addp, int ttl)
{
struct data_string ddns_fqdn, ddns_fwd_name,
ddns_dhcid, client_identifier;
/* If we didn't send an FQDN option, we certainly aren't going to
be doing an update. */
if (!client -> sent_options)
- return;
+ return ISC_R_SUCCESS;
/* If we don't have a lease, we can't do an update. */
if (!client -> active)
- return;
+ return ISC_R_SUCCESS;
/* If we set the no client update flag, don't do the update. */
if ((oc = lookup_option (&fqdn_universe, client -> sent_options,
client -> sent_options,
(struct option_state *)0,
&global_scope, oc, MDL))
- return;
+ return ISC_R_SUCCESS;
/* If we set the "server, please update" flag, or didn't set it
to false, don't do the update. */
client -> sent_options,
(struct option_state *)0,
&global_scope, oc, MDL))
- return;
+ return ISC_R_SUCCESS;
/* If no FQDN option was supplied, don't do the update. */
memset (&ddns_fwd_name, 0, sizeof ddns_fwd_name);
client -> sent_options,
(struct option_state *)0,
&global_scope, oc, MDL))
- return;
+ return ISC_R_SUCCESS;
/* Make a dhcid string out of either the client identifier,
if we are sending one, or the interface's MAC address,
client -> interface -> hw_address.hlen);
if (!result) {
data_string_forget (&ddns_fwd_name, MDL);
- return;
+ return ISC_R_SUCCESS;
}
/* Start the resolver, if necessary. */
if (addp)
rcode = ddns_update_a (&ddns_fwd_name,
client -> active -> address,
- &ddns_dhcid, DEFAULT_DDNS_TTL,
+ &ddns_dhcid, ttl,
1);
else
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);
+ return rcode;
}
-.\" dhclient.conf.5
+.\" $Id: dhclient.conf.5,v 1.15 2005/03/17 20:14:56 dhankins 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 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.14 2002/05/27 03:50:55 murray Exp $
+.\" $Id: dhclient.conf.5,v 1.15 2005/03/17 20:14:56 dhankins Exp $
.\"
.TH dhclient.conf 5
.SH NAME
.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
they will not make their requests in lockstep. 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
name. You \fBMUST\fR define a zone statement for the zone to be
updated. The \fIfqdn.encoded\fR option may need to be set to
\fIon\fR or \fIoff\fR, depending on the DHCP server you are using.
+.PP
+.I The
+.B do-forward-updates
+.I statement
+.PP
+ \fBdo-forward-updates [ \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
+DHCP client do the update directly (for example, if you want to
+use SIG(0) authentication, which is not supported directly by the
+DHCP client, you can instruct the client not to do the update using
+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.
.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
\fBlease {\fR \fIlease-declaration\fR [ ... \fIlease-declaration ] \fB}\fR
.PP
The DHCP client may decide after some period of time (see \fBPROTOCOL
-TIMING\fR) decide that it is not going to succeed in contacting a
+TIMING\fR) that it is not going to succeed in contacting a
server. At that time, it consults its own database of old leases and
tests each one that has not yet timed out by pinging the listed router
for that lease to see if that lease could work. It is possible to
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 used a
+The dhcp client automatically declares this parameter if it uses a
media type (see the
.B media
statement) when configuring the interface in order to obtain a lease.
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
.SH OTHER DECLARATIONS
\fBreject \fIip-address\fB;\fR
.PP
-The reject statement causes the DHCP client to reject offers from
+The
+.B reject
+statement causes the DHCP client to reject offers from
servers who use the specified address as a server identifier. This
can be used to avoid being configured by rogue or misconfigured dhcp
servers, although it should be a last resort - better to track down
interface named \fIreal-name\fR, with its own lease and its own
state. If you use this feature, you must provide a client identifier
for both the pseudo-interface and the actual interface, and the two
-identifiers must be different. You must also provide a seperate
+identifiers must be different. You must also provide a separate
client script for the pseudo-interface to do what you want with the IP
address. For example:
.PP
probably right (no guarantees).
.PP
The media setup is only used for the initial phase of address
-acquisition (the DHCPDISCOVER and DHCPOFFER packtes). Once an
+acquisition (the DHCPDISCOVER and DHCPOFFER packets). Once an
address has been acquired, the dhcp client will record it in its lease
database and will record the media type used to acquire the address.
Whenever the client tries to renew the lease, it will use that same
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
- script "/etc/dhclient-script";
+ script "CLIENTBINDIR/dhclient-script";
media "media 10baseT/UTP", "media 10base2/BNC";
}
RFC2131.
.SH AUTHOR
.B dhclient(8)
-was written by Ted Lemon <mellon@vix.com>
+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
-.B http://www.isc.org/isc.
+for this project was provided by Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
+.B http://www.isc.org.
-.\" dhclient.conf.5
+.\" $Id: dhclient.leases.5,v 1.4 2005/03/17 20:14:56 dhankins 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
-.\" by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
-.\" Enterprises. To learn more about 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 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.3 2002/05/27 03:50:56 murray Exp $
+.\" $Id: dhclient.leases.5,v 1.4 2005/03/17 20:14:56 dhankins 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,
dhcpd.conf(5), RFC2132, RFC2131.
.SH AUTHOR
.B dhclient(8)
-was written by Ted Lemon <mellon@vix.com>
+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
-.B http://www.isc.org/isc.
+for this project was provided by Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
+.B http://www.isc.org.
#!/bin/sh
+#
+# $Id: freebsd,v 1.16 2005/03/17 20:14:56 dhankins Exp $
+#
+# $FreeBSD$
if [ -x /usr/bin/logger ]; then
LOGGER="/usr/bin/logger -s -p user.notice -t dhclient"
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
}
if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
[ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then
- current_hostname=`hostname`
+ current_hostname=`/bin/hostname`
if [ x$current_hostname = x ] || \
[ x$current_hostname = x$old_host_name ]; then
if [ x$current_hostname = x ] || \
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
- if [ "$old_static_routes" != "" ]; then
+ if [ -n "$old_static_routes" ]; then
set -- $old_static_routes
while [ $# -gt 1 ]; do
route delete $1 $2
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
$new_broadcast_arg $medium"
- $LOGGER "New IP Address($interface): $new_ip_address"
- $LOGGER "New Subnet Mask($interface): $new_subnet_mask"
- $LOGGER "New Broadcast Address($interface): $new_broadcast_address"
- if [ "$new_routers" != "" ]; then
+ $LOGGER "New IP Address ($interface): $new_ip_address"
+ $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
+ $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
+ if [ -n "$new_routers" ]; then
$LOGGER "New Routers: $new_routers"
fi
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router >/dev/null 2>&1
done
- if [ "$new_static_routes" != "" ]; then
+ if [ -n "$new_static_routes" ]; then
$LOGGER "New Static Routes: $new_static_routes"
set -- $new_static_routes
while [ $# -gt 1 ]; do
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
- if [ "$old_static_routes" != "" ]; then
+ if [ -n "$old_static_routes" ]; then
set -- $old_static_routes
while [ $# -gt 1 ]; do
route delete $1 $2
shift; shift
done
fi
- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
+ arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' \
|sh >/dev/null 2>&1
fi
if [ x$alias_ip_address != x ]; then
fi
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
$new_broadcast_arg $medium"
- $LOGGER "New IP Address($interface): $new_ip_address"
- $LOGGER "New Subnet Mask($interface): $new_subnet_mask"
- $LOGGER "New Broadcast Address($interface): $new_broadcast_address"
+ $LOGGER "New IP Address ($interface): $new_ip_address"
+ $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
+ $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
sleep 1
- if [ "$new_routers" != "" ]; then
+ if [ -n "$new_routers" ]; then
$LOGGER "New Routers: $new_routers"
set -- $new_routers
if ping -q -c 1 $1; then
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
- if [ "$old_static_routes" != "" ]; then
+ if [ -n "$old_static_routes" ]; then
set -- $old_static_routes
while [ $# -gt 1 ]; do
route delete $1 $2
-#!/bin/sh
+#!/bin/bash
# dhclient-script for Linux. Dan Halbert, March, 1997.
# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
# No guarantees about this. I'm a novice at the details of Linux
# 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
# of the $1 in its args.
-function make_resolv_conf() {
+make_resolv_conf() {
if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
echo search $new_domain_name >/etc/resolv.conf
+ chmod 644 /etc/resolv.conf
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf
done
}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
-function exit_with_hooks() {
+exit_with_hooks() {
exit_status=$1
if [ -f /etc/dhclient-exit-hooks ]; then
. /etc/dhclient-exit-hooks
# Makefile.dist
-
-CATMANPAGES = dhcp-options.cat5 dhcp-contrib.cat5 dhcp-eval.cat5
-SEDMANPAGES = dhcp-options.man5 dhcp-contrib.man5 dhcp-eval.man5
+#
+# 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
-MAN = dhcp-options.5 dhcp-contrib.5 dhcp-eval.5
+ 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
CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
$(DESTDIR)$(FFMANDIR)/dhcp-options$(FFMANEXT)
$(MANINSTALL) $(MANFROM) dhcp-eval.$(MANCAT)5 $(MANTO) \
$(DESTDIR)$(FFMANDIR)/dhcp-eval$(FFMANEXT)
- $(MANINSTALL) $(MANFROM) dhcp-contrib.$(MANCAT)5 $(MANTO) \
- $(DESTDIR)$(FFMANDIR)/dhcp-contrib$(FFMANEXT)
depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
-e "s#RUNDIR#$(VARRUN)#g" < dhcp-eval.5 >dhcp-eval.man5
-dhcp-contrib.cat5: dhcp-contrib.man5
- nroff -man dhcp-contrib.man5 >dhcp-contrib.cat5
-
-dhcp-contrib.man5: dhcp-contrib.5
- sed -e "s#ETCDIR#$(ETC)#g" -e "s#DBDIR#$(VARDB)#g" \
- -e "s#RUNDIR#$(VARRUN)#g" < dhcp-contrib.5 >dhcp-contrib.man5
-
# Dependencies (semi-automatically-generated)
Memory allocation... */
/*
- * Copyright (c) 1996-2000 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''.
#ifndef lint
static char copyright[] =
-"$Id: alloc.c,v 1.54 2001/06/27 00:29:39 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: alloc.c,v 1.55 2005/03/17 20:14:56 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
option_chain_head = *ptr;
*ptr = (struct option_chain_head *)0;
--option_chain_head -> refcnt;
- rc_register (file, line, ptr,
- option_chain_head, option_chain_head -> refcnt, 1);
+ rc_register (file, line, ptr, option_chain_head,
+ option_chain_head -> refcnt, 1, RC_MISC);
if (option_chain_head -> refcnt > 0)
return 1;
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
group = *ptr;
*ptr = (struct group *)0;
--group -> refcnt;
- rc_register (file, line, ptr, group, group -> refcnt, 1);
+ rc_register (file, line, ptr, group, group -> refcnt, 1, RC_MISC);
if (group -> refcnt > 0)
return 1;
}
*ptr = src;
src -> refcnt++;
- rc_register (file, line, ptr, src, src -> refcnt, 0);
+ rc_register (file, line, ptr, src, src -> refcnt, 0, RC_MISC);
return 1;
}
}
*ptr = src;
src -> refcnt++;
- rc_register (file, line, ptr, src, src -> refcnt, 0);
+ rc_register (file, line, ptr, src, src -> refcnt, 0, RC_MISC);
return 1;
}
}
*ptr = src;
src -> refcnt++;
- rc_register (file, line, ptr, src, src -> refcnt, 0);
+ rc_register (file, line, ptr, src, src -> refcnt, 0, RC_MISC);
return 1;
}
}
*ptr = src;
src -> refcnt++;
- rc_register (file, line, ptr, src, src -> refcnt, 0);
+ rc_register (file, line, ptr, src, src -> refcnt, 0, RC_MISC);
return 1;
}
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
}
(*ptr) -> refcnt--;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1);
+ rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1, RC_MISC);
if (!(*ptr) -> refcnt) {
dfree ((*ptr), file, line);
} else if ((*ptr) -> refcnt < 0) {
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
}
(*ptr) -> refcnt--;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1);
+ rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1, RC_MISC);
if (!(*ptr) -> refcnt)
dfree ((*ptr), file, line);
if ((*ptr) -> refcnt < 0) {
memset (*ptr, 0, size);
(*ptr) -> universe_count = universe_count;
(*ptr) -> refcnt = 1;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 0);
+ rc_register (file, line,
+ ptr, *ptr, (*ptr) -> refcnt, 0, RC_MISC);
return 1;
}
return 0;
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
options = *ptr;
*ptr = (struct option_state *)0;
--options -> refcnt;
- rc_register (file, line, ptr, options, options -> refcnt, 1);
+ rc_register (file, line, ptr, options, options -> refcnt, 1, RC_MISC);
if (options -> refcnt > 0)
return 1;
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
packet = *ptr;
*ptr = (struct packet *)0;
--packet -> refcnt;
- rc_register (file, line, ptr, packet, packet -> refcnt, 1);
+ rc_register (file, line, ptr, packet, packet -> refcnt, 1, RC_MISC);
if (packet -> refcnt > 0)
return 1;
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
}
*ptr = bp;
bp -> refcnt++;
- rc_register (file, line, ptr, bp, bp -> refcnt, 0);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 0, RC_MISC);
return 1;
}
BPF socket interface code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2000 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
#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.49 2002/06/08 09:28:15 murray Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.50 2005/03/17 20:14:56 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* Open a BPF device */
for (b = 0; 1; b++) {
-#ifndef NO_SNPRINTF
- snprintf(filename, sizeof(filename), BPF_FORMAT, b);
-#else
+ /* %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) {
if (interface -> rbuf_offset == interface -> rbuf_len) {
length = read (interface -> rfdesc,
interface -> rbuf,
- interface -> rbuf_max);
+ (size_t)interface -> rbuf_max);
if (length <= 0) {
#ifdef __FreeBSD__
if (errno == ENXIO) {
interface -> rbuf,
interface -> rbuf_offset,
from,
- (unsigned char *)0,
hdr.bh_caplen);
/* If the IP or UDP checksum was bad, skip the packet... */
OMAPI object interfaces for the DHCP server. */
/*
- * Copyright (c) 1999-2001 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: comapi.c,v 1.10 2001/06/27 00:29:41 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: comapi.c,v 1.11 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
dhcp_control_create,
dhcp_control_remove, 0, 0, 0,
sizeof (dhcp_control_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register control object type: %s",
isc_result_totext (status));
dhcp_group_lookup,
dhcp_group_create,
dhcp_group_remove, 0, 0, 0,
- sizeof (struct group_object), 0);
+ sizeof (struct group_object), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register group object type: %s",
isc_result_totext (status));
dhcp_subnet_lookup,
dhcp_subnet_create,
dhcp_subnet_remove, 0, 0, 0,
- sizeof (struct subnet), 0);
+ sizeof (struct subnet), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register subnet object type: %s",
isc_result_totext (status));
dhcp_shared_network_lookup,
dhcp_shared_network_create,
dhcp_shared_network_remove, 0, 0, 0,
- sizeof (struct shared_network), 0);
+ sizeof (struct shared_network), 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register shared network object type: %s",
isc_result_totext (status));
Lexical scanner for dhcpd config file... */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: conflex.c,v 1.94 2001/06/27 00:29:42 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: conflex.c,v 1.95 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
int i;
int bs = 0;
int c;
- int value;
- int hex;
+ int value = 0;
+ int hex = 0;
for (i = 0; i < sizeof cfile -> tokbuf; i++) {
again:
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)) {
- cfile -> bufix--;
- cfile -> ugflag = 1;
+ if (c != EOF) {
+ cfile -> bufix--;
+ cfile -> ugflag = 1;
+ }
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;
}
c = get_char (cfile);
if (!isascii (c) ||
(c != '-' && c != '_' && !isalnum (c))) {
- cfile -> bufix--;
- cfile -> ugflag = 1;
+ if (c != EOF) {
+ cfile -> bufix--;
+ cfile -> ugflag = 1;
+ }
break;
}
if (!isxdigit (c))
return DOMAIN;
if (!strcasecmp (atom + 1, "omain-name"))
return DOMAIN_NAME;
+ if (!strcasecmp (atom + 1, "o-forward-update"))
+ return DO_FORWARD_UPDATE;
if (!strcasecmp (atom + 1, "ebug"))
return TOKEN_DEBUG;
if (!strcasecmp (atom + 1, "eny"))
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;
Subroutines that support dhcp tracing... */
/*
- * 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''.
*/
+#ifndef lint
+static char copyright[] =
+"$Id: ctrace.c,v 1.4 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include "dhcpd.h"
#if defined (TRACING)
return;
tip.from_port = from_port;
tip.from = from;
+ tip.from.len = htonl (tip.from.len);
if (hfrom) {
tip.hfrom = *hfrom;
tip.havehfrom = 1;
}
tip = (trace_inpacket_t *)buf;
index = ntohl (tip -> index);
+ tip -> from.len = ntohl (tip -> from.len);
if (index > interface_count ||
index < 0 ||
-.\" dhcp-eval.5
+.\" $Id: dhcp-eval.5,v 1.19 2005/03/17 20:14:57 dhankins 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''.
.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.
the packet to which the server is responding.
.RE
.PP
+.B config-option \fIoption-name\fR
+.PP
+.RS 0.25i
+The \fBconfig-option\fR operator returns the value for the specified option
+that the DHCP client or server has been configured to send.
+.RE
+.PP
.B hardware
.PP
.RS 0.25i
.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 ('\\') 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 or equal to 0xff.
.RE
.PP
-.I colon-seperated hexadecimal list
+.I colon-separated hexadecimal list
.PP
.RS 0.25i
-A list of hexadecimal octet values, seperated by colons, may be
+A list of hexadecimal octet values, separated by colons, may be
specified as a data expression.
.RE
.PP
.RS 0.25i
Converts the result of evaluating data-expr2 into a text string
containing one number for each element of the result of evaluating
-data-expr2. Each number is seperated from the other by the result of
+data-expr2. Each number is separated from the other by the result of
evaluating data-expr1. The result of evaluating numeric-expr1
specifies the base (2 through 16) into which the numbers should be
converted. The result of evaluating numeric-expr2 specifies 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
channels. A logging statement includes an optional priority (\fBfatal\fR,
\fBerror\fR, \fBinfo\fR, or \fBdebug\fR), and a data expression.
.PP
-.B log (\fIpriority\fB, \fIdata-expr\FB)\fR
+.B log (\fIpriority\fB, \fIdata-expr\fB)\fR
.PP
Logging statements take only a single data expression argument, so if you
want to output multiple data values, you will need to use the \fBconcat\fR
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
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
-Lemon <mellon@isc.org> 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
-.B http://www.isc.org/isc.
+The Internet Systems Consortium DHCP Distribution was written by Ted
+Lemon under a contract with Vixie Labs. Funding for
+this project was provided through Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
+.B http://www.isc.org.
-.\" dhcp-options.5
+.\" $Id: dhcp-options.5,v 1.24 2005/03/17 20:14:57 dhankins 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''.
.\"
-.\" $Id: dhcp-options.5,v 1.23 2002/06/10 00:07:41 murray Exp $
+.\" $Id: dhcp-options.5,v 1.24 2005/03/17 20:14:57 dhankins Exp $
.\"
.TH dhcpd-options 5
.SH NAME
.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
the lease time it is willing to offer.
.PP
This option is not directly user configurable in the server; refer to the
-\fImax-lease-time\fR and \fidefault-lease-time\fR server options in
+\fImax-lease-time\fR and \fIdefault-lease-time\fR server options in
.B dhcpd.conf(5).
.RE
.PP
\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...
\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...
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
\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
.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
.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.
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
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
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 servers available
+to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBwww-server\fR \fIip-address\fR [\fB,\fR
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
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.
Network input dispatcher... */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: discover.c,v 1.47 2002/06/10 00:12:34 murray Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: discover.c,v 1.48 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
dhcp_interface_remove,
0, 0, 0,
sizeof (struct interface_info),
- interface_initialize);
+ interface_initialize, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register interface object type: %s",
isc_result_totext (status));
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))
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);
if (tmp -> next)
interface_reference (&next, tmp -> next, MDL);
/* skip interfaces that are running already */
- if (tmp -> flags & INTERFACE_RUNNING)
+ if (tmp -> flags & INTERFACE_RUNNING) {
+ interface_dereference(&tmp, MDL);
+ if(next)
+ interface_reference(&tmp, next, MDL);
continue;
+ }
if ((tmp -> flags & INTERFACE_AUTOMATIC) &&
state == DISCOVER_REQUESTED)
tmp -> flags &= ~(INTERFACE_AUTOMATIC |
Network input dispatcher... */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: dispatch.c,v 1.64 2001/06/27 00:29:45 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dispatch.c,v 1.65 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
Data Link Provider Interface (DLPI) network interface code. */
/*
- * 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 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
#ifndef lint
static char copyright[] =
-"$Id: dlpi.c,v 1.28 2001/04/05 20:53:01 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dlpi.c,v 1.29 2005/03/17 20:14:57 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
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) {
Domain Name Service subroutines. */
/*
- * 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 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.36 2001/06/27 00:29:46 mellon Exp $ Copyright (c) 2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dns.c,v 1.37 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
* supported.
*/
-struct hash_table *tsig_key_hash;
-struct hash_table *dns_zone_hash;
+dns_zone_hash_t *dns_zone_hash;
#if defined (NSUPDATE)
isc_result_t find_tsig_key (ns_tsig_key **key, const char *zname,
dns_zone_dereference (&tz, MDL);
}
} else {
- dns_zone_hash =
- new_hash ((hash_reference)dns_zone_reference,
- (hash_dereference)dns_zone_dereference, 1,
- MDL);
- if (!dns_zone_hash)
+ if (!dns_zone_new_hash (&dns_zone_hash, 1, MDL))
return ISC_R_NOMEMORY;
}
dns_zone_hash_add (dns_zone_hash, zone -> name, 0, zone, MDL);
dns_zone = *ptr;
*ptr = (struct dns_zone *)0;
--dns_zone -> refcnt;
- rc_register (file, line, ptr, dns_zone, dns_zone -> refcnt, 1);
+ rc_register (file, line, ptr, dns_zone, dns_zone -> refcnt, 1, RC_MISC);
if (dns_zone -> refcnt > 0)
return 1;
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
*/
result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
+#ifdef DEBUG_DNS_UPDATES
print_dns_status ((int)result, &updqueue);
-
- while (!ISC_LIST_EMPTY (updqueue)) {
- updrec = ISC_LIST_HEAD (updqueue);
- ISC_LIST_UNLINK (updqueue, updrec, r_link);
- minires_freeupdrec (updrec);
- }
-
+#endif
/*
* If this update operation succeeds, the updater can conclude that it
* -- "Interaction between DHCP and DNS"
*/
- if (result == ISC_R_SUCCESS)
- return result;
+ if (result == ISC_R_SUCCESS) {
+ log_info ("Added new forward map from %.*s to %s",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data, ddns_address);
+ goto error;
+ }
/*
* -- "Interaction between DHCP and DNS"
*/
- if (result != (rrsetp ? ISC_R_YXRRSET : ISC_R_YXDOMAIN))
- return result;
+ if (result != (rrsetp ? ISC_R_YXRRSET : ISC_R_YXDOMAIN)) {
+ log_error ("Unable to add forward map from %.*s to %s: %s",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data, ddns_address,
+ isc_result_totext (result));
+ goto error;
+ }
+ while (!ISC_LIST_EMPTY (updqueue)) {
+ updrec = ISC_LIST_HEAD (updqueue);
+ ISC_LIST_UNLINK (updqueue, updrec, r_link);
+ minires_freeupdrec (updrec);
+ }
/*
* DHCID RR exists, and matches client identity.
*/
result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
+ if (result != ISC_R_SUCCESS) {
+ if (result == YXRRSET || result == YXDOMAIN ||
+ result == NXRRSET || result == NXDOMAIN)
+ log_error ("Forward map from %.*s to %s already in use",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data,
+ ddns_address);
+ else
+ log_error ("Can't update forward map %.*s to %s: %s",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data,
+ ddns_address, isc_result_totext (result));
+
+ } else {
+ log_info ("Added new forward map from %.*s to %s",
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data, ddns_address);
+ }
+#if defined (DEBUG_DNS_UPDATES)
print_dns_status ((int)result, &updqueue);
+#endif
/*
* If this query succeeds, the updater can conclude that the current
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
* -- "Interaction between DHCP and DNS"
*/
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS) {
+ /* If the rrset isn't there, we didn't need to do the
+ delete, which is success. */
+ if (result == ISC_R_NXRRSET || result == ISC_R_NXDOMAIN)
+ result = ISC_R_SUCCESS;
goto error;
+ }
while (!ISC_LIST_EMPTY (updqueue)) {
updrec = ISC_LIST_HEAD (updqueue);
#endif /* NSUPDATE */
-HASH_FUNCTIONS (dns_zone, const char *, struct dns_zone)
+HASH_FUNCTIONS (dns_zone, const char *, struct dns_zone, dns_zone_hash_t,
+ dns_zone_reference, dns_zone_dereference)
Packet assembly code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2000 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''.
#ifndef lint
static char copyright[] =
-"$Id: ethernet.c,v 1.7 2001/06/27 00:29:47 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: ethernet.c,v 1.8 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
Support for executable statements. */
/*
- * Copyright (c) 1998-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: execute.c,v 1.46 2001/08/10 10:48:58 mellon Exp $ Copyright (c) 1998-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: execute.c,v 1.47 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
goto blb;
}
}
- }
+ } else
+ binding = NULL;
+
if (ns && binding) {
status = (evaluate_expression
(&binding -> value, packet, lease,
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);
}
(*ptr) -> refcnt--;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1);
+ rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1, RC_MISC);
if ((*ptr) -> refcnt > 0) {
*ptr = (struct executable_statement *)0;
return 1;
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:
Packet assembly code, originally contributed by Archie Cobbs. */
/*
- * Copyright (c) 1996-2000 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''.
#ifndef lint
static char copyright[] =
-"$Id: fddi.c,v 1.3 2000/04/18 23:02:09 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: fddi.c,v 1.4 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
responses. */
/*
- * 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''.
#ifndef lint
static char copyright[] =
-"$Id: icmp.c,v 1.32 2002/06/09 22:16:34 murray Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: icmp.c,v 1.33 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
result = omapi_object_type_register (&dhcp_type_icmp, "icmp",
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- sizeof (struct icmp_state), 0);
+ sizeof (struct icmp_state),
+ 0, RC_MISC);
if (result != ISC_R_SUCCESS)
log_fatal ("Can't register icmp object type: %s",
way... */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: inet.c,v 1.9 2001/06/27 00:29:51 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: inet.c,v 1.10 2005/03/17 20:14:58 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
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... */
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);
int i, j, k;
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;
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... */
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;
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>");
char *piaddrmask (struct iaddr addr, struct iaddr mask,
const char *file, int line)
{
- char *s, *t;
- int i, mw;
- unsigned len;
-
- for (i = 0; i < 32; i++) {
- if (!mask.iabuf [3 - i / 8])
- i += 7;
- else if (mask.iabuf [3 - i / 8] & (1 << (i % 8)))
+ char *s, tbuf[sizeof("255.255.255.255/32")];
+ int mw;
+ unsigned i, oct, bit;
+
+ 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;
}
Support Services in Vancouver, B.C. */
/*
- * Copyright (c) 1996-2000 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.29 2001/04/24 00:36:00 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: lpf.c,v 1.30 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* 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)
Memory-resident database... */
/*
- * Copyright (c) 1995-2000 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''.
#ifndef lint
static char copyright[] =
-"$Id: memory.c,v 1.67 2001/06/27 00:29:52 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: memory.c,v 1.68 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
struct group *root_group;
-struct hash_table *group_name_hash;
+group_hash_t *group_name_hash;
int (*group_write_hook) (struct group_object *);
isc_result_t delete_group (struct group_object *group, int writep)
}
}
} else {
- group_name_hash = new_hash ((hash_reference)
- group_object_reference,
- (hash_dereference)
- group_object_dereference, 0, MDL);
+ group_new_hash (&group_name_hash, 0, MDL);
t = (struct group_object *)0;
}
with one crucial tidbit of help from Stu Grossmen. */
/*
- * Copyright (c) 1996-2000 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''.
#ifndef lint
static char copyright[] =
-"$Id: nit.c,v 1.34 2001/02/17 21:17:25 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: nit.c,v 1.35 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* 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)
DHCP options parsing and reassembly. */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: options.c,v 1.87 2001/08/10 10:49:00 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.88 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
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;
}
*s = '.';
s += len + 1;
- total_len += len;
+ total_len += len + 1;
}
+ /* We wind up with a length that's one too many because
+ we shouldn't increment for the last label, but there's
+ no way to tell we're at the last label until we exit
+ the loop. :'*/
+ if (total_len > 0)
+ total_len--;
+
if (!terminated) {
first_len = total_len;
}
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;
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);
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);
}
priority_list [priority_len++] = DHO_DHCP_LEASE_TIME;
priority_list [priority_len++] = DHO_DHCP_MESSAGE;
priority_list [priority_len++] = DHO_DHCP_REQUESTED_ADDRESS;
+ priority_list [priority_len++] = DHO_FQDN;
if (prl && prl -> len > 0) {
+ if ((op = lookup_option (&dhcp_universe, cfg_options,
+ DHO_SUBNET_SELECTION))) {
+ if (priority_len < PRIORITY_COUNT)
+ priority_list [priority_len++] =
+ DHO_SUBNET_SELECTION;
+ }
+
data_string_truncate (prl, (PRIORITY_COUNT - priority_len));
for (i = 0; i < prl -> len; i++) {
if (cfg_options -> site_code_min) {
for (i = 0; i < OPTION_HASH_SIZE; i++) {
hash = cfg_options -> universes [dhcp_universe.index];
- for (pp = hash [i]; pp; pp = pp -> cdr) {
+ if (hash) {
+ for (pp = hash [i]; pp; pp = pp -> cdr) {
op = (struct option_cache *)(pp -> car);
if (op -> option -> code <
cfg_options -> site_code_min &&
DHO_DHCP_AGENT_OPTIONS))
priority_list [priority_len++] =
op -> option -> code;
+ }
}
}
}
is no site option space, we'll be cycling through the
dhcp option space. */
for (i = 0; i < OPTION_HASH_SIZE; i++) {
- hash = (cfg_options -> universes
- [cfg_options -> site_universe]);
+ hash = (cfg_options -> universes
+ [cfg_options -> site_universe]);
+ if (hash)
for (pp = hash [i]; pp; pp = pp -> cdr) {
op = (struct option_cache *)(pp -> car);
if (op -> option -> code >=
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);
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;
-
- memcpy (&outpacket -> options [mainbufix],
- buffer, main_buffer_size - mainbufix);
- length = DHCP_FIXED_NON_UDP + main_buffer_size;
- agentix = main_buffer_size;
+ outpacket -> options [mainbufix++] = overload;
- 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)
/* 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;
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);
/* 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);
to be encapsulated first, except that if it's a straight
encapsulation and the user has provided a value for the
encapsulation option, use the user-provided value. */
- if ((u -> options [code] -> format [0] == 'E' && !oc) ||
- u -> options [code] -> format [0] == 'e') {
+ 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;
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;
+ unsigned incr = 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) {
+ 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 {
+ 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! */
- buffer [bufix] = code;
- buffer [bufix + 1] = incr;
+ base [*pix] = code;
+ base [*pix + 1] = (unsigned char)incr;
if (tto && incr == length) {
- memcpy (buffer + bufix + 2,
- od.data + ix, (unsigned)(incr - 1));
- buffer [bufix + 2 + incr - 1] = 0;
+ if (incr > 1)
+ memcpy (base + *pix + 2,
+ od.data + ix, (unsigned)(incr - 1));
+ base [*pix + 2 + incr - 1] = 0;
} else {
- memcpy (buffer + bufix + 2,
+ 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;
}
}
(*ptr) -> refcnt--;
- rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1);
+ rc_register (file, line, ptr, *ptr, (*ptr) -> refcnt, 1, RC_MISC);
if (!(*ptr) -> refcnt) {
if ((*ptr) -> data.buffer)
data_string_forget (&(*ptr) -> data, file, line);
status = 1;
}
} else {
+ memset (&ds, 0, sizeof ds);
+
/* If we have nwip options, the first one has to be the
nwip-exists-in-option-area option. */
if (!buffer_allocate (&ds.buffer, result -> len + 2, MDL)) {
Packet assembly code, originally contributed by Archie Cobbs. */
/*
- * 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 code was originally contributed by Archie Cobbs, and is still
* very similar to that contribution, although the packet checksum code
#ifndef lint
static char copyright[] =
-"$Id: packet.c,v 1.41 2001/06/27 00:29:55 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: packet.c,v 1.42 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* 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)
struct interface_info *interface;
unsigned char *buf;
unsigned bufix;
struct sockaddr_in *from;
- unsigned char *data;
unsigned buflen;
{
- 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;
unsigned ulen;
int ignore = 0;
- ip = (struct ip *)(buf + bufix);
+ memcpy(&ip, buf + bufix, sizeof (struct ip));
udp = (struct udphdr *)(buf + bufix + ip_len);
#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? */
}
/* 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;
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))));
Common parser code for dhcpd and dhclient. */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: parse.c,v 1.105 2001/06/27 00:29:56 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: parse.c,v 1.106 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
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;
/*
* hardware-parameter :== HARDWARE hardware-type colon-seperated-hex-list SEMI
- * hardware-type :== ETHERNET | TOKEN_RING
+ * hardware-type :== ETHERNET | TOKEN_RING | FDDI
*/
void parse_hardware_param (cfile, hardware)
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.");
universes = ua;
}
universes [nu -> index] = nu;
- nu -> hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&nu -> hash, 1, MDL);
if (!nu -> hash)
log_fatal ("Can't allocate %s option hash table.", nu -> name);
universe_hash_add (universe_hash, nu -> name, 0, nu, MDL);
executable_statement_dereference (result, MDL);
return 0;
}
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ return 0;
+ }
}
break;
if (!(*result)->data.unset)
log_fatal ("can't allocate variable name");
strcpy ((*result) -> data.unset, val);
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ return 0;
+ }
break;
case EVAL:
executable_statement_dereference (result, MDL);
return 0;
}
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ }
break;
case RETURN:
executable_statement_dereference (result, MDL);
return 0;
}
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ return 0;
+ }
break;
case LOG:
log_fatal ("no memory for new zone.");
zone -> name = parse_host_name (cfile);
if (!zone -> name) {
- badzone:
parse_warn (cfile, "expecting hostname.");
+ badzone:
*lose = 1;
skip_to_semi (cfile);
dns_zone_dereference (&zone, MDL);
i = strlen (zone -> name);
if (zone -> name [i - 1] != '.') {
s = dmalloc ((unsigned)i + 2, MDL);
- if (!s)
+ if (!s) {
+ parse_warn (cfile, "no trailing '.' on zone");
goto badzone;
+ }
strcpy (s, zone -> name);
s [i] = '.';
s [i + 1] = 0;
goto badzone;
status = enter_dns_zone (zone);
if (status != ISC_R_SUCCESS) {
- if (parse_semi (cfile))
- parse_warn (cfile, "dns zone key %s: %s",
- zone -> name,
- isc_result_totext (status));
+ parse_warn (cfile, "dns zone key %s: %s",
+ zone -> name, isc_result_totext (status));
dns_zone_dereference (&zone, MDL);
return 0;
}
executable_statement_dereference (result, MDL);
return 0;
}
- parse_semi (cfile);
+ if (!parse_semi (cfile)) {
+ *lose = 1;
+ executable_statement_dereference (result, MDL);
+ return 0;
+ }
break;
}
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;
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;
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;
case AND:
next_op = expr_and;
context = expression_context (rhs);
- if (context != context_boolean) {
- needbool:
- parse_warn (cfile, "expecting boolean expressions");
- skip_to_semi (cfile);
- expression_dereference (&rhs, MDL);
- *lose = 1;
- return 0;
- }
break;
case OR:
next_op = expr_or;
context = expression_context (rhs);
- if (context != context_boolean)
- goto needbool;
break;
case PLUS:
next_op = expr_add;
context = expression_context (rhs);
- if (context != context_numeric) {
- neednum:
- parse_warn (cfile, "expecting numeric expressions");
- skip_to_semi (cfile);
- expression_dereference (&rhs, MDL);
- *lose = 1;
- return 0;
- }
break;
case MINUS:
next_op = expr_subtract;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case SLASH:
next_op = expr_divide;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case ASTERISK:
next_op = expr_multiply;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case PERCENT:
next_op = expr_remainder;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case AMPERSAND:
next_op = expr_binary_and;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case PIPE:
next_op = expr_binary_or;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
case CARET:
next_op = expr_binary_xor;
context = expression_context (rhs);
- if (context != context_numeric)
- goto neednum;
break;
default:
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) {
+ 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);
+ expression_dereference (&lhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+
+ switch(binop) {
+ case expr_not_equal:
+ case expr_equal:
+ 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);
+ *lose = 1;
+ return 0;
+ }
+ break;
+
+ case expr_and:
+ case expr_or:
+ if ((rhs_context != context_boolean) &&
+ (rhs_context != context_any)) {
+ parse_warn (cfile, "expecting boolean expressions");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+ break;
+
+ case expr_add:
+ case expr_subtract:
+ case expr_divide:
+ case expr_multiply:
+ case expr_remainder:
+ case expr_binary_and:
+ case expr_binary_or:
+ case expr_binary_xor:
+ if ((rhs_context != context_numeric) &&
+ (rhs_context != context_any)) {
+ parse_warn (cfile, "expecting numeric expressions");
+ skip_to_semi (cfile);
+ expression_dereference (&rhs, MDL);
+ *lose = 1;
+ return 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
/* Now, if we didn't find a binary operator, we're done parsing
this subexpression, so combine it with the preceding binary
operator and return the result. */
/* 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))
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);
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;
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.");
}
return 0;
}
- token = next_token (&val, &len, cfile);
make_string:
if (!make_const_data (&t, (const unsigned char *)val,
len, 1, 1, MDL))
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;
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.");
}
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;
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;
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.");
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;
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.");
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;
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;
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);
#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;
Turn data structures into printable text. */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: print.c,v 1.56 2002/04/30 06:18:39 murray Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: print.c,v 1.57 2005/03/17 20:14:59 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
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,
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 (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]=' ';
+
}
+ lbuf[53]=' ';
+ lbuf[54]=' ';
+ lbuf[55]=' ';
+ lbuf[73]='\0';
log_info (lbuf);
}
if (bp -> len)
dump_raw (bp -> name, bp -> len);
else
- log_info ((const char *)bp -> name);
+ log_info ("%s", (const char *)bp -> name);
}
}
}
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;
case T_TXT:
en = "TXT";
break;
+ case T_KEY:
+ en = "KEY";
+ break;
case T_CNAME:
en = "CNAME";
break;
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) {
Sigh. */
/*
- * Copyright (c) 1995-2000 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''.
#ifndef lint
static char copyright[] =
-"$Id: raw.c,v 1.17 2000/03/17 03:59:01 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: raw.c,v 1.18 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
Parser for /etc/resolv.conf file. */
/*
- * 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''.
#ifndef lint
static char copyright[] =
-"$Id: resolv.c,v 1.16 2001/05/02 06:39:43 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: resolv.c,v 1.17 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
BSD socket interface code... */
/*
- * Copyright (c) 1995-2000 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''.
#ifndef lint
static char copyright[] =
-"$Id: socket.c,v 1.57 2002/06/09 22:19:37 murray Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: socket.c,v 1.58 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
Tables of information... */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: tables.c,v 1.52 2001/06/27 00:29:58 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tables.c,v 1.53 2005/03/17 20:15:00 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* XXXDPN: Moved here from hash.c, when it moved to libomapi. Not sure
where these really belong. */
-HASH_FUNCTIONS (group, const char *, struct group_object)
-HASH_FUNCTIONS (universe, const char *, struct universe)
-HASH_FUNCTIONS (option, const char *, struct option)
+HASH_FUNCTIONS (group, const char *, struct group_object, group_hash_t,
+ group_reference, group_dereference)
+HASH_FUNCTIONS (universe, const char *, struct universe, universe_hash_t, 0, 0)
+HASH_FUNCTIONS (option, const char *, struct option, option_hash_t, 0, 0)
/* DHCP Option names, formats and codes, from RFC1533.
{ "user-class", "t", &dhcp_universe, 77 },
{ "slp-directory-agent", "fIa", &dhcp_universe, 78 },
{ "slp-service-scope", "fto", &dhcp_universe, 79 },
- { "#80", "X", &dhcp_universe, 80 },
+ { "unknown-80", "X", &dhcp_universe, 80 },
{ "fqdn", "Efqdn.", &dhcp_universe, 81 },
{ "relay-agent-information", "Eagent.", &dhcp_universe, 82 },
- { "#83", "X", &dhcp_universe, 83 },
- { "#84", "X", &dhcp_universe, 84 },
+ { "unknown-83", "X", &dhcp_universe, 83 },
+ { "unknown-84", "X", &dhcp_universe, 84 },
{ "nds-servers", "IA", &dhcp_universe, 85 },
{ "nds-tree-name", "X", &dhcp_universe, 86 },
{ "nds-context", "X", &dhcp_universe, 87 },
- { "#88", "X", &dhcp_universe, 88 },
- { "#89", "X", &dhcp_universe, 89 },
- { "#90", "X", &dhcp_universe, 90 },
- { "#91", "X", &dhcp_universe, 91 },
- { "#92", "X", &dhcp_universe, 92 },
- { "#93", "X", &dhcp_universe, 93 },
- { "#94", "X", &dhcp_universe, 94 },
- { "#95", "X", &dhcp_universe, 95 },
- { "#96", "X", &dhcp_universe, 96 },
- { "#97", "X", &dhcp_universe, 97 },
+ { "unknown-88", "X", &dhcp_universe, 88 },
+ { "unknown-89", "X", &dhcp_universe, 89 },
+ { "unknown-90", "X", &dhcp_universe, 90 },
+ { "unknown-91", "X", &dhcp_universe, 91 },
+ { "unknown-92", "X", &dhcp_universe, 92 },
+ { "unknown-93", "X", &dhcp_universe, 93 },
+ { "unknown-94", "X", &dhcp_universe, 94 },
+ { "unknown-95", "X", &dhcp_universe, 95 },
+ { "unknown-96", "X", &dhcp_universe, 96 },
+ { "unknown-97", "X", &dhcp_universe, 97 },
{ "uap-servers", "t", &dhcp_universe, 98 },
- { "#99", "X", &dhcp_universe, 99 },
- { "#100", "X", &dhcp_universe, 100 },
- { "#101", "X", &dhcp_universe, 101 },
- { "#102", "X", &dhcp_universe, 102 },
- { "#103", "X", &dhcp_universe, 103 },
- { "#104", "X", &dhcp_universe, 104 },
- { "#105", "X", &dhcp_universe, 105 },
- { "#106", "X", &dhcp_universe, 106 },
- { "#107", "X", &dhcp_universe, 107 },
- { "#108", "X", &dhcp_universe, 108 },
- { "#109", "X", &dhcp_universe, 109 },
- { "#110", "X", &dhcp_universe, 110 },
- { "#111", "X", &dhcp_universe, 111 },
- { "#112", "X", &dhcp_universe, 112 },
- { "#113", "X", &dhcp_universe, 113 },
- { "#114", "X", &dhcp_universe, 114 },
- { "#115", "X", &dhcp_universe, 115 },
- { "#116", "X", &dhcp_universe, 116 },
- { "#117", "X", &dhcp_universe, 117 },
+ { "unknown-99", "X", &dhcp_universe, 99 },
+ { "unknown-100", "X", &dhcp_universe, 100 },
+ { "unknown-101", "X", &dhcp_universe, 101 },
+ { "unknown-102", "X", &dhcp_universe, 102 },
+ { "unknown-103", "X", &dhcp_universe, 103 },
+ { "unknown-104", "X", &dhcp_universe, 104 },
+ { "unknown-105", "X", &dhcp_universe, 105 },
+ { "unknown-106", "X", &dhcp_universe, 106 },
+ { "unknown-107", "X", &dhcp_universe, 107 },
+ { "unknown-108", "X", &dhcp_universe, 108 },
+ { "unknown-109", "X", &dhcp_universe, 109 },
+ { "unknown-110", "X", &dhcp_universe, 110 },
+ { "unknown-111", "X", &dhcp_universe, 111 },
+ { "unknown-112", "X", &dhcp_universe, 112 },
+ { "unknown-113", "X", &dhcp_universe, 113 },
+ { "unknown-114", "X", &dhcp_universe, 114 },
+ { "unknown-115", "X", &dhcp_universe, 115 },
+ { "unknown-116", "X", &dhcp_universe, 116 },
+ { "unknown-117", "X", &dhcp_universe, 117 },
{ "subnet-selection", "X", &dhcp_universe, 118 },
- { "#119", "X", &dhcp_universe, 119 },
- { "#120", "X", &dhcp_universe, 120 },
- { "#121", "X", &dhcp_universe, 121 },
- { "#122", "X", &dhcp_universe, 122 },
- { "#123", "X", &dhcp_universe, 123 },
- { "#124", "X", &dhcp_universe, 124 },
- { "#125", "X", &dhcp_universe, 125 },
- { "#126", "X", &dhcp_universe, 126 },
- { "#127", "X", &dhcp_universe, 127 },
- { "#128", "X", &dhcp_universe, 128 },
- { "#129", "X", &dhcp_universe, 129 },
- { "#130", "X", &dhcp_universe, 130 },
- { "#131", "X", &dhcp_universe, 131 },
- { "#132", "X", &dhcp_universe, 132 },
- { "#133", "X", &dhcp_universe, 133 },
- { "#134", "X", &dhcp_universe, 134 },
- { "#135", "X", &dhcp_universe, 135 },
- { "#136", "X", &dhcp_universe, 136 },
- { "#137", "X", &dhcp_universe, 137 },
- { "#138", "X", &dhcp_universe, 138 },
- { "#139", "X", &dhcp_universe, 139 },
- { "#140", "X", &dhcp_universe, 140 },
- { "#141", "X", &dhcp_universe, 141 },
- { "#142", "X", &dhcp_universe, 142 },
- { "#143", "X", &dhcp_universe, 143 },
- { "#144", "X", &dhcp_universe, 144 },
- { "#145", "X", &dhcp_universe, 145 },
- { "#146", "X", &dhcp_universe, 146 },
- { "#147", "X", &dhcp_universe, 147 },
- { "#148", "X", &dhcp_universe, 148 },
- { "#149", "X", &dhcp_universe, 149 },
- { "#150", "X", &dhcp_universe, 150 },
- { "#151", "X", &dhcp_universe, 151 },
- { "#152", "X", &dhcp_universe, 152 },
- { "#153", "X", &dhcp_universe, 153 },
- { "#154", "X", &dhcp_universe, 154 },
- { "#155", "X", &dhcp_universe, 155 },
- { "#156", "X", &dhcp_universe, 156 },
- { "#157", "X", &dhcp_universe, 157 },
- { "#158", "X", &dhcp_universe, 158 },
- { "#159", "X", &dhcp_universe, 159 },
- { "#160", "X", &dhcp_universe, 160 },
- { "#161", "X", &dhcp_universe, 161 },
- { "#162", "X", &dhcp_universe, 162 },
- { "#163", "X", &dhcp_universe, 163 },
- { "#164", "X", &dhcp_universe, 164 },
- { "#165", "X", &dhcp_universe, 165 },
- { "#166", "X", &dhcp_universe, 166 },
- { "#167", "X", &dhcp_universe, 167 },
- { "#168", "X", &dhcp_universe, 168 },
- { "#169", "X", &dhcp_universe, 169 },
- { "#170", "X", &dhcp_universe, 170 },
- { "#171", "X", &dhcp_universe, 171 },
- { "#172", "X", &dhcp_universe, 172 },
- { "#173", "X", &dhcp_universe, 173 },
- { "#174", "X", &dhcp_universe, 174 },
- { "#175", "X", &dhcp_universe, 175 },
- { "#176", "X", &dhcp_universe, 176 },
- { "#177", "X", &dhcp_universe, 177 },
- { "#178", "X", &dhcp_universe, 178 },
- { "#179", "X", &dhcp_universe, 179 },
- { "#180", "X", &dhcp_universe, 180 },
- { "#181", "X", &dhcp_universe, 181 },
- { "#182", "X", &dhcp_universe, 182 },
- { "#183", "X", &dhcp_universe, 183 },
- { "#184", "X", &dhcp_universe, 184 },
- { "#185", "X", &dhcp_universe, 185 },
- { "#186", "X", &dhcp_universe, 186 },
- { "#187", "X", &dhcp_universe, 187 },
- { "#188", "X", &dhcp_universe, 188 },
- { "#189", "X", &dhcp_universe, 189 },
- { "#190", "X", &dhcp_universe, 190 },
- { "#191", "X", &dhcp_universe, 191 },
- { "#192", "X", &dhcp_universe, 192 },
- { "#193", "X", &dhcp_universe, 193 },
- { "#194", "X", &dhcp_universe, 194 },
- { "#195", "X", &dhcp_universe, 195 },
- { "#196", "X", &dhcp_universe, 196 },
- { "#197", "X", &dhcp_universe, 197 },
- { "#198", "X", &dhcp_universe, 198 },
- { "#199", "X", &dhcp_universe, 199 },
- { "#200", "X", &dhcp_universe, 200 },
- { "#201", "X", &dhcp_universe, 201 },
- { "#202", "X", &dhcp_universe, 202 },
- { "#203", "X", &dhcp_universe, 203 },
- { "#204", "X", &dhcp_universe, 204 },
- { "#205", "X", &dhcp_universe, 205 },
- { "#206", "X", &dhcp_universe, 206 },
- { "#207", "X", &dhcp_universe, 207 },
- { "#208", "X", &dhcp_universe, 208 },
- { "#209", "X", &dhcp_universe, 209 },
+ { "unknown-119", "X", &dhcp_universe, 119 },
+ { "unknown-120", "X", &dhcp_universe, 120 },
+ { "unknown-121", "X", &dhcp_universe, 121 },
+ { "unknown-122", "X", &dhcp_universe, 122 },
+ { "unknown-123", "X", &dhcp_universe, 123 },
+ { "unknown-124", "X", &dhcp_universe, 124 },
+ { "unknown-125", "X", &dhcp_universe, 125 },
+ { "unknown-126", "X", &dhcp_universe, 126 },
+ { "unknown-127", "X", &dhcp_universe, 127 },
+ { "unknown-128", "X", &dhcp_universe, 128 },
+ { "unknown-129", "X", &dhcp_universe, 129 },
+ { "unknown-130", "X", &dhcp_universe, 130 },
+ { "unknown-131", "X", &dhcp_universe, 131 },
+ { "unknown-132", "X", &dhcp_universe, 132 },
+ { "unknown-133", "X", &dhcp_universe, 133 },
+ { "unknown-134", "X", &dhcp_universe, 134 },
+ { "unknown-135", "X", &dhcp_universe, 135 },
+ { "unknown-136", "X", &dhcp_universe, 136 },
+ { "unknown-137", "X", &dhcp_universe, 137 },
+ { "unknown-138", "X", &dhcp_universe, 138 },
+ { "unknown-139", "X", &dhcp_universe, 139 },
+ { "unknown-140", "X", &dhcp_universe, 140 },
+ { "unknown-141", "X", &dhcp_universe, 141 },
+ { "unknown-142", "X", &dhcp_universe, 142 },
+ { "unknown-143", "X", &dhcp_universe, 143 },
+ { "unknown-144", "X", &dhcp_universe, 144 },
+ { "unknown-145", "X", &dhcp_universe, 145 },
+ { "unknown-146", "X", &dhcp_universe, 146 },
+ { "unknown-147", "X", &dhcp_universe, 147 },
+ { "unknown-148", "X", &dhcp_universe, 148 },
+ { "unknown-149", "X", &dhcp_universe, 149 },
+ { "unknown-150", "X", &dhcp_universe, 150 },
+ { "unknown-151", "X", &dhcp_universe, 151 },
+ { "unknown-152", "X", &dhcp_universe, 152 },
+ { "unknown-153", "X", &dhcp_universe, 153 },
+ { "unknown-154", "X", &dhcp_universe, 154 },
+ { "unknown-155", "X", &dhcp_universe, 155 },
+ { "unknown-156", "X", &dhcp_universe, 156 },
+ { "unknown-157", "X", &dhcp_universe, 157 },
+ { "unknown-158", "X", &dhcp_universe, 158 },
+ { "unknown-159", "X", &dhcp_universe, 159 },
+ { "unknown-160", "X", &dhcp_universe, 160 },
+ { "unknown-161", "X", &dhcp_universe, 161 },
+ { "unknown-162", "X", &dhcp_universe, 162 },
+ { "unknown-163", "X", &dhcp_universe, 163 },
+ { "unknown-164", "X", &dhcp_universe, 164 },
+ { "unknown-165", "X", &dhcp_universe, 165 },
+ { "unknown-166", "X", &dhcp_universe, 166 },
+ { "unknown-167", "X", &dhcp_universe, 167 },
+ { "unknown-168", "X", &dhcp_universe, 168 },
+ { "unknown-169", "X", &dhcp_universe, 169 },
+ { "unknown-170", "X", &dhcp_universe, 170 },
+ { "unknown-171", "X", &dhcp_universe, 171 },
+ { "unknown-172", "X", &dhcp_universe, 172 },
+ { "unknown-173", "X", &dhcp_universe, 173 },
+ { "unknown-174", "X", &dhcp_universe, 174 },
+ { "unknown-175", "X", &dhcp_universe, 175 },
+ { "unknown-176", "X", &dhcp_universe, 176 },
+ { "unknown-177", "X", &dhcp_universe, 177 },
+ { "unknown-178", "X", &dhcp_universe, 178 },
+ { "unknown-179", "X", &dhcp_universe, 179 },
+ { "unknown-180", "X", &dhcp_universe, 180 },
+ { "unknown-181", "X", &dhcp_universe, 181 },
+ { "unknown-182", "X", &dhcp_universe, 182 },
+ { "unknown-183", "X", &dhcp_universe, 183 },
+ { "unknown-184", "X", &dhcp_universe, 184 },
+ { "unknown-185", "X", &dhcp_universe, 185 },
+ { "unknown-186", "X", &dhcp_universe, 186 },
+ { "unknown-187", "X", &dhcp_universe, 187 },
+ { "unknown-188", "X", &dhcp_universe, 188 },
+ { "unknown-189", "X", &dhcp_universe, 189 },
+ { "unknown-190", "X", &dhcp_universe, 190 },
+ { "unknown-191", "X", &dhcp_universe, 191 },
+ { "unknown-192", "X", &dhcp_universe, 192 },
+ { "unknown-193", "X", &dhcp_universe, 193 },
+ { "unknown-194", "X", &dhcp_universe, 194 },
+ { "unknown-195", "X", &dhcp_universe, 195 },
+ { "unknown-196", "X", &dhcp_universe, 196 },
+ { "unknown-197", "X", &dhcp_universe, 197 },
+ { "unknown-198", "X", &dhcp_universe, 198 },
+ { "unknown-199", "X", &dhcp_universe, 199 },
+ { "unknown-200", "X", &dhcp_universe, 200 },
+ { "unknown-201", "X", &dhcp_universe, 201 },
+ { "unknown-202", "X", &dhcp_universe, 202 },
+ { "unknown-203", "X", &dhcp_universe, 203 },
+ { "unknown-204", "X", &dhcp_universe, 204 },
+ { "unknown-205", "X", &dhcp_universe, 205 },
+ { "unknown-206", "X", &dhcp_universe, 206 },
+ { "unknown-207", "X", &dhcp_universe, 207 },
+ { "unknown-208", "X", &dhcp_universe, 208 },
+ { "unknown-209", "X", &dhcp_universe, 209 },
{ "authenticate", "X", &dhcp_universe, 210 },
- { "#211", "X", &dhcp_universe, 211 },
- { "#212", "X", &dhcp_universe, 212 },
- { "#213", "X", &dhcp_universe, 213 },
- { "#214", "X", &dhcp_universe, 214 },
- { "#215", "X", &dhcp_universe, 215 },
- { "#216", "X", &dhcp_universe, 216 },
- { "#217", "X", &dhcp_universe, 217 },
- { "#218", "X", &dhcp_universe, 218 },
- { "#219", "X", &dhcp_universe, 219 },
- { "#220", "X", &dhcp_universe, 220 },
- { "#221", "X", &dhcp_universe, 221 },
- { "#222", "X", &dhcp_universe, 222 },
- { "#223", "X", &dhcp_universe, 223 },
- { "#224", "X", &dhcp_universe, 224 },
- { "#225", "X", &dhcp_universe, 225 },
- { "#226", "X", &dhcp_universe, 226 },
- { "#227", "X", &dhcp_universe, 227 },
- { "#228", "X", &dhcp_universe, 228 },
- { "#229", "X", &dhcp_universe, 229 },
- { "#230", "X", &dhcp_universe, 230 },
- { "#231", "X", &dhcp_universe, 231 },
- { "#232", "X", &dhcp_universe, 232 },
- { "#233", "X", &dhcp_universe, 233 },
- { "#234", "X", &dhcp_universe, 234 },
- { "#235", "X", &dhcp_universe, 235 },
- { "#236", "X", &dhcp_universe, 236 },
- { "#237", "X", &dhcp_universe, 237 },
- { "#238", "X", &dhcp_universe, 238 },
- { "#239", "X", &dhcp_universe, 239 },
- { "#240", "X", &dhcp_universe, 240 },
- { "#241", "X", &dhcp_universe, 241 },
- { "#242", "X", &dhcp_universe, 242 },
- { "#243", "X", &dhcp_universe, 243 },
- { "#244", "X", &dhcp_universe, 244 },
- { "#245", "X", &dhcp_universe, 245 },
- { "#246", "X", &dhcp_universe, 246 },
- { "#247", "X", &dhcp_universe, 247 },
- { "#248", "X", &dhcp_universe, 248 },
- { "#249", "X", &dhcp_universe, 249 },
- { "#250", "X", &dhcp_universe, 250 },
- { "#251", "X", &dhcp_universe, 251 },
- { "#252", "X", &dhcp_universe, 252 },
- { "#253", "X", &dhcp_universe, 253 },
- { "#254", "X", &dhcp_universe, 254 },
+ { "unknown-211", "X", &dhcp_universe, 211 },
+ { "unknown-212", "X", &dhcp_universe, 212 },
+ { "unknown-213", "X", &dhcp_universe, 213 },
+ { "unknown-214", "X", &dhcp_universe, 214 },
+ { "unknown-215", "X", &dhcp_universe, 215 },
+ { "unknown-216", "X", &dhcp_universe, 216 },
+ { "unknown-217", "X", &dhcp_universe, 217 },
+ { "unknown-218", "X", &dhcp_universe, 218 },
+ { "unknown-219", "X", &dhcp_universe, 219 },
+ { "unknown-220", "X", &dhcp_universe, 220 },
+ { "unknown-221", "X", &dhcp_universe, 221 },
+ { "unknown-222", "X", &dhcp_universe, 222 },
+ { "unknown-223", "X", &dhcp_universe, 223 },
+ { "unknown-224", "X", &dhcp_universe, 224 },
+ { "unknown-225", "X", &dhcp_universe, 225 },
+ { "unknown-226", "X", &dhcp_universe, 226 },
+ { "unknown-227", "X", &dhcp_universe, 227 },
+ { "unknown-228", "X", &dhcp_universe, 228 },
+ { "unknown-229", "X", &dhcp_universe, 229 },
+ { "unknown-230", "X", &dhcp_universe, 230 },
+ { "unknown-231", "X", &dhcp_universe, 231 },
+ { "unknown-232", "X", &dhcp_universe, 232 },
+ { "unknown-233", "X", &dhcp_universe, 233 },
+ { "unknown-234", "X", &dhcp_universe, 234 },
+ { "unknown-235", "X", &dhcp_universe, 235 },
+ { "unknown-236", "X", &dhcp_universe, 236 },
+ { "unknown-237", "X", &dhcp_universe, 237 },
+ { "unknown-238", "X", &dhcp_universe, 238 },
+ { "unknown-239", "X", &dhcp_universe, 239 },
+ { "unknown-240", "X", &dhcp_universe, 240 },
+ { "unknown-241", "X", &dhcp_universe, 241 },
+ { "unknown-242", "X", &dhcp_universe, 242 },
+ { "unknown-243", "X", &dhcp_universe, 243 },
+ { "unknown-244", "X", &dhcp_universe, 244 },
+ { "unknown-245", "X", &dhcp_universe, 245 },
+ { "unknown-246", "X", &dhcp_universe, 246 },
+ { "unknown-247", "X", &dhcp_universe, 247 },
+ { "unknown-248", "X", &dhcp_universe, 248 },
+ { "unknown-249", "X", &dhcp_universe, 249 },
+ { "unknown-250", "X", &dhcp_universe, 250 },
+ { "unknown-251", "X", &dhcp_universe, 251 },
+ { "unknown-252", "X", &dhcp_universe, 252 },
+ { "unknown-253", "X", &dhcp_universe, 253 },
+ { "unknown-254", "X", &dhcp_universe, 254 },
{ "option-end", "e", &dhcp_universe, 255 },
};
{ "autoretry-secs", "B", &nwip_universe, 9 },
{ "nwip-1-1", "f", &nwip_universe, 10 },
{ "primary-dss", "I", &nwip_universe, 11 },
- { "#12", "X", &nwip_universe, 12 },
- { "#13", "X", &nwip_universe, 13 },
- { "#14", "X", &nwip_universe, 14 },
- { "#15", "X", &nwip_universe, 15 },
- { "#16", "X", &nwip_universe, 16 },
- { "#17", "X", &nwip_universe, 17 },
- { "#18", "X", &nwip_universe, 18 },
- { "#19", "X", &nwip_universe, 19 },
- { "#20", "X", &nwip_universe, 20 },
- { "#21", "X", &nwip_universe, 21 },
- { "#22", "X", &nwip_universe, 22 },
- { "#23", "X", &nwip_universe, 23 },
- { "#24", "X", &nwip_universe, 24 },
- { "#25", "X", &nwip_universe, 25 },
- { "#26", "X", &nwip_universe, 26 },
- { "#27", "X", &nwip_universe, 27 },
- { "#28", "X", &nwip_universe, 28 },
- { "#29", "X", &nwip_universe, 29 },
- { "#30", "X", &nwip_universe, 30 },
- { "#31", "X", &nwip_universe, 31 },
- { "#32", "X", &nwip_universe, 32 },
- { "#33", "X", &nwip_universe, 33 },
- { "#34", "X", &nwip_universe, 34 },
- { "#35", "X", &nwip_universe, 35 },
- { "#36", "X", &nwip_universe, 36 },
- { "#37", "X", &nwip_universe, 37 },
- { "#38", "X", &nwip_universe, 38 },
- { "#39", "X", &nwip_universe, 39 },
- { "#40", "X", &nwip_universe, 40 },
- { "#41", "X", &nwip_universe, 41 },
- { "#42", "X", &nwip_universe, 42 },
- { "#43", "X", &nwip_universe, 43 },
- { "#44", "X", &nwip_universe, 44 },
- { "#45", "X", &nwip_universe, 45 },
- { "#46", "X", &nwip_universe, 46 },
- { "#47", "X", &nwip_universe, 47 },
- { "#48", "X", &nwip_universe, 48 },
- { "#49", "X", &nwip_universe, 49 },
- { "#50", "X", &nwip_universe, 50 },
- { "#51", "X", &nwip_universe, 51 },
- { "#52", "X", &nwip_universe, 52 },
- { "#53", "X", &nwip_universe, 53 },
- { "#54", "X", &nwip_universe, 54 },
- { "#55", "X", &nwip_universe, 55 },
- { "#56", "X", &nwip_universe, 56 },
- { "#57", "X", &nwip_universe, 57 },
- { "#58", "X", &nwip_universe, 58 },
- { "#59", "X", &nwip_universe, 59 },
- { "#60", "X", &nwip_universe, 60 },
- { "#61", "X", &nwip_universe, 61 },
- { "#62", "X", &nwip_universe, 62 },
- { "#63", "X", &nwip_universe, 63 },
- { "#64", "X", &nwip_universe, 64 },
- { "#65", "X", &nwip_universe, 65 },
- { "#66", "X", &nwip_universe, 66 },
- { "#67", "X", &nwip_universe, 67 },
- { "#68", "X", &nwip_universe, 68 },
- { "#69", "X", &nwip_universe, 69 },
- { "#70", "X", &nwip_universe, 70 },
- { "#71", "X", &nwip_universe, 71 },
- { "#72", "X", &nwip_universe, 72 },
- { "#73", "X", &nwip_universe, 73 },
- { "#74", "X", &nwip_universe, 74 },
- { "#75", "X", &nwip_universe, 75 },
- { "#76", "X", &nwip_universe, 76 },
- { "#77", "X", &nwip_universe, 77 },
- { "#78", "X", &nwip_universe, 78 },
- { "#79", "X", &nwip_universe, 79 },
- { "#80", "X", &nwip_universe, 80 },
- { "#81", "X", &nwip_universe, 81 },
- { "#82", "X", &nwip_universe, 82 },
- { "#83", "X", &nwip_universe, 83 },
- { "#84", "X", &nwip_universe, 84 },
- { "#85", "X", &nwip_universe, 85 },
- { "#86", "X", &nwip_universe, 86 },
- { "#87", "X", &nwip_universe, 87 },
- { "#88", "X", &nwip_universe, 88 },
- { "#89", "X", &nwip_universe, 89 },
- { "#90", "X", &nwip_universe, 90 },
- { "#91", "X", &nwip_universe, 91 },
- { "#92", "X", &nwip_universe, 92 },
- { "#93", "X", &nwip_universe, 93 },
- { "#94", "X", &nwip_universe, 94 },
- { "#95", "X", &nwip_universe, 95 },
- { "#96", "X", &nwip_universe, 96 },
- { "#97", "X", &nwip_universe, 97 },
- { "#98", "X", &nwip_universe, 98 },
- { "#99", "X", &nwip_universe, 99 },
- { "#100", "X", &nwip_universe, 100 },
- { "#101", "X", &nwip_universe, 101 },
- { "#102", "X", &nwip_universe, 102 },
- { "#103", "X", &nwip_universe, 103 },
- { "#104", "X", &nwip_universe, 104 },
- { "#105", "X", &nwip_universe, 105 },
- { "#106", "X", &nwip_universe, 106 },
- { "#107", "X", &nwip_universe, 107 },
- { "#108", "X", &nwip_universe, 108 },
- { "#109", "X", &nwip_universe, 109 },
- { "#110", "X", &nwip_universe, 110 },
- { "#111", "X", &nwip_universe, 111 },
- { "#112", "X", &nwip_universe, 112 },
- { "#113", "X", &nwip_universe, 113 },
- { "#114", "X", &nwip_universe, 114 },
- { "#115", "X", &nwip_universe, 115 },
- { "#116", "X", &nwip_universe, 116 },
- { "#117", "X", &nwip_universe, 117 },
- { "#118", "X", &nwip_universe, 118 },
- { "#119", "X", &nwip_universe, 119 },
- { "#120", "X", &nwip_universe, 120 },
- { "#121", "X", &nwip_universe, 121 },
- { "#122", "X", &nwip_universe, 122 },
- { "#123", "X", &nwip_universe, 123 },
- { "#124", "X", &nwip_universe, 124 },
- { "#125", "X", &nwip_universe, 125 },
- { "#126", "X", &nwip_universe, 126 },
- { "#127", "X", &nwip_universe, 127 },
- { "#128", "X", &nwip_universe, 128 },
- { "#129", "X", &nwip_universe, 129 },
- { "#130", "X", &nwip_universe, 130 },
- { "#131", "X", &nwip_universe, 131 },
- { "#132", "X", &nwip_universe, 132 },
- { "#133", "X", &nwip_universe, 133 },
- { "#134", "X", &nwip_universe, 134 },
- { "#135", "X", &nwip_universe, 135 },
- { "#136", "X", &nwip_universe, 136 },
- { "#137", "X", &nwip_universe, 137 },
- { "#138", "X", &nwip_universe, 138 },
- { "#139", "X", &nwip_universe, 139 },
- { "#140", "X", &nwip_universe, 140 },
- { "#141", "X", &nwip_universe, 141 },
- { "#142", "X", &nwip_universe, 142 },
- { "#143", "X", &nwip_universe, 143 },
- { "#144", "X", &nwip_universe, 144 },
- { "#145", "X", &nwip_universe, 145 },
- { "#146", "X", &nwip_universe, 146 },
- { "#147", "X", &nwip_universe, 147 },
- { "#148", "X", &nwip_universe, 148 },
- { "#149", "X", &nwip_universe, 149 },
- { "#150", "X", &nwip_universe, 150 },
- { "#151", "X", &nwip_universe, 151 },
- { "#152", "X", &nwip_universe, 152 },
- { "#153", "X", &nwip_universe, 153 },
- { "#154", "X", &nwip_universe, 154 },
- { "#155", "X", &nwip_universe, 155 },
- { "#156", "X", &nwip_universe, 156 },
- { "#157", "X", &nwip_universe, 157 },
- { "#158", "X", &nwip_universe, 158 },
- { "#159", "X", &nwip_universe, 159 },
- { "#160", "X", &nwip_universe, 160 },
- { "#161", "X", &nwip_universe, 161 },
- { "#162", "X", &nwip_universe, 162 },
- { "#163", "X", &nwip_universe, 163 },
- { "#164", "X", &nwip_universe, 164 },
- { "#165", "X", &nwip_universe, 165 },
- { "#166", "X", &nwip_universe, 166 },
- { "#167", "X", &nwip_universe, 167 },
- { "#168", "X", &nwip_universe, 168 },
- { "#169", "X", &nwip_universe, 169 },
- { "#170", "X", &nwip_universe, 170 },
- { "#171", "X", &nwip_universe, 171 },
- { "#172", "X", &nwip_universe, 172 },
- { "#173", "X", &nwip_universe, 173 },
- { "#174", "X", &nwip_universe, 174 },
- { "#175", "X", &nwip_universe, 175 },
- { "#176", "X", &nwip_universe, 176 },
- { "#177", "X", &nwip_universe, 177 },
- { "#178", "X", &nwip_universe, 178 },
- { "#179", "X", &nwip_universe, 179 },
- { "#180", "X", &nwip_universe, 180 },
- { "#181", "X", &nwip_universe, 181 },
- { "#182", "X", &nwip_universe, 182 },
- { "#183", "X", &nwip_universe, 183 },
- { "#184", "X", &nwip_universe, 184 },
- { "#185", "X", &nwip_universe, 185 },
- { "#186", "X", &nwip_universe, 186 },
- { "#187", "X", &nwip_universe, 187 },
- { "#188", "X", &nwip_universe, 188 },
- { "#189", "X", &nwip_universe, 189 },
- { "#190", "X", &nwip_universe, 190 },
- { "#191", "X", &nwip_universe, 191 },
- { "#192", "X", &nwip_universe, 192 },
- { "#193", "X", &nwip_universe, 193 },
- { "#194", "X", &nwip_universe, 194 },
- { "#195", "X", &nwip_universe, 195 },
- { "#196", "X", &nwip_universe, 196 },
- { "#197", "X", &nwip_universe, 197 },
- { "#198", "X", &nwip_universe, 198 },
- { "#199", "X", &nwip_universe, 199 },
- { "#200", "X", &nwip_universe, 200 },
- { "#201", "X", &nwip_universe, 201 },
- { "#202", "X", &nwip_universe, 202 },
- { "#203", "X", &nwip_universe, 203 },
- { "#204", "X", &nwip_universe, 204 },
- { "#205", "X", &nwip_universe, 205 },
- { "#206", "X", &nwip_universe, 206 },
- { "#207", "X", &nwip_universe, 207 },
- { "#208", "X", &nwip_universe, 208 },
- { "#209", "X", &nwip_universe, 209 },
- { "#210", "X", &nwip_universe, 210 },
- { "#211", "X", &nwip_universe, 211 },
- { "#212", "X", &nwip_universe, 212 },
- { "#213", "X", &nwip_universe, 213 },
- { "#214", "X", &nwip_universe, 214 },
- { "#215", "X", &nwip_universe, 215 },
- { "#216", "X", &nwip_universe, 216 },
- { "#217", "X", &nwip_universe, 217 },
- { "#218", "X", &nwip_universe, 218 },
- { "#219", "X", &nwip_universe, 219 },
- { "#220", "X", &nwip_universe, 220 },
- { "#221", "X", &nwip_universe, 221 },
- { "#222", "X", &nwip_universe, 222 },
- { "#223", "X", &nwip_universe, 223 },
- { "#224", "X", &nwip_universe, 224 },
- { "#225", "X", &nwip_universe, 225 },
- { "#226", "X", &nwip_universe, 226 },
- { "#227", "X", &nwip_universe, 227 },
- { "#228", "X", &nwip_universe, 228 },
- { "#229", "X", &nwip_universe, 229 },
- { "#230", "X", &nwip_universe, 230 },
- { "#231", "X", &nwip_universe, 231 },
- { "#232", "X", &nwip_universe, 232 },
- { "#233", "X", &nwip_universe, 233 },
- { "#234", "X", &nwip_universe, 234 },
- { "#235", "X", &nwip_universe, 235 },
- { "#236", "X", &nwip_universe, 236 },
- { "#237", "X", &nwip_universe, 237 },
- { "#238", "X", &nwip_universe, 238 },
- { "#239", "X", &nwip_universe, 239 },
- { "#240", "X", &nwip_universe, 240 },
- { "#241", "X", &nwip_universe, 241 },
- { "#242", "X", &nwip_universe, 242 },
- { "#243", "X", &nwip_universe, 243 },
- { "#244", "X", &nwip_universe, 244 },
- { "#245", "X", &nwip_universe, 245 },
- { "#246", "X", &nwip_universe, 246 },
- { "#247", "X", &nwip_universe, 247 },
- { "#248", "X", &nwip_universe, 248 },
- { "#249", "X", &nwip_universe, 249 },
- { "#250", "X", &nwip_universe, 250 },
- { "#251", "X", &nwip_universe, 251 },
- { "#252", "X", &nwip_universe, 252 },
- { "#253", "X", &nwip_universe, 253 },
- { "#254", "X", &nwip_universe, 254 },
- { "#end", "e", &nwip_universe, 255 },
+ { "unknown-12", "X", &nwip_universe, 12 },
+ { "unknown-13", "X", &nwip_universe, 13 },
+ { "unknown-14", "X", &nwip_universe, 14 },
+ { "unknown-15", "X", &nwip_universe, 15 },
+ { "unknown-16", "X", &nwip_universe, 16 },
+ { "unknown-17", "X", &nwip_universe, 17 },
+ { "unknown-18", "X", &nwip_universe, 18 },
+ { "unknown-19", "X", &nwip_universe, 19 },
+ { "unknown-20", "X", &nwip_universe, 20 },
+ { "unknown-21", "X", &nwip_universe, 21 },
+ { "unknown-22", "X", &nwip_universe, 22 },
+ { "unknown-23", "X", &nwip_universe, 23 },
+ { "unknown-24", "X", &nwip_universe, 24 },
+ { "unknown-25", "X", &nwip_universe, 25 },
+ { "unknown-26", "X", &nwip_universe, 26 },
+ { "unknown-27", "X", &nwip_universe, 27 },
+ { "unknown-28", "X", &nwip_universe, 28 },
+ { "unknown-29", "X", &nwip_universe, 29 },
+ { "unknown-30", "X", &nwip_universe, 30 },
+ { "unknown-31", "X", &nwip_universe, 31 },
+ { "unknown-32", "X", &nwip_universe, 32 },
+ { "unknown-33", "X", &nwip_universe, 33 },
+ { "unknown-34", "X", &nwip_universe, 34 },
+ { "unknown-35", "X", &nwip_universe, 35 },
+ { "unknown-36", "X", &nwip_universe, 36 },
+ { "unknown-37", "X", &nwip_universe, 37 },
+ { "unknown-38", "X", &nwip_universe, 38 },
+ { "unknown-39", "X", &nwip_universe, 39 },
+ { "unknown-40", "X", &nwip_universe, 40 },
+ { "unknown-41", "X", &nwip_universe, 41 },
+ { "unknown-42", "X", &nwip_universe, 42 },
+ { "unknown-43", "X", &nwip_universe, 43 },
+ { "unknown-44", "X", &nwip_universe, 44 },
+ { "unknown-45", "X", &nwip_universe, 45 },
+ { "unknown-46", "X", &nwip_universe, 46 },
+ { "unknown-47", "X", &nwip_universe, 47 },
+ { "unknown-48", "X", &nwip_universe, 48 },
+ { "unknown-49", "X", &nwip_universe, 49 },
+ { "unknown-50", "X", &nwip_universe, 50 },
+ { "unknown-51", "X", &nwip_universe, 51 },
+ { "unknown-52", "X", &nwip_universe, 52 },
+ { "unknown-53", "X", &nwip_universe, 53 },
+ { "unknown-54", "X", &nwip_universe, 54 },
+ { "unknown-55", "X", &nwip_universe, 55 },
+ { "unknown-56", "X", &nwip_universe, 56 },
+ { "unknown-57", "X", &nwip_universe, 57 },
+ { "unknown-58", "X", &nwip_universe, 58 },
+ { "unknown-59", "X", &nwip_universe, 59 },
+ { "unknown-60", "X", &nwip_universe, 60 },
+ { "unknown-61", "X", &nwip_universe, 61 },
+ { "unknown-62", "X", &nwip_universe, 62 },
+ { "unknown-63", "X", &nwip_universe, 63 },
+ { "unknown-64", "X", &nwip_universe, 64 },
+ { "unknown-65", "X", &nwip_universe, 65 },
+ { "unknown-66", "X", &nwip_universe, 66 },
+ { "unknown-67", "X", &nwip_universe, 67 },
+ { "unknown-68", "X", &nwip_universe, 68 },
+ { "unknown-69", "X", &nwip_universe, 69 },
+ { "unknown-70", "X", &nwip_universe, 70 },
+ { "unknown-71", "X", &nwip_universe, 71 },
+ { "unknown-72", "X", &nwip_universe, 72 },
+ { "unknown-73", "X", &nwip_universe, 73 },
+ { "unknown-74", "X", &nwip_universe, 74 },
+ { "unknown-75", "X", &nwip_universe, 75 },
+ { "unknown-76", "X", &nwip_universe, 76 },
+ { "unknown-77", "X", &nwip_universe, 77 },
+ { "unknown-78", "X", &nwip_universe, 78 },
+ { "unknown-79", "X", &nwip_universe, 79 },
+ { "unknown-80", "X", &nwip_universe, 80 },
+ { "unknown-81", "X", &nwip_universe, 81 },
+ { "unknown-82", "X", &nwip_universe, 82 },
+ { "unknown-83", "X", &nwip_universe, 83 },
+ { "unknown-84", "X", &nwip_universe, 84 },
+ { "unknown-85", "X", &nwip_universe, 85 },
+ { "unknown-86", "X", &nwip_universe, 86 },
+ { "unknown-87", "X", &nwip_universe, 87 },
+ { "unknown-88", "X", &nwip_universe, 88 },
+ { "unknown-89", "X", &nwip_universe, 89 },
+ { "unknown-90", "X", &nwip_universe, 90 },
+ { "unknown-91", "X", &nwip_universe, 91 },
+ { "unknown-92", "X", &nwip_universe, 92 },
+ { "unknown-93", "X", &nwip_universe, 93 },
+ { "unknown-94", "X", &nwip_universe, 94 },
+ { "unknown-95", "X", &nwip_universe, 95 },
+ { "unknown-96", "X", &nwip_universe, 96 },
+ { "unknown-97", "X", &nwip_universe, 97 },
+ { "unknown-98", "X", &nwip_universe, 98 },
+ { "unknown-99", "X", &nwip_universe, 99 },
+ { "unknown-100", "X", &nwip_universe, 100 },
+ { "unknown-101", "X", &nwip_universe, 101 },
+ { "unknown-102", "X", &nwip_universe, 102 },
+ { "unknown-103", "X", &nwip_universe, 103 },
+ { "unknown-104", "X", &nwip_universe, 104 },
+ { "unknown-105", "X", &nwip_universe, 105 },
+ { "unknown-106", "X", &nwip_universe, 106 },
+ { "unknown-107", "X", &nwip_universe, 107 },
+ { "unknown-108", "X", &nwip_universe, 108 },
+ { "unknown-109", "X", &nwip_universe, 109 },
+ { "unknown-110", "X", &nwip_universe, 110 },
+ { "unknown-111", "X", &nwip_universe, 111 },
+ { "unknown-112", "X", &nwip_universe, 112 },
+ { "unknown-113", "X", &nwip_universe, 113 },
+ { "unknown-114", "X", &nwip_universe, 114 },
+ { "unknown-115", "X", &nwip_universe, 115 },
+ { "unknown-116", "X", &nwip_universe, 116 },
+ { "unknown-117", "X", &nwip_universe, 117 },
+ { "unknown-118", "X", &nwip_universe, 118 },
+ { "unknown-119", "X", &nwip_universe, 119 },
+ { "unknown-120", "X", &nwip_universe, 120 },
+ { "unknown-121", "X", &nwip_universe, 121 },
+ { "unknown-122", "X", &nwip_universe, 122 },
+ { "unknown-123", "X", &nwip_universe, 123 },
+ { "unknown-124", "X", &nwip_universe, 124 },
+ { "unknown-125", "X", &nwip_universe, 125 },
+ { "unknown-126", "X", &nwip_universe, 126 },
+ { "unknown-127", "X", &nwip_universe, 127 },
+ { "unknown-128", "X", &nwip_universe, 128 },
+ { "unknown-129", "X", &nwip_universe, 129 },
+ { "unknown-130", "X", &nwip_universe, 130 },
+ { "unknown-131", "X", &nwip_universe, 131 },
+ { "unknown-132", "X", &nwip_universe, 132 },
+ { "unknown-133", "X", &nwip_universe, 133 },
+ { "unknown-134", "X", &nwip_universe, 134 },
+ { "unknown-135", "X", &nwip_universe, 135 },
+ { "unknown-136", "X", &nwip_universe, 136 },
+ { "unknown-137", "X", &nwip_universe, 137 },
+ { "unknown-138", "X", &nwip_universe, 138 },
+ { "unknown-139", "X", &nwip_universe, 139 },
+ { "unknown-140", "X", &nwip_universe, 140 },
+ { "unknown-141", "X", &nwip_universe, 141 },
+ { "unknown-142", "X", &nwip_universe, 142 },
+ { "unknown-143", "X", &nwip_universe, 143 },
+ { "unknown-144", "X", &nwip_universe, 144 },
+ { "unknown-145", "X", &nwip_universe, 145 },
+ { "unknown-146", "X", &nwip_universe, 146 },
+ { "unknown-147", "X", &nwip_universe, 147 },
+ { "unknown-148", "X", &nwip_universe, 148 },
+ { "unknown-149", "X", &nwip_universe, 149 },
+ { "unknown-150", "X", &nwip_universe, 150 },
+ { "unknown-151", "X", &nwip_universe, 151 },
+ { "unknown-152", "X", &nwip_universe, 152 },
+ { "unknown-153", "X", &nwip_universe, 153 },
+ { "unknown-154", "X", &nwip_universe, 154 },
+ { "unknown-155", "X", &nwip_universe, 155 },
+ { "unknown-156", "X", &nwip_universe, 156 },
+ { "unknown-157", "X", &nwip_universe, 157 },
+ { "unknown-158", "X", &nwip_universe, 158 },
+ { "unknown-159", "X", &nwip_universe, 159 },
+ { "unknown-160", "X", &nwip_universe, 160 },
+ { "unknown-161", "X", &nwip_universe, 161 },
+ { "unknown-162", "X", &nwip_universe, 162 },
+ { "unknown-163", "X", &nwip_universe, 163 },
+ { "unknown-164", "X", &nwip_universe, 164 },
+ { "unknown-165", "X", &nwip_universe, 165 },
+ { "unknown-166", "X", &nwip_universe, 166 },
+ { "unknown-167", "X", &nwip_universe, 167 },
+ { "unknown-168", "X", &nwip_universe, 168 },
+ { "unknown-169", "X", &nwip_universe, 169 },
+ { "unknown-170", "X", &nwip_universe, 170 },
+ { "unknown-171", "X", &nwip_universe, 171 },
+ { "unknown-172", "X", &nwip_universe, 172 },
+ { "unknown-173", "X", &nwip_universe, 173 },
+ { "unknown-174", "X", &nwip_universe, 174 },
+ { "unknown-175", "X", &nwip_universe, 175 },
+ { "unknown-176", "X", &nwip_universe, 176 },
+ { "unknown-177", "X", &nwip_universe, 177 },
+ { "unknown-178", "X", &nwip_universe, 178 },
+ { "unknown-179", "X", &nwip_universe, 179 },
+ { "unknown-180", "X", &nwip_universe, 180 },
+ { "unknown-181", "X", &nwip_universe, 181 },
+ { "unknown-182", "X", &nwip_universe, 182 },
+ { "unknown-183", "X", &nwip_universe, 183 },
+ { "unknown-184", "X", &nwip_universe, 184 },
+ { "unknown-185", "X", &nwip_universe, 185 },
+ { "unknown-186", "X", &nwip_universe, 186 },
+ { "unknown-187", "X", &nwip_universe, 187 },
+ { "unknown-188", "X", &nwip_universe, 188 },
+ { "unknown-189", "X", &nwip_universe, 189 },
+ { "unknown-190", "X", &nwip_universe, 190 },
+ { "unknown-191", "X", &nwip_universe, 191 },
+ { "unknown-192", "X", &nwip_universe, 192 },
+ { "unknown-193", "X", &nwip_universe, 193 },
+ { "unknown-194", "X", &nwip_universe, 194 },
+ { "unknown-195", "X", &nwip_universe, 195 },
+ { "unknown-196", "X", &nwip_universe, 196 },
+ { "unknown-197", "X", &nwip_universe, 197 },
+ { "unknown-198", "X", &nwip_universe, 198 },
+ { "unknown-199", "X", &nwip_universe, 199 },
+ { "unknown-200", "X", &nwip_universe, 200 },
+ { "unknown-201", "X", &nwip_universe, 201 },
+ { "unknown-202", "X", &nwip_universe, 202 },
+ { "unknown-203", "X", &nwip_universe, 203 },
+ { "unknown-204", "X", &nwip_universe, 204 },
+ { "unknown-205", "X", &nwip_universe, 205 },
+ { "unknown-206", "X", &nwip_universe, 206 },
+ { "unknown-207", "X", &nwip_universe, 207 },
+ { "unknown-208", "X", &nwip_universe, 208 },
+ { "unknown-209", "X", &nwip_universe, 209 },
+ { "unknown-210", "X", &nwip_universe, 210 },
+ { "unknown-211", "X", &nwip_universe, 211 },
+ { "unknown-212", "X", &nwip_universe, 212 },
+ { "unknown-213", "X", &nwip_universe, 213 },
+ { "unknown-214", "X", &nwip_universe, 214 },
+ { "unknown-215", "X", &nwip_universe, 215 },
+ { "unknown-216", "X", &nwip_universe, 216 },
+ { "unknown-217", "X", &nwip_universe, 217 },
+ { "unknown-218", "X", &nwip_universe, 218 },
+ { "unknown-219", "X", &nwip_universe, 219 },
+ { "unknown-220", "X", &nwip_universe, 220 },
+ { "unknown-221", "X", &nwip_universe, 221 },
+ { "unknown-222", "X", &nwip_universe, 222 },
+ { "unknown-223", "X", &nwip_universe, 223 },
+ { "unknown-224", "X", &nwip_universe, 224 },
+ { "unknown-225", "X", &nwip_universe, 225 },
+ { "unknown-226", "X", &nwip_universe, 226 },
+ { "unknown-227", "X", &nwip_universe, 227 },
+ { "unknown-228", "X", &nwip_universe, 228 },
+ { "unknown-229", "X", &nwip_universe, 229 },
+ { "unknown-230", "X", &nwip_universe, 230 },
+ { "unknown-231", "X", &nwip_universe, 231 },
+ { "unknown-232", "X", &nwip_universe, 232 },
+ { "unknown-233", "X", &nwip_universe, 233 },
+ { "unknown-234", "X", &nwip_universe, 234 },
+ { "unknown-235", "X", &nwip_universe, 235 },
+ { "unknown-236", "X", &nwip_universe, 236 },
+ { "unknown-237", "X", &nwip_universe, 237 },
+ { "unknown-238", "X", &nwip_universe, 238 },
+ { "unknown-239", "X", &nwip_universe, 239 },
+ { "unknown-240", "X", &nwip_universe, 240 },
+ { "unknown-241", "X", &nwip_universe, 241 },
+ { "unknown-242", "X", &nwip_universe, 242 },
+ { "unknown-243", "X", &nwip_universe, 243 },
+ { "unknown-244", "X", &nwip_universe, 244 },
+ { "unknown-245", "X", &nwip_universe, 245 },
+ { "unknown-246", "X", &nwip_universe, 246 },
+ { "unknown-247", "X", &nwip_universe, 247 },
+ { "unknown-248", "X", &nwip_universe, 248 },
+ { "unknown-249", "X", &nwip_universe, 249 },
+ { "unknown-250", "X", &nwip_universe, 250 },
+ { "unknown-251", "X", &nwip_universe, 251 },
+ { "unknown-252", "X", &nwip_universe, 252 },
+ { "unknown-253", "X", &nwip_universe, 253 },
+ { "unknown-254", "X", &nwip_universe, 254 },
+ { "unknown-end", "e", &nwip_universe, 255 },
};
struct universe fqdn_universe;
{ "hostname", "t", &fqdn_universe, 6 },
{ "domainname", "t", &fqdn_universe, 7 },
{ "fqdn", "t", &fqdn_universe, 8 },
- { "#9", "X", &fqdn_universe, 9 },
- { "#10", "X", &fqdn_universe, 10 },
- { "#11", "X", &fqdn_universe, 11 },
- { "#12", "X", &fqdn_universe, 12 },
- { "#13", "X", &fqdn_universe, 13 },
- { "#14", "X", &fqdn_universe, 14 },
- { "#15", "X", &fqdn_universe, 15 },
- { "#16", "X", &fqdn_universe, 16 },
- { "#17", "X", &fqdn_universe, 17 },
- { "#18", "X", &fqdn_universe, 18 },
- { "#19", "X", &fqdn_universe, 19 },
- { "#20", "X", &fqdn_universe, 20 },
- { "#21", "X", &fqdn_universe, 21 },
- { "#22", "X", &fqdn_universe, 22 },
- { "#23", "X", &fqdn_universe, 23 },
- { "#24", "X", &fqdn_universe, 24 },
- { "#25", "X", &fqdn_universe, 25 },
- { "#26", "X", &fqdn_universe, 26 },
- { "#27", "X", &fqdn_universe, 27 },
- { "#28", "X", &fqdn_universe, 28 },
- { "#29", "X", &fqdn_universe, 29 },
- { "#30", "X", &fqdn_universe, 30 },
- { "#31", "X", &fqdn_universe, 31 },
- { "#32", "X", &fqdn_universe, 32 },
- { "#33", "X", &fqdn_universe, 33 },
- { "#34", "X", &fqdn_universe, 34 },
- { "#35", "X", &fqdn_universe, 35 },
- { "#36", "X", &fqdn_universe, 36 },
- { "#37", "X", &fqdn_universe, 37 },
- { "#38", "X", &fqdn_universe, 38 },
- { "#39", "X", &fqdn_universe, 39 },
- { "#40", "X", &fqdn_universe, 40 },
- { "#41", "X", &fqdn_universe, 41 },
- { "#42", "X", &fqdn_universe, 42 },
- { "#43", "X", &fqdn_universe, 43 },
- { "#44", "X", &fqdn_universe, 44 },
- { "#45", "X", &fqdn_universe, 45 },
- { "#46", "X", &fqdn_universe, 46 },
- { "#47", "X", &fqdn_universe, 47 },
- { "#48", "X", &fqdn_universe, 48 },
- { "#49", "X", &fqdn_universe, 49 },
- { "#50", "X", &fqdn_universe, 50 },
- { "#51", "X", &fqdn_universe, 51 },
- { "#52", "X", &fqdn_universe, 52 },
- { "#53", "X", &fqdn_universe, 53 },
- { "#54", "X", &fqdn_universe, 54 },
- { "#55", "X", &fqdn_universe, 55 },
- { "#56", "X", &fqdn_universe, 56 },
- { "#57", "X", &fqdn_universe, 57 },
- { "#58", "X", &fqdn_universe, 58 },
- { "#59", "X", &fqdn_universe, 59 },
- { "#60", "X", &fqdn_universe, 60 },
- { "#61", "X", &fqdn_universe, 61 },
- { "#62", "X", &fqdn_universe, 62 },
- { "#63", "X", &fqdn_universe, 63 },
- { "#64", "X", &fqdn_universe, 64 },
- { "#65", "X", &fqdn_universe, 65 },
- { "#66", "X", &fqdn_universe, 66 },
- { "#67", "X", &fqdn_universe, 67 },
- { "#68", "X", &fqdn_universe, 68 },
- { "#69", "X", &fqdn_universe, 69 },
- { "#70", "X", &fqdn_universe, 70 },
- { "#71", "X", &fqdn_universe, 71 },
- { "#72", "X", &fqdn_universe, 72 },
- { "#73", "X", &fqdn_universe, 73 },
- { "#74", "X", &fqdn_universe, 74 },
- { "#75", "X", &fqdn_universe, 75 },
- { "#76", "X", &fqdn_universe, 76 },
- { "#77", "X", &fqdn_universe, 77 },
- { "#78", "X", &fqdn_universe, 78 },
- { "#79", "X", &fqdn_universe, 79 },
- { "#80", "X", &fqdn_universe, 80 },
- { "#81", "X", &fqdn_universe, 81 },
- { "#82", "X", &fqdn_universe, 82 },
- { "#83", "X", &fqdn_universe, 83 },
- { "#84", "X", &fqdn_universe, 84 },
- { "#85", "X", &fqdn_universe, 85 },
- { "#86", "X", &fqdn_universe, 86 },
- { "#87", "X", &fqdn_universe, 87 },
- { "#88", "X", &fqdn_universe, 88 },
- { "#89", "X", &fqdn_universe, 89 },
- { "#90", "X", &fqdn_universe, 90 },
- { "#91", "X", &fqdn_universe, 91 },
- { "#92", "X", &fqdn_universe, 92 },
- { "#93", "X", &fqdn_universe, 93 },
- { "#94", "X", &fqdn_universe, 94 },
- { "#95", "X", &fqdn_universe, 95 },
- { "#96", "X", &fqdn_universe, 96 },
- { "#97", "X", &fqdn_universe, 97 },
- { "#98", "X", &fqdn_universe, 98 },
- { "#99", "X", &fqdn_universe, 99 },
- { "#100", "X", &fqdn_universe, 100 },
- { "#101", "X", &fqdn_universe, 101 },
- { "#102", "X", &fqdn_universe, 102 },
- { "#103", "X", &fqdn_universe, 103 },
- { "#104", "X", &fqdn_universe, 104 },
- { "#105", "X", &fqdn_universe, 105 },
- { "#106", "X", &fqdn_universe, 106 },
- { "#107", "X", &fqdn_universe, 107 },
- { "#108", "X", &fqdn_universe, 108 },
- { "#109", "X", &fqdn_universe, 109 },
- { "#110", "X", &fqdn_universe, 110 },
- { "#111", "X", &fqdn_universe, 111 },
- { "#112", "X", &fqdn_universe, 112 },
- { "#113", "X", &fqdn_universe, 113 },
- { "#114", "X", &fqdn_universe, 114 },
- { "#115", "X", &fqdn_universe, 115 },
- { "#116", "X", &fqdn_universe, 116 },
- { "#117", "X", &fqdn_universe, 117 },
- { "#118", "X", &fqdn_universe, 118 },
- { "#119", "X", &fqdn_universe, 119 },
- { "#120", "X", &fqdn_universe, 120 },
- { "#121", "X", &fqdn_universe, 121 },
- { "#122", "X", &fqdn_universe, 122 },
- { "#123", "X", &fqdn_universe, 123 },
- { "#124", "X", &fqdn_universe, 124 },
- { "#125", "X", &fqdn_universe, 125 },
- { "#126", "X", &fqdn_universe, 126 },
- { "#127", "X", &fqdn_universe, 127 },
- { "#128", "X", &fqdn_universe, 128 },
- { "#129", "X", &fqdn_universe, 129 },
- { "#130", "X", &fqdn_universe, 130 },
- { "#131", "X", &fqdn_universe, 131 },
- { "#132", "X", &fqdn_universe, 132 },
- { "#133", "X", &fqdn_universe, 133 },
- { "#134", "X", &fqdn_universe, 134 },
- { "#135", "X", &fqdn_universe, 135 },
- { "#136", "X", &fqdn_universe, 136 },
- { "#137", "X", &fqdn_universe, 137 },
- { "#138", "X", &fqdn_universe, 138 },
- { "#139", "X", &fqdn_universe, 139 },
- { "#140", "X", &fqdn_universe, 140 },
- { "#141", "X", &fqdn_universe, 141 },
- { "#142", "X", &fqdn_universe, 142 },
- { "#143", "X", &fqdn_universe, 143 },
- { "#144", "X", &fqdn_universe, 144 },
- { "#145", "X", &fqdn_universe, 145 },
- { "#146", "X", &fqdn_universe, 146 },
- { "#147", "X", &fqdn_universe, 147 },
- { "#148", "X", &fqdn_universe, 148 },
- { "#149", "X", &fqdn_universe, 149 },
- { "#150", "X", &fqdn_universe, 150 },
- { "#151", "X", &fqdn_universe, 151 },
- { "#152", "X", &fqdn_universe, 152 },
- { "#153", "X", &fqdn_universe, 153 },
- { "#154", "X", &fqdn_universe, 154 },
- { "#155", "X", &fqdn_universe, 155 },
- { "#156", "X", &fqdn_universe, 156 },
- { "#157", "X", &fqdn_universe, 157 },
- { "#158", "X", &fqdn_universe, 158 },
- { "#159", "X", &fqdn_universe, 159 },
- { "#160", "X", &fqdn_universe, 160 },
- { "#161", "X", &fqdn_universe, 161 },
- { "#162", "X", &fqdn_universe, 162 },
- { "#163", "X", &fqdn_universe, 163 },
- { "#164", "X", &fqdn_universe, 164 },
- { "#165", "X", &fqdn_universe, 165 },
- { "#166", "X", &fqdn_universe, 166 },
- { "#167", "X", &fqdn_universe, 167 },
- { "#168", "X", &fqdn_universe, 168 },
- { "#169", "X", &fqdn_universe, 169 },
- { "#170", "X", &fqdn_universe, 170 },
- { "#171", "X", &fqdn_universe, 171 },
- { "#172", "X", &fqdn_universe, 172 },
- { "#173", "X", &fqdn_universe, 173 },
- { "#174", "X", &fqdn_universe, 174 },
- { "#175", "X", &fqdn_universe, 175 },
- { "#176", "X", &fqdn_universe, 176 },
- { "#177", "X", &fqdn_universe, 177 },
- { "#178", "X", &fqdn_universe, 178 },
- { "#179", "X", &fqdn_universe, 179 },
- { "#180", "X", &fqdn_universe, 180 },
- { "#181", "X", &fqdn_universe, 181 },
- { "#182", "X", &fqdn_universe, 182 },
- { "#183", "X", &fqdn_universe, 183 },
- { "#184", "X", &fqdn_universe, 184 },
- { "#185", "X", &fqdn_universe, 185 },
- { "#186", "X", &fqdn_universe, 186 },
- { "#187", "X", &fqdn_universe, 187 },
- { "#188", "X", &fqdn_universe, 188 },
- { "#189", "X", &fqdn_universe, 189 },
- { "#190", "X", &fqdn_universe, 190 },
- { "#191", "X", &fqdn_universe, 191 },
- { "#192", "X", &fqdn_universe, 192 },
- { "#193", "X", &fqdn_universe, 193 },
- { "#194", "X", &fqdn_universe, 194 },
- { "#195", "X", &fqdn_universe, 195 },
- { "#196", "X", &fqdn_universe, 196 },
- { "#197", "X", &fqdn_universe, 197 },
- { "#198", "X", &fqdn_universe, 198 },
- { "#199", "X", &fqdn_universe, 199 },
- { "#200", "X", &fqdn_universe, 200 },
- { "#201", "X", &fqdn_universe, 201 },
- { "#202", "X", &fqdn_universe, 202 },
- { "#203", "X", &fqdn_universe, 203 },
- { "#204", "X", &fqdn_universe, 204 },
- { "#205", "X", &fqdn_universe, 205 },
- { "#206", "X", &fqdn_universe, 206 },
- { "#207", "X", &fqdn_universe, 207 },
- { "#208", "X", &fqdn_universe, 208 },
- { "#209", "X", &fqdn_universe, 209 },
- { "#210", "X", &fqdn_universe, 210 },
- { "#211", "X", &fqdn_universe, 211 },
- { "#212", "X", &fqdn_universe, 212 },
- { "#213", "X", &fqdn_universe, 213 },
- { "#214", "X", &fqdn_universe, 214 },
- { "#215", "X", &fqdn_universe, 215 },
- { "#216", "X", &fqdn_universe, 216 },
- { "#217", "X", &fqdn_universe, 217 },
- { "#218", "X", &fqdn_universe, 218 },
- { "#219", "X", &fqdn_universe, 219 },
- { "#220", "X", &fqdn_universe, 220 },
- { "#221", "X", &fqdn_universe, 221 },
- { "#222", "X", &fqdn_universe, 222 },
- { "#223", "X", &fqdn_universe, 223 },
- { "#224", "X", &fqdn_universe, 224 },
- { "#225", "X", &fqdn_universe, 225 },
- { "#226", "X", &fqdn_universe, 226 },
- { "#227", "X", &fqdn_universe, 227 },
- { "#228", "X", &fqdn_universe, 228 },
- { "#229", "X", &fqdn_universe, 229 },
- { "#230", "X", &fqdn_universe, 230 },
- { "#231", "X", &fqdn_universe, 231 },
- { "#232", "X", &fqdn_universe, 232 },
- { "#233", "X", &fqdn_universe, 233 },
- { "#234", "X", &fqdn_universe, 234 },
- { "#235", "X", &fqdn_universe, 235 },
- { "#236", "X", &fqdn_universe, 236 },
- { "#237", "X", &fqdn_universe, 237 },
- { "#238", "X", &fqdn_universe, 238 },
- { "#239", "X", &fqdn_universe, 239 },
- { "#240", "X", &fqdn_universe, 240 },
- { "#241", "X", &fqdn_universe, 241 },
- { "#242", "X", &fqdn_universe, 242 },
- { "#243", "X", &fqdn_universe, 243 },
- { "#244", "X", &fqdn_universe, 244 },
- { "#245", "X", &fqdn_universe, 245 },
- { "#246", "X", &fqdn_universe, 246 },
- { "#247", "X", &fqdn_universe, 247 },
- { "#248", "X", &fqdn_universe, 248 },
- { "#249", "X", &fqdn_universe, 249 },
- { "#250", "X", &fqdn_universe, 250 },
- { "#251", "X", &fqdn_universe, 251 },
- { "#252", "X", &fqdn_universe, 252 },
- { "#253", "X", &fqdn_universe, 253 },
- { "#254", "X", &fqdn_universe, 254 },
- { "#end", "e", &fqdn_universe, 255 },
+ { "unknown-9", "X", &fqdn_universe, 9 },
+ { "unknown-10", "X", &fqdn_universe, 10 },
+ { "unknown-11", "X", &fqdn_universe, 11 },
+ { "unknown-12", "X", &fqdn_universe, 12 },
+ { "unknown-13", "X", &fqdn_universe, 13 },
+ { "unknown-14", "X", &fqdn_universe, 14 },
+ { "unknown-15", "X", &fqdn_universe, 15 },
+ { "unknown-16", "X", &fqdn_universe, 16 },
+ { "unknown-17", "X", &fqdn_universe, 17 },
+ { "unknown-18", "X", &fqdn_universe, 18 },
+ { "unknown-19", "X", &fqdn_universe, 19 },
+ { "unknown-20", "X", &fqdn_universe, 20 },
+ { "unknown-21", "X", &fqdn_universe, 21 },
+ { "unknown-22", "X", &fqdn_universe, 22 },
+ { "unknown-23", "X", &fqdn_universe, 23 },
+ { "unknown-24", "X", &fqdn_universe, 24 },
+ { "unknown-25", "X", &fqdn_universe, 25 },
+ { "unknown-26", "X", &fqdn_universe, 26 },
+ { "unknown-27", "X", &fqdn_universe, 27 },
+ { "unknown-28", "X", &fqdn_universe, 28 },
+ { "unknown-29", "X", &fqdn_universe, 29 },
+ { "unknown-30", "X", &fqdn_universe, 30 },
+ { "unknown-31", "X", &fqdn_universe, 31 },
+ { "unknown-32", "X", &fqdn_universe, 32 },
+ { "unknown-33", "X", &fqdn_universe, 33 },
+ { "unknown-34", "X", &fqdn_universe, 34 },
+ { "unknown-35", "X", &fqdn_universe, 35 },
+ { "unknown-36", "X", &fqdn_universe, 36 },
+ { "unknown-37", "X", &fqdn_universe, 37 },
+ { "unknown-38", "X", &fqdn_universe, 38 },
+ { "unknown-39", "X", &fqdn_universe, 39 },
+ { "unknown-40", "X", &fqdn_universe, 40 },
+ { "unknown-41", "X", &fqdn_universe, 41 },
+ { "unknown-42", "X", &fqdn_universe, 42 },
+ { "unknown-43", "X", &fqdn_universe, 43 },
+ { "unknown-44", "X", &fqdn_universe, 44 },
+ { "unknown-45", "X", &fqdn_universe, 45 },
+ { "unknown-46", "X", &fqdn_universe, 46 },
+ { "unknown-47", "X", &fqdn_universe, 47 },
+ { "unknown-48", "X", &fqdn_universe, 48 },
+ { "unknown-49", "X", &fqdn_universe, 49 },
+ { "unknown-50", "X", &fqdn_universe, 50 },
+ { "unknown-51", "X", &fqdn_universe, 51 },
+ { "unknown-52", "X", &fqdn_universe, 52 },
+ { "unknown-53", "X", &fqdn_universe, 53 },
+ { "unknown-54", "X", &fqdn_universe, 54 },
+ { "unknown-55", "X", &fqdn_universe, 55 },
+ { "unknown-56", "X", &fqdn_universe, 56 },
+ { "unknown-57", "X", &fqdn_universe, 57 },
+ { "unknown-58", "X", &fqdn_universe, 58 },
+ { "unknown-59", "X", &fqdn_universe, 59 },
+ { "unknown-60", "X", &fqdn_universe, 60 },
+ { "unknown-61", "X", &fqdn_universe, 61 },
+ { "unknown-62", "X", &fqdn_universe, 62 },
+ { "unknown-63", "X", &fqdn_universe, 63 },
+ { "unknown-64", "X", &fqdn_universe, 64 },
+ { "unknown-65", "X", &fqdn_universe, 65 },
+ { "unknown-66", "X", &fqdn_universe, 66 },
+ { "unknown-67", "X", &fqdn_universe, 67 },
+ { "unknown-68", "X", &fqdn_universe, 68 },
+ { "unknown-69", "X", &fqdn_universe, 69 },
+ { "unknown-70", "X", &fqdn_universe, 70 },
+ { "unknown-71", "X", &fqdn_universe, 71 },
+ { "unknown-72", "X", &fqdn_universe, 72 },
+ { "unknown-73", "X", &fqdn_universe, 73 },
+ { "unknown-74", "X", &fqdn_universe, 74 },
+ { "unknown-75", "X", &fqdn_universe, 75 },
+ { "unknown-76", "X", &fqdn_universe, 76 },
+ { "unknown-77", "X", &fqdn_universe, 77 },
+ { "unknown-78", "X", &fqdn_universe, 78 },
+ { "unknown-79", "X", &fqdn_universe, 79 },
+ { "unknown-80", "X", &fqdn_universe, 80 },
+ { "unknown-81", "X", &fqdn_universe, 81 },
+ { "unknown-82", "X", &fqdn_universe, 82 },
+ { "unknown-83", "X", &fqdn_universe, 83 },
+ { "unknown-84", "X", &fqdn_universe, 84 },
+ { "unknown-85", "X", &fqdn_universe, 85 },
+ { "unknown-86", "X", &fqdn_universe, 86 },
+ { "unknown-87", "X", &fqdn_universe, 87 },
+ { "unknown-88", "X", &fqdn_universe, 88 },
+ { "unknown-89", "X", &fqdn_universe, 89 },
+ { "unknown-90", "X", &fqdn_universe, 90 },
+ { "unknown-91", "X", &fqdn_universe, 91 },
+ { "unknown-92", "X", &fqdn_universe, 92 },
+ { "unknown-93", "X", &fqdn_universe, 93 },
+ { "unknown-94", "X", &fqdn_universe, 94 },
+ { "unknown-95", "X", &fqdn_universe, 95 },
+ { "unknown-96", "X", &fqdn_universe, 96 },
+ { "unknown-97", "X", &fqdn_universe, 97 },
+ { "unknown-98", "X", &fqdn_universe, 98 },
+ { "unknown-99", "X", &fqdn_universe, 99 },
+ { "unknown-100", "X", &fqdn_universe, 100 },
+ { "unknown-101", "X", &fqdn_universe, 101 },
+ { "unknown-102", "X", &fqdn_universe, 102 },
+ { "unknown-103", "X", &fqdn_universe, 103 },
+ { "unknown-104", "X", &fqdn_universe, 104 },
+ { "unknown-105", "X", &fqdn_universe, 105 },
+ { "unknown-106", "X", &fqdn_universe, 106 },
+ { "unknown-107", "X", &fqdn_universe, 107 },
+ { "unknown-108", "X", &fqdn_universe, 108 },
+ { "unknown-109", "X", &fqdn_universe, 109 },
+ { "unknown-110", "X", &fqdn_universe, 110 },
+ { "unknown-111", "X", &fqdn_universe, 111 },
+ { "unknown-112", "X", &fqdn_universe, 112 },
+ { "unknown-113", "X", &fqdn_universe, 113 },
+ { "unknown-114", "X", &fqdn_universe, 114 },
+ { "unknown-115", "X", &fqdn_universe, 115 },
+ { "unknown-116", "X", &fqdn_universe, 116 },
+ { "unknown-117", "X", &fqdn_universe, 117 },
+ { "unknown-118", "X", &fqdn_universe, 118 },
+ { "unknown-119", "X", &fqdn_universe, 119 },
+ { "unknown-120", "X", &fqdn_universe, 120 },
+ { "unknown-121", "X", &fqdn_universe, 121 },
+ { "unknown-122", "X", &fqdn_universe, 122 },
+ { "unknown-123", "X", &fqdn_universe, 123 },
+ { "unknown-124", "X", &fqdn_universe, 124 },
+ { "unknown-125", "X", &fqdn_universe, 125 },
+ { "unknown-126", "X", &fqdn_universe, 126 },
+ { "unknown-127", "X", &fqdn_universe, 127 },
+ { "unknown-128", "X", &fqdn_universe, 128 },
+ { "unknown-129", "X", &fqdn_universe, 129 },
+ { "unknown-130", "X", &fqdn_universe, 130 },
+ { "unknown-131", "X", &fqdn_universe, 131 },
+ { "unknown-132", "X", &fqdn_universe, 132 },
+ { "unknown-133", "X", &fqdn_universe, 133 },
+ { "unknown-134", "X", &fqdn_universe, 134 },
+ { "unknown-135", "X", &fqdn_universe, 135 },
+ { "unknown-136", "X", &fqdn_universe, 136 },
+ { "unknown-137", "X", &fqdn_universe, 137 },
+ { "unknown-138", "X", &fqdn_universe, 138 },
+ { "unknown-139", "X", &fqdn_universe, 139 },
+ { "unknown-140", "X", &fqdn_universe, 140 },
+ { "unknown-141", "X", &fqdn_universe, 141 },
+ { "unknown-142", "X", &fqdn_universe, 142 },
+ { "unknown-143", "X", &fqdn_universe, 143 },
+ { "unknown-144", "X", &fqdn_universe, 144 },
+ { "unknown-145", "X", &fqdn_universe, 145 },
+ { "unknown-146", "X", &fqdn_universe, 146 },
+ { "unknown-147", "X", &fqdn_universe, 147 },
+ { "unknown-148", "X", &fqdn_universe, 148 },
+ { "unknown-149", "X", &fqdn_universe, 149 },
+ { "unknown-150", "X", &fqdn_universe, 150 },
+ { "unknown-151", "X", &fqdn_universe, 151 },
+ { "unknown-152", "X", &fqdn_universe, 152 },
+ { "unknown-153", "X", &fqdn_universe, 153 },
+ { "unknown-154", "X", &fqdn_universe, 154 },
+ { "unknown-155", "X", &fqdn_universe, 155 },
+ { "unknown-156", "X", &fqdn_universe, 156 },
+ { "unknown-157", "X", &fqdn_universe, 157 },
+ { "unknown-158", "X", &fqdn_universe, 158 },
+ { "unknown-159", "X", &fqdn_universe, 159 },
+ { "unknown-160", "X", &fqdn_universe, 160 },
+ { "unknown-161", "X", &fqdn_universe, 161 },
+ { "unknown-162", "X", &fqdn_universe, 162 },
+ { "unknown-163", "X", &fqdn_universe, 163 },
+ { "unknown-164", "X", &fqdn_universe, 164 },
+ { "unknown-165", "X", &fqdn_universe, 165 },
+ { "unknown-166", "X", &fqdn_universe, 166 },
+ { "unknown-167", "X", &fqdn_universe, 167 },
+ { "unknown-168", "X", &fqdn_universe, 168 },
+ { "unknown-169", "X", &fqdn_universe, 169 },
+ { "unknown-170", "X", &fqdn_universe, 170 },
+ { "unknown-171", "X", &fqdn_universe, 171 },
+ { "unknown-172", "X", &fqdn_universe, 172 },
+ { "unknown-173", "X", &fqdn_universe, 173 },
+ { "unknown-174", "X", &fqdn_universe, 174 },
+ { "unknown-175", "X", &fqdn_universe, 175 },
+ { "unknown-176", "X", &fqdn_universe, 176 },
+ { "unknown-177", "X", &fqdn_universe, 177 },
+ { "unknown-178", "X", &fqdn_universe, 178 },
+ { "unknown-179", "X", &fqdn_universe, 179 },
+ { "unknown-180", "X", &fqdn_universe, 180 },
+ { "unknown-181", "X", &fqdn_universe, 181 },
+ { "unknown-182", "X", &fqdn_universe, 182 },
+ { "unknown-183", "X", &fqdn_universe, 183 },
+ { "unknown-184", "X", &fqdn_universe, 184 },
+ { "unknown-185", "X", &fqdn_universe, 185 },
+ { "unknown-186", "X", &fqdn_universe, 186 },
+ { "unknown-187", "X", &fqdn_universe, 187 },
+ { "unknown-188", "X", &fqdn_universe, 188 },
+ { "unknown-189", "X", &fqdn_universe, 189 },
+ { "unknown-190", "X", &fqdn_universe, 190 },
+ { "unknown-191", "X", &fqdn_universe, 191 },
+ { "unknown-192", "X", &fqdn_universe, 192 },
+ { "unknown-193", "X", &fqdn_universe, 193 },
+ { "unknown-194", "X", &fqdn_universe, 194 },
+ { "unknown-195", "X", &fqdn_universe, 195 },
+ { "unknown-196", "X", &fqdn_universe, 196 },
+ { "unknown-197", "X", &fqdn_universe, 197 },
+ { "unknown-198", "X", &fqdn_universe, 198 },
+ { "unknown-199", "X", &fqdn_universe, 199 },
+ { "unknown-200", "X", &fqdn_universe, 200 },
+ { "unknown-201", "X", &fqdn_universe, 201 },
+ { "unknown-202", "X", &fqdn_universe, 202 },
+ { "unknown-203", "X", &fqdn_universe, 203 },
+ { "unknown-204", "X", &fqdn_universe, 204 },
+ { "unknown-205", "X", &fqdn_universe, 205 },
+ { "unknown-206", "X", &fqdn_universe, 206 },
+ { "unknown-207", "X", &fqdn_universe, 207 },
+ { "unknown-208", "X", &fqdn_universe, 208 },
+ { "unknown-209", "X", &fqdn_universe, 209 },
+ { "unknown-210", "X", &fqdn_universe, 210 },
+ { "unknown-211", "X", &fqdn_universe, 211 },
+ { "unknown-212", "X", &fqdn_universe, 212 },
+ { "unknown-213", "X", &fqdn_universe, 213 },
+ { "unknown-214", "X", &fqdn_universe, 214 },
+ { "unknown-215", "X", &fqdn_universe, 215 },
+ { "unknown-216", "X", &fqdn_universe, 216 },
+ { "unknown-217", "X", &fqdn_universe, 217 },
+ { "unknown-218", "X", &fqdn_universe, 218 },
+ { "unknown-219", "X", &fqdn_universe, 219 },
+ { "unknown-220", "X", &fqdn_universe, 220 },
+ { "unknown-221", "X", &fqdn_universe, 221 },
+ { "unknown-222", "X", &fqdn_universe, 222 },
+ { "unknown-223", "X", &fqdn_universe, 223 },
+ { "unknown-224", "X", &fqdn_universe, 224 },
+ { "unknown-225", "X", &fqdn_universe, 225 },
+ { "unknown-226", "X", &fqdn_universe, 226 },
+ { "unknown-227", "X", &fqdn_universe, 227 },
+ { "unknown-228", "X", &fqdn_universe, 228 },
+ { "unknown-229", "X", &fqdn_universe, 229 },
+ { "unknown-230", "X", &fqdn_universe, 230 },
+ { "unknown-231", "X", &fqdn_universe, 231 },
+ { "unknown-232", "X", &fqdn_universe, 232 },
+ { "unknown-233", "X", &fqdn_universe, 233 },
+ { "unknown-234", "X", &fqdn_universe, 234 },
+ { "unknown-235", "X", &fqdn_universe, 235 },
+ { "unknown-236", "X", &fqdn_universe, 236 },
+ { "unknown-237", "X", &fqdn_universe, 237 },
+ { "unknown-238", "X", &fqdn_universe, 238 },
+ { "unknown-239", "X", &fqdn_universe, 239 },
+ { "unknown-240", "X", &fqdn_universe, 240 },
+ { "unknown-241", "X", &fqdn_universe, 241 },
+ { "unknown-242", "X", &fqdn_universe, 242 },
+ { "unknown-243", "X", &fqdn_universe, 243 },
+ { "unknown-244", "X", &fqdn_universe, 244 },
+ { "unknown-245", "X", &fqdn_universe, 245 },
+ { "unknown-246", "X", &fqdn_universe, 246 },
+ { "unknown-247", "X", &fqdn_universe, 247 },
+ { "unknown-248", "X", &fqdn_universe, 248 },
+ { "unknown-249", "X", &fqdn_universe, 249 },
+ { "unknown-250", "X", &fqdn_universe, 250 },
+ { "unknown-251", "X", &fqdn_universe, 251 },
+ { "unknown-252", "X", &fqdn_universe, 252 },
+ { "unknown-253", "X", &fqdn_universe, 253 },
+ { "unknown-254", "X", &fqdn_universe, 254 },
+ { "unknown-end", "e", &fqdn_universe, 255 },
};
const char *hardware_types [] = {
"unknown-254",
"unknown-255" };
-struct hash_table *universe_hash;
+universe_hash_t *universe_hash;
struct universe **universes;
int universe_count, universe_max;
dhcp_universe.store_length = putUChar;
dhcp_universe.index = universe_count++;
universes [dhcp_universe.index] = &dhcp_universe;
- dhcp_universe.hash = new_hash (0, 0, 1, MDL);
- if (!dhcp_universe.hash)
+ if (!option_new_hash (&dhcp_universe.hash, 1, MDL))
log_fatal ("Can't allocate dhcp option hash table.");
for (i = 0; i < 256; i++) {
dhcp_universe.options [i] = &dhcp_options [i];
nwip_universe.tag_size = 1;
nwip_universe.store_tag = putUChar;
nwip_universe.store_length = putUChar;
- fqdn_universe.enc_opt = &dhcp_options [DHO_NWIP_SUBOPTIONS];
+ nwip_universe.enc_opt = &dhcp_options [DHO_NWIP_SUBOPTIONS];
nwip_universe.index = universe_count++;
universes [nwip_universe.index] = &nwip_universe;
- nwip_universe.hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&nwip_universe.hash, 1, MDL);
if (!nwip_universe.hash)
log_fatal ("Can't allocate nwip option hash table.");
for (i = 0; i < 256; i++) {
fqdn_universe.index = universe_count++;
fqdn_universe.enc_opt = &dhcp_options [DHO_FQDN];
universes [fqdn_universe.index] = &fqdn_universe;
- fqdn_universe.hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&fqdn_universe.hash, 1, MDL);
if (!fqdn_universe.hash)
log_fatal ("Can't allocate fqdn option hash table.");
for (i = 0; i < 256; i++) {
}
/* Set up the hash of universes. */
- universe_hash = new_hash (0, 0, 1, MDL);
+ universe_new_hash (&universe_hash, 1, MDL);
universe_hash_add (universe_hash,
dhcp_universe.name, 0,
&dhcp_universe, MDL);
Contributed in May of 1999 by Andrew Chittenden */
/*
- * Copyright (c) 1996-2000 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.7 2001/04/27 22:23:02 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tr.c,v 1.8 2005/03/17 20:15:01 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
Routines for manipulating parse trees... */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: tree.c,v 1.102 2001/06/27 00:30:00 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: tree.c,v 1.103 2005/03/17 20:15:01 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
}
(*oc) -> data.len = len;
+ (*oc) -> data.buffer = bp;
(*oc) -> data.data = &bp -> data [0];
(*oc) -> data.terminated = 0;
if (data)
/* Decrement the reference count. If it's nonzero, we're
done. */
--(bv -> refcnt);
- rc_register (file, line, v, bv, bv -> refcnt, 1);
+ rc_register (file, line, v, bv, bv -> refcnt, 1, RC_MISC);
if (bv -> refcnt > 0)
return 1;
if (bv -> refcnt < 0) {
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)
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);
if (len != 8 && len != 16 && len != 32) {
log_info ("binary_to_ascii: %s %ld!",
"invalid width", len);
+ status = 0;
goto b2a_out;
}
len /= 8;
/* Decrement the reference count. If it's nonzero, we're
done. */
--(expr -> refcnt);
- rc_register (file, line, eptr, expr, expr -> refcnt, 1);
+ rc_register (file, line, eptr, expr, expr -> refcnt, 1, RC_MISC);
if (expr -> refcnt > 0)
return;
if (expr -> refcnt < 0) {
case expr_equal:
case expr_not_equal:
- return 3;
+ return 4;
+ case expr_or:
case expr_and:
- case expr_multiply:
- case expr_divide:
- case expr_remainder:
- return 1;
+ return 3;
- case expr_or:
case expr_add:
case expr_subtract:
return 2;
+
+ case expr_multiply:
+ case expr_divide:
+ case expr_remainder:
+ return 1;
}
return 100;
}
*ptr = (struct binding_scope *)0;
--binding_scope -> refcnt;
rc_register (file, line, ptr,
- binding_scope, binding_scope -> refcnt, 1);
+ binding_scope, binding_scope -> refcnt, 1, RC_MISC);
if (binding_scope -> refcnt > 0)
return 1;
}
bp -> refcnt--;
- rc_register (file, line, ptr, bp, bp -> refcnt, 1);
+ rc_register (file, line, ptr, bp, bp -> refcnt, 1, RC_MISC);
if (bp -> refcnt < 0) {
log_error ("%s(%d): negative refcnt!", file, line);
#if defined (DEBUG_RC_HISTORY)
Ultrix PacketFilter interface code. */
/*
- * Copyright (c) 1996-2000 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''.
#ifndef lint
static char copyright[] =
-"$Id: upf.c,v 1.21 2000/09/01 23:03:39 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: upf.c,v 1.22 2005/03/17 20:15:01 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
/* 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) {
/* 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)
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`
fi;;
esac;;
NetBSD)
- hw=`uname -m`
- case $hw in
- arm32) sysname=netbsd-nocast;;
- alpha) sysname=netbsd-nocast;;
- *) sysname=netbsd;;
- esac;;
+ sysname=netbsd;;
OpenBSD)
sysname=openbsd;;
FreeBSD)
-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
# Makefile.dist
#
-# 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-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
$(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)
The dhcpctl callback object. */
/*
- * Copyright (c) 1999-2000 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.6 2005/03/17 20:15:02 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <omapip/omapip_p.h>
#include "dhcpctl.h"
Example program that uses the dhcpctl library. */
-/* Copyright (C) 2000-2001 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.13 2005/03/17 20:15:03 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
.\"
.\" Project: DHCP
.\" File: dhcpctl.3
-.\" RCSId: $Id: dhcpctl.3,v 1.4 2001/06/27 00:30:03 mellon Exp $
+.\" RCSId: $Id: dhcpctl.3,v 1.5 2005/03/17 20:15:03 dhankins 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.
.\"
.\"
.Sh SYNOPSIS
.Fd #include <dhcpctl/dhcpctl.h>
-.Fd
.Ft dhcpctl_status
.Fo dhcpctl_initialize
.Fa void
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.
.\"
.\"
.\"
}
.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.
+.Sh AUTHOR
+.Em dhcpctl
+was written by Ted Lemon of Nominum, Inc.
+This preliminary documentation was written by James Brister of Nominum, Inc.
Subroutines providing general support for objects. */
/*
- * Copyright (c) 1999-2000 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.25 2005/03/17 20:15:03 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <omapip/omapip_p.h>
#include "dhcpctl.h"
dhcpctl_callback_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof
- (dhcpctl_callback_object_t), 0);
+ (dhcpctl_callback_object_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
dhcpctl_remote_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (dhcpctl_remote_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
-/* dhcpctl.h
+/* $Id: dhcpctl.h,v 1.16 2005/03/17 20:15:03 dhankins Exp $
Subroutines providing general support for objects. */
/*
- * Copyright (c) 1999-2000 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''.
-.\" omshell.1
+.\" $Id: omshell.1,v 1.3 2005/03/17 20:15:03 dhankins Exp $
.\"
-.\" Copyright (c) 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) 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''.
Examine and modify omapi objects. */
/*
- * 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 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.10 2005/03/17 20:15:04 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
printf (" set <name> = <value>\n");
printf (" create\n");
printf (" open\n");
+ printf (" update\n");
+ printf (" unset <name>\n");
+ printf (" refresh\n");
+ printf (" remove\n");
skip_to_semi (cfile);
break;
break;
}
+ if (!oh) {
+ printf ("not open.\n");
+ skip_to_semi (cfile);
+ break;
+ }
omapi_object_dereference (&oh, MDL);
break;
val = buf;
do {
int intval = atoi (val);
+ dotiszero:
if (intval > 255) {
parse_warn (cfile,
"dotted octet > 255: %s",
(unsigned *)0, cfile);
if (token != DOT)
break;
- token = next_token (&val,
- (unsigned *)0, cfile);
+ /* DOT is zero. */
+ while ((token = next_token (&val,
+ (unsigned *)0, cfile)) == DOT)
+ *s++ = 0;
} while (token == NUMBER);
dhcpctl_set_data_value (oh, buf,
(unsigned)(s - buf),
break;
}
+ end_parse (&cfile);
} while (1);
exit (0);
The dhcpctl remote object. */
/*
- * Copyright (c) 1999-2000 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.14 2005/03/17 20:15:04 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+#endif /* not lint */
+
#include <omapip/omapip_p.h>
#include "dhcpctl.h"
omapi_object_dereference (&message, MDL);
return status;
}
- return omapi_protocol_send_message (connection -> outer,
+
+ status = omapi_protocol_send_message (connection -> outer,
(omapi_object_t *)0,
message, (omapi_object_t *)0);
+
+ if (status != ISC_R_SUCCESS)
+ omapi_message_unregister (message);
+
+ omapi_object_dereference (&message, MDL);
+ return status;
}
/* Callback methods (not meant to be called directly) */
if (p -> handle)
omapi_object_dereference ((omapi_object_t **)&p -> handle,
file, line);
+ if (p -> rtype)
+ omapi_typed_data_dereference ((omapi_typed_data_t **)&p->rtype,
+ file, line);
return ISC_R_SUCCESS;
}
-.\" dhclient-script.8
+.\" $Id: dhclient-script.8,v 1.2 2005/03/17 20:15:04 dhankins 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''.
Îà»÷¤·¤¿¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤ËÂФ¹¤ë¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë¤Ï
»÷¤Æ¤¤¤¿¤êÁ´¤¯Æ±¤¸¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢°ìÈ̤ˤϡ¢
³Æ¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥àÍѤ˳ơ¹¤Î¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë¤¬¤¢¤ë¤Ù¤¤Ç¤¹¡£
-Internet Software Consortium ¤Î DHCP ÇÛÉۤ˴ޤޤì¤ë¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë¤Ï¡¢
+Internet Systems Consortium ¤Î DHCP ÇÛÉۤ˴ޤޤì¤ë¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë¤Ï¡¢
client/scripts °Ê²¼¤ÎÇÛÉۥĥ꡼¤Ë¤¢¤ê¡¢
Æ°ºîÂоݥª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à̾¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
.SH ¥Ð¥°
.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 ¤Ë¤Ä¤¤¤Æ¤è¤ê¾Ü¤·¤¯¤Ï¡¢
-.\" dhclient.8
+.\" $Id: dhclient.8,v 1.2 2005/03/17 20:15:05 dhankins 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.
]
]
.SH ²òÀâ
-Internet Software Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ç¤¢¤ë dhclient
+Internet Systems Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ç¤¢¤ë dhclient
¤ÏưŪ¥Û¥¹¥ÈÀßÄê¥×¥í¥È¥³¥ë (DHCP: Dynamic Host Configuration Protocol)
¤Þ¤¿¤Ï BOOTP ¥×¥í¥È¥³¥ë¤òÍѤ¤¤Æ¡¢¤¢¤ë¤¤¤Ï
¤³¤ì¤é¤Î¥×¥í¥È¥³¥ë¤¬¼ºÇÔ¤·¤¿¾ì¹ç¤Ë¤Ï¥¢¥É¥ì¥¹¤òÀÅŪ¤Ë³ä¤êÅö¤Æ¤Æ¡¢
.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 ¤Ë¤Ä¤¤¤Æ¤è¤ê¾Ü¤·¤¯¤Ï¡¢
Linux ¤Ç¤ÎÍøÍѤ˺ݤ·ÂçÉý¤Ë½¤Àµ¡¢²þÎɤò¹Ô¤¤¤Þ¤·¤¿¡£
.PP
¸½ºß¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï¡¢Elliot ¤Ë¤è¤ë Linux ¤Ç¤Î²þÎɤËÉ餦¤È¤³¤í¤¬Â礤¤¤Ç¤¹¤¬¡¢
-Internet Software Consortium ¤Î DHCP ¥µ¡¼¥Ð¤¬»È¤¦¤â¤Î¤ÈƱ¤¸
+Internet Systems Consortium ¤Î DHCP ¥µ¡¼¥Ð¤¬»È¤¦¤â¤Î¤ÈƱ¤¸
¥Í¥Ã¥È¥ï¡¼¥¥ó¥°¥Õ¥ì¡¼¥à¥ï¡¼¥¯¤òÍѤ¤¤ë¤è¤¦¤Ë¡¢Ted Lemon ¤¬
ÂçÉý¤ÊºÆÊÔÀ®¤äÉôʬŪ¤Ê½ñ¤´¹¤¨¤ò¹Ô¤¤¤Þ¤·¤¿¡£
¥·¥¹¥Æ¥àÆÃͤÎÀßÄꥳ¡¼¥É¤ÎÂçÉôʬ¤Ï¥·¥§¥ë¥¹¥¯¥ê¥×¥È¤Ë°Ü¤µ¤ì¤¿¤Î¤Ç¡¢
-.\" dhclient.conf.5
+.\" $Id: dhclient.conf.5,v 1.2 2005/03/17 20:15:05 dhankins 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''.
dhclient.conf - DHCP ¥¯¥é¥¤¥¢¥ó¥ÈÀßÄê¥Õ¥¡¥¤¥ë
.SH ²òÀâ
dhclient.conf ¥Õ¥¡¥¤¥ë¤Ë¤Ï
-Internet Software Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ç¤¢¤ë
+Internet Systems Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ç¤¢¤ë
.IR dhclient
¤ÎÀßÄê¾ðÊ󤬴ޤޤì¤Þ¤¹¡£
.PP
DHCP ¥¯¥é¥¤¥¢¥ó¥È¤¬ TCP/IP ¥í¡¼¥ß¥ó¥° (roaming) ¥×¥í¥È¥³¥ë¤ò¼Â¹Ô¤·¤Æ
¤¤¤ë¾ì¹ç¡¢DHCP ¤òÍѤ¤¤ÆÆÀ¤é¤ì¤ë¥ê¡¼¥¹¤À¤±¤Ç¤Ê¤¯¡¢»öÁ°¤ËÄêµÁ¤µ¤ì¤¿
IP ¥¨¥¤¥ê¥¢¥¹¤â¡¢¼«Ê¬¤¬»ÈÍѤ¹¤ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ËÀßÄꤹ¤ëɬÍפ¬¤¢¤ë
-¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£Internet Software Consortium ÈÇ DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
+¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£Internet Systems Consortium ÈÇ DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
¸ÇÄꥢ¥É¥ì¥¹Ä¾ÀÜ»ØÄê¤Î¥í¡¼¥ß¥ó¥°¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó¤¬¡¢¤½¤Î¼ï¤Î¼Â¸³
¤¬¤Ç¤¤ë¤è¤¦¤Ë¡¢¤³¤Î dhcp ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
.B alias
.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
¤Ë¤¢¤ê¤Þ¤¹¡£
-.\" dhclient.conf.5
-.\"
-.\" Copyright (c) 1997 The Internet Software Consortium.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\" 3. 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.
-.\"
-.\" 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.
-.\"
-.\" This software has been written for the Internet Software Consortium
+.\" $Id: dhclient.leases.5,v 1.2 2005/03/17 20:15:05 dhankins Exp $
+.\"
+.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+.\" Copyright (c) 1997-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/
+.\"
+.\" 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''.
.\"
.SH ̾¾Î
dhclient.leases - DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Î¥ê¡¼¥¹¥Ç¡¼¥¿¥Ù¡¼¥¹
.SH ²òÀâ
-Internet Software Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
+Internet Systems Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤Ï¡¢
³ÍÆÀ¤·¤¿¥ê¡¼¥¹¤Î¤¦¤Á¤Þ¤À͸ú¤Ç¤¢¤ë¤â¤Î¤ò´ÉÍý¤¹¤ë¤¿¤á¤Î¡¢
±Ê³Ū¤Ê¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÊÝ»ý¤·¤Þ¤¹¡£
¤³¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ï¡¢¼«Í³·Á¼°¤Î ASCII ¥Õ¥¡¥¤¥ë¤Ç¤¢¤ê¡¢
.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
¤Ë¤¢¤ê¤Þ¤¹¡£
-.\" dhcp-eval.5
+.\" $Id: dhcp-eval.5,v 1.2 2005/03/17 20:15:05 dhankins 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''.
.SH ̾¾Î
dhcp-eval - ISC DHCP ¤Ë¤ª¤±¤ë¾ò·ïÉդɾ²Á
.SH ²òÀâ
-Internet Software Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Ï¡¢¤É¤Á¤é¤â
+Internet Systems Consortium ¤Î DHCP ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Ï¡¢¤É¤Á¤é¤â
¼õ¿®¤¹¤ë¥Ñ¥±¥Ã¥È¤Ë°Í¸¤·¤¿¾ò·ïÉդưºî¤ò¹Ô¤¦Ç½ÎϤò»ý¤Á¤Þ¤¹¡£
¾ò·ïÉդưºî¤Îʸˡ¤ò¤³¤³¤Ë¼¨¤·¤Þ¤¹¡£
.SH »²¾È: ¾ò·ïÉդưºî
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
¤Ë¤¢¤ê¤Þ¤¹¡£
-.\" dhcp-options.5
+.\" $Id: dhcp-options.5,v 1.2 2005/03/17 20:15:06 dhankins 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''.
.RE
.SH ¿·µ¬¥ª¥×¥·¥ç¥ó¤ÎÄêµÁ
.\" metal
-Internet Software Consortium DHCP ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Ï¡¢
+Internet Systems Consortium DHCP ¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Ï¡¢
¿·µ¬¥ª¥×¥·¥ç¥ó¤òÄêµÁ¤¹¤ëµ¡¹½¤âÄ󶡤·¤Æ¤¤¤Þ¤¹¡£
¤½¤ì¤¾¤ì¤Î 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
¤Ë¤¢¤ê¤Þ¤¹¡£
# Makefile.dist
#
-# Copyright (c) 1996-2000 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
/*
- * 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/
*/
/*
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: base64.c,v 1.1 2001/02/22 07:22:08 mellon Exp $";
+static const char rcsid[] = "$Id: base64.c,v 1.2 2005/03/17 20:15:06 dhankins Exp $";
#endif /* not lint */
#include <sys/types.h>
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;
#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; };
*/
/*
- * 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.4 2000/02/02 07:23:18 mellon Exp $
+ * $Id: nameser.h,v 1.5 2005/03/17 20:15:10 dhankins Exp $
*/
#ifndef _ARPA_NAMESER_H_
/*
* 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.
*/
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''.
#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 *
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''.
#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
#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"
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''.
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''.
#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
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''.
*/
-#define _ANSI_SOURCE
-
#include <syslog.h>
#include <sys/types.h>
#include <string.h>
#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
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''.
#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 *
NULL
};
#endif /* NEED_PRAND_CONF */
+
+/* these are #defined somewhere in /usr/include headers. */
+#undef NO
+#undef SERVER
+
/* 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
#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)
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''.
#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'
# endif
# define HAVE_ARPHRD_METRICOM
# define HAVE_ARPHRD_IEEE802
-# if (LINUX_MINOR >= 4)
-# define HAVE_ARPHRD_IEEE802_TR
-# endif
# define HAVE_ARPHRD_LOOPBACK
# define HAVE_SO_BINDTODEVICE
# define HAVE_SIOCGIFHWADDR
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''.
# define USE_BPF
#endif
-#ifdef __alpha__
+#if defined (__alpha__) || defined (__sparc64__)
#define PTRSIZE_64BIT
#endif
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''.
#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
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''.
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''.
#ifndef __QNXNTO__
# define NO_SNPRINTF
-# define vsnprintf( buf, size, fmt, list ) vsprintf( buf, fbuf, list )
#endif
#ifdef __QNXNTO__
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''.
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''.
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
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''.
#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.
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''.
#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... */
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. */
#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)
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''.
#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)
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''.
*/
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
- * by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
- * Enterprises. To learn more about the Internet Software Consortium,
- * see ``http://www.vix.com/isc''. To learn more about Vixie
- * Enterprises, see ``http://www.vix.com''.
+ * This software has been written for Internet Systems Consortium
+ * by Ted Lemon in cooperation with Vixie Enterprises. To learn more
+ * about Internet Systems Consortium, see ``http://www.isc.org''.
+ * To learn more about Vixie Enterprises, see ``http://www.vix.com''.
*/
#define DHCP_UDP_OVERHEAD (14 + /* Ethernet header */ \
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''.
# include "minires/minires.h"
#endif
+struct hash_table;
+typedef struct hash_table group_hash_t;
+typedef struct hash_table universe_hash_t;
+typedef struct hash_table option_hash_t;
+typedef struct hash_table dns_zone_hash_t;
+typedef struct hash_table lease_hash_t;
+typedef struct hash_table host_hash_t;
+typedef struct hash_table class_hash_t;
+
#include "dhcp.h"
#include "statement.h"
#include "tree.h"
} 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,
- FTS_RESERVED = 8,
- FTS_BOOTP = 9
-} 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
+#define FTS_RESERVED 8
+#define FTS_BOOTP 9
+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_BOOTP
/* A dhcp lease declaration structure. */
struct lease {
u_int8_t flags;
# define STATIC_LEASE 1
+# define BOOTP_LEASE 2
# define PERSISTENT_FLAGS (ON_ACK_QUEUE | ON_UPDATE_QUEUE)
# define MS_NULL_TERMINATION 8
# define ON_UPDATE_QUEUE 16
# define ON_ACK_QUEUE 32
# define UNICAST_BROADCAST_HACK 64
+# define ON_DEFERRED_QUEUE 128
# 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 binding_state;
+ binding_state_t next_binding_state;
+ binding_state_t desired_binding_state;
struct lease_state *state;
#define SV_PING_CHECKS 42
#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
int dirty;
/* Hash table containing subclasses. */
- struct hash_table *hash;
+ class_hash_t *hash;
struct data_string hash_string;
/* Expression used to match class. */
struct group *group;
-
/* Statements to execute if class matches. */
struct executable_statement *statements;
struct auth_key *key; /* Key used in basic DHCP authentication. */
unsigned int is_static : 1; /* If set, lease is from config file. */
- unsigned int is_bootp: 1; /* If set, lease was aquired with BOOTP. */
+ unsigned int is_bootp: 1; /* If set, lease was acquired with BOOTP. */
struct option_state *options; /* Options supplied with lease. */
};
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. */
};
/* Per-interface state used in the dhcp client... */
u_int16_t secs; /* secs value from DHCPDISCOVER. */
TIME first_sending; /* When was first copy sent? */
TIME interval; /* What's the current resend interval? */
+ int dns_update_timeout; /* Last timeout set for DNS update. */
struct string_list *medium; /* Last media type tried. */
struct dhcp_packet packet; /* Outgoing DHCP packet. */
unsigned packet_length; /* Actual length of generated packet. */
int wfdesc; /* Its write file descriptor, if
different. */
unsigned char *rbuf; /* Read buffer, if required. */
- size_t rbuf_max; /* Size of read buffer. */
+ unsigned int rbuf_max; /* Size of read buffer. */
size_t rbuf_offset; /* Current offset into buffer. */
size_t rbuf_len; /* Length of data in buffer. */
#define _PATH_DHCPD_CONF "dhcpd.conf"
#undef _PATH_DHCPD_DB
#define _PATH_DHCPD_DB "dhcpd.leases"
+#undef _PATH_DHCPD_PID
+#define _PATH_DHCPD_PID "dhcpd.pid"
#else
#ifndef _PATH_DHCPD_CONF
#define _PATH_DHCPD_CONF "/etc/dhcpd.conf"
/* External definitions... */
+HASH_FUNCTIONS_DECL (group, const char *, struct group_object, group_hash_t)
+HASH_FUNCTIONS_DECL (universe, const char *, struct universe, universe_hash_t)
+HASH_FUNCTIONS_DECL (option, const char *, struct option, option_hash_t)
+HASH_FUNCTIONS_DECL (dns_zone, const char *, struct dns_zone, dns_zone_hash_t)
+HASH_FUNCTIONS_DECL (lease, const unsigned char *, struct lease, lease_hash_t)
+HASH_FUNCTIONS_DECL (host, const unsigned char *, struct host_decl, host_hash_t)
+HASH_FUNCTIONS_DECL (class, const char *, struct class, class_hash_t)
+
/* options.c */
extern struct option *vendor_cfg_option;
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 **,
void parse_failover_state PROTO ((struct parse *,
enum failover_state *, TIME *));
#endif
+int permit_list_match (struct permit *, struct permit *);
void parse_pool_statement PROTO ((struct parse *, struct group *, int));
int parse_boolean PROTO ((struct parse *));
int parse_lbrace PROTO ((struct parse *));
int parse_fixed_addr_param PROTO ((struct option_cache **, struct parse *));
TIME parse_timestamp PROTO ((struct parse *));
int parse_lease_declaration PROTO ((struct lease **, struct parse *));
-void parse_address_range PROTO ((struct parse *,
- struct group *, int, struct pool *));
+void parse_address_range PROTO ((struct parse *, struct group *, int,
+ struct pool *, struct lease **));
/* ddns.c */
int ddns_updates PROTO ((struct packet *, struct lease *, struct lease *,
/* memory.c */
int (*group_write_hook) (struct group_object *);
extern struct group *root_group;
-extern struct hash_table *group_name_hash;
+extern group_hash_t *group_name_hash;
isc_result_t delete_group (struct group_object *, int);
isc_result_t supersede_group (struct group_object *, int);
int clone_group (struct group **, struct group *, const char *, int);
extern const char *hardware_types [256];
int universe_count, universe_max;
struct universe **universes;
-extern struct hash_table *universe_hash;
+extern universe_hash_t *universe_hash;
void initialize_common_option_spaces PROTO ((void));
struct universe *config_universe;
-HASH_FUNCTIONS_DECL (group, const char *, struct group_object)
-HASH_FUNCTIONS_DECL (universe, const char *, struct universe)
-HASH_FUNCTIONS_DECL (option, const char *, struct option)
/* stables.c */
#if defined (FAILOVER_PROTOCOL)
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;
int dhclient_interface_shutdown_hook (struct interface_info *);
int dhclient_interface_discovery_hook (struct interface_info *);
isc_result_t dhclient_interface_startup_hook (struct interface_info *);
-void client_dns_update (struct client_state *client, int);
+void client_dns_update_timeout (void *cp);
+isc_result_t client_dns_update (struct client_state *client, int, int);
/* db.c */
int write_lease PROTO ((struct lease *));
void write_named_billing_class (const char *, unsigned, struct class *);
void write_billing_classes (void);
int write_billing_class PROTO ((struct class *));
+void commit_leases_timeout PROTO ((void *));
int commit_leases PROTO ((void));
void db_startup PROTO ((int));
int new_lease_file PROTO ((void));
unsigned, struct hardware *));
ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
unsigned, struct sockaddr_in *,
- unsigned char *, unsigned));
+ unsigned));
/* ethernet.c */
void assemble_ethernet_header PROTO ((struct interface_info *, unsigned char *,
isc_result_t ddns_remove_a (struct data_string *,
struct iaddr, struct data_string *);
#endif /* NSUPDATE */
-HASH_FUNCTIONS_DECL (dns_zone, const char *, struct dns_zone)
/* resolv.c */
extern char path_resolv_conf [];
extern struct subnet *subnets;
extern struct shared_network *shared_networks;
-extern struct hash_table *host_hw_addr_hash;
-extern struct hash_table *host_uid_hash;
-extern struct hash_table *host_name_hash;
-extern struct hash_table *lease_uid_hash;
-extern struct hash_table *lease_ip_addr_hash;
-extern struct hash_table *lease_hw_addr_hash;
+extern host_hash_t *host_hw_addr_hash;
+extern host_hash_t *host_uid_hash;
+extern host_hash_t *host_name_hash;
+extern lease_hash_t *lease_uid_hash;
+extern lease_hash_t *lease_ip_addr_hash;
+extern lease_hash_t *lease_hw_addr_hash;
extern omapi_object_type_t *dhcp_type_host;
unsigned, const char *, int));
int find_host_for_network PROTO ((struct subnet **, struct host_decl **,
struct iaddr *, struct shared_network *));
-void new_address_range PROTO ((struct iaddr, struct iaddr,
- struct subnet *, struct pool *));
+void new_address_range PROTO ((struct parse *, struct iaddr, struct iaddr,
+ struct subnet *, struct pool *,
+ struct lease **));
isc_result_t dhcp_lease_free (omapi_object_t *, const char *, int);
isc_result_t dhcp_lease_get (omapi_object_t **, const char *, int);
int find_grouped_subnet PROTO ((struct subnet **, struct shared_network *,
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
void free_everything (void);
#endif
-HASH_FUNCTIONS_DECL (lease, const unsigned char *, struct lease)
-HASH_FUNCTIONS_DECL (host, const unsigned char *, struct host_decl)
-HASH_FUNCTIONS_DECL (class, const char *, struct class)
/* nsupdate.c */
char *ddns_rev_name (struct lease *, struct lease_state *, struct packet *);
Tokens for config file lexer and parser. */
/*
- * 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''.
CONNECT = 610,
REMOVE = 611,
REFRESH = 612,
- DOMAIN_NAME = 613
+ DOMAIN_NAME = 613,
+ DO_FORWARD_UPDATE = 614,
+ KNOWN_CLIENTS = 615
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
(x) != STRING && \
(x) != NUMBER && \
- (x) != EOF)
+ (x) != END_OF_FILE)
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''.
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
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''.
/*
- * Copyright (C) 1998, 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1998-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/
*/
#ifndef ISC_BOOLEAN_H
/*
- * Copyright (C) 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-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/
*/
#ifndef ISC_INT_H
/*
- * Copyright (C) 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-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/
*/
#ifndef ISC_LANG_H
/*
- * Copyright (C) 1997, 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1997-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/
*/
#ifndef ISC_LIST_H
/*
- * Copyright (C) 1998, 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1998-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/
*/
#ifndef ISC_RESULT_H
/*
- * Copyright (C) 1999 Internet Software Consortium.
- *
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-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/
*/
#ifndef ISC_TYPES_H
/*
- * Copyright (c) 2001 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2001-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/
*/
#include "cdefs.h"
#include "osdep.h"
+#define _ns_flagdata MR_ns_flagdata
+
#include "minires/resolv.h"
#include "minires/res_update.h"
#include "isc-dhcp/result.h"
const unsigned char *, unsigned,
const unsigned char *, double *,
unsigned, unsigned *);
-int ns_initparse (const unsigned char *, unsigned, ns_msg *);
+isc_result_t ns_initparse (const unsigned char *, unsigned, ns_msg *);
isc_result_t res_nquery(res_state, const char *,
ns_class, ns_type, double *, unsigned, unsigned *);
isc_result_t res_nsearch(res_state, const char *,
ns_class class, ns_type type,
double *, unsigned, unsigned *);
-int ns_skiprr(const unsigned char *, const unsigned char *, ns_sect, int);
+isc_result_t ns_skiprr(const unsigned char *,
+ const unsigned char *, ns_sect, int, int *);
int dn_skipname (const unsigned char *, const unsigned char *);
u_int32_t getULong (const unsigned char *);
int32_t getLong (const unsigned char *);
/*
- * Copyright (c) 1999 by Internet Software Consortium, Inc.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-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: res_update.h,v 1.3 2001/06/27 00:30:24 mellon Exp $
+ * $Id: res_update.h,v 1.4 2005/03/17 20:15:15 dhankins Exp $
*/
#ifndef __RES_UPDATE_H
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions 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 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/
*/
/*
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
- * $Id: resolv.h,v 1.3 2000/07/17 20:54:12 mellon Exp $
+ * $Id: resolv.h,v 1.4 2005/03/17 20:15:15 dhankins Exp $
*/
#ifndef _RESOLV_H_
* @(#)udp.h 8.1 (Berkeley) 6/10/93
*/
+/*
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions Copyright (c) 2000-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/
+ */
+
/*
* Udp protocol header.
* Per RFC 768, September, 1981.
Definitions for the object management API protocol memory allocation... */
/*
- * 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''.
#define DMDSIZE 0
#endif
+/* rc_history flags... */
+#define RC_LEASE 1
+#define RC_MISC 2
+
#if defined (DEBUG_RC_HISTORY)
#if !defined (RC_HISTORY_MAX)
# define RC_HISTORY_MAX 256
#endif
+#if !defined (RC_HISTORY_FLAGS)
+# define RC_HISTORY_FLAGS (RC_LEASE | RC_MISC)
+#endif
+
struct rc_history_entry {
const char *file;
int line;
int refcnt;
};
-#define rc_register(x, l, r, y, z, d) do { \
- rc_history [rc_history_index].file = (x); \
- rc_history [rc_history_index].line = (l); \
- rc_history [rc_history_index].reference = (r); \
- rc_history [rc_history_index].addr = (y); \
- rc_history [rc_history_index].refcnt = (z); \
- rc_history_next (d); \
+#define rc_register(x, l, r, y, z, d, f) do { \
+ if (RC_HISTORY_FLAGS & ~(f)) { \
+ rc_history [rc_history_index].file = (x); \
+ rc_history [rc_history_index].line = (l); \
+ rc_history [rc_history_index].reference = (r); \
+ rc_history [rc_history_index].addr = (y); \
+ rc_history [rc_history_index].refcnt = (z); \
+ rc_history_next (d); \
+ } \
} while (0)
-#define rc_register_mdl(r, y, z, d) \
- rc_register (__FILE__, __LINE__, r, y, z, d)
+#define rc_register_mdl(r, y, z, d, f) \
+ rc_register (__FILE__, __LINE__, r, y, z, d, f)
#else
-#define rc_register(file, line, reference, addr, refcnt, d)
-#define rc_register_mdl(reference, addr, refcnt, d)
+#define rc_register(file, line, reference, addr, refcnt, d, f)
+#define rc_register_mdl(reference, addr, refcnt, d, f)
#endif
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
Definitions for the object management API protocol buffering... */
/*
- * 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''.
Safe copying of integers into and out of a non-aligned memory buffer. */
/*
- * 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''.
Definitions for hashing... */
/*
- * Copyright (c) 1995-2000 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''.
struct hash_table *hash;
};
-#define HASH_FUNCTIONS_DECL(name, bufarg, type) \
-void name##_hash_add (struct hash_table *, bufarg, unsigned, type *, \
+#define HASH_FUNCTIONS_DECL(name, bufarg, type, hashtype) \
+void name##_hash_add (hashtype *, bufarg, unsigned, type *, \
const char *, int); \
-void name##_hash_delete (struct hash_table *, bufarg, unsigned, \
+void name##_hash_delete (hashtype *, bufarg, unsigned, \
const char *, int); \
-int name##_hash_lookup (type **, struct hash_table *, bufarg, unsigned, \
+int name##_hash_lookup (type **, hashtype *, bufarg, unsigned, \
const char *, int); \
-int name##_hash_foreach (struct hash_table *, \
- void (*) (bufarg, unsigned, type *));
+int name##_hash_foreach (hashtype *, \
+ void (*) (bufarg, unsigned, type *)); \
+int name##_new_hash (hashtype **, int, const char *, int); \
+void name##_free_hash_table (hashtype **, const char *, int);
-#define HASH_FUNCTIONS(name, bufarg, type) \
-void name##_hash_add (struct hash_table *table, \
+#define HASH_FUNCTIONS(name, bufarg, type, hashtype, ref, deref) \
+void name##_hash_add (hashtype *table, \
bufarg buf, unsigned len, type *ptr, \
const char *file, int line) \
{ \
- add_hash (table, \
+ add_hash ((struct hash_table *)table, \
(const unsigned char *)buf, \
len, (hashed_object_t *)ptr, file, line); \
} \
\
-void name##_hash_delete (struct hash_table *table, \
+void name##_hash_delete (hashtype *table, \
bufarg buf, unsigned len, const char *file, int line)\
{ \
- delete_hash_entry (table, (const unsigned char *)buf, \
+ delete_hash_entry ((struct hash_table *)table, \
+ (const unsigned char *)buf, \
len, file, line); \
} \
\
-int name##_hash_lookup (type **ptr, struct hash_table *table, \
+int name##_hash_lookup (type **ptr, hashtype *table, \
bufarg buf, unsigned len, const char *file, int line) \
{ \
- return hash_lookup ((hashed_object_t **)ptr, table, \
+ return hash_lookup ((hashed_object_t **)ptr, \
+ (struct hash_table *)table, \
(const unsigned char *)buf, len, file, line); \
} \
\
-int name##_hash_foreach (struct hash_table *table, \
+int name##_hash_foreach (hashtype *table, \
void (*func) (bufarg, unsigned, type *)) \
{ \
- return hash_foreach (table, (hash_foreach_func)func); \
+ return hash_foreach ((struct hash_table *)table, \
+ (hash_foreach_func)func); \
+} \
+ \
+int name##_new_hash (hashtype **tp, int c, const char *file, int line) \
+{ \
+ return new_hash ((struct hash_table **)tp, \
+ (hash_reference)ref, (hash_dereference)deref, c, \
+ file, line); \
+} \
+ \
+void name##_free_hash_table (hashtype **table, const char *file, int line) \
+{ \
+ free_hash_table ((struct hash_table **)table, file, line); \
}
-
void relinquish_hash_bucket_hunks (void);
-struct hash_table *new_hash_table (int, const char *, int);
-void free_hash_table (struct hash_table *, const char *, int);
+int new_hash_table (struct hash_table **, int, const char *, int);
+void free_hash_table (struct hash_table **, const char *, int);
struct hash_bucket *new_hash_bucket (const char *, int);
void free_hash_bucket (struct hash_bucket *, const char *, int);
-struct hash_table *new_hash (hash_reference, hash_dereference, int,
- const char *, int);
+int new_hash (struct hash_table **,
+ hash_reference, hash_dereference, int, const char *, int);
void add_hash (struct hash_table *,
const unsigned char *, unsigned, hashed_object_t *,
const char *, int);
Definitions for the object management API and protocol... */
/*
- * 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''.
isc_result_t (*allocator) (omapi_object_t **, const char *, int);
isc_result_t (*sizer) (size_t);
size_t size;
+ int rc_flag;
isc_result_t (*initialize) (omapi_object_t *, const char *, int);
} omapi_object_type_t;
const char *, int),
isc_result_t (*) (size_t), size_t,
isc_result_t (*) (omapi_object_t *,
- const char *, int));
+ const char *, int),
+ int);
isc_result_t omapi_signal (omapi_object_t *, const char *, ...);
isc_result_t omapi_signal_in (omapi_object_t *, const char *, ...);
isc_result_t omapi_set_value (omapi_object_t *, omapi_object_t *,
Private master include file for the OMAPI library. */
/*
- * 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''.
Definitions for omapi 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''.
*/
Operating system dependencies... */
/*
- * 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''.
# endif
#endif
+/* snprintf/vsnprintf hacks. for systems with no libc versions only. */
+#ifdef NO_SNPRINTF
+ extern int isc_print_snprintf(char *, size_t, const char *, ...);
+ extern int isc_print_vsnprintf(char *, size_t, const char *, va_list ap);
+# define snprintf isc_print_snprintf
+# define vsnprintf isc_print_vsnprintf
+#endif
+
/* Porting::
If you add a new network API, and have it set up so that it can be
# define HAVE_ARPHRD_IEEE802
#endif
+#if defined (ARPHRD_IEEE802_TR) && !defined (HAVE_ARPHRD_IEEE802_TR)
+# define HAVE_ARPHRD_IEEE802_TR
+#endif
+
#if defined (ARPHRD_FDDI) && !defined (HAVE_ARPHRD_FDDI)
# define HAVE_ARPHRD_FDDI
#endif
#endif
#if !defined (SOCKLEN_T)
-#define SOCKLEN_T socklen_t
+# define SOCKLEN_T socklen_t
+#endif
+
+#if !defined (STDERR_FILENO)
+# define STDERR_FILENO 2
#endif
#endif /* __ISC_DHCP_OSDEP_H__ */
/* #define DEBUG_FAILOVER_TIMING */
+/* Define this if you want all leases written to the lease file, even if
+ they are free leases that have never been used. */
+
+/* #define DEBUG_DUMP_ALL_LEASES */
+
/* Define this if you want DHCP failover protocol support in the DHCP
server. */
Definitions for executable statements... */
/*
- * 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''.
Definitions for address trees... */
/*
- * 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''.
void (*store_tag) PROTO ((unsigned char *, u_int32_t));
void (*store_length) PROTO ((unsigned char *, u_int32_t));
int tag_size, length_size;
- struct hash_table *hash;
+ option_hash_t *hash;
struct option *options [256];
struct option *enc_opt;
int index;
# Makefile.dist
#
-# Copyright (c) 1996-2000 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 = dhcpctl.cat3
SEDMANPAGES = dhcpctl.man3
/*
- * Copyright (c) 1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-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/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_date.c,v 1.2 2000/04/11 01:58:39 mellon Exp $";
+static const char rcsid[] = "$Id: ns_date.c,v 1.3 2005/03/17 20:15:17 dhankins Exp $";
#endif
/* Import. */
/*
- * 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/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_name.c,v 1.1 2000/02/02 07:28:14 mellon Exp $";
+static const char rcsid[] = "$Id: ns_name.c,v 1.2 2005/03/17 20:15:17 dhankins Exp $";
#endif
#include <sys/types.h>
dn = dst;
eom = dst + dstsiz;
+ if (dn >= eom) {
+ errno = EMSGSIZE;
+ return (-1);
+ }
while ((n = *cp++) != 0) {
if ((n & NS_CMPRSFLGS) != 0) {
/* Some kind of compression pointer. */
/*
- * 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/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_parse.c,v 1.2 2001/01/16 22:33:08 mellon Exp $";
+static const char rcsid[] = "$Id: ns_parse.c,v 1.3 2005/03/17 20:15:17 dhankins Exp $";
#endif
/* Import. */
/* Macros. */
-#define RETERR(err) do { errno = (err); return (-1); } while (0)
-
/* Public. */
/* These need to be in the same order as the nres.h:ns_flag enum. */
{ 0x0000, 0 }, /* expansion (6/6). */
};
-int
-ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
+isc_result_t
+ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count,
+ int *rc) {
const u_char *optr = ptr;
for ((void)NULL; count > 0; count--) {
b = dn_skipname(ptr, eom);
if (b < 0)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
ptr += b/*Name*/ + NS_INT16SZ/*Type*/ + NS_INT16SZ/*Class*/;
if (section != ns_s_qd) {
if (ptr + NS_INT32SZ + NS_INT16SZ > eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
ptr += NS_INT32SZ/*TTL*/;
rdlength = getUShort(ptr);
ptr += 2;
}
}
if (ptr > eom)
- RETERR(EMSGSIZE);
- return (ptr - optr);
+ return ISC_R_INCOMPLETE;
+ if (rc)
+ *rc = ptr - optr;
+ return ISC_R_SUCCESS;
}
-int
+isc_result_t
ns_initparse(const u_char *msg, unsigned msglen, ns_msg *handle) {
const u_char *eom = msg + msglen;
int i;
handle->_msg = msg;
handle->_eom = eom;
if (msg + NS_INT16SZ > eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
handle->_id = getUShort (msg);
msg += 2;
if (msg + NS_INT16SZ > eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
handle->_flags = getUShort (msg);
msg += 2;
for (i = 0; i < ns_s_max; i++) {
if (msg + NS_INT16SZ > eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
handle->_counts[i] = getUShort (msg);
msg += 2;
}
if (handle->_counts[i] == 0)
handle->_sections[i] = NULL;
else {
- int b = ns_skiprr(msg, eom, (ns_sect)i,
- handle->_counts[i]);
+ int b;
+ isc_result_t status =
+ ns_skiprr(msg, eom, (ns_sect)i,
+ handle->_counts[i], &b);
- if (b < 0)
- return (-1);
+ if (status != ISC_R_SUCCESS)
+ return STATUS;
handle->_sections[i] = msg;
msg += b;
}
if (msg != eom)
- RETERR(EMSGSIZE);
+ return ISC_R_INCOMPLETE;
setsection(handle, ns_s_max);
- return (0);
+ return ISC_R_SUCCESS;
}
isc_result_t
ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) {
int b;
+ isc_result_t status;
/* Make section right. */
if (section < 0 || section >= ns_s_max)
if (rrnum == -1)
rrnum = handle->_rrnum;
if (rrnum < 0 || rrnum >= handle->_counts[(int)section])
- RETERR(ENODEV);
+ return ISC_R_UNKNOWNATTRIBUTE;
if (rrnum < handle->_rrnum)
setsection(handle, section);
if (rrnum > handle->_rrnum) {
- b = ns_skiprr(handle->_ptr, handle->_eom, section,
- rrnum - handle->_rrnum);
+ status = ns_skiprr(handle->_ptr, handle->_eom, section,
+ rrnum - handle->_rrnum, &b);
- if (b < 0)
- return (-1);
+ if (status != ISC_R_SUCCESS)
+ return status;
handle->_ptr += b;
handle->_rrnum = rrnum;
}
b = dn_expand(handle->_msg, handle->_eom,
handle->_ptr, rr->name, NS_MAXDNAME);
if (b < 0)
- return (-1);
+ return ISC_R_FORMERR;
handle->_ptr += b;
if (handle->_ptr + NS_INT16SZ + NS_INT16SZ > handle->_eom)
- return ISC_R_NOSPACE;
+ return ISC_R_INCOMPLETE;
rr->type = getUShort (handle->_ptr);
handle -> _ptr += 2;
rr->rr_class = getUShort (handle->_ptr);
rr->rdata = NULL;
} else {
if (handle->_ptr + NS_INT32SZ + NS_INT16SZ > handle->_eom)
- return ISC_R_NOSPACE;
+ return ISC_R_INCOMPLETE;
rr->ttl = getULong (handle->_ptr);
handle -> _ptr += 4;
rr->rdlength = getUShort (handle->_ptr);
handle -> _ptr += 2;
if (handle->_ptr + rr->rdlength > handle->_eom)
- return ISC_R_NOSPACE;
+ return ISC_R_INCOMPLETE;
rr->rdata = handle->_ptr;
handle->_ptr += rr->rdlength;
}
/*
- * Copyright (c) 1995,1999 by Internet Software Consortium.
+ * Copyright (c) 2004 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 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/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_samedomain.c,v 1.3 2001/01/16 22:33:09 mellon Exp $";
+static const char rcsid[] = "$Id: ns_samedomain.c,v 1.4 2005/03/17 20:15:18 dhankins Exp $";
#endif
#include <sys/types.h>
size_t n = strlen(src);
if (n + sizeof "." > dstsize) {
- ISC_R_NOSPACE;
+ return ISC_R_NOSPACE;
}
strcpy(dst, src);
while (n > 0 && dst[n - 1] == '.') /* Ends in "." */
/*
- * Copyright (c) 1999-2001 by Internet Software Consortium, Inc.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-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/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_sign.c,v 1.5 2001/06/27 00:30:32 mellon Exp $";
+static const char rcsid[] = "$Id: ns_sign.c,v 1.6 2005/03/17 20:15:18 dhankins Exp $";
#endif
#if defined (TRACING)
dst_init();
if (msg == NULL || msglen == NULL || sig == NULL || siglen == NULL)
- ISC_R_INVALIDARG;
+ return ISC_R_INVALIDARG;
/* Name. */
if (key != NULL && error != ns_r_badsig && error != ns_r_badkey)
else
n = dn_comp("", cp, (unsigned)(eob - cp), NULL, NULL);
if (n < 0)
- ISC_R_NOSPACE;
+ return ISC_R_NOSPACE;
alg = cp;
cp += n;
n = dst_sign_data(SIG_MODE_FINAL, key, &ctx, NULL, 0,
sig, *siglen);
if (n < 0)
- ISC_R_BADKEY;
+ return ISC_R_BADKEY;
*siglen = n;
} else
*siglen = 0;
/*
- * Copyright (c) 1999-2001 by Internet Software Consortium, Inc.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-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/
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_verify.c,v 1.6 2001/06/27 00:30:33 mellon Exp $";
+static const char rcsid[] = "$Id: ns_verify.c,v 1.7 2005/03/17 20:15:18 dhankins Exp $";
#endif
#define time(x) trace_mr_time (x)
HEADER *hp = (HEADER *)msg;
int n, type;
u_char *cp = msg, *start;
+ isc_result_t status;
if (msg == NULL || eom == NULL || msg > eom)
return (NULL);
cp += HFIXEDSZ;
- n = ns_skiprr(cp, eom, ns_s_qd, ntohs(hp->qdcount));
- if (n < 0)
+ status = ns_skiprr(cp, eom, ns_s_qd, ntohs(hp->qdcount), &n);
+ if (status != ISC_R_SUCCESS)
return (NULL);
cp += n;
- n = ns_skiprr(cp, eom, ns_s_an, ntohs(hp->ancount));
- if (n < 0)
+ status = ns_skiprr(cp, eom, ns_s_an, ntohs(hp->ancount), &n);
+ if (status != ISC_R_SUCCESS)
return (NULL);
cp += n;
- n = ns_skiprr(cp, eom, ns_s_ns, ntohs(hp->nscount));
- if (n < 0)
+ status = ns_skiprr(cp, eom, ns_s_ns, ntohs(hp->nscount), &n);
+ if (status != ISC_R_SUCCESS)
return (NULL);
cp += n;
- n = ns_skiprr(cp, eom, ns_s_ar, ntohs(hp->arcount) - 1);
- if (n < 0)
+ status = ns_skiprr(cp, eom, ns_s_ar, ntohs(hp->arcount) - 1, &n);
+ if (status != ISC_R_SUCCESS)
return (NULL);
cp += n;
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions 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/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_comp.c,v 1.2 2000/02/02 19:59:16 mellon Exp $";
+static const char rcsid[] = "$Id: res_comp.c,v 1.3 2005/03/17 20:15:18 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_findzonecut.c,v 1.15 2001/06/27 00:30:34 mellon Exp $";
+static const char rcsid[] = "$Id: res_findzonecut.c,v 1.16 2005/03/17 20:15:18 dhankins Exp $";
#endif /* not lint */
/*
- * Copyright (c) 1999 by Internet Software Consortium.
+ * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 1999-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/
*/
/* Import. */
while (*dname != '.') {
if (*dname == '\\')
if (*++dname == '\0') {
- ISC_R_NOSPACE;
+ return ISC_R_NOSPACE;
}
dname++;
}
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions 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 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/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static const char rcsid[] = "$Id: res_init.c,v 1.5 2001/06/27 00:30:35 mellon Exp $";
+static const char rcsid[] = "$Id: res_init.c,v 1.6 2005/03/17 20:15:19 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions 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/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_mkquery.c,v 1.4 2001/01/16 22:33:14 mellon Exp $";
+static const char rcsid[] = "$Id: res_mkquery.c,v 1.5 2005/03/17 20:15:19 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
/*
- * 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/
*/
/*
*/
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_mkupdate.c,v 1.7 2001/01/11 02:16:24 mellon Exp $";
+static const char rcsid[] = "$Id: res_mkupdate.c,v 1.8 2005/03/17 20:15:19 dhankins Exp $";
#endif /* not lint */
#include <sys/types.h>
static int getword_str(char *, int,
const unsigned char **,
const unsigned char *);
+static int getphrase_str(char *, int, const u_char **, const u_char *);
static int getstr_str(char *, int, const u_char **, const u_char *);
struct valuelist {
u_int16_t rtype, rclass;
u_int32_t n1, rttl;
u_char *dnptrs[20], **dpp, **lastdnptr;
- unsigned siglen, keylen, certlen;
+ unsigned siglen, certlen;
+ int keylen;
unsigned buflen = *blp;
u_char *buf = (unsigned char *)bp;
case T_MR:
case T_NS:
case T_PTR:
- if (!getword_str(buf2, sizeof buf2, &startp, endp))
+ if (!getphrase_str(buf2, sizeof buf2, &startp, endp))
return (-1);
n = dn_comp(buf2, cp, buflen, dnptrs, lastdnptr);
if (n < 0)
cp += siglen;
break;
}
- case ns_t_key:
- /* flags */
- n = gethexnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- ShrinkBuffer(INT16SZ);
- PUTSHORT(n, cp);
- /* proto */
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- ShrinkBuffer(1);
- *cp++ = n;
- /* alg */
- n = getnum_str(&startp, endp);
- if (n < 0)
- return (-1);
- ShrinkBuffer(1);
- *cp++ = n;
- /* key */
- if ((n = getword_str(buf2, sizeof buf2,
- &startp, endp)) < 0)
- return (-1);
- keylen = b64_pton(buf2, buf3, sizeof(buf3));
- if (keylen < 0)
- return (-1);
- ShrinkBuffer(keylen);
- memcpy(cp, buf3, keylen);
- cp += keylen;
- break;
case ns_t_nxt:
{
int success, nxt_type;
cp += n;
break;
}
+#endif
+#if 1
+ case ns_t_key:
+ /* flags */
+ n = gethexnum_str(&startp, endp);
+ if (n < 0)
+ return (-1);
+ ShrinkBuffer(INT16SZ);
+ PUTSHORT(n, cp);
+ /* proto */
+ n = getnum_str(&startp, endp);
+ if (n < 0)
+ return (-1);
+ ShrinkBuffer(1);
+ *cp++ = n;
+ /* alg */
+ n = getnum_str(&startp, endp);
+ if (n < 0)
+ return (-1);
+ ShrinkBuffer(1);
+ *cp++ = n;
+ /* key */
+ if ((n = getword_str(buf2, sizeof buf2,
+ &startp, endp)) < 0)
+ return (-1);
+ keylen = b64_pton(buf2, buf3, sizeof(buf3));
+ if (keylen < 0)
+ return (-1);
+ ShrinkBuffer(keylen);
+ memcpy(cp, buf3, keylen);
+ cp += keylen;
+ break;
case ns_t_cert:
/* type */
n = getnum_str(&startp, endp);
break;
#endif
default:
+ fprintf(stderr, "NSupdate of RR type: %d not implemented\n",
+ rrecp->r_type);
return (-1);
} /*switch*/
n = (u_int16_t)((cp - sp2) - INT16SZ);
return (cp != buf);
}
+/*
+ * Get a phrase - possibly containing blanks - from a string (not file)
+ * into buf. modify the start pointer to point after the
+ * phrase in the string.
+ */
+static int
+getphrase_str(char *buf, int size, const u_char **startpp, const u_char *endp) {
+ char *cp;
+ int c;
+
+ for (cp = buf; *startpp <= endp; ) {
+ c = **startpp;
+ if (isspace(c) && cp == buf ) {
+ /* leading whitespace */
+ (*startpp)++;
+ continue;
+ }
+ else if ( c == '\0' ) {
+ break;
+ }
+ (*startpp)++;
+ if (cp >= buf+size-1)
+ break;
+ *cp++ = (u_char)c;
+ }
+ *cp = '\0';
+ return (cp != buf);
+}
+
/*
* get a white spae delimited string from memory. Process quoted strings
* and \DDD escapes. Return length or -1 on error. Returned string may
*/
/*
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions 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/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_query.c,v 1.4 2001/01/16 22:33:15 mellon Exp $";
+static const char rcsid[] = "$Id: res_query.c,v 1.5 2005/03/17 20:15:19 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
*/
/*
- * Portions Copyright (c) 1996-2001 by Internet Software Consortium.
+ * Portions Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+ * Portions 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/
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_send.c,v 1.7 2001/02/22 07:28:25 mellon Exp $";
+static const char rcsid[] = "$Id: res_send.c,v 1.8 2005/03/17 20:15:19 dhankins Exp $";
#endif /* LIBC_SCCS and not lint */
/* Rename the I/O functions in case we're tracing. */
(unsigned)len);
}
Dprint(statp->options & RES_DEBUG,
- (stdout, ";; new DG socket\n"))
+ (stdout, ";; new DG socket\n"));
#endif /* CAN_RECONNECT */
statp->_flags &= ~RES_F_CONN;
errno = 0;
+/*
+ * Copyright (c) 2004 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/
+ */
+
#include <sys/types.h>
#include <sys/param.h>
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_update.c,v 1.12 2001/06/27 00:30:38 mellon Exp $";
+static const char rcsid[] = "$Id: res_update.c,v 1.13 2005/03/17 20:15:20 dhankins Exp $";
#endif /* not lint */
/*
- * 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/
*/
/*
# Makefile.dist
#
-# Copyright (c) 1996-2001 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/
#
CATMANPAGES = omapi.cat3
SRC = protocol.c buffer.c alloc.c result.c connection.c errwarn.c \
listener.c dispatch.c generic.c support.c handle.c message.c \
convert.c hash.c auth.c inet_addr.c array.c trace.c mrtrace.c \
- toisc.c
+ toisc.c iscprint.c
OBJ = protocol.o buffer.o alloc.o result.o connection.o errwarn.o \
listener.o dispatch.o generic.o support.o handle.o message.o \
convert.o hash.o auth.o inet_addr.o array.o trace.o mrtrace.o \
- toisc.o
+ toisc.o iscprint.o
+# XXX: iscprint.o above is a kludge.
MAN = omapi.3
protocol... */
/*
- * Copyright (c) 1999-2001 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''.
#endif
#endif
#ifdef DEBUG_REFCNT_DMALLOC_FREE
- rc_register (file, line, 0, foo + DMDOFFSET, 1, 0);
+ rc_register (file, line, 0, foo + DMDOFFSET, 1, 0, RC_MALLOC);
#endif
return bar;
}
}
#endif
#ifdef DEBUG_REFCNT_DMALLOC_FREE
- rc_register (file, line, 0, (unsigned char *)ptr + DMDOFFSET, 0, 1);
+ rc_register (file, line,
+ 0, (unsigned char *)ptr + DMDOFFSET, 0, 1, RC_MALLOC);
#endif
free (ptr);
}
rc_history_index = 0;
++rc_history_count;
}
-#endif
+#endif /* DEBUG_RC_HISTORY */
#if defined (DEBUG_MEMORY_LEAKAGE) || defined (DEBUG_MALLOC_POOL) || \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
foo = (omapi_object_t *)0;
status = (*type -> allocator) (&foo, file, line);
tsize = type -> size;
- } else
+ } else {
status = ISC_R_NOMEMORY;
+ tsize = 0;
+ }
+
if (status == ISC_R_NOMEMORY) {
if (type -> sizer)
tsize = (*type -> sizer) (size);
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, h -> type -> rc_flag);
return ISC_R_SUCCESS;
}
omapi_object_dereference
(&hp -> outer, file, line);
/* if (!hp -> type -> freer) */
- rc_register (file, line, h, hp, 0, 1);
+ rc_register (file, line, h, hp,
+ 0, 1, hp -> type -> rc_flag);
if (hp -> type -> destroy)
(*(hp -> type -> destroy)) (hp, file, line);
if (hp -> type -> freer)
(*h) -> refcnt--;
/* if (!(*h) -> type -> freer) */
rc_register (file, line,
- h, *h, (*h) -> refcnt, 1);
+ h, *h, (*h) -> refcnt, 1,
+ (*h) -> type -> rc_flag);
}
} else {
(*h) -> refcnt--;
/* if (!(*h) -> type -> freer) */
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1,
+ (*h) -> type -> rc_flag);
}
*h = 0;
return ISC_R_SUCCESS;
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
}
--(*h) -> refcnt;
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt == 0)
dfree (*h, file, line);
*h = 0;
va_list l;
omapi_typed_data_t *new;
unsigned len;
- unsigned val;
- int intval;
- char *s;
+ unsigned val = 0;
+ int intval = 0;
+ char *s = NULL;
isc_result_t status;
- omapi_object_t *obj;
+ omapi_object_t *obj = NULL;
va_start (l, type);
obj = va_arg (l, omapi_object_t *);
break;
default:
+ va_end (l);
return ISC_R_INVALIDARG;
}
+ va_end (l);
new = dmalloc (len, file, line);
if (!new)
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
}
--((*h) -> refcnt);
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt <= 0 ) {
switch ((*h) -> type) {
case omapi_datatype_int:
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
}
--((*h) -> refcnt);
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt <= 0 ) {
dfree (*h, file, line);
}
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
}
--((*h) -> refcnt);
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt == 0) {
if ((*h) -> name)
omapi_data_string_dereference (&(*h) -> name,
}
*r = h;
h -> refcnt++;
- rc_register (file, line, r, h, h -> refcnt, 0);
+ rc_register (file, line, r, h, h -> refcnt, 0, RC_MISC);
return ISC_R_SUCCESS;
}
}
--((*h) -> refcnt);
- rc_register (file, line, h, *h, (*h) -> refcnt, 1);
+ rc_register (file, line, h, *h, (*h) -> refcnt, 1, RC_MISC);
if ((*h) -> refcnt <= 0 ) {
dfree (*h, file, line);
}
Subroutines that support the omapi extensible array type. */
/*
- * 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 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''.
Subroutines having to do with authentication. */
/*
- * Copyright (c) 1998-2000 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''.
#ifndef lint
static char ocopyright[] =
-"$Id: auth.c,v 1.4 2001/06/27 00:30:42 mellon Exp $ Copyright 1998-2000 The Internet Software Consortium.";
+"$Id: auth.c,v 1.5 2005/03/17 20:15:20 dhankins Exp $ Copyright 2004 Internet Systems Consortium.";
#endif
#include <omapip/omapip_p.h>
OMAPI_OBJECT_ALLOC (omapi_auth_key, omapi_auth_key_t, omapi_type_auth_key)
-
-struct hash_table *auth_key_hash = (struct hash_table *)0;
-HASH_FUNCTIONS_DECL (omapi_auth_key, const char *, omapi_auth_key_t)
+typedef struct hash omapi_auth_hash_t;
+HASH_FUNCTIONS_DECL (omapi_auth_key, const char *,
+ omapi_auth_key_t, omapi_auth_hash_t)
+omapi_auth_hash_t *auth_key_hash;
+HASH_FUNCTIONS (omapi_auth_key, const char *, omapi_auth_key_t,
+ omapi_auth_hash_t,
+ omapi_auth_key_reference, omapi_auth_key_dereference)
isc_result_t omapi_auth_key_new (omapi_auth_key_t **o, const char *file,
int line)
omapi_auth_key_dereference (&tk, MDL);
}
} else {
- auth_key_hash =
- new_hash ((hash_reference)omapi_auth_key_reference,
- (hash_dereference)omapi_auth_key_dereference,
- 1, MDL);
- if (!auth_key_hash)
+ if (!omapi_auth_key_new_hash (&auth_key_hash, 1, MDL))
return ISC_R_NOMEMORY;
}
omapi_auth_key_hash_add (auth_key_hash, a -> name, 0, a, MDL);
return ISC_R_SUCCESS;
}
-
-HASH_FUNCTIONS (omapi_auth_key, const char *, omapi_auth_key_t)
Buffer access functions for the object management protocol... */
/*
- * Copyright (c) 1999-2001 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''.
Subroutines for dealing with connections. */
/*
- * Copyright (c) 1999-2001 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''.
omapi_value_t *name = (omapi_value_t *)0;
omapi_value_t *algorithm = (omapi_value_t *)0;
omapi_value_t *key = (omapi_value_t *)0;
- int algorithm_id;
- char *name_str;
+ int algorithm_id = UNKNOWN_KEYALG;
+ char *name_str = NULL;
isc_result_t status = ISC_R_SUCCESS;
if (status == ISC_R_SUCCESS)
can't be assumed to be aligned. */
/*
- * 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''.
#ifndef lint
static char copyright[] =
-"$Id: convert.c,v 1.1 2000/08/01 22:34:36 neild Exp $ Copyright (c) 1996-1999 The Internet Software Consortium. All rights reserved.\n";
+"$Id: convert.c,v 1.2 2005/03/17 20:15:21 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
u_int32_t getULong (buf)
const unsigned char *buf;
{
- unsigned long ibuf;
+ u_int32_t ibuf;
memcpy (&ibuf, buf, sizeof (u_int32_t));
return ntohl (ibuf);
int32_t getLong (buf)
const unsigned char *buf;
{
- long ibuf;
+ int32_t ibuf;
memcpy (&ibuf, buf, sizeof (int32_t));
return ntohl (ibuf);
number = getUShort (buf);
else if (width == 4)
number = getULong (buf);
+ else
+ return 0;
do {
column = newcolumn;
number = getUShort (inbuf);
else if (width == 4)
number = getULong (inbuf);
+ else
+ return 0;
for (i = power - 1 ; i >= 0; i--) {
outbuf [i] = h2a [number % base];
I/O dispatcher. */
/*
- * Copyright (c) 1999-2000 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''.
#include <omapip/omapip_p.h>
static omapi_io_object_t omapi_io_states;
-u_int32_t cur_time;
+TIME cur_time;
OMAPI_OBJECT_ALLOC (omapi_io,
omapi_io_object_t, omapi_type_io_object)
int desc;
struct timeval now, to;
omapi_io_object_t *io, *prev;
- isc_result_t status;
omapi_waiter_object_t *waiter;
omapi_object_t *tmp = (omapi_object_t *)0;
if (len)
omapi_value_dereference (&ov, MDL);
}
- status = (*(io -> reaper)) (io -> inner);
+ (*(io -> reaper)) (io -> inner);
if (prev) {
omapi_io_dereference (&prev -> next, MDL);
if (io -> next)
if (io -> readfd &&
(desc = (*(io -> readfd)) (tmp)) >= 0) {
if (FD_ISSET (desc, &r))
- status = ((*(io -> reader)) (tmp));
- /* XXX what to do with status? */
+ ((*(io -> reader)) (tmp));
}
/* Same deal for write descriptors. */
(desc = (*(io -> writefd)) (tmp)) >= 0)
{
if (FD_ISSET (desc, &w))
- status = ((*(io -> writer)) (tmp));
- /* XXX what to do with status? */
+ ((*(io -> writer)) (tmp));
}
omapi_object_dereference (&tmp, MDL);
}
prev = (omapi_io_object_t *)0;
for (io = omapi_io_states.next; io; io = io -> next) {
if (io -> reaper) {
- if (io -> inner)
- status = (*(io -> reaper)) (io -> inner);
- if (!io -> inner || status != ISC_R_SUCCESS) {
+ if (!io -> inner ||
+ ((*(io -> reaper)) (io -> inner) !=
+ ISC_R_SUCCESS)) {
omapi_io_object_t *tmp =
(omapi_io_object_t *)0;
/* Save a reference to the next
return ISC_R_NOTFOUND;
}
+/* omapi_io_destroy (object, MDL);
+ *
+ * Find the requsted IO [object] and remove it from the list of io
+ * states, causing the cleanup functions to destroy it. Note that we must
+ * hold a reference on the object while moving its ->next reference and
+ * removing the reference in the chain to the target object...otherwise it
+ * may be cleaned up from under us.
+ */
isc_result_t omapi_io_destroy (omapi_object_t *h, const char *file, int line)
{
- omapi_io_object_t *obj, *p, *last;
+ omapi_io_object_t *obj = NULL, *p, *last = NULL, **holder;
if (h -> type != omapi_type_io_object)
return ISC_R_INVALIDARG;
- obj = (omapi_io_object_t *)h;
-
/* remove from the list of I/O states */
for (p = omapi_io_states.next; p; p = p -> next) {
- if (p == obj) {
- omapi_io_dereference (&last -> next, MDL);
- omapi_io_reference (&last -> next, p -> next, MDL);
- omapi_io_dereference (&p, MDL);
- break;
+ if (p == (omapi_io_object_t *)h) {
+ omapi_io_reference (&obj, p, MDL);
+
+ if (last)
+ holder = &last -> next;
+ else
+ holder = &omapi_io_states.next;
+
+ omapi_io_dereference (holder, MDL);
+
+ if (obj -> next) {
+ omapi_io_reference (holder, obj -> next, MDL);
+ omapi_io_dereference (&obj -> next, MDL);
+ }
+
+ return omapi_io_dereference (&obj, MDL);
}
last = p;
}
-
- return ISC_R_SUCCESS;
+
+ return ISC_R_NOTFOUND;
}
isc_result_t omapi_io_signal_handler (omapi_object_t *h,
/*
* Copyright (c) 1995 RadioMail Corporation.
- * Copyright (c) 1996-2000 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.
*/
#ifndef lint
static char copyright[] =
-"$Id: errwarn.c,v 1.9 2000/09/29 20:01:49 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium. All rights reserved.\n";
+"$Id: errwarn.c,v 1.10 2005/03/17 20:15:21 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
do_percentm (fbuf, fmt);
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
/* Also log it to stderr? */
if (log_perror) {
- write (2, mbuf, strlen (mbuf));
- write (2, "\n", 1);
+ write (STDERR_FILENO, mbuf, strlen (mbuf));
+ write (STDERR_FILENO, "\n", 1);
}
#if !defined (NOMINUM)
do_percentm (fbuf, fmt);
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
#endif
if (log_perror) {
- write (2, mbuf, strlen (mbuf));
- write (2, "\n", 1);
+ write (STDERR_FILENO, mbuf, strlen (mbuf));
+ write (STDERR_FILENO, "\n", 1);
}
return 0;
do_percentm (fbuf, fmt);
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
#endif
if (log_perror) {
- write (2, mbuf, strlen (mbuf));
- write (2, "\n", 1);
+ write (STDERR_FILENO, mbuf, strlen (mbuf));
+ write (STDERR_FILENO, "\n", 1);
}
return 0;
do_percentm (fbuf, fmt);
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
va_start (list, fmt);
vsnprintf (mbuf, sizeof mbuf, fbuf, list);
va_end (list);
#endif
if (log_perror) {
- write (2, mbuf, strlen (mbuf));
- write (2, "\n", 1);
+ write (STDERR_FILENO, mbuf, strlen (mbuf));
+ write (STDERR_FILENO, "\n", 1);
}
return 0;
Subroutines that support the generic object. */
/*
- * Copyright (c) 1999-2001 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''.
/* Look up the specified name in our list of objects. */
for (i = 0; i < g -> nvalues; i++) {
+ if (!g -> values[i])
+ continue;
if (!omapi_data_string_cmp (name, g -> values [i] -> name)) {
/* If this is a name/null value pair, this is the
same as if there were no value that matched
Functions for maintaining handles on objects. */
/*
- * Copyright (c) 1999-2000 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''.
Routines for manipulating hash tables... */
/*
- * Copyright (c) 1995-2000 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''.
#ifndef lint
static char copyright[] =
-"$Id: hash.c,v 1.4 2001/08/10 10:50:22 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: hash.c,v 1.5 2005/03/17 20:15:22 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
static int do_hash (const unsigned char *, unsigned, unsigned);
static int do_case_hash (const unsigned char *, unsigned, unsigned);
-struct hash_table *new_hash_table (count, file, line)
+int new_hash_table (tp, count, file, line)
+ struct hash_table **tp;
int count;
const char *file;
int line;
{
- struct hash_table *rval = dmalloc (sizeof (struct hash_table)
- - (DEFAULT_HASH_SIZE
- * sizeof (struct hash_bucket *))
- + (count
- * sizeof (struct hash_bucket *)),
- file, line);
+ struct hash_table *rval;
+
+ if (!tp) {
+ log_error ("%s(%d): new_hash_table called with null pointer.",
+ file, line);
+#if defined (POINTER_DEBUG)
+ abort ();
+#endif
+ return 0;
+ }
+ if (*tp) {
+ log_error ("%s(%d): non-null target for new_hash_table.",
+ file, line);
+#if defined (POINTER_DEBUG)
+ abort ();
+#endif
+ }
+ rval = dmalloc (sizeof (struct hash_table) -
+ (DEFAULT_HASH_SIZE * sizeof (struct hash_bucket *)) +
+ (count * sizeof (struct hash_bucket *)), file, line);
+ if (!rval)
+ return 0;
rval -> hash_count = count;
- return rval;
+ *tp = rval;
+ return 1;
}
-void free_hash_table (ptr, file, line)
- struct hash_table *ptr;
+void free_hash_table (tp, file, line)
+ struct hash_table **tp;
const char *file;
int line;
{
int i;
struct hash_bucket *hbc, *hbn = (struct hash_bucket *)0;
+ struct hash_table *ptr = *tp;
#if defined (DEBUG_MEMORY_LEAKAGE) || \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
#endif
dfree ((VOIDPTR)ptr, MDL);
+ *tp = (struct hash_table *)0;
}
struct hash_bucket *free_hash_buckets;
free_hash_buckets = ptr;
}
-struct hash_table *new_hash (hash_reference referencer,
- hash_dereference dereferencer,
- int casep, const char *file, int line)
+int new_hash (struct hash_table **rp,
+ hash_reference referencer,
+ hash_dereference dereferencer,
+ int casep, const char *file, int line)
{
- struct hash_table *rv = new_hash_table (DEFAULT_HASH_SIZE, file, line);
- if (!rv)
- return rv;
- memset (&rv -> buckets [0], 0,
+ if (!new_hash_table (rp, DEFAULT_HASH_SIZE, file, line))
+ return 0;
+ memset (&(*rp) -> buckets [0], 0,
DEFAULT_HASH_SIZE * sizeof (struct hash_bucket *));
- rv -> referencer = referencer;
- rv -> dereferencer = dereferencer;
+ (*rp) -> referencer = referencer;
+ (*rp) -> dereferencer = dereferencer;
if (casep) {
- rv -> cmp = casecmp;
- rv -> do_hash = do_case_hash;
+ (*rp) -> cmp = casecmp;
+ (*rp) -> do_hash = do_case_hash;
} else {
- rv -> cmp = (hash_comparator_t)memcmp;
- rv -> do_hash = do_hash;
+ (*rp) -> cmp = (hash_comparator_t)memcmp;
+ (*rp) -> do_hash = do_hash;
}
- return rv;
+ return 1;
}
static int do_case_hash (name, len, size)
Subroutines that support the generic listener object. */
/*
- * Copyright (c) 1999-2001 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''.
Subroutines for dealing with message objects. */
/*
- * Copyright (c) 1999-2000 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''.
omapi_object_reference ((omapi_object_t **)&n,
(omapi_object_t *)m -> next, MDL);
omapi_object_dereference ((omapi_object_t **)&m -> next, MDL);
+ omapi_object_dereference ((omapi_object_t **)&n -> prev, MDL);
}
if (m -> prev) {
omapi_message_object_t *tmp = (omapi_message_object_t *)0;
case OMAPI_OP_UPDATE:
if (m && m -> object) {
- omapi_object_reference (&object, m -> object, MDL);
+ status = omapi_object_reference (&object, m -> object,
+ MDL);
} else {
status = omapi_handle_lookup (&object, message -> h);
if (status != ISC_R_SUCCESS) {
status = omapi_protocol_send_status
(po, message -> id_object, ISC_R_SUCCESS,
message -> id, (char *)0);
- if (m)
+ if (m) {
omapi_signal ((omapi_object_t *)m,
"status", ISC_R_SUCCESS,
(omapi_typed_data_t *)0);
+ omapi_message_unregister ((omapi_object_t *)m);
+ }
+
+ omapi_object_dereference (&object, MDL);
+
return status;
case OMAPI_OP_NOTIFY:
omapi_signal ((omapi_object_t *)m, "status", waitstatus, tv);
if (status == ISC_R_SUCCESS)
omapi_value_dereference (&tv, MDL);
+
+ omapi_message_unregister((omapi_object_t *)m);
+
return ISC_R_SUCCESS;
case OMAPI_OP_DELETE:
Subroutines that support minires tracing... */
/*
- * 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''.
*/
int trace_mr_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
unsigned int trace_mr_res_randomid (unsigned int);
-extern time_t cur_time;
+extern TIME cur_time;
#if defined (TRACING)
void trace_mr_init ()
iov [1].buf = (char *)&flags;
iov [2].len = len;
iov [2].buf = msg;
- trace_write_packet_iov (trace_mr_output, 2, iov, MDL);
+ trace_write_packet_iov (trace_mr_output, 3, iov, MDL);
}
#endif
return rv;
.\" omapi.3
.\"
-.\" Copyright (c) 2000-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) 2000-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''.
strlen(secret) + 1);
.fi
.PP
-The keyname, algorithm and secret must all match what is specified in
-the server's dhcpd.conf file:
+The keyname, algorithm and must all match what is specified in the server's
+dhcpd.conf file, excepting that the secret should appear in 'raw' form, not
+in base64 as it would in dhcpd.conf:
.PP
.nf
key "a-key-name" {
# Set the omapi-key value to use
# authenticated connections
- omapi-key "a-key-name";
+ omapi-key a-key-name;
.fi
.PP
The authenticator handle that is created by the call to
Functions supporting the object management protocol... */
/*
- * Copyright (c) 1999-2000 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''.
u_int32_t vlen;
u_int32_t th;
#if defined (DEBUG_MEMORY_LEAKAGE)
- unsigned long previous_outstanding = 0xBEADCAFE;
- unsigned long connect_outstanding = 0xBEADCAFE;
+ unsigned long previous_outstanding = 0xDEADBEEF;
+ unsigned long connect_outstanding = 0xDEADBEEF;
#endif
if (h -> type != omapi_type_protocol) {
/* If we get a disconnect, dump memory usage. */
if (!strcmp (name, "disconnect")) {
#if defined (DEBUG_MEMORY_LEAKAGE)
- if (connect_outstanding != 0xBEADCAFE) {
+ if (connect_outstanding != 0xDEADBEEF) {
log_info ("generation %ld: %ld new, %ld outstanding, %ld%s",
dmalloc_generation,
dmalloc_outstanding - previous_outstanding,
case omapi_protocol_header_wait:
#if defined (DEBUG_MEMORY_LEAKAGE)
- if (previous_outstanding != 0xBEADCAFE) {
+ if (previous_outstanding != 0xDEADBEEF) {
log_info ("%s %ld: %ld new, %ld outstanding, %ld%s",
"generation", dmalloc_generation,
dmalloc_outstanding - previous_outstanding,
dump_rc_history ();
#endif
#if defined (DEBUG_MEMORY_LEAKAGE)
- previous_outstanding = 0xBEADCAFE;
+ previous_outstanding = 0xDEADBEEF;
#endif
/* Now wait for the next message. */
goto to_header_wait;
while (p -> remote_auth_list) {
omapi_remote_auth_t *r = p -> remote_auth_list -> next;
- omapi_object_dereference (&r -> a, file, line);
- dfree (r, file, line);
p -> remote_auth_list = r;
+ if (r) {
+ omapi_object_dereference (&r -> a, file, line);
+ dfree (r, file, line);
+ }
}
return ISC_R_SUCCESS;
}
until the actual libisc merge. */
/*
- * Copyright (c) 1999-2001 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''.
const char *isc_result_totext (isc_result_t result)
{
+ static char ebuf[40];
+
if (result >= ISC_R_SUCCESS && result < ISC_R_NRESULTS)
return text [result];
- return "unknown error.";
+ sprintf(ebuf, "unknown error: %d", result);
+ return ebuf;
}
Subroutines providing general support for objects. */
/*
- * Copyright (c) 1999-2001 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''.
omapi_connection_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof
- (omapi_connection_object_t), 0);
+ (omapi_connection_object_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
omapi_listener_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (omapi_listener_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
omapi_io_signal_handler,
omapi_io_stuff_values,
0, 0, 0, 0, 0, 0,
- sizeof (omapi_io_object_t), 0);
+ sizeof (omapi_io_object_t),
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
omapi_generic_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (omapi_generic_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
omapi_protocol_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (omapi_protocol_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
omapi_protocol_listener_signal,
omapi_protocol_listener_stuff,
0, 0, 0, 0, 0, 0,
- sizeof (omapi_protocol_listener_object_t), 0));
+ sizeof (omapi_protocol_listener_object_t), 0, RC_MISC));
if (status != ISC_R_SUCCESS)
return status;
omapi_message_stuff_values,
0, 0, 0, 0, 0, 0,
sizeof (omapi_message_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
omapi_waiter_signal_handler, 0,
0, 0, 0, 0, 0, 0,
sizeof (omapi_waiter_object_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
omapi_auth_key_stuff_values,
omapi_auth_key_lookup,
0, 0, 0, 0, 0,
- sizeof (omapi_auth_key_t), 0);
+ sizeof (omapi_auth_key_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
return status;
size_t size,
isc_result_t (*initialize)
(omapi_object_t *,
- const char *, int))
+ const char *, int),
+ int rc_flag)
{
omapi_object_type_t *t;
t -> freer = freer;
t -> allocator = allocator;
t -> initialize = initialize;
+ t -> rc_flag = rc_flag;
omapi_object_types = t;
if (type)
*type = t;
Test code for omapip... */
/*
- * Copyright (c) 1999-2000 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''.
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
+#include <string.h>
#include <isc-dhcp/result.h>
#include <sys/time.h>
#include <omapip/omapip.h>
Convert non-ISC result codes to ISC result codes. */
/*
- * 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 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''.
transactions... */
/*
- * 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''.
*/
# Makefile.dist
#
-# 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/
#
CATMANPAGES = dhcrelay.cat8
.\" dhcrelay.8
.\"
-.\" Copyright (c) 1997, 1998 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: dhcrelay.8,v 1.9 2002/06/09 23:01:03 murray Exp $
+.\" $Id: dhcrelay.8,v 1.10 2005/03/17 20:15:24 dhankins Exp $
.\"
.TH dhcrelay 8
.SH NAME
.B -a
]
[
+.B -c
+.I count
+]
+[
.B -A
.I length
]
.I ...serverN
]
.SH DESCRIPTION
-The Internet Software Consortium DHCP Relay Agent, dhcrelay, provides a
+The Internet Systems Consortium DHCP Relay Agent, dhcrelay, provides a
means for relaying DHCP and BOOTP requests from a subnet to which
no DHCP server is directly connected to one or more DHCP servers on other
subnets.
forwarding such responses back to the client.
.PP
The agent option field will contain two agent options: the Circuit ID
-suboption and the Agent ID suboption. Currently, the Circuit ID will
+suboption and the Remote ID suboption. Currently, the Circuit ID will
be the printable name of the interface on which the client request was
-received. The Agent ID will be the value that the relay agent stores
-in the DHCP packet's giaddr field. The client supports inclusion of
-a Remote ID suboption as well, but this is not used by default.
+received. The client supports inclusion of a Remote ID suboption as
+well, but this is not used by default.
.PP
-.I Note:
-The Agent ID suboption is not defined in the current Relay Agent
-Information Option draft (draft-ietf-dhc-agent-options-03.txt), but
-has been proposed for inclusion in the next draft.
+When forwarding packets, dhcrelay discards packets which have reached a hop
+count of 10. If a lower or higher threshold (up to 255) is desired, depending
+on your environment, you can specify the max hop count threshold as a number
+following the
+.B -c
+option.
.PP
Relay Agent options are added to a DHCP packet without the knowledge
of the DHCP client. The client may have filled the DHCP packet
current Agent Options draft requires that the relay agent use a
maximum packet size of 576 bytes.
.PP
-It is recommended that with the Internet Software Consortium DHCP
+It is recommended that with the Internet Systems Consortium DHCP
server, the maximum packet size be set to about 1400, allowing plenty
of extra space in which the relay agent can put the agent option
field, while still fitting into the Ethernet MTU size. This can be
.I discard
it.
.PP
-Which of these behaviours is followed by the Internet Software
+Which of these behaviours is followed by the Internet Systems
Consortium DHCP Relay Agent may be configured with the
.B -m
flag, followed by one of the four keywords specified in
topology, which requires that it have a configuration file.
.SH AUTHOR
.B dhcrelay(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/isc.
To learn more about Vixie
DHCP/BOOTP Relay Agent. */
/*
- * Copyright (c) 1997-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 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 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 ocopyright[] =
-"$Id: dhcrelay.c,v 1.52 2001/04/19 16:48:53 mellon Exp $ Copyright (c) 1997-2000 Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcrelay.c,v 1.53 2005/03/17 20:15:24 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
static void usage PROTO ((void));
-TIME cur_time;
TIME default_lease_time = 43200; /* 12 hours... */
TIME max_lease_time = 86400; /* 24 hours... */
struct tree_cache *global_options [256];
int add_agent_options = 0; /* If nonzero, add relay agent options. */
int drop_agent_mismatches = 0; /* If nonzero, drop server replies that
- don't contain a Relay Agent Information
- option whose Agent ID suboption matches
- our giaddr. */
+ don't have matching circuit-id's. */
int corrupt_agent_options = 0; /* Number of packets dropped because
relay agent information option was bad. */
int missing_agent_option = 0; /* Number of packets dropped because no
did not match any known circuit ID. */
int missing_circuit_id = 0; /* Circuit ID option in matching RAI option
was missing. */
+int max_hop_count = 10; /* Maximum hop count */
+
/* Maximum size of a packet with agent options added. */
int dhcp_max_agent_option_packet_length = 576;
struct sockaddr_in to;
} *servers;
-static char copyright [] = "Copyright 1997-2000 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 Relay Agent";
-static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
+static char message [] = "Internet Systems Consortium DHCP Relay Agent";
+static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/";
int main (argc, argv, envp)
int argc;
quiet_interface_discovery = 1;
} else if (!strcmp (argv [i], "-a")) {
add_agent_options = 1;
+ } else if (!strcmp (argv [i], "-c")) {
+ int hcount;
+ if (++i == argc)
+ usage ();
+ hcount = atoi(argv[i]);
+ if (hcount <= 255)
+ max_hop_count= hcount;
+ else
+ usage ();
} else if (!strcmp (argv [i], "-A")) {
if (++i == argc)
usage ();
struct server_list *sp;
struct sockaddr_in to;
struct interface_info *out;
- struct hardware hto;
+ struct hardware hto, *htop;
if (packet -> hlen > sizeof packet -> chaddr) {
log_info ("Discarding packet with invalid hlen.");
can_unicast_without_arp (out)) {
to.sin_addr = packet -> yiaddr;
to.sin_port = remote_port;
+
+ /* and hardware address is not broadcast */
+ htop = &hto;
} else {
to.sin_addr.s_addr = htonl (INADDR_BROADCAST);
to.sin_port = remote_port;
+
+ /* hardware address is broadcast */
+ htop = NULL;
}
to.sin_family = AF_INET;
#ifdef HAVE_SA_LEN
if (send_packet (out,
(struct packet *)0,
packet, length, out -> primary_address,
- &to, &hto) < 0) {
+ &to, htop) < 0) {
++server_packet_errors;
} else {
log_debug ("forwarded BOOTREPLY for %s to %s",
that set giaddr, so we won't see it. */
if (!packet -> giaddr.s_addr)
packet -> giaddr = ip -> primary_address;
+ if (packet -> hops < max_hop_count)
+ packet -> hops = packet -> hops + 1;
+ else
+ return;
/* Otherwise, it's a BOOTREQUEST, so forward it to all the
servers. */
static void usage ()
{
- log_fatal ("Usage: dhcrelay [-p <port>] [-d] [-D] [-i %s%s%s",
- "interface]\n ",
- "[-q] [-a] [-A length] [-m append|replace|forward|discard]\n",
- " [server1 [... serverN]]");
+ log_fatal ("Usage: dhcrelay [-p <port>] [-d] [-D] [-i %s%s%s%s",
+ "interface] [-q] [-a]\n ",
+ "[-c count] [-A length] ",
+ "[-m append|replace|forward|discard]\n",
+ " [server1 [... serverN]]");
}
int write_lease (lease)
return 0;
}
+/* As a wise man once said in dhcpctl/omshell.c: */
+/* Sigh */
+isc_result_t dhcp_set_control_state (control_object_state_t oldstate,
+ control_object_state_t newstate)
+{
+ return ISC_R_SUCCESS;
+}
+
#endif
/* Strip any Relay Agent Information options from the DHCP packet
- option buffer. If an RAI option is found whose Agent ID matches
- the giaddr (i.e., ours), try to look up the outgoing interface
- based on the circuit ID suboption. */
+ option buffer. If there is a circuit ID suboption, look up the
+ outgoing interface based upon it. */
int strip_relay_agent_options (in, out, packet, length)
struct interface_info *in, **out;
{
int i = 0;
u_int8_t *circuit_id = 0;
- unsigned circuit_id_len;
+ unsigned circuit_id_len = 0;
struct interface_info *ip;
while (i < len) {
# Makefile.dist
#
-# 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/
#
CATMANPAGES = dhcpd.cat8 dhcpd.conf.cat5 dhcpd.leases.cat5
BOOTP Protocol support. */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: bootp.c,v 1.71 2001/06/27 00:31:00 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bootp.c,v 1.72 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (packet -> raw -> op != BOOTREQUEST)
return;
- sprintf (msgbuf, "BOOTREQUEST from %s via %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf, "BOOTREQUEST from %s via %s",
print_hw_addr (packet -> raw -> htype,
packet -> raw -> hlen,
packet -> raw -> chaddr),
ack_lease (packet, lease, 0, 0, msgbuf, 0);
goto out;
}
- /* XXX just ignore BOOTREQUESTS from unknown clients if
- XXX we can't allocate IP addresses for them. */
-#if 0
- log_info ("%s: no available leases", msgbuf);
-#endif
+
+ /* We couldn't find an address to give this bootp client. */
+ log_info ("%s: BOOTP from unknown client and no dynamic leases",
+ msgbuf);
goto out;
}
Handling for client classes. */
/*
- * Copyright (c) 1998-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: class.c,v 1.31 2001/06/27 00:31:02 mellon Exp $ Copyright (c) 1998-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: class.c,v 1.32 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
MDL);
data_string_forget (&data, MDL);
if (!class -> hash)
- class -> hash = new_hash (0, 0, 0, MDL);
+ class_new_hash (&class -> hash, 0, MDL);
class_hash_add (class -> hash,
(const char *)
nc -> hash_string.data,
Parser for dhcpd config file... */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.147 2001/08/10 10:50:44 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.148 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (result != ulen)
log_fatal ("%s: short read of %d bytes instead of %d.",
filename, ulen, result);
+ close (file);
memfile:
/* If we're recording, write out the filename and file contents. */
if (trace_record ())
new_parse (&cfile, -1, fbuf, ulen, filename, 0); /* XXX */
#else
new_parse (&cfile, file, (char *)0, 0, filename, 0);
+ close (file);
#endif
if (leasep)
status = lease_file_subparse (cfile);
#if defined (TRACING)
dfree (dbuf, MDL);
#endif
- close (file);
return status;
}
next_token (&val, (unsigned *)0, cfile);
cache = (struct option_cache *)0;
if (parse_fixed_addr_param (&cache, cfile)) {
- if (host_decl)
- host_decl -> fixed_addr = cache;
- else {
+ if (host_decl) {
+ if (host_decl -> fixed_addr) {
+ option_cache_dereference (&cache, MDL);
+ parse_warn (cfile,
+ "Only one fixed address%s",
+ " declaration per host.");
+ } else {
+ host_decl -> fixed_addr = cache;
+ }
+ } else {
parse_warn (cfile,
"fixed-address parameter not %s",
"allowed here.");
skip_to_semi (cfile);
return declaration;
}
- parse_address_range (cfile, group, type, (struct pool *)0);
+ parse_address_range (cfile, group, type, (struct pool *)0,
+ (struct lease **)0);
return declaration;
case TOKEN_NOT:
break;
case FAILOVER:
- if (type != ROOT_GROUP && type != SHARED_NETWORK) {
+ if (type != ROOT_GROUP && type != SHARED_NET_DECL) {
parse_warn (cfile, "failover peers may only be %s",
"defined in shared-network");
log_error ("declarations and the outer scope.");
return;
}
} while (token != RBRACE);
-
- if (peer -> i_am == primary && !peer -> hba) {
- parse_warn (cfile,
+
+ /* me.address can be null; the failover link initiate code tries to
+ * derive a reasonable address to use.
+ */
+ if (!peer -> partner.address)
+ parse_warn (cfile, "peer address may not be omitted");
+
+ /* XXX - when/if we get a port number assigned, just set as default */
+ if (!peer -> me.port)
+ parse_warn (cfile, "local port may not be omitted");
+ if (!peer -> partner.port)
+ parse_warn (cfile, "peer port may not be omitted");
+
+ if (peer -> i_am == primary) {
+ if (!peer -> hba) {
+ parse_warn (cfile,
"primary failover server must have hba or split.");
+ } else if (!peer -> mclt) {
+ parse_warn (cfile,
+ "primary failover server must have mclt.");
+ }
+ }
+ if (!peer -> me.max_flying_updates) {
+ peer -> me.max_flying_updates = 100;
+ }
+ if (!peer -> me.max_response_delay) {
+ peer -> me.max_response_delay = 60;
}
if (type == SHARED_NET_DECL) {
}
#endif /* defined (FAILOVER_PROTOCOL) */
+/* Permit_list_match returns 1 if every element of the permit list in lhs
+ also appears in rhs. Note that this doesn't by itself mean that the
+ two lists are equal - to check for equality, permit_list_match has to
+ return 1 with (list1, list2) and with (list2, list1). */
+
+int permit_list_match (struct permit *lhs, struct permit *rhs)
+{
+ struct permit *plp, *prp;
+ int matched;
+
+ if (!lhs)
+ return 1;
+ if (!rhs)
+ return 0;
+ for (plp = lhs; plp; plp = plp -> next) {
+ matched = 0;
+ for (prp = rhs; prp; prp = prp -> next) {
+ if (prp -> type == plp -> type &&
+ (prp -> type != permit_class ||
+ prp -> class == plp -> class)) {
+ matched = 1;
+ break;
+ }
+ }
+ if (!matched)
+ return 0;
+ }
+ return 1;
+}
+
void parse_pool_statement (cfile, group, type)
struct parse *cfile;
struct group *group;
enum dhcp_token token;
const char *val;
int done = 0;
- struct pool *pool, **p;
+ struct pool *pool, **p, *pp;
struct permit *permit;
struct permit **permit_head;
int declaration = 0;
isc_result_t status;
+ struct lease *lpchain = (struct lease *)0, *lp;
pool = (struct pool *)0;
status = pool_allocate (&pool, MDL);
log_fatal ("no memory for pool: %s",
isc_result_totext (status));
- if (!clone_group (&pool -> group, group, MDL))
- log_fatal ("can't clone pool group.");
-
if (type == SUBNET_DECL)
shared_network_reference (&pool -> shared_network,
group -> subnet -> shared_network,
shared_network_reference (&pool -> shared_network,
group -> shared_network, MDL);
+ if (!clone_group (&pool -> group, pool -> shared_network -> group, MDL))
+ log_fatal ("can't clone pool group.");
+
#if defined (FAILOVER_PROTOCOL)
/* Inherit the failover peer from the shared network. */
if (pool -> shared_network -> failover_peer)
case RANGE:
next_token (&val, (unsigned *)0, cfile);
- parse_address_range (cfile, group, type, pool);
+ parse_address_range (cfile, group, type,
+ pool, &lpchain);
break;
case ALLOW:
permit_head = &pool -> permit_list;
}
break;
+ case KNOWN_CLIENTS:
+ permit -> type = permit_known_clients;
+ break;
+
case UNKNOWN_CLIENTS:
permit -> type = permit_unknown_clients;
break;
because BOOTP doesn't support leases, and failover absolutely
depends on lease timing. */
if (pool -> failover_peer) {
- for (permit = pool -> permit_list;
- permit; permit = permit -> next) {
+ /* This search order matches the search orders later in
+ * execution - deny first, if not denied, check permit
+ * list. A dynamic bootp client may be known or unknown,
+ * it may belong to a member of a class, but it definitely
+ * will not be authenticated since that requires DHCP
+ * to work. So a dynamic bootp client is definitely not
+ * an authenticated client, and we can't say for sure about
+ * anything else.
+ *
+ * So we nag the user.
+ */
+ for (permit = pool -> prohibit_list; permit;
+ permit = permit -> next) {
if (permit -> type == permit_dynamic_bootp_clients ||
- permit -> type == permit_all_clients) {
- dynamic_bootp_clash:
- parse_warn (cfile,
- "pools with failover peers %s",
- "may not permit dynamic bootp.");
- log_error ("Either write a \"no failover\" %s",
- "statement and use disjoint");
- log_error ("pools, or don't permit dynamic%s",
- " bootp.");
- log_error ("This is a protocol limitation,%s",
- " not an ISC DHCP limitation, so");
- log_error ("please don't request an %s",
- "enhancement or ask why this is.");
- goto clash_testing_done;
- }
+ permit -> type == permit_unauthenticated_clients ||
+ permit -> type == permit_all_clients)
+ break;
}
- if (!pool -> permit_list) {
- if (!pool -> prohibit_list)
- goto dynamic_bootp_clash;
+ if (!permit) {
+ permit = pool -> permit_list;
+ do {
+ if (!permit ||
+ permit -> type !=
+ permit_authenticated_clients) {
+ parse_warn (cfile,
+ "pools with failover peers %s",
+ "may not permit dynamic bootp.");
+ log_error ("Either write a \"%s\" %s",
+ "no failover",
+ "statement and use disjoint");
+ log_error ("pools, or%s (%s) %s",
+ " don't permit dynamic bootp",
+ "\"deny dynamic bootp clients;\"",
+ "in this pool.");
+ log_error ("This is a protocol,%s %s",
+ " limitation, not an ISC DHCP",
+ "limitation, so");
+ log_error ("please don't request an %s",
+ "enhancement or ask why this is.");
- for (permit = pool -> prohibit_list; permit;
- permit = permit -> next) {
- if (permit -> type ==
- permit_dynamic_bootp_clients ||
- permit -> type == permit_all_clients)
- goto clash_testing_done;
- }
+ break;
+ }
+
+ permit = permit -> next;
+ } while (permit);
}
}
- clash_testing_done:
#endif /* FAILOVER_PROTOCOL */
- p = &pool -> shared_network -> pools;
- for (; *p; p = &((*p) -> next))
- ;
- pool_reference (p, pool, MDL);
+ /* See if there's already a pool into which we can merge this one. */
+ for (pp = pool -> shared_network -> pools; pp; pp = pp -> next) {
+ struct lease *l;
+
+ if (pp -> group -> statements != pool -> group -> statements)
+ continue;
+#if defined (FAILOVER_PROTOCOL)
+ if (pool -> failover_peer != pp -> failover_peer)
+ continue;
+#endif
+ if (!permit_list_match (pp -> permit_list,
+ pool -> permit_list) ||
+ !permit_list_match (pool -> permit_list,
+ pp -> permit_list) ||
+ !permit_list_match (pp -> prohibit_list,
+ pool -> prohibit_list) ||
+ !permit_list_match (pool -> prohibit_list,
+ pp -> prohibit_list))
+ continue;
+
+ /* Okay, we can merge these two pools. All we have to
+ do is fix up the leases, which all point to their pool. */
+ for (lp = lpchain; lp; lp = lp -> next) {
+ pool_dereference (&lp -> pool, MDL);
+ pool_reference (&lp -> pool, pp, MDL);
+ }
+ break;
+ }
+
+ /* If we didn't succeed in merging this pool into another, put
+ it on the list. */
+ if (!pp) {
+ p = &pool -> shared_network -> pools;
+ for (; *p; p = &((*p) -> next))
+ ;
+ pool_reference (p, pool, MDL);
+ }
+
+ /* Don't allow a pool declaration with no addresses, since it is
+ probably a configuration error. */
+ if (!lpchain) {
+ parse_warn (cfile, "Pool declaration with no address range.");
+ log_error ("Pool declarations must always contain at least");
+ log_error ("one range statement.");
+ }
+
+ /* Dereference the lease chain. */
+ lp = (struct lease *)0;
+ while (lpchain) {
+ lease_reference (&lp, lpchain, MDL);
+ lease_dereference (&lpchain, MDL);
+ if (lp -> next) {
+ lease_reference (&lpchain, lp -> next, MDL);
+ lease_dereference (&lp -> next, MDL);
+ lease_dereference (&lp, MDL);
+ }
+ }
pool_dereference (&pool, MDL);
}
struct executable_statement *stmt = (struct executable_statement *)0;
struct expression *expr;
int new = 1;
- isc_result_t status;
+ isc_result_t status = ISC_R_FAILURE;
int deleted = 0;
int dynamic = 0;
sizeof class -> billed_leases));
}
data_string_copy (&class -> hash_string, &data, MDL);
- if (!pc -> hash)
- pc -> hash =
- new_hash ((hash_reference)
- omapi_object_reference,
- (hash_dereference)
- omapi_object_dereference,
- 0, MDL);
- add_hash (pc -> hash,
- class -> hash_string.data,
- class -> hash_string.len,
- (void *)class, MDL);
+ if (!pc -> hash &&
+ !class_new_hash (&pc -> hash, 0, MDL))
+ log_fatal ("No memory for subclass hash.");
+ class_hash_add (pc -> hash,
+ (const char *)class -> hash_string.data,
+ class -> hash_string.len,
+ (void *)class, MDL);
} else {
if (!clone_group (&class -> group, group, MDL))
log_fatal ("no memory to clone class group.");
skip_to_semi (cfile);
break;
}
+ token = next_token (&val, (unsigned *)0, cfile);
+ token = peek_token (&val, (unsigned *)0, cfile);
+ if (token != IF)
+ goto submatch;
if (class -> expr) {
parse_warn (cfile, "can't override match.");
skip_to_semi (cfile);
break;
}
token = next_token (&val, (unsigned *)0, cfile);
- token = peek_token (&val, (unsigned *)0, cfile);
- if (token != IF)
- goto submatch;
- token = next_token (&val, (unsigned *)0, cfile);
if (!parse_boolean_expression (&class -> expr, cfile,
&lose)) {
if (!lose) {
/* Validate the network number/netmask pair. */
if (host_addr (subnet -> net, subnet -> netmask)) {
+ char *maskstr;
+
+ maskstr = strdup (piaddr (subnet -> netmask));
parse_warn (cfile,
- "subnet %s: bad subnet number/mask combination.",
- piaddr (subnet -> net));
+ "subnet %s netmask %s: bad subnet number/mask combination.",
+ piaddr (subnet -> net), maskstr);
+ free(maskstr);
subnet_dereference (&subnet, MDL);
skip_to_semi (cfile);
return;
break;
default: /* for gcc, we'll never get here. */
- break;
+ log_fatal ("Impossible error at %s:%d.", MDL);
+ return 0;
}
break;
case DYNAMIC_BOOTP:
seenbit = 256;
- lease -> binding_state = FTS_BOOTP;
- lease -> next_binding_state = FTS_BOOTP;
+ lease -> flags |= BOOTP_LEASE;
parse_semi (cfile);
break;
new_state = FTS_BACKUP;
break;
case TOKEN_RESERVED:
- new_state = FTS_RESERVED;
+ new_state = FTS_ACTIVE;
break;
case TOKEN_BOOTP:
- new_state = FTS_BOOTP;
+ new_state = FTS_ACTIVE;
+ lease -> flags |= BOOTP_LEASE;
break;
default:
parse_warn (cfile,
"%s: expecting a binding state.",
val);
skip_to_semi (cfile);
- break;
+ return 0;
}
if (seenbit == 256) {
"name");
strcpy (binding -> name, val);
newbinding = 1;
- } else if (binding -> value) {
- binding_value_dereference (&binding -> value,
+ } else {
+ if (binding -> value)
+ binding_value_dereference (&binding -> value,
MDL);
newbinding = 0;
}
+
if (!binding_value_allocate (&binding -> value, MDL))
log_fatal ("no memory for binding value.");
/* address-range-declaration :== ip-address ip-address SEMI
| DYNAMIC_BOOTP ip-address ip-address SEMI */
-void parse_address_range (cfile, group, type, inpool)
+void parse_address_range (cfile, group, type, inpool, lpchain)
struct parse *cfile;
struct group *group;
int type;
struct pool *inpool;
+ struct lease **lpchain;
{
struct iaddr low, high, net;
unsigned char addr [4];
#endif /* FAILOVER_PROTOCOL */
/* Create the new address range... */
- new_address_range (low, high, subnet, pool);
+ new_address_range (cfile, low, high, subnet, pool, lpchain);
pool_dereference (&pool, MDL);
}
Persistent database management routines for DHCPD... */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: db.c,v 1.67 2001/07/10 20:36:03 brister Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: db.c,v 1.68 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (lease -> starts) {
if (lease -> starts != MAX_TIME) {
t = gmtime (&lease -> starts);
+ /* %Audit% Cannot exceed 59 bytes. %2004.06.17,Safe% */
sprintf (tbuf, "%d %d/%02d/%02d %02d:%02d:%02d;",
t -> tm_wday, t -> tm_year + 1900,
t -> tm_mon + 1, t -> tm_mday,
if (lease -> ends) {
if (lease -> ends != MAX_TIME) {
t = gmtime (&lease -> ends);
+ /* %Audit% Cannot exceed 59 bytes. %2004.06.17,Safe% */
sprintf (tbuf, "%d %d/%02d/%02d %02d:%02d:%02d;",
t -> tm_wday, t -> tm_year + 1900,
t -> tm_mon + 1, t -> tm_mday,
}
}
- fprintf (db_file, "\n binding state %s;",
- ((lease -> binding_state > 0 &&
- lease -> binding_state <= FTS_BOOTP)
- ? binding_state_names [lease -> binding_state - 1]
- : "abandoned"));
-
- if (lease -> binding_state != lease -> next_binding_state)
+ if (lease -> binding_state == FTS_ACTIVE &&
+ (lease -> flags & BOOTP_LEASE)) {
+ fprintf (db_file, "\n binding state bootp;\n");
+ } else {
+ fprintf (db_file, "\n binding state %s;",
+ ((lease -> binding_state > 0 &&
+ lease -> binding_state <= FTS_LAST)
+ ? binding_state_names [lease -> binding_state - 1]
+ : "abandoned"));
+ }
+
+ if (lease -> binding_state != lease -> next_binding_state) {
+ if (lease -> next_binding_state == FTS_ACTIVE &&
+ (lease -> flags & BOOTP_LEASE))
+ fprintf (db_file, "\n next binding state bootp;\n");
+ else
fprintf (db_file, "\n next binding state %s;",
((lease -> next_binding_state > 0 &&
- lease -> next_binding_state <= FTS_BOOTP)
+ lease -> next_binding_state <= FTS_LAST)
? (binding_state_names
[lease -> next_binding_state - 1])
: "abandoned"));
+ }
/* If this lease is billed to a class and is still valid,
write it out. */
- if (lease -> billing_class && lease -> ends > cur_time)
- if (!write_billing_class (lease -> billing_class))
+ if (lease -> billing_class && lease -> ends > cur_time) {
+ if (!write_billing_class (lease -> billing_class)) {
+ log_error ("unable to write class %s",
+ lease -> billing_class -> name);
++errors;
+ }
+ }
if (lease -> hardware_addr.hlen) {
errno = 0;
pair p;
memset (&ds, 0, sizeof ds);
- if (lease -> agent_options) {
- for (p = lease -> agent_options -> first; p; p = p -> cdr) {
- oc = (struct option_cache *)p -> car;
- if (oc -> data.len) {
- errno = 0;
- fprintf (db_file, "\n option agent.%s %s;",
- oc -> option -> name,
- pretty_print_option (oc -> option,
- oc -> data.data,
- oc -> data.len,
- 1, 1));
- if (errno)
- ++errors;
- }
- }
+ for (p = lease -> agent_options -> first; p; p = p -> cdr) {
+ oc = (struct option_cache *)p -> car;
+ if (oc -> data.len) {
+ errno = 0;
+ fprintf (db_file, "\n option agent.%s %s;",
+ oc -> option -> name,
+ pretty_print_option (oc -> option, oc -> data.data,
+ oc -> data.len, 1, 1));
+ if (errno)
+ ++errors;
+ }
}
}
if (lease -> client_hostname &&
}
for (i = 0; i < ip_addrs.len - 3; i += 4) {
errno = 0;
- fprintf (db_file, "%d.%d.%d.%d%s",
- ip_addrs.data [i],
- ip_addrs.data [i + 1],
- ip_addrs.data [i + 2],
- ip_addrs.data [i + 3],
+ fprintf (db_file, "%u.%u.%u.%u%s",
+ ip_addrs.data [i] & 0xff,
+ ip_addrs.data [i + 1] & 0xff,
+ ip_addrs.data [i + 2] & 0xff,
+ ip_addrs.data [i + 3] & 0xff,
i + 7 < ip_addrs.len ? "," : "");
if (errno) {
++errors;
unsigned len;
{
int i;
+
for (i = 0; i < len; i++)
if (!isascii (s [i]) || !isprint (s [i]) ||
s [i] == '"' || s [i] == '\\')
static int print_hash_string(FILE *fp, struct class *class)
{
int i;
- int errors;
-
-
+ int errors = 0;
+
for (i = 0; i < class -> hash_string.len; i++)
if (!isascii (class -> hash_string.data [i]) ||
!isprint (class -> hash_string.data [i]))
return !errors;
}
+/* Commit leases after a timeout. */
+void commit_leases_timeout (void *foo)
+{
+ commit_leases ();
+}
+
/* Commit any leases that have been written out... */
int commit_leases ()
/* Make a temporary lease file... */
GET_TIME (&t);
- sprintf (newfname, "%s.%d", path_dhcpd_db, (int)t);
+
+ /* %Audit% Truncated filename causes panic. %2004.06.17,Safe%
+ * This should never happen since the path is a configuration
+ * variable from build-time or command-line. But if it should,
+ * either by malice or ignorance, we panic, since the potential
+ * for havoc is high.
+ */
+ if (snprintf (newfname, sizeof newfname, "%s.%d",
+ path_dhcpd_db, (int)t) >= sizeof newfname)
+ log_fatal("new_lease_file: lease file path too long");
+
db_fd = open (newfname, O_WRONLY | O_TRUNC | O_CREAT, 0664);
if (db_fd < 0) {
log_error ("Can't create new lease file: %m");
#if defined (TRACING)
if (!trace_playback ()) {
#endif
+ /* %Audit% Truncated filename causes panic. %2004.06.17,Safe%
+ * This should never happen since the path is a configuration
+ * variable from build-time or command-line. But if it should,
+ * either by malice or ignorance, we panic, since the potential
+ * for havoc is too high.
+ */
+ if (snprintf (backfname, sizeof backfname, "%s~", path_dhcpd_db)
+ >= sizeof backfname)
+ log_fatal("new_lease_file: backup lease file path too long");
+
/* Get the old database out of the way... */
- sprintf (backfname, "%s~", path_dhcpd_db);
if (unlink (backfname) < 0 && errno != ENOENT) {
log_error ("Can't remove old lease database backup %s: %m",
backfname);
Dynamic DNS updates. */
/*
- * 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 donated to the Internet Software Consortium
+ * This software has been donated to Internet Systems Consortium
* by Damien Neil of 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: ddns.c,v 1.17 2001/06/29 18:34:54 mellon Exp $ Copyright (c) 2000-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: ddns.c,v 1.18 2005/03/17 20:15:26 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
* Attempt to perform the update.
*/
result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
+#if defined (DEBUG)
print_dns_status ((int)result, &updqueue);
+#endif
+ if (result == ISC_R_SUCCESS) {
+ log_info ("added reverse map from %.*s to %.*s",
+ (int)ddns_rev_name -> len,
+ (const char *)ddns_rev_name -> data,
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data);
+ } else {
+ log_error ("unable to add reverse map from %.*s to %.*s: %s",
+ (int)ddns_rev_name -> len,
+ (const char *)ddns_rev_name -> data,
+ (int)ddns_fwd_name -> len,
+ (const char *)ddns_fwd_name -> data,
+ isc_result_totext (result));
+ }
/* Fall through. */
error:
* Attempt to perform the update.
*/
result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
+#if defined (DEBUG)
print_dns_status ((int)result, &updqueue);
+#endif
+ if (result == ISC_R_SUCCESS) {
+ log_info ("removed reverse map on %.*s",
+ (int)ddns_rev_name -> len,
+ (const char *)ddns_rev_name -> data);
+ } else {
+ if (result != ISC_R_NXRRSET && result != ISC_R_NXDOMAIN)
+ log_error ("can't remove reverse map on %.*s: %s",
+ (int)ddns_rev_name -> len,
+ (const char *)ddns_rev_name -> data,
+ isc_result_totext (result));
+ }
+
+ /* Not there is success. */
+ if (result == ISC_R_NXRRSET || result == ISC_R_NXDOMAIN)
+ result = ISC_R_SUCCESS;
/* Fall through. */
error:
nonzero, don't try to use the client-supplied
XXX */
if (!(oc = lookup_option (&fqdn_universe, packet -> options,
- FQDN_NO_CLIENT_UPDATE)) ||
+ FQDN_SERVER_UPDATE)) ||
evaluate_boolean_option_cache (&ignorep, packet, lease,
(struct client_state *)0,
packet -> options,
goto client_updates;
}
noclient:
+ /* If do-forward-updates is disabled, this basically means don't
+ do an update unless the client is participating, so if we get
+ here and do-forward-updates is disabled, we can stop. */
+ if ((oc = lookup_option (&server_universe, state -> options,
+ SV_DO_FORWARD_UPDATES)) &&
+ !evaluate_boolean_option_cache (&ignorep, packet, lease,
+ (struct client_state *)0,
+ packet -> options,
+ state -> options,
+ &lease -> scope, oc, MDL)) {
+ return 0;
+ }
/* If it's a static lease, then don't do the DNS update unless we're
specifically configured to do so. If the client asked to do its
/*
* Compute the name for the A record.
*/
- s1 = s2 = 0;
-
oc = lookup_option (&server_universe, state -> options,
SV_DDNS_HOST_NAME);
if (oc)
packet -> options,
state -> options,
&lease -> scope, oc, MDL);
+ else
+ s1 = 0;
oc = lookup_option (&server_universe, state -> options,
SV_DDNS_DOMAIN_NAME);
packet -> options,
state -> options,
&lease -> scope, oc, MDL);
+ else
+ s2 = 0;
if (s1 && s2) {
+ if (ddns_hostname.len + ddns_domainname.len > 253) {
+ log_error ("ddns_update: host.domain name too long");
+
+ goto out;
+ }
+
buffer_allocate (&ddns_fwd_name.buffer,
ddns_hostname.len + ddns_domainname.len + 2,
MDL);
PTR update. */
if (find_bound_string (&old_ddns_fwd_name,
lease -> scope, "ddns-client-fqdn")) {
+ /* If the name is not different, no need to update
+ the PTR record. */
if (old_ddns_fwd_name.len == ddns_fwd_name.len &&
!memcmp (old_ddns_fwd_name.data, ddns_fwd_name.data,
- old_ddns_fwd_name.len)) {
- /* If the name is not different, no need to update
- the PTR record. */
+ old_ddns_fwd_name.len) &&
+ (!(oc = lookup_option (&server_universe,
+ state -> options,
+ SV_UPDATE_OPTIMIZATION)) ||
+ evaluate_boolean_option_cache (&ignorep, packet, lease,
+ (struct client_state *)0,
+ packet -> options,
+ state -> options,
+ &lease -> scope, oc,
+ MDL))) {
goto noerror;
}
}
if (!ddns_fwd_name.len)
goto out;
+ if (ddns_fwd_name.len > 255) {
+ log_error ("client provided fqdn: too long");
+ goto out;
+ }
+
/*
* Compute the RR TTL.
*/
packet -> options,
state -> options,
&lease -> scope, oc, MDL);
-
+ else
+ s1 = 0;
+
+ if (s1 && (d1.len > 238)) {
+ log_error ("ddns_update: Calculated rev domain name too long.");
+ s1 = 0;
+ data_string_forget (&d1, MDL);
+ }
+
if (oc && s1) {
/* Buffer length:
XXX.XXX.XXX.XXX.<ddns-rev-domain-name>\0 */
d1.len + 17, MDL);
if (ddns_rev_name.buffer) {
ddns_rev_name.data = ddns_rev_name.buffer -> data;
-#ifndef NO_SNPRINTF
- snprintf ((char *)ddns_rev_name.buffer -> data, 17,
- "%d.%d.%d.%d.",
- lease -> ip_addr . iabuf[3],
- lease -> ip_addr . iabuf[2],
- lease -> ip_addr . iabuf[1],
- lease -> ip_addr . iabuf[0]);
-#else
+
+ /* %Audit% Cannot exceed 17 bytes. %2004.06.17,Safe% */
sprintf ((char *)ddns_rev_name.buffer -> data,
- "%d.%d.%d.%d.",
- lease -> ip_addr . iabuf[3],
- lease -> ip_addr . iabuf[2],
- lease -> ip_addr . iabuf[1],
- lease -> ip_addr . iabuf[0]);
-#endif
+ "%u.%u.%u.%u.",
+ lease -> ip_addr . iabuf[3] & 0xff,
+ lease -> ip_addr . iabuf[2] & 0xff,
+ lease -> ip_addr . iabuf[1] & 0xff,
+ lease -> ip_addr . iabuf[0] & 0xff);
+
ddns_rev_name.len =
strlen ((const char *)ddns_rev_name.data);
data_string_append (&ddns_rev_name, &d1);
if (!lease -> scope)
return 0;
+ if (ddns_update_style != 2)
+ return 0;
+
/*
* Look up stored names.
*/
if (!resolver_inited) {
minires_ninit (&resolver_state);
resolver_inited = 1;
+ resolver_state.retrans = 1;
+ resolver_state.retry = 1;
}
/* We need the fwd name whether we are deleting both records or just
DHCP Protocol engine. */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.196 2002/01/17 17:01:46 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.197 2005/03/17 20:15:27 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
packet -> packet_type < dhcp_type_name_max - 1) {
s = dhcp_type_names [packet -> packet_type - 1];
} else {
-#if defined (HAVE_SNPRINTF)
- snprintf (typebuf, sizeof typebuf,
- "type %d", packet -> packet_type);
-#else
- sprintf (typebuf,
- "type %d", packet -> packet_type);
-#endif
+ /* %Audit% Cannot exceed 28 bytes. %2004.06.17,Safe% */
+ sprintf (typebuf, "type %d", packet -> packet_type);
s = typebuf;
}
struct lease *lease = (struct lease *)0;
char msgbuf [1024]; /* XXX */
TIME when;
- char *s;
+ const char *s;
int allocatedp = 0;
int peer_has_leases = 0;
+ int alloc_lease_called = 0;
#if defined (FAILOVER_PROTOCOL)
dhcp_failover_state_t *peer;
#endif
find_lease (&lease, packet, packet -> shared_network,
0, &allocatedp, (struct lease *)0, MDL);
- if (lease && lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ if (lease && lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
- /* Say what we're doing... */
- sprintf (msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf, "DHCPDISCOVER from %s %s%s%svia %s",
(packet -> raw -> htype
? print_hw_addr (packet -> raw -> htype,
packet -> raw -> hlen,
packet -> shared_network -> pools,
&peer_has_leases)) {
if (peer_has_leases)
- log_info ("%s: peer holds all free leases",
- msgbuf);
+ log_error ("%s: peer holds all free leases",
+ msgbuf);
else
- log_info ("%s: network %s: no free leases",
- msgbuf,
- packet -> shared_network -> name);
+ log_error ("%s: network %s: no free leases",
+ msgbuf,
+ packet -> shared_network -> name);
return;
}
#if defined (FAILOVER_PROTOCOL)
dhcp_failover_pool_check (lease -> pool);
#endif
allocatedp = 1;
+ alloc_lease_called = 1;
}
#if defined (FAILOVER_PROTOCOL)
XXX be forced to switch servers (and IP addresses) just because
XXX of bad luck, when it's possible for it to get the address it
XXX is requesting. Not sure this is allowed. */
- if (allocatedp && peer) {
- if (peer -> service_state == cooperating) {
- if (!load_balance_mine (packet, peer)) {
- log_debug ("%s: load balance to peer %s",
- msgbuf, peer -> name);
- goto out;
- }
+ if (allocatedp && peer && (peer -> service_state == cooperating) &&
+ !load_balance_mine (packet, peer)) {
+ /* peer_has_leases only has a chance to be set if we called
+ * allocate_lease() above.
+ */
+ if (!alloc_lease_called || peer_has_leases) {
+ log_debug ("%s: load balance to peer %s",
+ msgbuf, peer -> name);
+ goto out;
+ } else {
+ log_debug ("cancel load balance to peer %s - %s",
+ peer -> name, "no free leases");
}
}
#endif
struct data_string data;
int status;
char msgbuf [1024]; /* XXX */
- char *s;
+ const char *s;
char smbuf [19];
#if defined (FAILOVER_PROTOCOL)
dhcp_failover_state_t *peer;
/* XXX consider using allocatedp arg to find_lease to see
XXX that this isn't a compliant DHCPREQUEST. */
- if (lease && lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ if (lease && lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
oc = lookup_option (&dhcp_universe, packet -> options,
sip.len = 4;
memcpy (sip.iabuf, data.data, 4);
data_string_forget (&data, MDL);
+ /* piaddr() should not return more than a 15 byte string.
+ * safe.
+ */
sprintf (smbuf, " (%s)", piaddr (sip));
have_server_identifier = 1;
} else
smbuf [0] = 0;
- /* Say what we're doing... */
- sprintf (msgbuf, "DHCPREQUEST for %s%s from %s %s%s%svia %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf,
+ "DHCPREQUEST for %s%s from %s %s%s%svia %s",
piaddr (cip), smbuf,
(packet -> raw -> htype
? print_hw_addr (packet -> raw -> htype,
msgbuf, peer -> nrr);
goto out;
}
- /* Don't load balance if the client is RENEWING or REBINDING.
- If it's RENEWING, we are the only server to hear it, so
- we have to serve it. If it's REBINDING, it's out of
- communication with the other server, so there's no point
- in waiting to serve it. However, if the lease we're
- offering is not a free lease, then we may be the only
- server that can offer it, so we can't load balance if
- the lease isn't in the free or backup state. */
- if (peer -> service_state == cooperating &&
- !packet -> raw -> ciaddr.s_addr &&
- (lease -> binding_state == FTS_FREE ||
- lease -> binding_state == FTS_BACKUP)) {
- if (!load_balance_mine (packet, peer)) {
- log_debug ("%s: load balance to peer %s",
- msgbuf, peer -> name);
- goto out;
- }
- }
- /* Don't let a client allocate a lease using DHCPREQUEST
- if the lease isn't ours to allocate. */
+ /* "load balance to peer" - is not done at all for request.
+ *
+ * If it's RENEWING, we are the only server to hear it, so
+ * we have to serve it. If it's REBINDING, it's out of
+ * communication with the other server, so there's no point
+ * in waiting to serve it. However, if the lease we're
+ * offering is not a free lease, then we may be the only
+ * server that can offer it, so we can't load balance if
+ * the lease isn't in the free or backup state. If it is
+ * in the free or backup state, then that state is what
+ * mandates one server or the other should perform the
+ * allocation, not the LBA...we know the peer cannot
+ * allocate a request for an address in our free state.
+ *
+ * So our only compass is lease_mine_to_reallocate(). This
+ * effects both load balancing, and a sanity-check that we
+ * are not going to try to allocate a lease that isn't ours.
+ */
if ((lease -> binding_state == FTS_FREE ||
lease -> binding_state == FTS_BACKUP) &&
!lease_mine_to_reallocate (lease)) {
goto out;
}
+ /* If the lease is in a transitional state, we can't
+ renew it. */
+ if ((lease -> binding_state == FTS_RELEASED ||
+ lease -> binding_state == FTS_EXPIRED) &&
+ !lease_mine_to_reallocate (lease)) {
+ log_debug ("%s: lease in transition state %s", msgbuf,
+ lease -> binding_state == FTS_RELEASED
+ ? "released" : "expired");
+ goto out;
+ }
+
+ /* It's actually very unlikely that we'll ever get here,
+ but if we do, tell the client to stop using the lease,
+ because the administrator reset it. */
+ if (lease -> binding_state == FTS_RESET &&
+ !lease_mine_to_reallocate (lease)) {
+ log_debug ("%s: lease reset by administrator", msgbuf);
+ nak_lease (packet, &cip);
+ goto out;
+ }
+
/* At this point it's possible that we will get a broadcast
DHCPREQUEST for a lease that we didn't offer, because
both we and the peer are in a position to offer it.
struct iaddr cip;
struct option_cache *oc;
struct data_string data;
- char *s;
- char msgbuf [1024]; /* XXX */
+ const char *s;
+ char msgbuf [1024], cstr[16]; /* XXX */
/* DHCPRELEASE must not specify address in requested-address
}
- if (lease && lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ /* If the hardware address doesn't match, don't do the release. */
+ if (lease &&
+ (lease -> hardware_addr.hlen != packet -> raw -> hlen + 1 ||
+ lease -> hardware_addr.hbuf [0] != packet -> raw -> htype ||
+ memcmp (&lease -> hardware_addr.hbuf [1],
+ packet -> raw -> chaddr, packet -> raw -> hlen)))
+ lease_dereference (&lease, MDL);
+
+ if (lease && lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
- /* Say what we're doing... */
- sprintf (msgbuf,
+ /* %Audit% Cannot exceed 16 bytes. %2004.06.17,Safe%
+ * We copy this out to stack because we actually want to log two
+ * inet_ntoa()'s in this message.
+ */
+ strncpy(cstr, inet_ntoa (packet -> raw -> ciaddr), 15);
+ cstr[15] = '\0';
+
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf,
"DHCPRELEASE of %s from %s %s%s%svia %s (%sfound)",
- inet_ntoa (packet -> raw -> ciaddr),
+ cstr,
(packet -> raw -> htype
? print_hw_addr (packet -> raw -> htype,
packet -> raw -> hlen,
int ignorep = 0;
int i;
const char *status;
- char *s;
+ const char *s;
char msgbuf [1024]; /* XXX */
struct iaddr cip;
struct option_cache *oc;
data_string_forget (&data, MDL);
find_lease_by_ip_addr (&lease, cip, MDL);
- if (lease && lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ if (lease && lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
- sprintf (msgbuf, "DHCPDECLINE of %s from %s %s%s%svia %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf,
+ "DHCPDECLINE of %s from %s %s%s%svia %s",
piaddr (cip),
(packet -> raw -> htype
? print_hw_addr (packet -> raw -> htype,
source address if they didn't set ciaddr. */
if (!packet -> raw -> ciaddr.s_addr) {
cip.len = 4;
- memcpy (cip.iabuf, &packet -> client_addr, 4);
+ memcpy (cip.iabuf, &packet -> client_addr.iabuf, 4);
} else {
cip.len = 4;
memcpy (cip.iabuf, &packet -> raw -> ciaddr, 4);
}
- sprintf (msgbuf, "DHCPINFORM from %s via %s",
+ /* %Audit% This is log output. %2004.06.17,Safe%
+ * If we truncate we hope the user can get a hint from the log.
+ */
+ snprintf (msgbuf, sizeof msgbuf, "DHCPINFORM from %s via %s",
piaddr (cip), packet -> interface -> name);
/* If the IP source address is zero, don't respond. */
log_info ("please write an `authoritative;' directi%s",
"ve either in the");
log_info ("subnet declaration or in some scope that%s",
- "encloses the");
+ " encloses the");
log_info ("subnet declaration - for example, write %s",
"it at the top");
log_info ("of the dhcpd.conf file.");
log_info ("%s", msgbuf);
/* Figure out the address of the boot file server. */
- raw.siaddr = from;
if ((oc =
lookup_option (&server_universe, options, SV_NEXT_SERVER))) {
if (evaluate_option_cache (&d1, packet, (struct lease *)0,
goto use_primary;
}
+ /* If there were agent options in the incoming packet, return
+ them. */
+ if (packet -> raw -> giaddr.s_addr &&
+ packet -> options -> universe_count > agent_universe.index &&
+ packet -> options -> universes [agent_universe.index]) {
+ option_chain_head_reference
+ ((struct option_chain_head **)
+ &(options -> universes [agent_universe.index]),
+ (struct option_chain_head *)
+ packet -> options -> universes [agent_universe.index],
+ MDL);
+ }
+
/* Do not use the client's requested parameter list. */
delete_option (&dhcp_universe, packet -> options,
DHO_DHCP_PARAMETER_REQUEST_LIST);
struct lease *lt;
struct lease_state *state;
struct lease *next;
+ struct host_decl *host = (struct host_decl *)0;
TIME lease_time;
TIME offered_lease_time;
struct data_string d1;
int status;
isc_result_t result;
int did_ping = 0;
+ TIME ping_timeout;
unsigned i, j;
int s1, s2;
if (lease -> state)
return;
+ /* If the lease carries a host record, remember it. */
+ if (lease -> host)
+ host_reference (&host, lease -> host, MDL);
+
/* Allocate a lease state structure... */
state = new_lease_state (MDL);
if (!state)
/* If the lease is from a pool, run the pool scope. */
if (lease -> pool)
- execute_statements_in_scope ((struct binding_value **)0,
- packet, lease,
- (struct client_state *)0,
- packet -> options,
- state -> options, &lease -> scope,
- lease -> pool -> group,
- lease -> subnet -> group);
+ (execute_statements_in_scope
+ ((struct binding_value **)0, packet, lease,
+ (struct client_state *)0, packet -> options,
+ state -> options, &lease -> scope, lease -> pool -> group,
+ lease -> pool -> shared_network -> group));
/* Execute statements from class scopes. */
for (i = packet -> class_count; i > 0; i--) {
: lease -> subnet -> group));
}
- /* If we have a host_decl structure, run the options associated
- with its group. */
- if (lease -> host)
- execute_statements_in_scope ((struct binding_value **)0,
- packet, lease,
- (struct client_state *)0,
- packet -> options,
- state -> options, &lease -> scope,
- lease -> host -> group,
- (lease -> pool
- ? lease -> pool -> group
- : lease -> subnet -> group));
-
/* See if the client is only supposed to have one lease at a time,
and if so, find its other leases and release them. We can only
do this on DHCPREQUEST. It's a little weird to do this before
} while (1);
}
if (!lease -> uid_len ||
- (lease -> host &&
- !lease -> host -> client_identifier.len &&
+ (host &&
+ !host -> client_identifier.len &&
(oc = lookup_option (&server_universe, state -> options,
SV_DUPLICATES)) &&
!evaluate_boolean_option_cache (&ignorep, packet, lease,
d1.data [0]);
data_string_forget (&d1, MDL);
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
data_string_forget (&d1, MDL);
}
}
- /* Try to find a matching host declaration for this lease. */
- if (!lease -> host) {
+ /* Try to find a matching host declaration for this lease.
+ */
+ if (!host) {
struct host_decl *hp = (struct host_decl *)0;
struct host_decl *h;
&lease -> scope, oc, MDL)) {
find_hosts_by_uid (&hp, d1.data, d1.len, MDL);
data_string_forget (&d1, MDL);
- if (hp)
- host_reference (&lease -> host, hp, MDL);
+ for (h = hp; h; h = h -> n_ipaddr) {
+ if (!h -> fixed_addr)
+ break;
+ }
+ if (h)
+ host_reference (&host, h, MDL);
}
- if (!hp) {
+ if (!host) {
find_hosts_by_haddr (&hp,
packet -> raw -> htype,
packet -> raw -> chaddr,
break;
}
if (h)
- host_reference (&lease -> host, h, MDL);
+ host_reference (&host, h, MDL);
}
if (hp)
host_dereference (&hp, MDL);
}
+ /* If we have a host_decl structure, run the options associated
+ with its group. Wether the host decl struct is old or not. */
+ if (host)
+ execute_statements_in_scope ((struct binding_value **)0,
+ packet, lease,
+ (struct client_state *)0,
+ packet -> options,
+ state -> options, &lease -> scope,
+ host -> group,
+ (lease -> pool
+ ? lease -> pool -> group
+ : lease -> subnet -> group));
+
/* Drop the request if it's not allowed for this client. By
default, unknown clients are allowed. */
- if (!lease -> host &&
+ if (!host &&
(oc = lookup_option (&server_universe, state -> options,
SV_BOOT_UNKNOWN_CLIENTS)) &&
!evaluate_boolean_option_cache (&ignorep,
if (!ignorep)
log_info ("%s: unknown client", msg);
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
if (!ignorep)
log_info ("%s: bootp disallowed", msg);
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
if (!ignorep)
log_info ("%s: booting disallowed", msg);
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
log_info ("%s: no available billing",
msg);
free_lease_state (state, MDL);
- /* XXX probably not necessary: */
+ if (host)
+ host_dereference (&host, MDL);
+ /* XXX possibly not necessary: */
return;
}
}
log_info ("%s: can't allocate temporary lease structure: %s",
msg, isc_result_totext (result));
free_lease_state (state, MDL);
+ if (host)
+ host_dereference (&host, MDL);
return;
}
&lease -> scope, oc, MDL);
else
s1 = 0;
+
if (s1 && d1.len == sizeof (u_int32_t)) {
lease_time = getULong (d1.data);
data_string_forget (&d1, MDL);
data_string_forget (&d1, MDL);
lease_time = default_lease_time;
}
-
+
/* See if there's a maximum lease time. */
max_lease_time = DEFAULT_MAX_LEASE_TIME;
if ((oc = lookup_option (&server_universe, state -> options,
#if defined (FAILOVER_PROTOCOL)
/* Okay, we know the lease duration. Now check the
failover state, if any. */
+ if (lease -> tsfp) {
+ lt ->tsfp = lease ->tsfp;
+ }
if (lease -> pool && lease -> pool -> failover_peer) {
dhcp_failover_state_t *peer =
lease -> pool -> failover_peer;
}
lt -> ends = state -> offered_expiry = cur_time + lease_time;
- lt -> next_binding_state = FTS_BOOTP;
+ lt -> next_binding_state = FTS_ACTIVE;
}
lt -> timestamp = cur_time;
data_string_forget (&d1, MDL);
}
- if (lease -> host)
- host_reference (< -> host, lease -> host, MDL);
+ if (host) {
+ host_reference (< -> host, host, MDL);
+ host_dereference (&host, MDL);
+ }
if (lease -> subnet)
subnet_reference (< -> subnet, lease -> subnet, MDL);
if (lease -> billing_class)
packet -> options,
(struct option_state *)0,
&global_scope, oc, MDL);
+ else
+ s1 = 0;
+
if (oc && s1 &&
lease -> client_hostname &&
strlen (lease -> client_hostname) == d1.len &&
}
}
+ /* Get the Subnet Selection option from the packet, if one
+ was sent. */
+ if ((oc = lookup_option (&dhcp_universe, packet -> options,
+ DHO_SUBNET_SELECTION))) {
+
+ /* Make a copy of the data. */
+ struct option_cache *noc = (struct option_cache *)0;
+ if (option_cache_allocate (&noc, MDL)) {
+ if (oc -> data.len)
+ data_string_copy (&noc -> data,
+ &oc -> data, MDL);
+ if (oc -> expression)
+ expression_reference (&noc -> expression,
+ oc -> expression, MDL);
+ if (oc -> option)
+ noc -> option = oc -> option;
+ }
+
+ save_option (&dhcp_universe, state -> options, noc);
+ option_cache_dereference (&noc, MDL);
+ }
+
/* Now, if appropriate, put in DHCP-specific options that
override those. */
if (state -> offer) {
}
/* Figure out the address of the boot file server. */
- memcpy (&state -> siaddr, state -> from.iabuf, sizeof state -> siaddr);
+ memset (&state -> siaddr, 0, sizeof state -> siaddr);
if ((oc =
lookup_option (&server_universe,
state -> options, SV_NEXT_SERVER))) {
&lease -> scope, oc, MDL))) {
lease -> timestamp = cur_time;
icmp_echorequest (&lease -> ip_addr);
- add_timeout (cur_time + 1, lease_ping_timeout, lease,
+
+ /* Determine wether to use configured or default ping timeout.
+ */
+ if ((oc = lookup_option (&server_universe, state -> options,
+ SV_PING_TIMEOUT)) &&
+ evaluate_option_cache (&d1, packet, lease, NULL,
+ packet -> options,
+ state -> options,
+ &lease -> scope, oc, MDL)) {
+ if (d1.len == sizeof (u_int32_t))
+ ping_timeout = getULong (d1.data);
+ else
+ ping_timeout = DEFAULT_PING_TIMEOUT;
+
+ data_string_forget (&d1, MDL);
+ } else
+ ping_timeout = DEFAULT_PING_TIMEOUT;
+
+#ifdef DEBUG
+ log_debug ("Ping timeout: %ld", (long)ping_timeout);
+#endif
+
+ add_timeout (cur_time + ping_timeout, lease_ping_timeout, lease,
(tvref_t)lease_reference,
(tvunref_t)lease_dereference);
++outstanding_pings;
struct option_tag *ot, *not;
struct data_string d1;
struct option_cache *oc;
- char *s;
+ const char *s;
if (!state)
log_fatal ("dhcp_reply was supplied lease with no state!");
raw.hops = state -> hops;
raw.op = BOOTREPLY;
- if (lease -> client_hostname &&
- db_printable (lease -> client_hostname))
- s = lease -> client_hostname;
- else
+ if (lease -> client_hostname) {
+ if ((strlen (lease -> client_hostname) <= 64) &&
+ db_printable (lease -> client_hostname))
+ s = lease -> client_hostname;
+ else
+ s = "Hostname Unsuitable for Printing";
+ } else
s = (char *)0;
/* Say what we're doing... */
struct shared_network *share, struct host_decl *hp)
{
struct lease *lease = (struct lease *)0;
- const unsigned char **s;
- isc_result_t status;
struct host_decl *rhp = (struct host_decl *)0;
- status = lease_allocate (&lease, MDL);
- if (status != ISC_R_SUCCESS)
+ if (lease_allocate (&lease, MDL) != ISC_R_SUCCESS)
return 0;
- if (host_reference (&rhp, hp, MDL) != ISC_R_SUCCESS)
+ if (host_reference (&rhp, hp, MDL) != ISC_R_SUCCESS) {
+ lease_dereference (&lease, MDL);
return 0;
+ }
if (!find_host_for_network (&lease -> subnet,
&rhp, &lease -> ip_addr, share)) {
lease_dereference (&lease, MDL);
+ host_dereference (&rhp, MDL);
return 0;
}
host_reference (&lease -> host, rhp, MDL);
lease -> starts = lease -> timestamp = lease -> ends = MIN_TIME;
lease -> flags = STATIC_LEASE;
lease -> binding_state = FTS_FREE;
+
lease_reference (lp, lease, MDL);
+
lease_dereference (&lease, MDL);
host_dereference (&rhp, MDL);
return 1;
a lease at all. */
int allocate_lease (struct lease **lp, struct packet *packet,
- struct pool *pool, int *peer_has_leases)
+ struct pool *pool, int *peer_has_leases)
{
struct lease *lease = (struct lease *)0;
- struct lease **lq;
- struct permit *permit;
+ struct lease *candl = (struct lease *)0;
- if (!pool)
- return 0;
-
- /* If we aren't elegible to try this pool, try a subsequent one. */
- if ((pool -> prohibit_list &&
- permitted (packet, pool -> prohibit_list)) ||
- (pool -> permit_list && !permitted (packet, pool -> permit_list)))
- return allocate_lease (lp, packet, pool -> next,
- peer_has_leases);
+ for (; pool ; pool = pool -> next) {
+ if ((pool -> prohibit_list &&
+ permitted (packet, pool -> prohibit_list)) ||
+ (pool -> permit_list &&
+ !permitted (packet, pool -> permit_list)))
+ continue;
#if defined (FAILOVER_PROTOCOL)
- /* Peer_has_leases just says that we found at least one free lease.
- If no free lease is returned, the caller can deduce that this
- means the peer is hogging all the free leases, so we can print
- a better error message. */
-
- /* XXX Do we need code here to ignore PEER_IS_OWNER and just check
- XXX tstp if we're in, e.g., PARTNER_DOWN? Where do we deal with
- XXX CONFLICT_DETECTED, et al? */
- /* XXX This should be handled by the lease binding "state machine" -
- XXX that is, when we get here, if a lease could be allocated, it
- XXX will have the correct binding state so that the following code
- XXX will result in its being allocated. */
- /* Skip to the most expired lease in the pool that is not owned by a
- failover peer. */
- if (pool -> failover_peer) {
- if (pool -> failover_peer -> i_am == primary) {
- if (pool -> backup)
- *peer_has_leases = 1;
- lease = pool -> free;
- if (!lease)
- lease = pool -> abandoned;
- } else {
+ /* Peer_has_leases just says that we found at least one
+ free lease. If no free lease is returned, the caller
+ can deduce that this means the peer is hogging all the
+ free leases, so we can print a better error message. */
+ /* XXX Do we need code here to ignore PEER_IS_OWNER and
+ * XXX just check tstp if we're in, e.g., PARTNER_DOWN?
+ * XXX Where do we deal with CONFLICT_DETECTED, et al? */
+ /* XXX This should be handled by the lease binding "state
+ * XXX machine" - that is, when we get here, if a lease
+ * XXX could be allocated, it will have the correct
+ * XXX binding state so that the following code will
+ * XXX result in its being allocated. */
+ /* Skip to the most expired lease in the pool that is not
+ * owned by a failover peer. */
+ if (pool -> failover_peer) {
+ if (pool -> failover_peer -> i_am == primary) {
+ if (pool -> backup)
+ *peer_has_leases = 1;
+ candl = pool -> free;
+ if (!candl)
+ candl = pool -> abandoned;
+ } else {
+ if (pool -> free)
+ *peer_has_leases = 1;
+ candl = pool -> backup;
+ }
+ } else
+#endif
+ {
if (pool -> free)
- *peer_has_leases = 1;
- lease = pool -> backup;
+ candl = pool -> free;
+ else
+ candl = pool -> abandoned;
}
- } else
-#endif
- {
- if (pool -> free)
- lease = pool -> free;
- else
- lease = pool -> abandoned;
- }
-
- /* If there are no leases in the pool that have
- expired, try the next one. */
- if (!lease || lease -> ends > cur_time)
- return allocate_lease (lp, packet,
- pool -> next, peer_has_leases);
-
- /* If we find an abandoned lease, and no other lease qualifies
- better, take it. */
- /* XXX what if there are non-abandoned leases that are younger
- XXX than this? Shouldn't we hunt for those here? */
- if (lease -> binding_state == FTS_ABANDONED) {
- /* If we already have a non-abandoned lease that we didn't
- love, but that's okay, don't reclaim the abandoned lease. */
- if (*lp)
- return allocate_lease (lp, packet, pool -> next,
- peer_has_leases);
- if (!allocate_lease (lp, packet,
- pool -> next, peer_has_leases)) {
- log_error ("Reclaiming abandoned IP address %s.",
- piaddr (lease -> ip_addr));
- lease_reference (lp, lease, MDL);
+
+ if (!candl || (candl -> ends > cur_time))
+ continue;
+
+ if (!lease) {
+ lease = candl;
+ continue;
}
- return 1;
+
+ if ((lease -> binding_state == FTS_ABANDONED) &&
+ ((candl -> binding_state != FTS_ABANDONED) ||
+ (candl -> ends < lease -> ends))) {
+ lease = candl;
+ continue;
+ } else if (candl -> binding_state == FTS_ABANDONED)
+ continue;
+
+ if ((lease -> uid_len || lease -> hardware_addr.hlen) &&
+ ((!candl -> uid_len && !candl -> hardware_addr.hlen) ||
+ (candl -> ends < lease -> ends))) {
+ lease = candl;
+ continue;
+ } else if (candl -> uid_len || candl -> hardware_addr.hlen)
+ continue;
+
+ if (candl -> ends < lease -> ends)
+ lease = candl;
}
- /* If there's a lease we could take, but it had previously been
- allocated to a different client, try for a virgin lease before
- stealing it. */
- if (lease -> uid_len || lease -> hardware_addr.hlen) {
- /* If we're already in that boat, no need to consider
- allocating this particular lease. */
- if (*lp)
- return allocate_lease (lp, packet, pool -> next,
- peer_has_leases);
+ if (lease) {
+ if (lease -> binding_state == FTS_ABANDONED)
+ log_error ("Reclaiming abandoned lease %s.",
+ piaddr (lease -> ip_addr));
- allocate_lease (lp, packet, pool -> next, peer_has_leases);
- if (*lp)
- return 1;
+ lease_reference (lp, lease, MDL);
+ return 1;
}
- lease_reference (lp, lease, MDL);
- return 1;
+ return 0;
}
/* Determine whether or not a permit exists on a particular permit list
.\" dhcpd.8
.\"
-.\" 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''.
.\"
-.\" $Id: dhcpd.8,v 1.21 2002/05/27 03:53:16 murray Exp $
+.\" $Id: dhcpd.8,v 1.22 2005/03/17 20:15:27 dhankins Exp $
.\"
.TH dhcpd 8
.SH NAME
]
]
.SH DESCRIPTION
-The Internet Software Consortium DHCP Server, dhcpd, implements the
+The Internet Systems Consortium DHCP Server, dhcpd, implements the
Dynamic Host Configuration Protocol (DHCP) and the Internet Bootstrap
Protocol (BOOTP). DHCP allows hosts on a TCP/IP network to request
and be assigned IP addresses, and also to discover information about
on systems where dhcpd is unable to identify non-broadcast interfaces,
but should not be required on other systems. If no interface names
are specified on the command line dhcpd will identify all network
-interfaces which are up, elimininating non-broadcast interfaces if
+interfaces which are up, eliminating non-broadcast interfaces if
possible, and listen for DHCP broadcasts on each interface.
.PP
If dhcpd should listen on a port other than the standard (port 67),
refuse to operate in playback mode unless you specify an alternate
lease file.
.SH CONFIGURATION
-The syntax of the dhcpd.conf(5) file is discussed seperately. This
+The syntax of the dhcpd.conf(5) file is discussed separately. This
section should be used as an overview of the configuration process,
and the dhcpd.conf(5) documentation should be consulted for detailed
reference information.
.sp 1
subnet 239.252.197.0 netmask 255.255.255.0 {
range 239.252.197.10 239.252.197.250;
- }
+ }
.fi
.PP
Multiple address ranges may be specified like this:
range 239.252.197.10 239.252.197.107;
default-lease-time 600;
max-lease-time 7200;
- |
+ }
.fi
.PP
This particular subnet declaration specifies a default lease time of
clients, also on a per-client basis. In the event that a BOOTP
client declaration specifies options that are also specified in its
subnet declaration, the options specified in the client declaration
-take precedence. An reasonably complete DHCP configuration might
+take precedence. A reasonably complete DHCP configuration might
look something like this:
.nf
.sp 1
.SH AUTHOR
.B dhcpd(8)
was originally written by Ted Lemon under a contract with Vixie Labs.
-Funding for this project was provided by the Internet Software
+Funding for this project was provided by Internet Systems
Consortium. Version 3 of the DHCP server was funded by Nominum, Inc.
-Information about the Internet Software Consortium is available at
-.B http://www.isc.org/isc\fR.
-Information about Nominum and support contracts for DHCP and BIND can
-be found at \fBhttp://www.nominum.com\fR.
+Information about Internet Systems Consortium is available at
+.B http://www.isc.org/\fR.
+Information about Nominum can be found at \fBhttp://www.nominum.com/\fR.
DHCP Server Daemon. */
/*
- * 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 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 ocopyright[] =
-"$Id: dhcpd.c,v 1.116 2001/06/27 00:31:09 mellon Exp $ Copyright 1995-2001 Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.117 2005/03/17 20:15:27 dhankins Exp $ Copyright 2004-2005 Internet Systems Consortium.";
#endif
static char copyright[] =
-"Copyright 1995-2001 Internet Software Consortium.";
+"Copyright 2004-2005 Internet Systems Consortium.";
static char arr [] = "All rights reserved.";
-static char message [] = "Internet Software Consortium DHCP Server";
-static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
+static char message [] = "Internet Systems Consortium DHCP Server";
+static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/";
#include "dhcpd.h"
#include "version.h"
static void usage PROTO ((void));
-TIME cur_time;
-
struct iaddr server_identifier;
int server_identifier_matched;
#if defined (TRACING)
trace_init (set_time, MDL);
- if (traceoutfile)
- trace_begin (traceoutfile, MDL);
+ if (traceoutfile) {
+ result = trace_begin (traceoutfile, MDL);
+ if (result != ISC_R_SUCCESS)
+ log_fatal ("Unable to begin trace: %s",
+ isc_result_totext (result));
+ }
interface_trace_setup ();
parse_trace_setup ();
trace_srandom = trace_type_register ("random-seed", (void *)0,
}
trace_file_replay (traceinfile);
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
+#if defined (DEBUG_MEMORY_LEAKAGE) && \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
free_everything ();
omapi_print_dmalloc_usage_by_caller ();
if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
status = read (i, pbuf, (sizeof pbuf) - 1);
close (i);
- pbuf [status] = 0;
- pid = atoi (pbuf);
-
- /* If the previous server process is not still running,
- write a new pid file immediately. */
- if (pid && (pid == getpid() || kill (pid, 0) < 0)) {
- unlink (path_dhcpd_pid);
- if ((i = open (path_dhcpd_pid,
- O_WRONLY | O_CREAT, 0644)) >= 0) {
- sprintf (pbuf, "%d\n", (int)getpid ());
- write (i, pbuf, strlen (pbuf));
- close (i);
- pidfilewritten = 1;
- }
- } else
- log_fatal ("There's already a DHCP server running.");
+ if (status > 0) {
+ pbuf [status] = 0;
+ pid = atoi (pbuf);
+
+ /* If the previous server process is not still running,
+ write a new pid file immediately. */
+ if (pid && (pid == getpid() || kill (pid, 0) < 0)) {
+ unlink (path_dhcpd_pid);
+ if ((i = open (path_dhcpd_pid,
+ O_WRONLY | O_CREAT, 0644)) >= 0) {
+ sprintf (pbuf, "%d\n", (int)getpid ());
+ write (i, pbuf, strlen (pbuf));
+ close (i);
+ pidfilewritten = 1;
+ }
+ } else
+ log_fatal ("There's already a DHCP server running.");
+ }
}
/* If we were requested to log to stdout on the command line,
}
} else {
log_info ("%s", "");
- log_error ("** You must add a ddns-update-style %s%s.",
+ log_error ("** You must add a global ddns-update-style %s%s.",
"statement to ", path_dhcpd_conf);
log_error (" To get the same behaviour as in 3.0b2pl11 %s",
"and previous");
dhcp_failover_set_state (state, recover);
}
}
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
+#if defined (DEBUG_MEMORY_LEAKAGE) && \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
free_everything ();
omapi_print_dmalloc_usage_by_caller ();
}
#else
if (shutdown_state == shutdown_done) {
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
- free_everything ();
- omapi_print_dmalloc_usage_by_caller ();
+#if defined (DEBUG_MEMORY_LEAKAGE) && \
+ defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
+ free_everything ();
+ omapi_print_dmalloc_usage_by_caller ();
#endif
exit (0);
}
.\" dhcpd.conf.5
.\"
-.\" 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-2005 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: dhcpd.conf.5,v 1.66 2002/05/27 03:53:18 murray Exp $
+.\" $Id: dhcpd.conf.5,v 1.67 2005/03/17 20:15:27 dhankins Exp $
.\"
.TH dhcpd.conf 5
.SH NAME
.SH DESCRIPTION
The dhcpd.conf file contains configuration information for
.IR dhcpd,
-the Internet Software Consortium DHCP Server.
+the Internet Systems Consortium DHCP Server.
.PP
The dhcpd.conf file is a free-form ASCII text file. It is parsed by
the recursive-descent parser built into dhcpd. The file may contain
all parameters must be specified before any declarations which depend
on those parameters may be specified.
.PP
-Declarations about network topology include the
- \fIshared-network\fR and the \fIsubnet\fR
-declarations. If clients on a subnet are to be assigned addresses
+Declarations about network topology include the \fIshared-network\fR
+and the \fIsubnet\fR declarations. If clients on a subnet are to be
+assigned addresses
dynamically, a \fIrange\fR declaration must appear within the
\fIsubnet\fR declaration. For clients with statically assigned
addresses, or for installations where only known clients will be
.PP
When dhcpd tries to find a \fIhost\fR declaration for a client, it
first looks for a \fIhost\fR declaration which has a
-\fIfixed-address\fR parameter which matches the subnet or shared
-network on which the client is booting. If it doesn't find any such
-entry, it then tries to find an entry which has no \fIfixed-address\fR
-parameter.
+\fIfixed-address\fR declaration that lists an IP address that is valid
+for the subnet or shared network on which the client is booting. If
+it doesn't find any such entry, it tries to find an entry which has
+no \fIfixed-address\fR declaration.
.SH EXAMPLES
.PP
A typical dhcpd.conf file will look something like this:
.PP
In Figure 1, each host had \fIhost-specific parameters\fR. These
could include such things as the \fIhostname\fR option, the name of a
-file to upload (the \fIfilename parameter) and the address of the
+file to upload (the \fIfilename\fR parameter) and the address of the
server from which to upload the file (the \fInext-server\fR
parameter). In general, any parameter can appear anywhere that
parameters are allowed, and will be applied according to the scope in
option domain-name-servers bogus.example.com;
max-lease-time 300;
range 10.0.0.200 10.0.0.253;
- allow unknown clients;
+ allow unknown-clients;
}
# Known clients get this pool.
option domain-name-servers ns1.example.com, ns2.example.com;
max-lease-time 28800;
range 10.0.0.5 10.0.0.199;
- deny unknown clients;
+ deny unknown-clients;
}
}
.fi
which case the server will send a DHCPNAK even though it doesn't know
about the address.
.PP
-There may be a host declaration matching the client's identification,
-and that host declaration contains a fixed-address declaration that is
-valid for the network segment to which the client is connected. In
-this case, the DHCP server will never do dynamic address allocation.
-In this case, the client is \fIrequired\fB to take the address
-specified in the host declaration. If the client is requesting some
-other address, the server will respond with a DHCPNAK.
+There may be a host declaration matching the client's identification.
+If that host declaration contains a fixed-address declaration that
+lists an IP address that is valid for the network segment to which the
+client is connected. In this case, the DHCP server will never do
+dynamic address allocation. In this case, the client is \fIrequired\fR
+to take the address specified in the host declaration. If the
+client sends a DHCPREQUEST for some other address, the server will respond
+with a DHCPNAK.
.PP
When the DHCP server allocates a new address for a client (remember,
this only happens if the client has sent a DHCPDISCOVER), it first
allocation but has been previously assigned to a different client, the
server will keep looking in hopes of finding an address that has never
before been assigned to a client.
+.PP
+The DHCP server generates the list of available IP addresses from a
+hash table. This means that the addresses are not sorted in any
+particular order, and so it is not possible to predict the order in
+which the DHCP server will allocate IP addresses. Users of previous
+versions of the ISC DHCP server may have become accustomed to the DHCP
+server allocating IP addresses in ascending order, but this is no
+longer possible, and there is no way to configure this behavior with
+version 3 of the ISC DHCP server.
.SH IP ADDRESS CONFLICT PREVENTION
The DHCP server checks IP addresses to see if they are in use before
allocating them to clients. It does this by sending an ICMP Echo
server into the PARTNER-DOWN state.
.PP
You can put the server into the PARTNER-DOWN state either by using the
-.B omshell (8)
+.B omshell (1)
command or by stopping the server, editing the last peer state
declaration in the lease file, and restarting the server. If you use
this last method, be sure to leave the date and time of the start of
network segment. You must not tell one server it's doing failover
on a particular address pool and tell the other it is not. You must
not have any common address pools on which you are not doing
-failover.
+failover. A pool declaration that utilizes failover would look like this:
+.PP
+.nf
+pool {
+ failover peer "foo";
+ deny dynamic bootp clients;
+ \fIpool specific parameters\fR
+};
+.fi
+.PP
+Dynamic BOOTP leases are not compatible with failover, and, as such,
+you need to disallow BOOTP in pools that you are using failover for.
.PP
The server currently does very little sanity checking, so if you
configure it wrong, it will just fail in odd ways. I would recommend
therefore that you either do failover or don't do failover, but don't
do any mixed pools. Also, use the same master configuration file for
-both servers, and have a seperate file that contains the peer
+both servers, and have a separate file that contains the peer
declaration and includes the master file. This will help you to avoid
configuration mismatches. As our implementation evolves, this will
become less of a problem. A basic sample dhcpd.conf file for a
max-response-delay 60;
max-unacked-updates 10;
mclt 3600;
- hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
- 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00;
+ split 128;
load balance max seconds 3;
}
.PP
.B address \fIaddress\fR\fB;\fR
.PP
-The \fBaddress\fR statement declares the IP address on which the
-server should listen for connections from its failover peer, and also
-the value to use for the DHCP Failover Protocol server identifier.
-Because this value is used as an identifier, it may not be omitted.
+The \fBaddress\fR statement declares the IP address or DNS name on which the
+server should listen for connections from its failover peer, and also the
+value to use for the DHCP Failover Protocol server identifier. Because this
+value is used as an identifier, it may not be omitted.
.RE
.PP
The
.PP
.B peer address \fIaddress\fR\fB;\fR
.PP
-The \fBpeer address\fR statement declares the IP address to which the
-server should connect to reach its failover peer for failover
+The \fBpeer address\fR statement declares the IP address or DNS name to
+which the server should connect to reach its failover peer for failover
messages.
.RE
.PP
makes a DHCP request, the DHCP server runs a hash on the client
identification. If the hash comes out to less than the split value,
the primary answers. If it comes out to equal to or more than the
-split, the secondary answers. This value should generally be set to
-128, and can only be configured on the primary.
+split, the secondary answers. The only meaningful value is 128, and can
+only be configured on the primary.
.RE
.PP
The
statement
.RS 0.25i
.PP
-.B hba \fIcolon-seperated-hex-list\fB;\fR
+.B hba \fIcolon-separated-hex-list\fB;\fR
.PP
The hba statement specifies the split between the primary and
secondary as a bitmap rather than a cutoff, which theoretically allows
hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00;
.fi
+.PP
+This is equivalent to a \fBsplit 128;\fR statement. You must only have
+\fBsplit\fR or \fBhba\fR defined, never both. For most cases, the
+fine-grained control that \fBhba\fR offers isn't necessary, and \fBsplit\fR
+should be used. As such, the use of \fBhba\fR is deprecated.
.RE
.PP
The
clients retry.
.RE
.SH CLIENT CLASSING
-Clients can be seperated into classes, and treated differently
-depending on what class they are in. This seperation can be done
+Clients can be separated into classes, and treated differently
+depending on what class they are in. This separation can be done
either with a conditional statement, or with a match statement within
the class declaration. It is possible to specify a limit on the
total number of clients within a particular class or subclass that may
match if substring (option dhcp-client-identifier, 1, 3) = "RAS";
}
.fi
+.PP
Note that whether you use matching expressions or add statements (or
both) to classify clients, you must always write a class declaration
for any class that you use. If there will be no match statement and
no in-scope statements for a class, the declaration should look like
this:
+.PP
.nf
class "ras-clients" {
}
.I ddns-update-style
configuration parameter.
.SH THE AD-HOC DNS UPDATE SCHEME
+The ad-hoc Dynamic DNS update scheme is
+.B now deprecated
+and
+.B
+does not work.
+In future releases of the ISC DHCP server, this scheme will not likely be
+available. The interim scheme works, allows for failover, and should now be
+used. The following description is left here for informational purposes
+only.
+.PP
The ad-hoc Dynamic DNS update scheme implemented in this version of
the ISC DHCP server is a prototype design, which does not
have much to do with the standard update method that is being
}
.fi
.PP
+The \fIprimary\fR statement specifies the IP address of the name
+server whose zone information is to be updated.
+.PP
Note that the zone declarations have to correspond to authority
records in your name server - in the above example, there must be an
SOA record for "example.org." and for "17.10.10.in-addr.arpa.". For
-example, if there were a subdoman "foo.example.org" with no seperate
+example, if there were a subdomain "foo.example.org" with no separate
SOA, you could not write a zone declaration for "foo.example.org."
Also keep in mind that zone names in your DHCP configuration should end in a
"."; this is the preferred syntax. If you do not end your zone name in a
substantially more random key, so we recommend you use that one even
if you are not using BIND 9 as your DNS server. If you are using BIND 9's
dnssec-keygen, the above key would be created as follows:
+.PP
.nf
dnssec-keygen -a HMAC-MD5 -b 128 -n USER DHCP_UPDATER
-
+.fi
+.PP
If you are using the BIND 8 dnskeygen program, the following command will
generate a key as seen above:
+.PP
.nf
dnskeygen -H 128 -u -c -n DHCP_UPDATER
.fi
and modifying it.
.SH REFERENCE: DECLARATIONS
.PP
+.B The
+.I include
+.B statement
+.PP
+.nf
+ \fBinclude\fR \fI"filename"\fR\fB;\fR
+.fi
+.PP
+The \fIinclude\fR statement is used to read in a named file, and process
+the contents of that file as though it were entered in place of the
+include statement.
+.PP
.B The
.I shared-network
.B statement
\fB}\fR
.fi
.PP
-There must be at least one
-.B host
-statement for every BOOTP client that is to be served.
+The
.B host
-statements may also be specified for DHCP clients, although this is
-not required unless booting is only enabled for known hosts.
+declaration provides a scope in which to provide configuration information about
+a specific client, and also provides a way to assign a client a fixed address.
+The host declaration provides a way for the DHCP server to identify a DHCP or
+BOOTP client, and also a way to assign the client a static IP address.
.PP
If it is desirable to be able to boot a DHCP or BOOTP
client on more than one subnet with fixed addresses, more than one
address may be specified in the
.I fixed-address
-parameter, or more than one
+declaration, or more than one
.B host
statement may be specified.
.PP
If client-specific boot parameters must change based on the network
to which the client is attached, then multiple
.B host
-statements should
+declaration should
be used.
.PP
If a client is to be booted using a fixed address if it's
possible, but should be allocated a dynamic address otherwise, then a
.B host
-statement must be specified without a
+declaration must be specified without a
.B fixed-address
-clause.
+declaration.
.I hostname
should be a name identifying the host. If a \fIhostname\fR option is
not specified for the host, \fIhostname\fR is used.
provide a \fIdhcp-client-identifier\fR, so the hardware address must
be used for all clients that may boot using the BOOTP protocol.
.PP
+Please be aware that
+.B only
+the \fIdhcp-client-identifier\fR option and the hardware address can be
+used to match a host declaration. For example, it is not possible to match
+a host declaration to a \fIhost-name\fR option. This is because the
+host-name option cannot be guaranteed to be unique for any given client,
+whereas both the hardware address and \fIdhcp-client-identifier\fR option
+are at least theoretically guaranteed to be unique to a given client.
+.PP
.B The
.I group
.B statement
address assignment to unknown clients is \fBallow\fRed by default.
An unknown client is simply a client that has no host declaration.
.PP
+The use of this option is now \fIdeprecated\fR. If you are trying to
+restrict access on your network to known clients, you should use \fBdeny
+unknown-clients;\fR inside of your address pool, as described under the
+heading ALLOW AND DENY WITHIN POOL DECLARAIONS.
+.PP
.B The
.I bootp
.B keyword
or not to respond to bootp queries. Bootp queries are \fBallow\fRed
by default.
.PP
+This option does not satisfy the requirement of failover peers for denying
+dynamic bootp clients. The \fBdeny dynamic bootp clients;\fR option should
+be used instead. See the ALLOW AND DENY WITHIN POOL DECLARATIONS section
+of this man page for more details.
+.PP
.B The
.I booting
.B keyword
to queries from a particular client. This keyword only has meaning
when it appears in a host declaration. By default, booting is
\fBallow\fRed, but if it is disabled for a particular client, then
-that client will not be able to get and address from the DHCP server.
+that client will not be able to get an address from the DHCP server.
+.PP
.B The
.I duplicates
.B keyword
violation of the DHCP protocol, but can prevent clients whose client
identifiers change regularly from holding many leases at the same time.
By default, duplicates are \fBallow\fRed.
+.PP
.B The
.I declines
.B keyword
DHCPDECLINE messages. If it is set to \fBdeny\fR or \fBignore\fR in
a particular scope, the DHCP server will not respond to DHCPDECLINE
messages.
+.PP
.B The
.I client-updates
.B keyword
When declaring permit lists for address allocation pools, the
following syntaxes are recognized following the allow or deny keywords:
.PP
- \fBknown clients;\fR
+ \fBknown-clients;\fR
.PP
If specified, this statement either allows or prevents allocation from
this pool to any client that has a host declaration (i.e., is known).
A client is known if it has a host declaration in \fIany\fR scope, not
just the current scope.
.PP
- \fBunknown clients;\fR
+ \fBunknown-clients;\fR
.PP
If specified, this statement either allows or prevents allocation from
this pool to any client that has no host declaration (i.e., is not
Unfortunately, some DHCP and BOOTP clients do not do this, and
therefore may not receive responses from the DHCP server. The DHCP
server can be made to always broadcast its responses to clients by
-setting this flag to 'on' for the relevant scope. To avoid creating
-excess broadcast traffic on your network, we recommend that you
-restrict the use of this option to as few clients as possible. For
-example, the Microsoft DHCP client is known not to have this problem,
-as are the OpenTransport and ISC DHCP clients.
+setting this flag to 'on' for the relevant scope; relevant scopes would be
+inside a conditional statement, as a parameter for a class, or as a parameter
+for a host declaration. To avoid creating excess broadcast traffic on your
+network, we recommend that you restrict the use of this option to as few
+clients as possible. For example, the Microsoft DHCP client is known not
+to have this problem, as are the OpenTransport and ISC DHCP clients.
.RE
.PP
The
The \fIboot-unknown-clients\fR statement
.RS 0.25i
.PP
-.B boot-unknown-clients \fIname\fB;\fR
+.B boot-unknown-clients \fIflag\fB;\fR
.PP
If the \fIboot-unknown-clients\fR statement is present and has a value
of \fIfalse\fR or \fIoff\fR, then clients for which there is no
.RE
.PP
The
+.I do-forward-updates
+statement
+.RS 0.25i
+.PP
+.B do-forward-updates \fIflag\fB;\fR
+.PP
+The \fIdo-forward-updates\fR statement instructs the DHCP server as
+to whether it should attempt to update a DHCP client's A record
+when the client acquires or renews a lease. This statement has no
+effect unless DNS updates are enabled and \fBddns-update-style\fR is
+set to \fBinterim\fR. Forward updates are enabled by default. If
+this statement is used to disable forward updates, the DHCP server
+will never attempt to update the client's A record, and will only ever
+attempt to update the client's PTR record if the client supplies an
+FQDN that should be placed in the PTR record using the fqdn option.
+If forward updates are enabled, the DHCP server will still honor the
+setting of the \fBclient-updates\fR flag.
+.RE
+.PP
+The
.I dynamic-bootp-lease-cutoff
statement
.RS 0.25i
.PP
The
.I fixed-address
-statement
+declaration
.RS 0.25i
.PP
.B fixed-address address\fR [\fB,\fR \fIaddress\fR ... ]\fB;\fR
.PP
-The \fIfixed-address\fR statement is used to assign one or more fixed
+The \fIfixed-address\fR declaration is used to assign one or more fixed
IP addresses to a client. It should only appear in a \fIhost\fR
declaration. If more than one address is supplied, then when the
-client boots, it will be assigned the address which corresponds to the
+client boots, it will be assigned the address that corresponds to the
network on which it is booting. If none of the addresses in the
-\fIfixed-address\fR statement are on the network on which the client
-is booting, that client will not match the \fIhost\fR declaration
-containing that \fIfixed-address\fR statement. Each \fIaddress\fR
-should be either an IP address or a domain name which resolves to one
-or more IP addresses.
+\fIfixed-address\fR statement are valid for the network to which the client
+is connected, that client will not match the \fIhost\fR declaration
+containing that \fIfixed-address\fR declaration. Each \fIaddress\fR
+in the \fIfixed-address\fR declaration should be either an IP address or
+a domain name that resolves to one or more IP addresses.
.RE
.PP
The
The
.I hardware-address
should be a set of hexadecimal octets (numbers from 0 through ff)
-seperated by colons. The \fIhardware\fR statement may also be used
+separated by colons. The \fIhardware\fR statement may also be used
for DHCP clients.
.RE
.PP
.RE
.PP
The
+.I local-address
+statement
+.RS 0.25i
+.PP
+.B local-address \fIaddress\fB;\fR
+.PP
+This statement causes the DHCP server to listen for DHCP requests sent
+to the specified \fIaddress\fR, rather than requests sent to all addresses.
+Since serving directly attached DHCP clients implies that the server must
+respond to requests sent to the all-ones IP address, this option cannot be
+used if clients are on directly attached networks...it is only realistically
+useful for a server whose only clients are reached via unicasts, such as via
+DHCP relay agents.
+.PP
+Note: This statement is only effective if the server was compiled using
+the USE_SOCKETS #define statement, which is default on a small number of
+operating systems, and must be explicitly chosen at compile-time for all
+others. You can be sure if your server is compiled with USE_SOCKETS if
+you see lines of this format at startup:
+.PP
+ Listening on Socket/eth0
+.PP
+Note also that since this bind()s all DHCP sockets to the specified
+address, that only one address may be supported in a daemon at a given
+time.
+.RE
+.PP
+The
.I log-facility
statement
.RS 0.25i
response \fIis\fR heard, the lease is abandoned, and the server does
not respond to the client.
.PP
-This \fIping check\fR introduces a one-second delay in responding to
-DHCPDISCOVER messages, which can be a problem for some clients. The
-ping-check configuration parameter can be used to control checking -
-if its value is false, no ping check is done.
+This \fIping check\fR introduces a default one-second delay in responding
+to DHCPDISCOVER messages, which can be a problem for some clients. The
+default delay of one second may be configured using the ping-timeout
+parameter. The ping-check configuration parameter can be used to control
+checking - if its value is false, no ping check is done.
+.RE
+.PP
+The
+.I ping-timeout
+statement
+.RS 0.25i
+.PP
+.B ping-timeout
+.I seconds\fR\fB;\fR
+.PP
+If the DHCP server determined it should send an ICMP echo request (a
+\fIping\fR) because the ping-check statement is true, ping-timeout allows
+you to configure how many seconds the DHCP server should wait for an
+ICMP Echo response to be heard, if no ICMP Echo response has been received
+before the timeout expires, it assigns the address. If a response \fIis\fR
+heard, the lease is abandoned, and the server does not respond to the client.
+If no value is set, ping-timeout defaults to 1 second.
.RE
.PP
The
might use the same option code that another vendor's client uses, for
different purposes. The \fIsite-option-space\fR option can be used
to assign a different set of site-specific options for each such
-vendor, using conditional evaluation (see \fIdhcp-eval.5\fR for
+vendor, using conditional evaluation (see \fBdhcp-eval (5)\fR for
details).
.RE
.PP
client renews its lease, rather than only attempting an update when it
appears to be necessary. This will allow the DNS to heal from
database inconsistencies more easily, but the cost is that the DHCP
-server must do many more DNS updates. We do not recommend enabling
-this on large networks with the current DHCP server. This option
-only affects the behavior of the interim DNS update scheme,
-and has no effect on the ad-hoc DNS update scheme. If this
-parameter is not specified, or is false, the DHCP server will only
-update when the client information changes, the client gets a
+server must do many more DNS updates. We recommend leaving this option
+enabled, which is the default. This option only affects the behavior of
+the interim DNS update scheme, and has no effect on the ad-hoc DNS update
+scheme. If this parameter is not specified, or is true, the DHCP server
+will only update when the client information changes, the client gets a
different lease, or the client's lease expires.
.RE
.PP
use-host-decl-names on;
host joe {
- hardware ethernet 08:00:2b:4c:29:32;
- fixed-address joe.fugue.com;
+ hardware ethernet 08:00:2b:4c:29:32;
+ fixed-address joe.fugue.com;
}
}
is equivalent to
host joe {
- hardware ethernet 08:00:2b:4c:29:32;
- fixed-address joe.fugue.com;
+ hardware ethernet 08:00:2b:4c:29:32;
+ fixed-address joe.fugue.com;
option host-name "joe";
}
.fi
.PP
The \fIvendor-option-space\fR parameter determines from what option
space vendor options are taken. The use of this configuration
-parameter is illustrated in the \fIdhcp-options(5)\fR manual page, in
+parameter is illustrated in the \fBdhcp-options(5)\fR manual page, in
the \fIVENDOR ENCAPSULATED OPTIONS\fR section.
.RE
.SH SETTING PARAMETER VALUES USING EXPRESSIONS
dhcpd(8), dhcpd.leases(5), dhcp-options(5), dhcp-eval(5), RFC2132, RFC2131.
.SH AUTHOR
.B dhcpd.conf(5)
-was written by Ted Lemon <mellon@vix.com>
+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
-.B http://www.isc.org/isc.
+for this project was provided by Internet Systems Consortium.
+Information about Internet Systems Consortium can be found at
+.B http://www.isc.org.
.\" dhcpd.leases.5
.\"
-.\" 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''.
.\"
-.\" $Id: dhcpd.leases.5,v 1.9 2002/05/27 03:53:19 murray Exp $
+.\" $Id: dhcpd.leases.5,v 1.10 2005/03/17 20:15:28 dhankins Exp $
.\"
.TH dhcpd.leases 5
.SH NAME
dhcpd.leases - DHCP client lease database
.SH DESCRIPTION
-The Internet Software Consortium DHCP Server keeps a persistent
+The Internet Systems Consortium DHCP Server keeps a persistent
database of leases that it has assigned. This database is a free-form
ASCII file containing a series of lease declarations. Every time a
lease is acquired, renewed or released, its new value is recorded at
.PP
.B lease \fIip-address\fB { \fIstatements...\fB }
.PP
-Each lease declaration include the single IP address that has been
+Each lease declaration includes the single IP address that has been
leased to the client. The statements within the braces define the
duration of the lease and to whom it is assigned.
.PP
.PP
The hardware statement records the MAC address of the network
interface on which the lease will be used. It is specified as a
-series of hexadecimal octets, seperated by colons.
+series of hexadecimal octets, separated by colons.
.PP
.B uid \fIclient-identifier\fB;\fR
.PP
ethernet) followed by the MAC address, just like in the \fBhardware\fI
statement, but this is not required.
.PP
-The client identifier is recorded as a colon-seperated hexadecimal
+The client identifier is recorded as a colon-separated hexadecimal
list or as a quoted string. If it is recorded as a quoted string and
it contains one or more non-printable characters, those characters are
represented as octal escapes - a backslash character followed by three
The \fBon\fI statement records a list of statements to execute if a
certain event occurs. The possible events that can occur for an
active lease are \fBrelease\fR and \fBexpiry\fR. More than one event
-can be specified - if so, the events are seperated by '|' characters.
+can be specified - if so, the events are separated by '|' characters.
.SH THE FAILOVER PEER STATE DECLARATION
The state of any failover peering arrangements is also recorded in the
lease file, using the \fBfailover peer\fR statement:
dhcpd(8), dhcp-options(5), dhcp-eval(5), dhcpd.conf(5), RFC2132, RFC2131.
.SH AUTHOR
.B dhcpd(8)
-was written by Ted Lemon <mellon@vix.com>
+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/
Failover protocol support code... */
/*
- * Copyright (c) 1999-2001 Internet Software Consortium.
- * All rights reserved.
+ * Copyright (c) 2004-2005 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: failover.c,v 1.57 2001/08/10 10:50:49 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: failover.c,v 1.58 2005/03/17 20:15:28 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
#include <omapip/omapip_p.h>
#if defined (FAILOVER_PROTOCOL)
-static struct hash_table *failover_hash;
dhcp_failover_state_t *failover_states;
static isc_result_t do_a_failover_option (omapi_object_t *,
dhcp_failover_link_t *);
return ISC_R_SUCCESS;
}
+ if (!strcmp (name, "status")) {
+ if (link -> state_object) {
+ isc_result_t status;
+
+ status = va_arg(ap, isc_result_t);
+
+ if ((status == ISC_R_HOSTUNREACH) || (status == ISC_R_TIMEDOUT)) {
+ dhcp_failover_state_reference (&state,
+ link -> state_object, MDL);
+ link -> state = dhcp_flink_disconnected;
+
+ /* Make the transition. */
+ dhcp_failover_state_transition (link -> state_object,
+ "disconnect");
+
+ /* Start trying to reconnect. */
+#if defined (DEBUG_FAILOVER_TIMING)
+ log_info ("add_timeout +5 %s",
+ "dhcp_failover_reconnect");
+#endif
+ add_timeout (cur_time + 5, dhcp_failover_reconnect,
+ state,
+ (tvref_t)dhcp_failover_state_reference,
+ (tvunref_t)dhcp_failover_state_dereference);
+ }
+ dhcp_failover_state_dereference (&state, MDL);
+ }
+ return ISC_R_SUCCESS;
+ }
+
/* Not a signal we recognize? */
if (strcmp (name, "ready")) {
if (h -> inner && h -> inner -> type -> signal_handler)
badconnect:
/* XXX Send a refusal message first?
XXX Look in protocol spec for guidance. */
- log_error ("Failover CONNECT from %d.%d.%d.%d: %s",
+ log_error ("Failover CONNECT from %u.%u.%u.%u: %s",
((u_int8_t *)
(&link -> imsg -> server_addr)) [0],
((u_int8_t *)
link);
if (link -> imsg -> reject_reason) {
- log_error ("Failover CONNECT to %d.%d.%d.%d%s%s",
+ log_error ("Failover CONNECT to %u.%u.%u.%u%s%s",
((u_int8_t *)
(&link -> imsg -> server_addr)) [0],
((u_int8_t *)
errmsg = "unknown server";
reason = FTR_INVALID_PARTNER;
badconnectack:
- log_error ("Failover CONNECTACK from %d.%d.%d.%d: %s",
+ log_error ("Failover CONNECTACK from %u.%u.%u.%u: %s",
((u_int8_t *)
(&link -> imsg -> server_addr)) [0],
((u_int8_t *)
(tvunref_t)dhcp_failover_state_dereference);
} else if (link -> imsg -> type == FTM_DISCONNECT) {
if (link -> imsg -> reject_reason) {
- log_error ("Failover DISCONNECT from %d.%d.%d.%d%s%s",
+ log_error ("Failover DISCONNECT from %u.%u.%u.%u%s%s",
((u_int8_t *)
(&link -> imsg -> server_addr)) [0],
((u_int8_t *)
if (state -> service_state != not_responding) {
switch (state -> partner.state) {
case partner_down:
- case recover:
state -> service_state = not_responding;
state -> nrr = " (recovering)";
break;
case unknown_state:
case normal:
case potential_conflict:
- case recover:
case recover_done:
case shut_down:
case paused:
case partner_down:
case communications_interrupted:
case resolution_interrupted:
+ case recover:
break;
}
}
XXX clever detection of when we should send an
XXX UPDREQALL message rather than an UPDREQ
XXX message. What to do, what to do? */
- dhcp_failover_send_update_request (state);
+ /* Currently when we enter recover state, no matter
+ * the reason, we send an UPDREQALL. So, it makes
+ * the most sense to stick to that until something
+ * better is done.
+ * Furthermore, we only went to send the update
+ * request if we are not in startup state.
+ */
+ if (state -> me.state == recover)
+ dhcp_failover_send_update_request_all (state);
break;
case shut_down:
binding_state_t peer_lease_state;
binding_state_t my_lease_state;
struct lease **lq;
+ int tenper;
if (state -> me.state != normal || state -> i_am == secondary)
return 0;
lq = &p -> backup;
}
- log_info ("pool %lx total %d free %d backup %d lts %d",
- (unsigned long)p, p -> lease_count,
- p -> free_leases, p -> backup_leases, lts);
+ tenper = (p -> backup_leases + p -> free_leases) / 10;
+ if (tenper == 0)
+ tenper = 1;
+ if (lts > tenper) {
+ log_info ("pool %lx %s total %d free %d %s %d lts %d",
+ (unsigned long)p,
+ (p -> shared_network ?
+ p -> shared_network -> name : ""), p -> lease_count,
+ p -> free_leases, "backup", p -> backup_leases, lts);
- if (lts > 1) {
lease_reference (&lp, *lq, MDL);
while (lp && lts) {
}
if (lts > 1) {
log_info ("lease imbalance - lts = %d", lts);
- leases_queued -= lts;
}
}
}
{
int lts;
struct lease *lp;
+ int tenper;
if (!pool -> failover_peer ||
- pool -> failover_peer -> i_am == primary ||
pool -> failover_peer -> me.state != normal)
return 0;
else
lts = (pool -> free_leases - pool -> backup_leases) / 2;
- log_info ("pool %lx total %d free %d backup %d lts %d",
- (unsigned long)pool, pool -> lease_count,
+ log_info ("pool %lx %s total %d free %d backup %d lts %d",
+ (unsigned long)pool,
+ pool -> shared_network ? pool -> shared_network -> name : "",
+ pool -> lease_count,
pool -> free_leases, pool -> backup_leases, lts);
- if (lts > 1) {
+ tenper = (pool -> backup_leases + pool -> free_leases) / 10;
+ if (tenper == 0)
+ tenper = 1;
+ if (lts > tenper) {
/* XXX What about multiple pools? */
- dhcp_failover_send_poolreq (pool -> failover_peer);
- return 1;
+ if (pool -> failover_peer -> i_am == secondary) {
+ /* Ask the primary to send us leases. */
+ dhcp_failover_send_poolreq (pool -> failover_peer);
+ return 1;
+ } else {
+ /* Figure out how many leases to skip on the backup
+ list. We skip the earliest leases on the list
+ to reduce the chance of trying to steal a lease
+ that the secondary is about to allocate. */
+ int i = pool -> backup_leases - lts;
+ log_info ("Taking %d leases from secondary.", lts);
+ for (lp = pool -> backup; lp; lp = lp -> next) {
+ /* Skip to the last leases on the free
+ list, because they are less likely
+ to already have been allocated. */
+ if (i)
+ --i;
+ else {
+ lp -> desired_binding_state = FTS_FREE;
+ dhcp_failover_queue_update (lp, 1);
+ --lts;
+ }
+ }
+ if (lts)
+ log_info ("failed to take %d leases.", lts);
+ }
}
return 0;
}
if (status == ISC_R_SUCCESS) {
for (s = failover_states; s; s = s -> next) {
unsigned l = strlen (s -> name);
- if (l == tv -> value -> u.buffer.len ||
+ if (l == tv -> value -> u.buffer.len &&
!memcmp (s -> name,
tv -> value -> u.buffer.value, l))
break;
va_list va;
char tbuf [256];
+ /* %Audit% Truncation causes panic. %2004.06.17,Revisit%
+ * It is unclear what the effects of truncation here are, or
+ * how that condition should be handled. It seems that this
+ * function is used for formatting messages in the failover
+ * command channel. For now the safest thing is for
+ * overflow-truncation to cause a fatal log.
+ */
va_start (va, fmt);
-#if defined (HAVE_SNPRINTF)
- /* Presumably if we have snprintf, we also have
- vsnprintf. */
- vsnprintf (tbuf, sizeof tbuf, fmt, va);
-#else
- vsprintf (tbuf, fmt, va);
-#endif
+ if (vsnprintf (tbuf, sizeof tbuf, fmt, va) >= sizeof tbuf)
+ log_fatal ("%s: vsnprintf would truncate",
+ "dhcp_failover_make_option");
va_end (va);
return dhcp_failover_make_option (code, obuf, obufix, obufmax,
unsigned size, count;
unsigned val;
u_int8_t *iaddr;
- unsigned ilen;
+ unsigned ilen = 0;
u_int8_t *bval;
- char *txt;
+ char *txt = NULL;
#if defined (DEBUG_FAILOVER_MESSAGES)
char tbuf [256];
#endif
/* shouldn't get here. */
log_fatal ("bogus type in failover_make_option: %d",
info -> type);
- break;
+ return &null_failover_option;
}
}
/* Allocate a buffer for the option. */
option.count = size;
option.data = dmalloc (option.count, MDL);
- if (!option.data)
+ if (!option.data) {
+ va_end (va);
return &null_failover_option;
+ }
/* Put in the option code and option length. */
putUShort (option.data, code);
putUShort (&option.data [2], size - 4);
#if defined (DEBUG_FAILOVER_MESSAGES)
- sprintf (tbuf, " (%s<%d>", info -> name, option.count);
+ /* %Audit% Truncation causes panic. %2004.06.17,Revisit%
+ * It is unclear what the effects of truncation here are, or
+ * how that condition should be handled. It seems that this
+ * message may be sent over the failover command channel.
+ * For now the safest thing is for overflow-truncation to cause
+ * a fatal log.
+ */
+ if (snprintf (tbuf, sizeof tbuf, " (%s<%d>", info -> name,
+ option.count) >= sizeof tbuf)
+ log_fatal ("dhcp_failover_make_option: tbuf overflow");
failover_print (obuf, obufix, obufmax, tbuf);
#endif
for (i = 0; i < count; i++) {
val = va_arg (va, unsigned);
#if defined (DEBUG_FAILOVER_MESSAGES)
+ /* %Audit% Cannot exceed 24 bytes. %2004.06.17,Safe% */
sprintf (tbuf, " %d", val);
failover_print (obuf, obufix, obufmax, tbuf);
#endif
dfree (option.data, MDL);
log_error ("IP addrlen=%d, should be 4.",
ilen);
+ va_end (va);
return &null_failover_option;
}
#if defined (DEBUG_FAILOVER_MESSAGES)
- sprintf (tbuf, " %u.%u.%u.%u", iaddr [0], iaddr [1],
- iaddr [2], iaddr [3]);
+ /*%Audit% Cannot exceed 17 bytes. %2004.06.17,Safe%*/
+ sprintf (tbuf, " %u.%u.%u.%u",
+ iaddr [0], iaddr [1], iaddr [2], iaddr [3]);
failover_print (obuf, obufix, obufmax, tbuf);
#endif
memcpy (&option.data [4 + i * ilen], iaddr, ilen);
for (i = 0; i < count; i++) {
val = va_arg (va, unsigned);
#if defined (DEBUG_FAILOVER_MESSAGES)
+ /*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/
sprintf (tbuf, " %d", val);
failover_print (obuf, obufix, obufmax, tbuf);
#endif
bval = va_arg (va, u_int8_t *);
#if defined (DEBUG_FAILOVER_MESSAGES)
for (i = 0; i < count; i++) {
+ /* 23 bytes plus nul, safe. */
sprintf (tbuf, " %d", bval [i]);
failover_print (obuf, obufix, obufmax, tbuf);
}
break;
/* On output, TEXT_OR_BYTES is _always_ text, and always NUL
- terminated. Note that the caller should be careful not to
- provide a format and data that amount to more than 256 bytes
- of data, since it will be truncated on platforms that
- support snprintf, and will mung the stack on those platforms
- that do not support snprintf. Also, callers should not pass
- data acquired from the network without specifically checking
- it to make sure it won't bash the stack. */
+ terminated. Note that the caller should be careful not
+ to provide a format and data that amount to more than 256
+ bytes of data, since it will cause a fatal error. */
case FT_TEXT_OR_BYTES:
case FT_TEXT:
#if defined (DEBUG_FAILOVER_MESSAGES)
- sprintf (tbuf, "\"%s\"", txt);
+ /* %Audit% Truncation causes panic. %2004.06.17,Revisit%
+ * It is unclear what the effects of truncation here are, or
+ * how that condition should be handled. It seems that this
+ * function is used for formatting messages in the failover
+ * command channel. For now the safest thing is for
+ * overflow-truncation to cause a fatal log.
+ */
+ if (snprintf (tbuf, sizeof tbuf, "\"%s\"", txt) >= sizeof tbuf)
+ log_fatal ("dhcp_failover_make_option: tbuf overflow");
failover_print (obuf, obufix, obufmax, tbuf);
#endif
memcpy (&option.data [4], txt, count);
memcpy (&option.data [4 + count], bval, size - count - 4);
#if defined (DEBUG_FAILOVER_MESSAGES)
for (i = 4; i < size; i++) {
+ /*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/
sprintf (tbuf, " %d", option.data [i]);
failover_print (obuf, obufix, obufmax, tbuf);
}
for (i = 0; i < count; i++) {
val = va_arg (va, u_int32_t);
#if defined (DEBUG_FAILOVER_MESSAGES)
+ /*%Audit% Cannot exceed 24 bytes. %2004.06.17,Safe%*/
sprintf (tbuf, " %d", val);
failover_print (obuf, obufix, obufmax, tbuf);
#endif
#if defined DEBUG_FAILOVER_MESSAGES
failover_print (obuf, obufix, obufmax, ")");
#endif
+ va_end (va);
/* Now allocate a place to store what we just set up. */
op = dmalloc (sizeof (failover_option_t), MDL);
lease -> ip_addr.len,
lease -> ip_addr.iabuf),
dhcp_failover_make_option (FTO_BINDING_STATUS, FMA,
- lease -> binding_state),
+ lease -> desired_binding_state),
lease -> uid_len
? dhcp_failover_make_option (FTO_CLIENT_IDENTIFIER, FMA,
lease -> uid_len,
status = (dhcp_failover_put_message
(link, link -> outer,
- FTM_POOLREQ,
+ FTM_POOLRESP,
dhcp_failover_make_option (FTO_ADDRESSES_TRANSFERRED, FMA,
leases),
(failover_option_t *)0));
if (!link -> outer || link -> outer -> type != omapi_type_connection)
return ISC_R_INVALIDARG;
+ if (state -> curUPD)
+ return ISC_R_ALREADYRUNNING;
+
status = (dhcp_failover_put_message
(link, link -> outer,
FTM_UPDREQ,
(failover_option_t *)0));
+ if (status == ISC_R_SUCCESS)
+ state -> curUPD = FTM_UPDREQ;
+
#if defined (DEBUG_FAILOVER_MESSAGES)
if (status != ISC_R_SUCCESS)
failover_print (FMA, " (failed)");
log_debug ("%s", obuf);
}
#endif
+ log_info ("Sent update request message to %s", state -> name);
return status;
}
if (!link -> outer || link -> outer -> type != omapi_type_connection)
return ISC_R_INVALIDARG;
+ /* If there is an UPDREQ in progress, then upgrade to UPDREQALL. */
+ if (state -> curUPD && (state -> curUPD != FTM_UPDREQ))
+ return ISC_R_ALREADYRUNNING;
+
status = (dhcp_failover_put_message
(link, link -> outer,
FTM_UPDREQALL,
(failover_option_t *)0));
+ if (status == ISC_R_SUCCESS)
+ state -> curUPD = FTM_UPDREQALL;
+
#if defined (DEBUG_FAILOVER_MESSAGES)
if (status != ISC_R_SUCCESS)
failover_print (FMA, " (failed)");
log_debug ("%s", obuf);
}
#endif
+ log_info ("Sent update request all message to %s", state -> name);
return status;
}
}
#endif
+ log_info ("Sent update done message to %s", state -> name);
+
/* There may be uncommitted leases at this point (since
dhcp_failover_process_bind_ack() doesn't commit leases);
commit the lease file. */
}
if (msg -> options_present & FTB_CHADDR) {
+ if (msg->binding_status == FTS_ABANDONED) {
+ message = "BNDUPD to ABANDONED with a CHADDR";
+ goto bad;
+ }
if (msg -> chaddr.count > sizeof lt -> hardware_addr.hbuf) {
message = "chaddr to long";
goto bad;
lt -> hardware_addr.hlen = msg -> chaddr.count;
memcpy (lt -> hardware_addr.hbuf, msg -> chaddr.data,
msg -> chaddr.count);
- }
+ } else if (msg->binding_status == FTS_ACTIVE ||
+ msg->binding_status == FTS_EXPIRED ||
+ msg->binding_status == FTS_RELEASED) {
+ message = "BNDUPD without CHADDR";
+ goto bad;
+ } else if (msg->binding_status == FTS_ABANDONED) {
+ lt->hardware_addr.hlen = 0;
+ if (lt->scope)
+ binding_scope_dereference(<->scope, MDL);
+ }
+
+ /* There is no explicit message content to indicate that the client
+ * supplied no client-identifier. So if we don't hear of a value,
+ * we discard the last one.
+ */
+ if (msg->options_present & FTB_CLIENT_IDENTIFIER) {
+ if (msg->binding_status == FTS_ABANDONED) {
+ message = "BNDUPD to ABANDONED with client-id";
+ goto bad;
+ }
- if (msg -> options_present & FTB_CLIENT_IDENTIFIER) {
- lt -> uid_len = msg -> client_identifier.count;
- if (lt -> uid_len > sizeof lt -> uid_buf) {
- lt -> uid_max = lt -> uid_len;
- lt -> uid = dmalloc (lt -> uid_len, MDL);
- if (!lt -> uid) {
- message = "no memory";
- goto bad;
+ lt->uid_len = msg->client_identifier.count;
+
+ /* Allocate the lt->uid buffer if we haven't already, or
+ * re-allocate the lt-uid buffer if we have one that is not
+ * large enough. Otherwise, just use the extant buffer.
+ */
+ if (!lt->uid || lt->uid == lt->uid_buf ||
+ lt->uid_len > lt->uid_max) {
+ if (lt->uid && lt->uid != lt->uid_buf)
+ dfree(lt->uid, MDL);
+
+ if (lt->uid_len > sizeof(lt->uid_buf)) {
+ lt->uid_max = lt->uid_len;
+ lt->uid = dmalloc(lt->uid_len, MDL);
+ if (!lt->uid) {
+ message = "no memory";
+ goto bad;
+ }
+ } else {
+ lt->uid_max = sizeof(lt->uid_buf);
+ lt->uid = lt->uid_buf;
}
- } else {
- lt -> uid_max = sizeof lt -> uid_buf;
- lt -> uid = lt -> uid_buf;
}
memcpy (lt -> uid,
msg -> client_identifier.data, lt -> uid_len);
+ } else if (lt->uid && msg->binding_status != FTS_RESET &&
+ msg->binding_status != FTS_FREE &&
+ msg->binding_status != FTS_BACKUP) {
+ if (lt->uid != lt->uid_buf)
+ dfree (lt->uid, MDL);
+ lt->uid = NULL;
+ lt->uid_max = lt->uid_len = 0;
}
-
+
+ /* If the lease was expired, also remove the stale binding scope. */
+ if (lt->scope && lt->ends < cur_time)
+ binding_scope_dereference(<->scope, MDL);
+
/* XXX Times may need to be adjusted based on clock skew! */
if (msg -> options_present & FTB_STOS) {
lt -> starts = msg -> stos;
}
if (new_binding_state != msg -> binding_status) {
char outbuf [100];
-#if !defined (NO_SNPRINTF)
- snprintf (outbuf, sizeof outbuf,
+
+ if (snprintf (outbuf, sizeof outbuf,
"%s: invalid state transition: %s to %s",
piaddr (lease -> ip_addr),
binding_state_print (lease -> binding_state),
- binding_state_print (msg -> binding_status));
-#else
- sprintf (outbuf,
- "%s: invalid state transition: %s to %s",
- piaddr (lease -> ip_addr),
- binding_state_print (lease -> binding_state),
- binding_state_print (msg -> binding_status));
-#endif
+ binding_state_print (msg -> binding_status))
+ >= sizeof outbuf)
+ log_fatal ("%s: impossible outbuf overflow",
+ "dhcp_failover_process_bind_update");
+
dhcp_failover_send_bind_ack (state, msg,
FTR_FATAL_CONFLICT,
outbuf);
commit_leases ();
} else {
lease -> tsfp = msg -> potential_expiry;
+ if ((lease -> desired_binding_state !=
+ lease -> binding_state) &&
+ (msg -> options_present & FTB_BINDING_STATUS) &&
+ (msg -> binding_status ==
+ lease -> desired_binding_state)) {
+ lease -> next_binding_state =
+ lease -> desired_binding_state;
+ supersede_lease (lease,
+ (struct lease *)0, 0, 0, 0);
+ }
write_lease (lease);
-#if 0 /* XXX This might be needed. */
- if (state -> me.state == normal)
- commit_leases ();
-#endif
+ /* Commit the lease only after a two-second timeout,
+ so that if we get a bunch of acks in quick
+ successtion (e.g., when stealing leases from the
+ secondary), we do not do an immediate commit for
+ each one. */
+ add_timeout (cur_time + 2,
+ commit_leases_timeout, (void *)0, 0, 0);
}
+ } else if (lease -> desired_binding_state != lease -> binding_state &&
+ (msg -> options_present & FTB_BINDING_STATUS) &&
+ msg -> binding_status == lease -> desired_binding_state) {
+ lease -> next_binding_state = lease -> desired_binding_state;
+ supersede_lease (lease, (struct lease *)0, 0, 0, 0);
+ write_lease (lease);
+ add_timeout (cur_time + 2, commit_leases_timeout,
+ (void *)0, 0, 0);
}
unqueue:
}
if (state -> send_update_done)
lease_dereference (&state -> send_update_done, MDL);
+ state -> cur_unacked_updates = 0;
/* Loop through each pool in each shared network and call the
expiry routine on the pool. */
(l -> starts != MIN_TIME ||
l -> ends != MIN_TIME)) ||
l -> tstp > l -> tsfp)) {
+ l -> desired_binding_state = l -> binding_state;
dhcp_failover_queue_update (l, 0);
}
}
lease_reference (&state -> send_update_done,
state -> update_queue_tail, MDL);
dhcp_failover_send_updates (state);
+ log_info ("Update request from %s: sending update",
+ state -> name);
} else {
/* Otherwise, there are no updates to send, so we can
just send an UPDDONE message immediately. */
dhcp_failover_send_update_done (state);
+ log_info ("Update request from %s: nothing pending",
+ state -> name);
}
return ISC_R_SUCCESS;
lease_reference (&state -> send_update_done,
state -> update_queue_tail, MDL);
dhcp_failover_send_updates (state);
+ log_info ("Update request all from %s: sending update",
+ state -> name);
} else {
/* This should really never happen, but it could happen
on a server that currently has no leases configured. */
dhcp_failover_send_update_done (state);
+ log_info ("Update request all from %s: nothing pending",
+ state -> name);
}
return ISC_R_SUCCESS;
log_info ("failover peer %s: peer update completed.",
state -> name);
+ state -> curUPD = 0;
+
switch (state -> me.state) {
case unknown_state:
case partner_down:
case FTS_ACTIVE:
case FTS_ABANDONED:
case FTS_BACKUP:
- case FTS_RESERVED:
- case FTS_BOOTP:
+ case FTS_EXPIRED:
+ case FTS_RELEASED:
+ case FTS_RESET:
/* If the lease was free, and our peer is primary,
then it can make it active, or abandoned, or
backup. Abandoned is treated like free in
peer to change its state anyway, but log a warning
message in hopes that the error will be fixed. */
case FTS_FREE: /* for compiler */
- case FTS_EXPIRED:
- case FTS_RELEASED:
- case FTS_RESET:
- log_error ("allowing %s%s: %s to %s",
- "invalid peer state transition on ",
- piaddr (lease -> ip_addr),
- (binding_state_print
- (lease -> binding_state)),
- binding_state_print (binding_state));
new_state = binding_state;
goto out;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
/* The secondary can't change the state of an active
lease. */
if (state -> i_am == primary) {
+ /* Except that the client may send the DHCPRELEASE
+ to the secondary, and we have to accept that. */
+ if (binding_state == FTS_RELEASED)
+ return binding_state;
new_state = lease -> binding_state;
goto out;
}
return binding_state;
case FTS_EXPIRED:
- if (lease -> ends > cur_time) {
+ /* XXX 65 should be the clock skew between the peers
+ XXX plus a fudge factor. This code will result
+ XXX in problems if MCLT is really short or the
+ XXX max-lease-time is really short (less than the
+ XXX fudge factor. */
+ if (lease -> ends - 65 > cur_time) {
new_state = lease -> binding_state;
goto out;
}
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_RELEASED:
case FTS_ABANDONED:
case FTS_RESET:
case FTS_ACTIVE:
return binding_state;
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
break;
case FTS_EXPIRED:
}
return binding_state;
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_ACTIVE:
case FTS_RELEASED:
case FTS_ABANDONED:
case FTS_RESET:
case FTS_EXPIRED:
return binding_state;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
case FTS_RELEASED:
switch (binding_state) {
/* These are invalid state transitions - should we
prevent them? */
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_EXPIRED:
case FTS_ABANDONED:
case FTS_RESET:
case FTS_ACTIVE:
case FTS_RELEASED:
return binding_state;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
case FTS_RESET:
switch (binding_state) {
return binding_state;
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_EXPIRED:
case FTS_RELEASED:
case FTS_ABANDONED:
case FTS_RESET:
return binding_state;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
case FTS_BACKUP:
switch (binding_state) {
case FTS_ACTIVE:
case FTS_ABANDONED:
- case FTS_FREE:
- case FTS_RESERVED:
- case FTS_BOOTP:
- /* If the lease was in backup, and our peer is
- secondary, then it can make it active, or
- abandoned, or free. */
- if (state -> i_am == primary)
- return binding_state;
-
- /* Otherwise, it can't do any sort of state
- transition, but because the lease was free
- we allow it to do the transition, and just
- log the error. */
case FTS_EXPIRED:
case FTS_RELEASED:
case FTS_RESET:
- log_error ("allowing %s%s: %s to %s",
- "invalid peer state transition on ",
- piaddr (lease -> ip_addr),
- (binding_state_print
- (lease -> binding_state)),
- binding_state_print (binding_state));
- new_state = binding_state;
- goto out;
+ /* If the lease was in backup, and our peer
+ is secondary, then it can make it active
+ or abandoned. */
+ if (state -> i_am == primary)
+ return binding_state;
+
+ /* Either the primary or the secondary can
+ reasonably move a lease from the backup
+ state to the free state. */
+ case FTS_FREE:
+ return binding_state;
case FTS_BACKUP:
new_state = lease -> binding_state;
goto out;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
out:
return new_state;
going to take the partner's change if the partner
thinks it's free. */
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
switch (binding_state) {
case FTS_FREE:
case FTS_BACKUP:
new_state = binding_state;
break;
- case FTS_RESERVED:
- case FTS_BOOTP:
case FTS_ACTIVE:
new_state = binding_state;
break;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
break;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return FTS_RESET;
}
}
return new_state;
case FTS_RESET:
case FTS_RELEASED:
case FTS_EXPIRED:
- case FTS_BOOTP:
- case FTS_RESERVED:
if (peer -> service_state == service_partner_down &&
(lease -> tsfp < peer -> me.stos
? peer -> me.stos + peer -> mclt < cur_time
return "backup";
break;
- case FTS_RESERVED:
- return "reserved";
- break;
-
- case FTS_BOOTP:
- return "bootp";
- break;
-
default:
return "unknown";
break;
Server-specific in-memory database support. */
/*
- * 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''.
#ifndef lint
static char copyright[] =
-"$Id: mdb.c,v 1.71 2001/07/10 20:36:05 brister Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: mdb.c,v 1.72 2005/03/17 20:15:28 dhankins Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
+#include "omapip/hash.h"
struct subnet *subnets;
struct shared_network *shared_networks;
-struct hash_table *host_hw_addr_hash;
-struct hash_table *host_uid_hash;
-struct hash_table *lease_uid_hash;
-struct hash_table *lease_ip_addr_hash;
-struct hash_table *lease_hw_addr_hash;
-struct hash_table *host_name_hash;
+host_hash_t *host_hw_addr_hash;
+host_hash_t *host_uid_hash;
+host_hash_t *host_name_hash;
+lease_hash_t *lease_uid_hash;
+lease_hash_t *lease_ip_addr_hash;
+lease_hash_t *lease_hw_addr_hash;
int numclasseswritten;
struct executable_statement *esp;
if (!host_name_hash) {
- host_name_hash =
- new_hash ((hash_reference)host_reference,
- (hash_dereference)host_dereference, 0, MDL);
- if (!host_name_hash)
+ if (!host_new_hash (&host_name_hash, 0, MDL))
log_fatal ("Can't allocate host name hash");
host_hash_add (host_name_hash,
(unsigned char *)hd -> name,
strlen (hd -> name), MDL);
/* If the old entry wasn't dynamic, then we
always have to keep the deletion. */
- if (!hp -> flags & HOST_DECL_DYNAMIC)
+ if (hp -> flags & HOST_DECL_STATIC) {
hd -> flags |= HOST_DECL_STATIC;
+ }
+ host_dereference (&hp, MDL);
}
/* If we are updating an existing host declaration, we
if (hd -> interface.hlen) {
if (!host_hw_addr_hash) {
- host_hw_addr_hash =
- new_hash ((hash_reference)host_reference,
- (hash_dereference)host_dereference,
- 0, MDL);
- if (!host_hw_addr_hash)
+ if (!host_new_hash (&host_hw_addr_hash, 0, MDL))
log_fatal ("Can't allocate host/hw hash");
} else {
/* If there isn't already a host decl matching this
/* If there's no uid hash, make one; otherwise, see if
there's already an entry in the hash for this host. */
if (!host_uid_hash) {
- host_uid_hash =
- new_hash ((hash_reference)host_reference,
- (hash_dereference)host_dereference,
- 0, MDL);
- if (!host_uid_hash)
+ if (!host_new_hash (&host_uid_hash, 0, MDL))
log_fatal ("Can't allocate host/uid hash");
host_hash_add (host_uid_hash,
while (foo) {
if (foo == hd)
break;
+ if (np)
+ host_dereference (&np, MDL);
host_reference (&np, foo, MDL);
host_dereference (&foo, MDL);
if (np -> n_ipaddr)
while (foo) {
if (foo == hd)
break;
+ if (np)
+ host_dereference (&np, MDL);
host_reference (&np, foo, MDL);
host_dereference (&foo, MDL);
if (np -> n_ipaddr)
return 0;
}
-void new_address_range (low, high, subnet, pool)
+void new_address_range (cfile, low, high, subnet, pool, lpchain)
+ struct parse *cfile;
struct iaddr low, high;
struct subnet *subnet;
struct pool *pool;
+ struct lease **lpchain;
{
struct lease *address_range, *lp, *plp;
struct iaddr net;
/* Initialize the hash table if it hasn't been done yet. */
if (!lease_uid_hash) {
- lease_uid_hash =
- new_hash ((hash_reference)lease_reference,
- (hash_dereference)lease_dereference, 0, MDL);
- if (!lease_uid_hash)
+ if (!lease_new_hash (&lease_uid_hash, 0, MDL))
log_fatal ("Can't allocate lease/uid hash");
}
if (!lease_ip_addr_hash) {
- lease_ip_addr_hash =
- new_hash ((hash_reference)lease_reference,
- (hash_dereference)lease_dereference, 0, MDL);
- if (!lease_uid_hash)
+ if (!lease_new_hash (&lease_ip_addr_hash, 0, MDL))
log_fatal ("Can't allocate lease/ip hash");
}
if (!lease_hw_addr_hash) {
- lease_hw_addr_hash =
- new_hash ((hash_reference)lease_reference,
- (hash_dereference)lease_dereference, 0, MDL);
- if (!lease_uid_hash)
+ if (!lease_new_hash (&lease_hw_addr_hash, 0, MDL))
log_fatal ("Can't allocate lease/hw hash");
}
/* Remember the lease in the IP address hash. */
if (find_lease_by_ip_addr (<, lp -> ip_addr, MDL)) {
if (lt -> pool) {
- log_error ("duplicate entries for lease %s",
- piaddr (lp -> ip_addr));
+ parse_warn (cfile,
+ "lease %s is declared twice!",
+ piaddr (lp -> ip_addr));
} else
pool_reference (< -> pool, pool, MDL);
lease_dereference (<, MDL);
lease_hash_add (lease_ip_addr_hash,
lp -> ip_addr.iabuf,
lp -> ip_addr.len, lp, MDL);
+ /* Put the lease on the chain for the caller. */
+ if (lpchain) {
+ if (*lpchain) {
+ lease_reference (&lp -> next, *lpchain, MDL);
+ lease_dereference (lpchain, MDL);
+ }
+ lease_reference (lpchain, lp, MDL);
+ }
lease_dereference (&lp, MDL);
}
}
comp -> hardware_addr.hlen))))) {
log_error ("Lease conflict at %s",
piaddr (comp -> ip_addr));
- return 0;
}
/* If there's a Unique ID, dissociate it from the hash
/* Only retain the agent options if the lease is still
affirmatively associated with a client. */
if (lease -> next_binding_state == FTS_ACTIVE ||
- lease -> next_binding_state == FTS_EXPIRED ||
- lease -> next_binding_state == FTS_RESERVED ||
- lease -> next_binding_state == FTS_BOOTP)
+ lease -> next_binding_state == FTS_EXPIRED)
option_chain_head_reference (&comp -> agent_options,
lease -> agent_options,
MDL);
break;
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
lq = &comp -> pool -> active;
break;
if (!lp) {
log_error ("Lease with binding state %s not on its queue.",
- (comp -> binding_state < 1 &&
- comp -> binding_state < FTS_BOOTP)
+ (comp -> binding_state < 1 ||
+ comp -> binding_state > FTS_LAST)
? "unknown"
: binding_state_names [comp -> binding_state - 1]);
return 0;
#if defined (FAILOVER_PROTOCOL)
if (propogate) {
+ comp -> desired_binding_state = comp -> binding_state;
if (!dhcp_failover_queue_update (comp, pimmediate))
return 0;
}
#endif
+ /* If the current binding state has already expired, do an
+ expiry event right now. */
+ /* XXX At some point we should optimize this so that we don't
+ XXX write the lease twice, but this is a safe way to fix the
+ XXX problem for 3.0 (I hope!). */
+ if ((commit || !pimmediate) &&
+ comp -> sort_time < cur_time &&
+ comp -> next_binding_state != comp -> binding_state)
+ pool_timer (comp -> pool);
+
return 1;
}
((
#if defined (FAILOVER_PROTOCOL)
peer &&
- lease -> binding_state == FTS_EXPIRED &&
+ (lease -> binding_state == FTS_EXPIRED ||
+ (peer -> i_am == secondary &&
+ lease -> binding_state == FTS_ACTIVE)) &&
(lease -> next_binding_state == FTS_FREE ||
lease -> next_binding_state == FTS_BACKUP)) ||
(!peer &&
#endif
- (lease -> binding_state == FTS_ACTIVE ||
- lease -> binding_state == FTS_BOOTP ||
- lease -> binding_state == FTS_RESERVED) &&
+ lease -> binding_state == FTS_ACTIVE &&
lease -> next_binding_state != FTS_RELEASED))) {
#if defined (NSUPDATE)
ddns_removals (lease);
if (lease -> on_release)
executable_statement_dereference (&lease -> on_release,
MDL);
+ /* Get rid of client-specific bindings that are only
+ correct when the lease is active. */
if (lease -> billing_class)
unbill_class (lease, lease -> billing_class);
+ if (lease -> agent_options)
+ option_chain_head_dereference (&lease -> agent_options,
+ MDL);
+ if (lease -> client_hostname) {
+ dfree (lease -> client_hostname, MDL);
+ lease -> client_hostname = (char *)0;
+ }
+ if (lease -> host)
+ host_dereference (&lease -> host, MDL);
/* Send the expiry time to the peer. */
lease -> tstp = lease -> ends;
lease -> next_binding_state == FTS_BACKUP)) ||
(!peer &&
#endif
- (lease -> binding_state == FTS_ACTIVE ||
- lease -> binding_state == FTS_BOOTP ||
- lease -> binding_state == FTS_RESERVED) &&
+ lease -> binding_state == FTS_ACTIVE &&
lease -> next_binding_state == FTS_RELEASED))) {
#if defined (NSUPDATE)
ddns_removals (lease);
executable_statement_dereference (&lease -> on_expiry,
MDL);
+ /* Get rid of client-specific bindings that are only
+ correct when the lease is active. */
if (lease -> billing_class)
unbill_class (lease, lease -> billing_class);
+ if (lease -> agent_options)
+ option_chain_head_dereference (&lease -> agent_options,
+ MDL);
+ if (lease -> client_hostname) {
+ dfree (lease -> client_hostname, MDL);
+ lease -> client_hostname = (char *)0;
+ }
+ if (lease -> host)
+ host_dereference (&lease -> host, MDL);
/* Send the release time (should be == cur_time) to the
peer. */
lease -> binding_state = lease -> next_binding_state;
switch (lease -> binding_state) {
case FTS_ACTIVE:
- case FTS_BOOTP:
#if defined (FAILOVER_PROTOCOL)
if (lease -> pool && lease -> pool -> failover_peer)
lease -> next_binding_state = FTS_EXPIRED;
case FTS_FREE:
case FTS_BACKUP:
- case FTS_RESERVED:
lease -> next_binding_state = lease -> binding_state;
break;
}
if (!lease_copy (<, lease, MDL))
return;
+ if (lt->scope)
+ binding_scope_dereference(<->scope, MDL);
+
lt -> ends = cur_time; /* XXX */
lt -> next_binding_state = FTS_ABANDONED;
for (i = FREE_LEASES; i <= BACKUP_LEASES; i++) {
for (l = *(lptr [i]); l; l = l -> next) {
+#if !defined (DEBUG_DUMP_ALL_LEASES)
if (l -> hardware_addr.hlen ||
l -> uid_len ||
- (l -> binding_state != FTS_FREE)) {
+ (l -> binding_state != FTS_FREE))
+#endif
+ {
if (!write_lease (l))
return 0;
num_written++;
break;
case FTS_ACTIVE:
- case FTS_RESERVED:
- case FTS_BOOTP:
lq = &comp -> pool -> active;
comp -> sort_time = comp -> ends;
break;
if (lease -> binding_state == FTS_ACTIVE ||
lease -> binding_state == FTS_EXPIRED ||
lease -> binding_state == FTS_RELEASED ||
- lease -> binding_state == FTS_RESET ||
- lease -> binding_state == FTS_RESERVED ||
- lease -> binding_state == FTS_BOOTP)
+ lease -> binding_state == FTS_RESET)
bill_class (lease, class);
class_dereference (&class, MDL);
}
#if defined (FAILOVER_PROTOCOL)
if (p -> failover_peer &&
l -> tstp > l -> tsfp &&
- !(l -> flags & ON_UPDATE_QUEUE))
+ !(l -> flags & ON_UPDATE_QUEUE)) {
+ l -> desired_binding_state = l -> binding_state;
dhcp_failover_queue_update (l, 1);
+ }
#endif
}
}
}
}
-HASH_FUNCTIONS (lease, const unsigned char *, struct lease)
-HASH_FUNCTIONS (host, const unsigned char *, struct host_decl)
-HASH_FUNCTIONS (class, const char *, struct class)
+HASH_FUNCTIONS (lease, const unsigned char *, struct lease, lease_hash_t,
+ lease_reference, lease_dereference)
+HASH_FUNCTIONS (host, const unsigned char *, struct host_decl, host_hash_t,
+ host_reference, host_dereference)
+HASH_FUNCTIONS (class, const char *, struct class, class_hash_t,
+ class_reference, class_dereference)
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
+#if defined (DEBUG_MEMORY_LEAKAGE) && \
defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
extern struct hash_table *dns_zone_hash;
extern struct interface_info **interface_vector;
struct hash_table *universe_hash;
struct universe **universes;
int universe_count, universe_max;
+#if 0
extern int end;
+#endif
#if defined (COMPACT_LEASES)
extern struct lease *lease_hunks;
/* Get rid of all the hash tables. */
if (host_hw_addr_hash)
- free_hash_table (host_hw_addr_hash, MDL);
+ host_free_hash_table (&host_hw_addr_hash, MDL);
host_hw_addr_hash = 0;
if (host_uid_hash)
- free_hash_table (host_uid_hash, MDL);
+ host_free_hash_table (&host_uid_hash, MDL);
host_uid_hash = 0;
if (lease_uid_hash)
- free_hash_table (lease_uid_hash, MDL);
+ lease_free_hash_table (&lease_uid_hash, MDL);
lease_uid_hash = 0;
if (lease_ip_addr_hash)
- free_hash_table (lease_ip_addr_hash, MDL);
+ lease_free_hash_table (&lease_ip_addr_hash, MDL);
lease_ip_addr_hash = 0;
if (lease_hw_addr_hash)
- free_hash_table (lease_hw_addr_hash, MDL);
+ lease_free_hash_table (&lease_hw_addr_hash, MDL);
lease_hw_addr_hash = 0;
if (host_name_hash)
- free_hash_table (host_name_hash, MDL);
+ host_free_hash_table (&host_name_hash, MDL);
host_name_hash = 0;
if (dns_zone_hash)
- free_hash_table (dns_zone_hash, MDL);
+ dns_zone_free_hash_table (&dns_zone_hash, MDL);
dns_zone_hash = 0;
+#if 0
if (auth_key_hash)
- free_hash_table (auth_key_hash, MDL);
+ auth_key_free_hash_table (&auth_key_hash, MDL);
+#endif
auth_key_hash = 0;
omapi_object_dereference ((omapi_object_t **)&dhcp_control_object,
}
group_dereference (&cc -> group, MDL);
if (cc -> hash) {
- free_hash_table (cc -> hash, MDL);
+ class_free_hash_table (&cc -> hash, MDL);
cc -> hash = (struct hash_table *)0;
}
class_dereference (&cc, MDL);
omapi_object_dereference ((omapi_object_t **)&icmp_state, MDL);
- free_hash_table (universe_hash, MDL);
+ universe_free_hash_table (&universe_hash, MDL);
for (i = 0; i < universe_count; i++) {
union {
const char *c;
} foo;
if (universes [i]) {
if (universes [i] -> hash)
- free_hash_table (universes [i] -> hash, MDL);
+ option_free_hash_table (&universes [i] -> hash,
+ MDL);
+#if 0
if (universes [i] -> name > (char *)&end) {
foo.c = universes [i] -> name;
dfree (foo.s, MDL);
}
if (universes [i] > (struct universe *)&end)
dfree (universes [i], MDL);
+#endif
}
}
dfree (universes, MDL);
relinquish_hash_bucket_hunks ();
omapi_type_relinquish ();
}
-#endif /* DEBUG_MEMORY_LEAKAGE */
+#endif /* DEBUG_MEMORY_LEAKAGE_ON_EXIT */
OMAPI object interfaces for the DHCP server. */
/*
- * Copyright (c) 1999-2001 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: omapi.c,v 1.52 2002/01/17 17:04:00 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: omapi.c,v 1.53 2005/03/17 20:15:28 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
0, 0,
#endif
0,
- sizeof (struct lease), 0);
+ sizeof (struct lease),
+ 0, RC_LEASE);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register lease object type: %s",
isc_result_totext (status));
dhcp_class_lookup,
dhcp_class_create,
dhcp_class_remove, 0, 0, 0,
- sizeof (struct class), 0);
+ sizeof (struct class), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register class object type: %s",
isc_result_totext (status));
dhcp_subclass_lookup,
dhcp_subclass_create,
dhcp_subclass_remove, 0, 0, 0,
- sizeof (struct class), 0);
+ sizeof (struct class), 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register subclass object type: %s",
isc_result_totext (status));
dhcp_pool_lookup,
dhcp_pool_create,
dhcp_pool_remove, 0, 0, 0,
- sizeof (struct pool), 0);
+ sizeof (struct pool), 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register pool object type: %s",
dhcp_host_lookup,
dhcp_host_create,
dhcp_host_remove, 0, 0, 0,
- sizeof (struct host_decl), 0);
+ sizeof (struct host_decl),
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register host object type: %s",
dhcp_failover_state_remove,
0, 0, 0,
sizeof (dhcp_failover_state_t),
- 0);
+ 0, RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register failover state object type: %s",
dhcp_failover_link_signal,
dhcp_failover_link_stuff_values,
0, 0, 0, 0, 0, 0,
- sizeof (dhcp_failover_link_t), 0);
+ sizeof (dhcp_failover_link_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register failover link object type: %s",
dhcp_failover_listener_stuff,
0, 0, 0, 0, 0, 0,
sizeof
- (dhcp_failover_listener_t), 0);
+ (dhcp_failover_listener_t), 0,
+ RC_MISC);
if (status != ISC_R_SUCCESS)
log_fatal ("Can't register failover listener object type: %s",
set - for now, we just make it possible to whack the state. */
if (!omapi_ds_strcmp (name, "state")) {
unsigned long bar;
+ const char *ols, *nls;
status = omapi_get_int_value (&bar, value);
if (status != ISC_R_SUCCESS)
return status;
- if (bar < 1 || bar > FTS_BOOTP)
+ if (bar < 1 || bar > FTS_LAST)
return ISC_R_INVALIDARG;
+ nls = binding_state_names [bar - 1];
+ if (lease -> binding_state >= 1 &&
+ lease -> binding_state <= FTS_LAST)
+ ols = binding_state_names [lease -> binding_state - 1];
+ else
+ ols = "unknown state";
+
if (lease -> binding_state != bar) {
lease -> next_binding_state = bar;
- if (supersede_lease (lease, 0, 1, 1, 1))
+ if (supersede_lease (lease, 0, 1, 1, 1)) {
+ log_info ("lease %s state changed from %s to %s",
+ piaddr(lease->ip_addr), ols, nls);
return ISC_R_SUCCESS;
+ }
+ log_info ("lease %s state change from %s to %s failed.",
+ piaddr (lease -> ip_addr), ols, nls);
return ISC_R_IOERROR;
}
return ISC_R_UNCHANGED;
/* Now look for a hardware address. */
status = omapi_get_value_str (ref, id, "hardware-address", &tv);
if (status == ISC_R_SUCCESS) {
- lease = (struct lease *)0;
- lease_hash_lookup (&lease, lease_hw_addr_hash,
- tv -> value -> u.buffer.value,
- tv -> value -> u.buffer.len, MDL);
+ unsigned char *haddr;
+ unsigned int len;
+
+ len = tv -> value -> u.buffer.len + 1;
+ haddr = dmalloc (len, MDL);
+ if (!haddr) {
+ omapi_value_dereference (&tv, MDL);
+ return ISC_R_NOMEMORY;
+ }
+
+ memcpy (haddr + 1, tv -> value -> u.buffer.value, len - 1);
omapi_value_dereference (&tv, MDL);
-
+
+ status = omapi_get_value_str (ref, id, "hardware-type", &tv);
+ if (status == ISC_R_SUCCESS) {
+ if (tv -> value -> type == omapi_datatype_data) {
+ if ((tv -> value -> u.buffer.len != 4) ||
+ (tv -> value -> u.buffer.value[0] != 0) ||
+ (tv -> value -> u.buffer.value[1] != 0) ||
+ (tv -> value -> u.buffer.value[2] != 0)) {
+ omapi_value_dereference (&tv, MDL);
+ dfree (haddr, MDL);
+ return ISC_R_INVALIDARG;
+ }
+
+ haddr[0] = tv -> value -> u.buffer.value[3];
+ } else if (tv -> value -> type == omapi_datatype_int) {
+ haddr[0] = (unsigned char)
+ tv -> value -> u.integer;
+ } else {
+ omapi_value_dereference (&tv, MDL);
+ dfree (haddr, MDL);
+ return ISC_R_INVALIDARG;
+ }
+
+ omapi_value_dereference (&tv, MDL);
+ } else {
+ /* If no hardware-type is specified, default to
+ ethernet. This may or may not be a good idea,
+ but Telus is currently relying on this behavior.
+ - DPN */
+ haddr[0] = HTYPE_ETHER;
+ }
+
+ lease = (struct lease *)0;
+ lease_hash_lookup (&lease, lease_hw_addr_hash, haddr, len, MDL);
+ dfree (haddr, MDL);
+
if (*lp && *lp != (omapi_object_t *)lease) {
omapi_object_dereference (lp, MDL);
lease_dereference (&lease, MDL);
if (!omapi_ds_strcmp (name, "name")) {
if (host -> name)
return ISC_R_EXISTS;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
host -> name = dmalloc (value -> u.buffer.len + 1,
MDL);
if (!host -> name)
}
if (!omapi_ds_strcmp (name, "group")) {
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
struct group_object *group;
group = (struct group_object *)0;
group_hash_lookup (&group, group_name_hash,
if (!omapi_ds_strcmp (name, "hardware-address")) {
if (host -> interface.hlen)
return ISC_R_EXISTS;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
if (value -> u.buffer.len >
(sizeof host -> interface.hbuf) - 1)
return ISC_R_INVALIDARG;
if (!omapi_ds_strcmp (name, "hardware-type")) {
int type;
- if (value -> type == omapi_datatype_data &&
- value -> u.buffer.len == sizeof type) {
+ if (value && (value -> type == omapi_datatype_data &&
+ value -> u.buffer.len == sizeof type)) {
if (value -> u.buffer.len > sizeof type)
return ISC_R_INVALIDARG;
memcpy (&type,
if (!omapi_ds_strcmp (name, "dhcp-client-identifier")) {
if (host -> client_identifier.data)
return ISC_R_EXISTS;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
if (!buffer_allocate (&host -> client_identifier.buffer,
value -> u.buffer.len, MDL))
return ISC_R_NOMEMORY;
option_cache_dereference (&host -> fixed_addr, MDL);
if (!value)
return ISC_R_SUCCESS;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
struct data_string ds;
memset (&ds, 0, sizeof ds);
ds.len = value -> u.buffer.len;
}
if (!host -> group)
return ISC_R_NOMEMORY;
- if (value -> type == omapi_datatype_data ||
- value -> type == omapi_datatype_string) {
+ if (value && (value -> type == omapi_datatype_data ||
+ value -> type == omapi_datatype_string)) {
struct parse *parse;
int lose = 0;
parse = (struct parse *)0;
if (status == ISC_R_SUCCESS)
return status;
}
-
return ISC_R_UNKNOWNATTRIBUTE;
}
return ISC_R_INVALIDARG;
class = (struct class *)h;
+#if defined (DEBUG_MEMORY_LEAKAGE) || \
+ defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
if (class -> nic)
class_dereference (&class -> nic, file, line);
if (class -> superclass)
class -> billed_leases = (struct lease **)0;
}
if (class -> hash) {
- free_hash_table (class -> hash, file, line);
- class -> hash = (struct hash_table *)0;
+ class_free_hash_table (&class -> hash, file, line);
+ class -> hash = (class_hash_t *)0;
}
data_string_forget (&class -> hash_string, file, line);
file, line);
if (class -> superclass)
class_dereference (&class -> superclass, file, line);
+#endif
return ISC_R_SUCCESS;
}
if (issubclass) {
- if (!class -> superclass -> hash) {
- class -> superclass -> hash =
- new_hash ((hash_reference)
- omapi_object_reference,
- (hash_dereference)
- omapi_object_dereference,
- 0, MDL);
- }
+ if (!class -> superclass -> hash)
+ class_new_hash(&class->superclass->hash,
+ 0, MDL);
+
add_hash (class -> superclass -> hash,
class -> hash_string.data,
class -> hash_string.len,
if (status == ISC_R_SUCCESS)
return status;
}
-
return ISC_R_UNKNOWNATTRIBUTE;
}
case binding_dns:
case binding_function:
return ISC_R_INVALIDARG;
+
+ default:
+ log_fatal ("Impossible case at %s:%d.", MDL);
+ return ISC_R_FAILURE;
}
if (status != ISC_R_SUCCESS)
Memory allocation for the DHCP server... */
/*
- * 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''.
#ifndef lint
static char copyright[] =
-"$Id: salloc.c,v 1.4 2001/06/27 00:31:16 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: salloc.c,v 1.5 2005/03/17 20:15:29 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
Tables of information only used by server... */
/*
- * Copyright (c) 1995-2001 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''.
#ifndef lint
static char copyright[] =
-"$Id: stables.c,v 1.26 2001/06/27 00:31:17 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: stables.c,v 1.27 2005/03/17 20:15:29 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
{ "circuit-id", "X", &agent_universe, 1 },
{ "remote-id", "X", &agent_universe, 2 },
{ "agent-id", "I", &agent_universe, 3 },
- { "#4", "X", &agent_universe, 4 },
- { "#5", "X", &agent_universe, 5 },
- { "#6", "X", &agent_universe, 6 },
- { "#7", "X", &agent_universe, 7 },
- { "#8", "X", &agent_universe, 8 },
- { "#9", "X", &agent_universe, 9 },
- { "#10", "X", &agent_universe, 10 },
- { "#11", "X", &agent_universe, 11 },
- { "#12", "X", &agent_universe, 12 },
- { "#13", "X", &agent_universe, 13 },
- { "#14", "X", &agent_universe, 14 },
- { "#15", "X", &agent_universe, 15 },
- { "#16", "X", &agent_universe, 16 },
- { "#17", "X", &agent_universe, 17 },
- { "#18", "X", &agent_universe, 18 },
- { "#19", "X", &agent_universe, 19 },
- { "#20", "X", &agent_universe, 20 },
- { "#21", "X", &agent_universe, 21 },
- { "#22", "X", &agent_universe, 22 },
- { "#23", "X", &agent_universe, 23 },
- { "#24", "X", &agent_universe, 24 },
- { "#25", "X", &agent_universe, 25 },
- { "#26", "X", &agent_universe, 26 },
- { "#27", "X", &agent_universe, 27 },
- { "#28", "X", &agent_universe, 28 },
- { "#29", "X", &agent_universe, 29 },
- { "#30", "X", &agent_universe, 30 },
- { "#31", "X", &agent_universe, 31 },
- { "#32", "X", &agent_universe, 32 },
- { "#33", "X", &agent_universe, 33 },
- { "#34", "X", &agent_universe, 34 },
- { "#35", "X", &agent_universe, 35 },
- { "#36", "X", &agent_universe, 36 },
- { "#37", "X", &agent_universe, 37 },
- { "#38", "X", &agent_universe, 38 },
- { "#39", "X", &agent_universe, 39 },
- { "#40", "X", &agent_universe, 40 },
- { "#41", "X", &agent_universe, 41 },
- { "#42", "X", &agent_universe, 42 },
- { "#43", "X", &agent_universe, 43 },
- { "#44", "X", &agent_universe, 44 },
- { "#45", "X", &agent_universe, 45 },
- { "#46", "X", &agent_universe, 46 },
- { "#47", "X", &agent_universe, 47 },
- { "#48", "X", &agent_universe, 48 },
- { "#49", "X", &agent_universe, 49 },
- { "#50", "X", &agent_universe, 50 },
- { "#51", "X", &agent_universe, 51 },
- { "#52", "X", &agent_universe, 52 },
- { "#53", "X", &agent_universe, 53 },
- { "#54", "X", &agent_universe, 54 },
- { "#55", "X", &agent_universe, 55 },
- { "#56", "X", &agent_universe, 56 },
- { "#57", "X", &agent_universe, 57 },
- { "#58", "X", &agent_universe, 58 },
- { "#59", "X", &agent_universe, 59 },
- { "#60", "X", &agent_universe, 60 },
- { "#61", "X", &agent_universe, 61 },
- { "#62", "X", &agent_universe, 62 },
- { "#63", "X", &agent_universe, 63 },
- { "#64", "X", &agent_universe, 64 },
- { "#65", "X", &agent_universe, 65 },
- { "#66", "X", &agent_universe, 66 },
- { "#67", "X", &agent_universe, 67 },
- { "#68", "X", &agent_universe, 68 },
- { "#69", "X", &agent_universe, 69 },
- { "#70", "X", &agent_universe, 70 },
- { "#71", "X", &agent_universe, 71 },
- { "#72", "X", &agent_universe, 72 },
- { "#73", "X", &agent_universe, 73 },
- { "#74", "X", &agent_universe, 74 },
- { "#75", "X", &agent_universe, 75 },
- { "#76", "X", &agent_universe, 76 },
- { "#77", "X", &agent_universe, 77 },
- { "#78", "X", &agent_universe, 78 },
- { "#79", "X", &agent_universe, 79 },
- { "#80", "X", &agent_universe, 80 },
- { "#81", "X", &agent_universe, 81 },
- { "#82", "X", &agent_universe, 82 },
- { "#83", "X", &agent_universe, 83 },
- { "#84", "X", &agent_universe, 84 },
- { "#85", "X", &agent_universe, 85 },
- { "#86", "X", &agent_universe, 86 },
- { "#87", "X", &agent_universe, 87 },
- { "#88", "X", &agent_universe, 88 },
- { "#89", "X", &agent_universe, 89 },
- { "#90", "X", &agent_universe, 90 },
- { "#91", "X", &agent_universe, 91 },
- { "#92", "X", &agent_universe, 92 },
- { "#93", "X", &agent_universe, 93 },
- { "#94", "X", &agent_universe, 94 },
- { "#95", "X", &agent_universe, 95 },
- { "#96", "X", &agent_universe, 96 },
- { "#97", "X", &agent_universe, 97 },
- { "#98", "X", &agent_universe, 98 },
- { "#99", "X", &agent_universe, 99 },
- { "#100", "X", &agent_universe, 100 },
- { "#101", "X", &agent_universe, 101 },
- { "#102", "X", &agent_universe, 102 },
- { "#103", "X", &agent_universe, 103 },
- { "#104", "X", &agent_universe, 104 },
- { "#105", "X", &agent_universe, 105 },
- { "#106", "X", &agent_universe, 106 },
- { "#107", "X", &agent_universe, 107 },
- { "#108", "X", &agent_universe, 108 },
- { "#109", "X", &agent_universe, 109 },
- { "#110", "X", &agent_universe, 110 },
- { "#111", "X", &agent_universe, 111 },
- { "#112", "X", &agent_universe, 112 },
- { "#113", "X", &agent_universe, 113 },
- { "#114", "X", &agent_universe, 114 },
- { "#115", "X", &agent_universe, 115 },
- { "#116", "X", &agent_universe, 116 },
- { "#117", "X", &agent_universe, 117 },
- { "#118", "X", &agent_universe, 118 },
- { "#119", "X", &agent_universe, 119 },
- { "#120", "X", &agent_universe, 120 },
- { "#121", "X", &agent_universe, 121 },
- { "#122", "X", &agent_universe, 122 },
- { "#123", "X", &agent_universe, 123 },
- { "#124", "X", &agent_universe, 124 },
- { "#125", "X", &agent_universe, 125 },
- { "#126", "X", &agent_universe, 126 },
- { "#127", "X", &agent_universe, 127 },
- { "#128", "X", &agent_universe, 128 },
- { "#129", "X", &agent_universe, 129 },
- { "#130", "X", &agent_universe, 130 },
- { "#131", "X", &agent_universe, 131 },
- { "#132", "X", &agent_universe, 132 },
- { "#133", "X", &agent_universe, 133 },
- { "#134", "X", &agent_universe, 134 },
- { "#135", "X", &agent_universe, 135 },
- { "#136", "X", &agent_universe, 136 },
- { "#137", "X", &agent_universe, 137 },
- { "#138", "X", &agent_universe, 138 },
- { "#139", "X", &agent_universe, 139 },
- { "#140", "X", &agent_universe, 140 },
- { "#141", "X", &agent_universe, 141 },
- { "#142", "X", &agent_universe, 142 },
- { "#143", "X", &agent_universe, 143 },
- { "#144", "X", &agent_universe, 144 },
- { "#145", "X", &agent_universe, 145 },
- { "#146", "X", &agent_universe, 146 },
- { "#147", "X", &agent_universe, 147 },
- { "#148", "X", &agent_universe, 148 },
- { "#149", "X", &agent_universe, 149 },
- { "#150", "X", &agent_universe, 150 },
- { "#151", "X", &agent_universe, 151 },
- { "#152", "X", &agent_universe, 152 },
- { "#153", "X", &agent_universe, 153 },
- { "#154", "X", &agent_universe, 154 },
- { "#155", "X", &agent_universe, 155 },
- { "#156", "X", &agent_universe, 156 },
- { "#157", "X", &agent_universe, 157 },
- { "#158", "X", &agent_universe, 158 },
- { "#159", "X", &agent_universe, 159 },
- { "#160", "X", &agent_universe, 160 },
- { "#161", "X", &agent_universe, 161 },
- { "#162", "X", &agent_universe, 162 },
- { "#163", "X", &agent_universe, 163 },
- { "#164", "X", &agent_universe, 164 },
- { "#165", "X", &agent_universe, 165 },
- { "#166", "X", &agent_universe, 166 },
- { "#167", "X", &agent_universe, 167 },
- { "#168", "X", &agent_universe, 168 },
- { "#169", "X", &agent_universe, 169 },
- { "#170", "X", &agent_universe, 170 },
- { "#171", "X", &agent_universe, 171 },
- { "#172", "X", &agent_universe, 172 },
- { "#173", "X", &agent_universe, 173 },
- { "#174", "X", &agent_universe, 174 },
- { "#175", "X", &agent_universe, 175 },
- { "#176", "X", &agent_universe, 176 },
- { "#177", "X", &agent_universe, 177 },
- { "#178", "X", &agent_universe, 178 },
- { "#179", "X", &agent_universe, 179 },
- { "#180", "X", &agent_universe, 180 },
- { "#181", "X", &agent_universe, 181 },
- { "#182", "X", &agent_universe, 182 },
- { "#183", "X", &agent_universe, 183 },
- { "#184", "X", &agent_universe, 184 },
- { "#185", "X", &agent_universe, 185 },
- { "#186", "X", &agent_universe, 186 },
- { "#187", "X", &agent_universe, 187 },
- { "#188", "X", &agent_universe, 188 },
- { "#189", "X", &agent_universe, 189 },
- { "#190", "X", &agent_universe, 190 },
- { "#191", "X", &agent_universe, 191 },
- { "#192", "X", &agent_universe, 192 },
- { "#193", "X", &agent_universe, 193 },
- { "#194", "X", &agent_universe, 194 },
- { "#195", "X", &agent_universe, 195 },
- { "#196", "X", &agent_universe, 196 },
- { "#197", "X", &agent_universe, 197 },
- { "#198", "X", &agent_universe, 198 },
- { "#199", "X", &agent_universe, 199 },
- { "#200", "X", &agent_universe, 200 },
- { "#201", "X", &agent_universe, 201 },
- { "#202", "X", &agent_universe, 202 },
- { "#203", "X", &agent_universe, 203 },
- { "#204", "X", &agent_universe, 204 },
- { "#205", "X", &agent_universe, 205 },
- { "#206", "X", &agent_universe, 206 },
- { "#207", "X", &agent_universe, 207 },
- { "#208", "X", &agent_universe, 208 },
- { "#209", "X", &agent_universe, 209 },
- { "#210", "X", &agent_universe, 210 },
- { "#211", "X", &agent_universe, 211 },
- { "#212", "X", &agent_universe, 212 },
- { "#213", "X", &agent_universe, 213 },
- { "#214", "X", &agent_universe, 214 },
- { "#215", "X", &agent_universe, 215 },
- { "#216", "X", &agent_universe, 216 },
- { "#217", "X", &agent_universe, 217 },
- { "#218", "X", &agent_universe, 218 },
- { "#219", "X", &agent_universe, 219 },
- { "#220", "X", &agent_universe, 220 },
- { "#221", "X", &agent_universe, 221 },
- { "#222", "X", &agent_universe, 222 },
- { "#223", "X", &agent_universe, 223 },
- { "#224", "X", &agent_universe, 224 },
- { "#225", "X", &agent_universe, 225 },
- { "#226", "X", &agent_universe, 226 },
- { "#227", "X", &agent_universe, 227 },
- { "#228", "X", &agent_universe, 228 },
- { "#229", "X", &agent_universe, 229 },
- { "#230", "X", &agent_universe, 230 },
- { "#231", "X", &agent_universe, 231 },
- { "#232", "X", &agent_universe, 232 },
- { "#233", "X", &agent_universe, 233 },
- { "#234", "X", &agent_universe, 234 },
- { "#235", "X", &agent_universe, 235 },
- { "#236", "X", &agent_universe, 236 },
- { "#237", "X", &agent_universe, 237 },
- { "#238", "X", &agent_universe, 238 },
- { "#239", "X", &agent_universe, 239 },
- { "#240", "X", &agent_universe, 240 },
- { "#241", "X", &agent_universe, 241 },
- { "#242", "X", &agent_universe, 242 },
- { "#243", "X", &agent_universe, 243 },
- { "#244", "X", &agent_universe, 244 },
- { "#245", "X", &agent_universe, 245 },
- { "#246", "X", &agent_universe, 246 },
- { "#247", "X", &agent_universe, 247 },
- { "#248", "X", &agent_universe, 248 },
- { "#249", "X", &agent_universe, 249 },
- { "#250", "X", &agent_universe, 250 },
- { "#251", "X", &agent_universe, 251 },
- { "#252", "X", &agent_universe, 252 },
- { "#253", "X", &agent_universe, 253 },
- { "#254", "X", &agent_universe, 254 },
- { "#end", "e", &agent_universe, 255 },
+ { "DOCSIS-device-class", "L", &agent_universe, 4 },
+ { "unknown-5", "X", &agent_universe, 5 },
+ { "unknown-6", "X", &agent_universe, 6 },
+ { "unknown-7", "X", &agent_universe, 7 },
+ { "unknown-8", "X", &agent_universe, 8 },
+ { "unknown-9", "X", &agent_universe, 9 },
+ { "unknown-10", "X", &agent_universe, 10 },
+ { "unknown-11", "X", &agent_universe, 11 },
+ { "unknown-12", "X", &agent_universe, 12 },
+ { "unknown-13", "X", &agent_universe, 13 },
+ { "unknown-14", "X", &agent_universe, 14 },
+ { "unknown-15", "X", &agent_universe, 15 },
+ { "unknown-16", "X", &agent_universe, 16 },
+ { "unknown-17", "X", &agent_universe, 17 },
+ { "unknown-18", "X", &agent_universe, 18 },
+ { "unknown-19", "X", &agent_universe, 19 },
+ { "unknown-20", "X", &agent_universe, 20 },
+ { "unknown-21", "X", &agent_universe, 21 },
+ { "unknown-22", "X", &agent_universe, 22 },
+ { "unknown-23", "X", &agent_universe, 23 },
+ { "unknown-24", "X", &agent_universe, 24 },
+ { "unknown-25", "X", &agent_universe, 25 },
+ { "unknown-26", "X", &agent_universe, 26 },
+ { "unknown-27", "X", &agent_universe, 27 },
+ { "unknown-28", "X", &agent_universe, 28 },
+ { "unknown-29", "X", &agent_universe, 29 },
+ { "unknown-30", "X", &agent_universe, 30 },
+ { "unknown-31", "X", &agent_universe, 31 },
+ { "unknown-32", "X", &agent_universe, 32 },
+ { "unknown-33", "X", &agent_universe, 33 },
+ { "unknown-34", "X", &agent_universe, 34 },
+ { "unknown-35", "X", &agent_universe, 35 },
+ { "unknown-36", "X", &agent_universe, 36 },
+ { "unknown-37", "X", &agent_universe, 37 },
+ { "unknown-38", "X", &agent_universe, 38 },
+ { "unknown-39", "X", &agent_universe, 39 },
+ { "unknown-40", "X", &agent_universe, 40 },
+ { "unknown-41", "X", &agent_universe, 41 },
+ { "unknown-42", "X", &agent_universe, 42 },
+ { "unknown-43", "X", &agent_universe, 43 },
+ { "unknown-44", "X", &agent_universe, 44 },
+ { "unknown-45", "X", &agent_universe, 45 },
+ { "unknown-46", "X", &agent_universe, 46 },
+ { "unknown-47", "X", &agent_universe, 47 },
+ { "unknown-48", "X", &agent_universe, 48 },
+ { "unknown-49", "X", &agent_universe, 49 },
+ { "unknown-50", "X", &agent_universe, 50 },
+ { "unknown-51", "X", &agent_universe, 51 },
+ { "unknown-52", "X", &agent_universe, 52 },
+ { "unknown-53", "X", &agent_universe, 53 },
+ { "unknown-54", "X", &agent_universe, 54 },
+ { "unknown-55", "X", &agent_universe, 55 },
+ { "unknown-56", "X", &agent_universe, 56 },
+ { "unknown-57", "X", &agent_universe, 57 },
+ { "unknown-58", "X", &agent_universe, 58 },
+ { "unknown-59", "X", &agent_universe, 59 },
+ { "unknown-60", "X", &agent_universe, 60 },
+ { "unknown-61", "X", &agent_universe, 61 },
+ { "unknown-62", "X", &agent_universe, 62 },
+ { "unknown-63", "X", &agent_universe, 63 },
+ { "unknown-64", "X", &agent_universe, 64 },
+ { "unknown-65", "X", &agent_universe, 65 },
+ { "unknown-66", "X", &agent_universe, 66 },
+ { "unknown-67", "X", &agent_universe, 67 },
+ { "unknown-68", "X", &agent_universe, 68 },
+ { "unknown-69", "X", &agent_universe, 69 },
+ { "unknown-70", "X", &agent_universe, 70 },
+ { "unknown-71", "X", &agent_universe, 71 },
+ { "unknown-72", "X", &agent_universe, 72 },
+ { "unknown-73", "X", &agent_universe, 73 },
+ { "unknown-74", "X", &agent_universe, 74 },
+ { "unknown-75", "X", &agent_universe, 75 },
+ { "unknown-76", "X", &agent_universe, 76 },
+ { "unknown-77", "X", &agent_universe, 77 },
+ { "unknown-78", "X", &agent_universe, 78 },
+ { "unknown-79", "X", &agent_universe, 79 },
+ { "unknown-80", "X", &agent_universe, 80 },
+ { "unknown-81", "X", &agent_universe, 81 },
+ { "unknown-82", "X", &agent_universe, 82 },
+ { "unknown-83", "X", &agent_universe, 83 },
+ { "unknown-84", "X", &agent_universe, 84 },
+ { "unknown-85", "X", &agent_universe, 85 },
+ { "unknown-86", "X", &agent_universe, 86 },
+ { "unknown-87", "X", &agent_universe, 87 },
+ { "unknown-88", "X", &agent_universe, 88 },
+ { "unknown-89", "X", &agent_universe, 89 },
+ { "unknown-90", "X", &agent_universe, 90 },
+ { "unknown-91", "X", &agent_universe, 91 },
+ { "unknown-92", "X", &agent_universe, 92 },
+ { "unknown-93", "X", &agent_universe, 93 },
+ { "unknown-94", "X", &agent_universe, 94 },
+ { "unknown-95", "X", &agent_universe, 95 },
+ { "unknown-96", "X", &agent_universe, 96 },
+ { "unknown-97", "X", &agent_universe, 97 },
+ { "unknown-98", "X", &agent_universe, 98 },
+ { "unknown-99", "X", &agent_universe, 99 },
+ { "unknown-100", "X", &agent_universe, 100 },
+ { "unknown-101", "X", &agent_universe, 101 },
+ { "unknown-102", "X", &agent_universe, 102 },
+ { "unknown-103", "X", &agent_universe, 103 },
+ { "unknown-104", "X", &agent_universe, 104 },
+ { "unknown-105", "X", &agent_universe, 105 },
+ { "unknown-106", "X", &agent_universe, 106 },
+ { "unknown-107", "X", &agent_universe, 107 },
+ { "unknown-108", "X", &agent_universe, 108 },
+ { "unknown-109", "X", &agent_universe, 109 },
+ { "unknown-110", "X", &agent_universe, 110 },
+ { "unknown-111", "X", &agent_universe, 111 },
+ { "unknown-112", "X", &agent_universe, 112 },
+ { "unknown-113", "X", &agent_universe, 113 },
+ { "unknown-114", "X", &agent_universe, 114 },
+ { "unknown-115", "X", &agent_universe, 115 },
+ { "unknown-116", "X", &agent_universe, 116 },
+ { "unknown-117", "X", &agent_universe, 117 },
+ { "unknown-118", "X", &agent_universe, 118 },
+ { "unknown-119", "X", &agent_universe, 119 },
+ { "unknown-120", "X", &agent_universe, 120 },
+ { "unknown-121", "X", &agent_universe, 121 },
+ { "unknown-122", "X", &agent_universe, 122 },
+ { "unknown-123", "X", &agent_universe, 123 },
+ { "unknown-124", "X", &agent_universe, 124 },
+ { "unknown-125", "X", &agent_universe, 125 },
+ { "unknown-126", "X", &agent_universe, 126 },
+ { "unknown-127", "X", &agent_universe, 127 },
+ { "unknown-128", "X", &agent_universe, 128 },
+ { "unknown-129", "X", &agent_universe, 129 },
+ { "unknown-130", "X", &agent_universe, 130 },
+ { "unknown-131", "X", &agent_universe, 131 },
+ { "unknown-132", "X", &agent_universe, 132 },
+ { "unknown-133", "X", &agent_universe, 133 },
+ { "unknown-134", "X", &agent_universe, 134 },
+ { "unknown-135", "X", &agent_universe, 135 },
+ { "unknown-136", "X", &agent_universe, 136 },
+ { "unknown-137", "X", &agent_universe, 137 },
+ { "unknown-138", "X", &agent_universe, 138 },
+ { "unknown-139", "X", &agent_universe, 139 },
+ { "unknown-140", "X", &agent_universe, 140 },
+ { "unknown-141", "X", &agent_universe, 141 },
+ { "unknown-142", "X", &agent_universe, 142 },
+ { "unknown-143", "X", &agent_universe, 143 },
+ { "unknown-144", "X", &agent_universe, 144 },
+ { "unknown-145", "X", &agent_universe, 145 },
+ { "unknown-146", "X", &agent_universe, 146 },
+ { "unknown-147", "X", &agent_universe, 147 },
+ { "unknown-148", "X", &agent_universe, 148 },
+ { "unknown-149", "X", &agent_universe, 149 },
+ { "unknown-150", "X", &agent_universe, 150 },
+ { "unknown-151", "X", &agent_universe, 151 },
+ { "unknown-152", "X", &agent_universe, 152 },
+ { "unknown-153", "X", &agent_universe, 153 },
+ { "unknown-154", "X", &agent_universe, 154 },
+ { "unknown-155", "X", &agent_universe, 155 },
+ { "unknown-156", "X", &agent_universe, 156 },
+ { "unknown-157", "X", &agent_universe, 157 },
+ { "unknown-158", "X", &agent_universe, 158 },
+ { "unknown-159", "X", &agent_universe, 159 },
+ { "unknown-160", "X", &agent_universe, 160 },
+ { "unknown-161", "X", &agent_universe, 161 },
+ { "unknown-162", "X", &agent_universe, 162 },
+ { "unknown-163", "X", &agent_universe, 163 },
+ { "unknown-164", "X", &agent_universe, 164 },
+ { "unknown-165", "X", &agent_universe, 165 },
+ { "unknown-166", "X", &agent_universe, 166 },
+ { "unknown-167", "X", &agent_universe, 167 },
+ { "unknown-168", "X", &agent_universe, 168 },
+ { "unknown-169", "X", &agent_universe, 169 },
+ { "unknown-170", "X", &agent_universe, 170 },
+ { "unknown-171", "X", &agent_universe, 171 },
+ { "unknown-172", "X", &agent_universe, 172 },
+ { "unknown-173", "X", &agent_universe, 173 },
+ { "unknown-174", "X", &agent_universe, 174 },
+ { "unknown-175", "X", &agent_universe, 175 },
+ { "unknown-176", "X", &agent_universe, 176 },
+ { "unknown-177", "X", &agent_universe, 177 },
+ { "unknown-178", "X", &agent_universe, 178 },
+ { "unknown-179", "X", &agent_universe, 179 },
+ { "unknown-180", "X", &agent_universe, 180 },
+ { "unknown-181", "X", &agent_universe, 181 },
+ { "unknown-182", "X", &agent_universe, 182 },
+ { "unknown-183", "X", &agent_universe, 183 },
+ { "unknown-184", "X", &agent_universe, 184 },
+ { "unknown-185", "X", &agent_universe, 185 },
+ { "unknown-186", "X", &agent_universe, 186 },
+ { "unknown-187", "X", &agent_universe, 187 },
+ { "unknown-188", "X", &agent_universe, 188 },
+ { "unknown-189", "X", &agent_universe, 189 },
+ { "unknown-190", "X", &agent_universe, 190 },
+ { "unknown-191", "X", &agent_universe, 191 },
+ { "unknown-192", "X", &agent_universe, 192 },
+ { "unknown-193", "X", &agent_universe, 193 },
+ { "unknown-194", "X", &agent_universe, 194 },
+ { "unknown-195", "X", &agent_universe, 195 },
+ { "unknown-196", "X", &agent_universe, 196 },
+ { "unknown-197", "X", &agent_universe, 197 },
+ { "unknown-198", "X", &agent_universe, 198 },
+ { "unknown-199", "X", &agent_universe, 199 },
+ { "unknown-200", "X", &agent_universe, 200 },
+ { "unknown-201", "X", &agent_universe, 201 },
+ { "unknown-202", "X", &agent_universe, 202 },
+ { "unknown-203", "X", &agent_universe, 203 },
+ { "unknown-204", "X", &agent_universe, 204 },
+ { "unknown-205", "X", &agent_universe, 205 },
+ { "unknown-206", "X", &agent_universe, 206 },
+ { "unknown-207", "X", &agent_universe, 207 },
+ { "unknown-208", "X", &agent_universe, 208 },
+ { "unknown-209", "X", &agent_universe, 209 },
+ { "unknown-210", "X", &agent_universe, 210 },
+ { "unknown-211", "X", &agent_universe, 211 },
+ { "unknown-212", "X", &agent_universe, 212 },
+ { "unknown-213", "X", &agent_universe, 213 },
+ { "unknown-214", "X", &agent_universe, 214 },
+ { "unknown-215", "X", &agent_universe, 215 },
+ { "unknown-216", "X", &agent_universe, 216 },
+ { "unknown-217", "X", &agent_universe, 217 },
+ { "unknown-218", "X", &agent_universe, 218 },
+ { "unknown-219", "X", &agent_universe, 219 },
+ { "unknown-220", "X", &agent_universe, 220 },
+ { "unknown-221", "X", &agent_universe, 221 },
+ { "unknown-222", "X", &agent_universe, 222 },
+ { "unknown-223", "X", &agent_universe, 223 },
+ { "unknown-224", "X", &agent_universe, 224 },
+ { "unknown-225", "X", &agent_universe, 225 },
+ { "unknown-226", "X", &agent_universe, 226 },
+ { "unknown-227", "X", &agent_universe, 227 },
+ { "unknown-228", "X", &agent_universe, 228 },
+ { "unknown-229", "X", &agent_universe, 229 },
+ { "unknown-230", "X", &agent_universe, 230 },
+ { "unknown-231", "X", &agent_universe, 231 },
+ { "unknown-232", "X", &agent_universe, 232 },
+ { "unknown-233", "X", &agent_universe, 233 },
+ { "unknown-234", "X", &agent_universe, 234 },
+ { "unknown-235", "X", &agent_universe, 235 },
+ { "unknown-236", "X", &agent_universe, 236 },
+ { "unknown-237", "X", &agent_universe, 237 },
+ { "unknown-238", "X", &agent_universe, 238 },
+ { "unknown-239", "X", &agent_universe, 239 },
+ { "unknown-240", "X", &agent_universe, 240 },
+ { "unknown-241", "X", &agent_universe, 241 },
+ { "unknown-242", "X", &agent_universe, 242 },
+ { "unknown-243", "X", &agent_universe, 243 },
+ { "unknown-244", "X", &agent_universe, 244 },
+ { "unknown-245", "X", &agent_universe, 245 },
+ { "unknown-246", "X", &agent_universe, 246 },
+ { "unknown-247", "X", &agent_universe, 247 },
+ { "unknown-248", "X", &agent_universe, 248 },
+ { "unknown-249", "X", &agent_universe, 249 },
+ { "unknown-250", "X", &agent_universe, 250 },
+ { "unknown-251", "X", &agent_universe, 251 },
+ { "unknown-252", "X", &agent_universe, 252 },
+ { "unknown-253", "X", &agent_universe, 253 },
+ { "unknown-254", "X", &agent_universe, 254 },
+ { "option-end", "e", &agent_universe, 255 },
};
struct universe server_universe;
struct option server_options [256] = {
- { "pad", "", &server_universe, 0 },
- { "default-lease-time", "T", &server_universe, 1 },
- { "max-lease-time", "T", &server_universe, 2 },
- { "min-lease-time", "T", &server_universe, 3 },
- { "dynamic-bootp-lease-cutoff", "T", &server_universe, 4 },
- { "dynamic-bootp-lease-length", "L", &server_universe, 5 },
- { "boot-unknown-clients", "f", &server_universe, 6 },
- { "dynamic-bootp", "f", &server_universe, 7 },
- { "allow-bootp", "f", &server_universe, 8 },
- { "allow-booting", "f", &server_universe, 9 },
- { "one-lease-per-client", "f", &server_universe, 10 },
- { "get-lease-hostnames", "f", &server_universe, 11 },
- { "use-host-decl-names", "f", &server_universe, 12 },
- { "use-lease-addr-for-default-route", "f", &server_universe, 13 },
- { "min-secs", "B", &server_universe, 14 },
- { "filename", "t", &server_universe, 15 },
- { "server-name", "t", &server_universe, 16 },
- { "next-server", "I", &server_universe, 17 },
- { "authoritative", "f", &server_universe, 18 },
- { "vendor-option-space", "U", &server_universe, 19 },
- { "always-reply-rfc1048", "f", &server_universe, 20 },
- { "site-option-space", "X", &server_universe, 21 },
- { "always-broadcast", "f", &server_universe, 22 },
- { "ddns-domainname", "t", &server_universe, 23 },
- { "ddns-hostname", "t", &server_universe, 24 },
- { "ddns-rev-domainname", "t", &server_universe, 25 },
- { "lease-file-name", "t", &server_universe, 26 },
- { "pid-file-name", "t", &server_universe, 27 },
- { "duplicates", "f", &server_universe, 28 },
- { "declines", "f", &server_universe, 29 },
- { "ddns-updates", "f", &server_universe, 30 },
- { "omapi-port", "S", &server_universe, 31 },
- { "local-port", "S", &server_universe, 32 },
- { "limited-broadcast-address", "I", &server_universe, 33 },
- { "remote-port", "S", &server_universe, 34 },
- { "local-address", "I", &server_universe, 35 },
- { "omapi-key", "d", &server_universe, 36 },
- { "stash-agent-options", "f", &server_universe, 37 },
- { "ddns-ttl", "T", &server_universe, 38 },
- { "ddns-update-style", "Nddns-styles.", &server_universe, 39 },
- { "client-updates", "f", &server_universe, 40 },
- { "update-optimization", "f", &server_universe, 41 },
- { "ping-check", "f", &server_universe, 42 },
- { "update-static-leases", "f", &server_universe, 43 },
- { "log-facility", "Nsyslog-facilities.", &server_universe, 44 },
- { "#45", "X", &server_universe, 45 },
- { "#46", "X", &server_universe, 46 },
- { "#47", "X", &server_universe, 47 },
- { "#48", "X", &server_universe, 48 },
- { "#49", "X", &server_universe, 49 },
- { "#50", "X", &server_universe, 50 },
- { "#51", "X", &server_universe, 51 },
- { "#52", "X", &server_universe, 52 },
- { "#53", "X", &server_universe, 53 },
- { "#54", "X", &server_universe, 54 },
- { "#55", "X", &server_universe, 55 },
- { "#56", "X", &server_universe, 56 },
- { "#57", "X", &server_universe, 57 },
- { "#58", "X", &server_universe, 58 },
- { "#59", "X", &server_universe, 59 },
- { "#60", "X", &server_universe, 60 },
- { "#61", "X", &server_universe, 61 },
- { "#62", "X", &server_universe, 62 },
- { "#63", "X", &server_universe, 63 },
- { "#64", "X", &server_universe, 64 },
- { "#65", "X", &server_universe, 65 },
- { "#66", "X", &server_universe, 66 },
- { "#67", "X", &server_universe, 67 },
- { "#68", "X", &server_universe, 68 },
- { "#69", "X", &server_universe, 69 },
- { "#70", "X", &server_universe, 70 },
- { "#71", "X", &server_universe, 71 },
- { "#72", "X", &server_universe, 72 },
- { "#73", "X", &server_universe, 73 },
- { "#74", "X", &server_universe, 74 },
- { "#75", "X", &server_universe, 75 },
- { "#76", "X", &server_universe, 76 },
- { "#77", "X", &server_universe, 77 },
- { "#78", "X", &server_universe, 78 },
- { "#79", "X", &server_universe, 79 },
- { "#80", "X", &server_universe, 80 },
- { "#81", "X", &server_universe, 81 },
- { "#82", "X", &server_universe, 82 },
- { "#83", "X", &server_universe, 83 },
- { "#84", "X", &server_universe, 84 },
- { "#85", "X", &server_universe, 85 },
- { "#86", "X", &server_universe, 86 },
- { "#87", "X", &server_universe, 87 },
- { "#88", "X", &server_universe, 88 },
- { "#89", "X", &server_universe, 89 },
- { "#90", "X", &server_universe, 90 },
- { "#91", "X", &server_universe, 91 },
- { "#92", "X", &server_universe, 92 },
- { "#93", "X", &server_universe, 93 },
- { "#94", "X", &server_universe, 94 },
- { "#95", "X", &server_universe, 95 },
- { "#96", "X", &server_universe, 96 },
- { "#97", "X", &server_universe, 97 },
- { "#98", "X", &server_universe, 98 },
- { "#99", "X", &server_universe, 99 },
- { "#100", "X", &server_universe, 100 },
- { "#101", "X", &server_universe, 101 },
- { "#102", "X", &server_universe, 102 },
- { "#103", "X", &server_universe, 103 },
- { "#104", "X", &server_universe, 104 },
- { "#105", "X", &server_universe, 105 },
- { "#106", "X", &server_universe, 106 },
- { "#107", "X", &server_universe, 107 },
- { "#108", "X", &server_universe, 108 },
- { "#109", "X", &server_universe, 109 },
- { "#110", "X", &server_universe, 110 },
- { "#111", "X", &server_universe, 111 },
- { "#112", "X", &server_universe, 112 },
- { "#113", "X", &server_universe, 113 },
- { "#114", "X", &server_universe, 114 },
- { "#115", "X", &server_universe, 115 },
- { "#116", "X", &server_universe, 116 },
- { "#117", "X", &server_universe, 117 },
- { "#118", "X", &server_universe, 118 },
- { "#119", "X", &server_universe, 119 },
- { "#120", "X", &server_universe, 120 },
- { "#121", "X", &server_universe, 121 },
- { "#122", "X", &server_universe, 122 },
- { "#123", "X", &server_universe, 123 },
- { "#124", "X", &server_universe, 124 },
- { "#125", "X", &server_universe, 125 },
- { "#126", "X", &server_universe, 126 },
- { "#127", "X", &server_universe, 127 },
- { "#128", "X", &server_universe, 128 },
- { "#129", "X", &server_universe, 129 },
- { "#130", "X", &server_universe, 130 },
- { "#131", "X", &server_universe, 131 },
- { "#132", "X", &server_universe, 132 },
- { "#133", "X", &server_universe, 133 },
- { "#134", "X", &server_universe, 134 },
- { "#135", "X", &server_universe, 135 },
- { "#136", "X", &server_universe, 136 },
- { "#137", "X", &server_universe, 137 },
- { "#138", "X", &server_universe, 138 },
- { "#139", "X", &server_universe, 139 },
- { "#140", "X", &server_universe, 140 },
- { "#141", "X", &server_universe, 141 },
- { "#142", "X", &server_universe, 142 },
- { "#143", "X", &server_universe, 143 },
- { "#144", "X", &server_universe, 144 },
- { "#145", "X", &server_universe, 145 },
- { "#146", "X", &server_universe, 146 },
- { "#147", "X", &server_universe, 147 },
- { "#148", "X", &server_universe, 148 },
- { "#149", "X", &server_universe, 149 },
- { "#150", "X", &server_universe, 150 },
- { "#151", "X", &server_universe, 151 },
- { "#152", "X", &server_universe, 152 },
- { "#153", "X", &server_universe, 153 },
- { "#154", "X", &server_universe, 154 },
- { "#155", "X", &server_universe, 155 },
- { "#156", "X", &server_universe, 156 },
- { "#157", "X", &server_universe, 157 },
- { "#158", "X", &server_universe, 158 },
- { "#159", "X", &server_universe, 159 },
- { "#160", "X", &server_universe, 160 },
- { "#161", "X", &server_universe, 161 },
- { "#162", "X", &server_universe, 162 },
- { "#163", "X", &server_universe, 163 },
- { "#164", "X", &server_universe, 164 },
- { "#165", "X", &server_universe, 165 },
- { "#166", "X", &server_universe, 166 },
- { "#167", "X", &server_universe, 167 },
- { "#168", "X", &server_universe, 168 },
- { "#169", "X", &server_universe, 169 },
- { "#170", "X", &server_universe, 170 },
- { "#171", "X", &server_universe, 171 },
- { "#172", "X", &server_universe, 172 },
- { "#173", "X", &server_universe, 173 },
- { "#174", "X", &server_universe, 174 },
- { "#175", "X", &server_universe, 175 },
- { "#176", "X", &server_universe, 176 },
- { "#177", "X", &server_universe, 177 },
- { "#178", "X", &server_universe, 178 },
- { "#179", "X", &server_universe, 179 },
- { "#180", "X", &server_universe, 180 },
- { "#181", "X", &server_universe, 181 },
- { "#182", "X", &server_universe, 182 },
- { "#183", "X", &server_universe, 183 },
- { "#184", "X", &server_universe, 184 },
- { "#185", "X", &server_universe, 185 },
- { "#186", "X", &server_universe, 186 },
- { "#187", "X", &server_universe, 187 },
- { "#188", "X", &server_universe, 188 },
- { "#189", "X", &server_universe, 189 },
- { "#190", "X", &server_universe, 190 },
- { "#191", "X", &server_universe, 191 },
- { "#192", "X", &server_universe, 192 },
- { "#193", "X", &server_universe, 193 },
- { "#194", "X", &server_universe, 194 },
- { "#195", "X", &server_universe, 195 },
- { "#196", "X", &server_universe, 196 },
- { "#197", "X", &server_universe, 197 },
- { "#198", "X", &server_universe, 198 },
- { "#199", "X", &server_universe, 199 },
- { "#200", "X", &server_universe, 200 },
- { "#201", "X", &server_universe, 201 },
- { "#202", "X", &server_universe, 202 },
- { "#203", "X", &server_universe, 203 },
- { "#204", "X", &server_universe, 204 },
- { "#205", "X", &server_universe, 205 },
- { "#206", "X", &server_universe, 206 },
- { "#207", "X", &server_universe, 207 },
- { "#208", "X", &server_universe, 208 },
- { "#209", "X", &server_universe, 209 },
- { "#210", "X", &server_universe, 210 },
- { "#211", "X", &server_universe, 211 },
- { "#212", "X", &server_universe, 212 },
- { "#213", "X", &server_universe, 213 },
- { "#214", "X", &server_universe, 214 },
- { "#215", "X", &server_universe, 215 },
- { "#216", "X", &server_universe, 216 },
- { "#217", "X", &server_universe, 217 },
- { "#218", "X", &server_universe, 218 },
- { "#219", "X", &server_universe, 219 },
- { "#220", "X", &server_universe, 220 },
- { "#221", "X", &server_universe, 221 },
- { "#222", "X", &server_universe, 222 },
- { "#223", "X", &server_universe, 223 },
- { "#224", "X", &server_universe, 224 },
- { "#225", "X", &server_universe, 225 },
- { "#226", "X", &server_universe, 226 },
- { "#227", "X", &server_universe, 227 },
- { "#228", "X", &server_universe, 228 },
- { "#229", "X", &server_universe, 229 },
- { "#230", "X", &server_universe, 230 },
- { "#231", "X", &server_universe, 231 },
- { "#232", "X", &server_universe, 232 },
- { "#233", "X", &server_universe, 233 },
- { "#234", "X", &server_universe, 234 },
- { "#235", "X", &server_universe, 235 },
- { "#236", "X", &server_universe, 236 },
- { "#237", "X", &server_universe, 237 },
- { "#238", "X", &server_universe, 238 },
- { "#239", "X", &server_universe, 239 },
- { "#240", "X", &server_universe, 240 },
- { "#241", "X", &server_universe, 241 },
- { "#242", "X", &server_universe, 242 },
- { "#243", "X", &server_universe, 243 },
- { "#244", "X", &server_universe, 244 },
- { "#245", "X", &server_universe, 245 },
- { "#246", "X", &server_universe, 246 },
- { "#247", "X", &server_universe, 247 },
- { "#248", "X", &server_universe, 248 },
- { "#249", "X", &server_universe, 249 },
- { "#250", "X", &server_universe, 250 },
- { "#251", "X", &server_universe, 251 },
- { "#252", "X", &server_universe, 252 },
- { "#253", "X", &server_universe, 253 },
- { "#254", "X", &server_universe, 254 },
- { "option-end", "e", &server_universe, 255 },
+ { "pad", "", &server_universe, 0 },
+ { "default-lease-time", "T", &server_universe, 1 },
+ { "max-lease-time", "T", &server_universe, 2 },
+ { "min-lease-time", "T", &server_universe, 3 },
+ { "dynamic-bootp-lease-cutoff", "T", &server_universe, 4 },
+ { "dynamic-bootp-lease-length", "L", &server_universe, 5 },
+ { "boot-unknown-clients", "f", &server_universe, 6 },
+ { "dynamic-bootp", "f", &server_universe, 7 },
+ { "allow-bootp", "f", &server_universe, 8 },
+ { "allow-booting", "f", &server_universe, 9 },
+ { "one-lease-per-client", "f", &server_universe, 10 },
+ { "get-lease-hostnames", "f", &server_universe, 11 },
+ { "use-host-decl-names", "f", &server_universe, 12 },
+ { "use-lease-addr-for-default-route", "f", &server_universe, 13 },
+ { "min-secs", "B", &server_universe, 14 },
+ { "filename", "t", &server_universe, 15 },
+ { "server-name", "t", &server_universe, 16 },
+ { "next-server", "I", &server_universe, 17 },
+ { "authoritative", "f", &server_universe, 18 },
+ { "vendor-option-space", "U", &server_universe, 19 },
+ { "always-reply-rfc1048", "f", &server_universe, 20 },
+ { "site-option-space", "X", &server_universe, 21 },
+ { "always-broadcast", "f", &server_universe, 22 },
+ { "ddns-domainname", "t", &server_universe, 23 },
+ { "ddns-hostname", "t", &server_universe, 24 },
+ { "ddns-rev-domainname", "t", &server_universe, 25 },
+ { "lease-file-name", "t", &server_universe, 26 },
+ { "pid-file-name", "t", &server_universe, 27 },
+ { "duplicates", "f", &server_universe, 28 },
+ { "declines", "f", &server_universe, 29 },
+ { "ddns-updates", "f", &server_universe, 30 },
+ { "omapi-port", "S", &server_universe, 31 },
+ { "local-port", "S", &server_universe, 32 },
+ { "limited-broadcast-address", "I", &server_universe, 33 },
+ { "remote-port", "S", &server_universe, 34 },
+ { "local-address", "I", &server_universe, 35 },
+ { "omapi-key", "d", &server_universe, 36 },
+ { "stash-agent-options", "f", &server_universe, 37 },
+ { "ddns-ttl", "T", &server_universe, 38 },
+ { "ddns-update-style", "Nddns-styles.", &server_universe, 39 },
+ { "client-updates", "f", &server_universe, 40 },
+ { "update-optimization", "f", &server_universe, 41 },
+ { "ping-check", "f", &server_universe, 42 },
+ { "update-static-leases", "f", &server_universe, 43 },
+ { "log-facility", "Nsyslog-facilities.", &server_universe, 44 },
+ { "do-forward-updates", "f", &server_universe, 45 },
+ { "ping-timeout", "T", &server_universe, 46 },
+ { "unknown-47", "X", &server_universe, 47 },
+ { "unknown-48", "X", &server_universe, 48 },
+ { "unknown-49", "X", &server_universe, 49 },
+ { "unknown-50", "X", &server_universe, 50 },
+ { "unknown-51", "X", &server_universe, 51 },
+ { "unknown-52", "X", &server_universe, 52 },
+ { "unknown-53", "X", &server_universe, 53 },
+ { "unknown-54", "X", &server_universe, 54 },
+ { "unknown-55", "X", &server_universe, 55 },
+ { "unknown-56", "X", &server_universe, 56 },
+ { "unknown-57", "X", &server_universe, 57 },
+ { "unknown-58", "X", &server_universe, 58 },
+ { "unknown-59", "X", &server_universe, 59 },
+ { "unknown-60", "X", &server_universe, 60 },
+ { "unknown-61", "X", &server_universe, 61 },
+ { "unknown-62", "X", &server_universe, 62 },
+ { "unknown-63", "X", &server_universe, 63 },
+ { "unknown-64", "X", &server_universe, 64 },
+ { "unknown-65", "X", &server_universe, 65 },
+ { "unknown-66", "X", &server_universe, 66 },
+ { "unknown-67", "X", &server_universe, 67 },
+ { "unknown-68", "X", &server_universe, 68 },
+ { "unknown-69", "X", &server_universe, 69 },
+ { "unknown-70", "X", &server_universe, 70 },
+ { "unknown-71", "X", &server_universe, 71 },
+ { "unknown-72", "X", &server_universe, 72 },
+ { "unknown-73", "X", &server_universe, 73 },
+ { "unknown-74", "X", &server_universe, 74 },
+ { "unknown-75", "X", &server_universe, 75 },
+ { "unknown-76", "X", &server_universe, 76 },
+ { "unknown-77", "X", &server_universe, 77 },
+ { "unknown-78", "X", &server_universe, 78 },
+ { "unknown-79", "X", &server_universe, 79 },
+ { "unknown-80", "X", &server_universe, 80 },
+ { "unknown-81", "X", &server_universe, 81 },
+ { "unknown-82", "X", &server_universe, 82 },
+ { "unknown-83", "X", &server_universe, 83 },
+ { "unknown-84", "X", &server_universe, 84 },
+ { "unknown-85", "X", &server_universe, 85 },
+ { "unknown-86", "X", &server_universe, 86 },
+ { "unknown-87", "X", &server_universe, 87 },
+ { "unknown-88", "X", &server_universe, 88 },
+ { "unknown-89", "X", &server_universe, 89 },
+ { "unknown-90", "X", &server_universe, 90 },
+ { "unknown-91", "X", &server_universe, 91 },
+ { "unknown-92", "X", &server_universe, 92 },
+ { "unknown-93", "X", &server_universe, 93 },
+ { "unknown-94", "X", &server_universe, 94 },
+ { "unknown-95", "X", &server_universe, 95 },
+ { "unknown-96", "X", &server_universe, 96 },
+ { "unknown-97", "X", &server_universe, 97 },
+ { "unknown-98", "X", &server_universe, 98 },
+ { "unknown-99", "X", &server_universe, 99 },
+ { "unknown-100", "X", &server_universe, 100 },
+ { "unknown-101", "X", &server_universe, 101 },
+ { "unknown-102", "X", &server_universe, 102 },
+ { "unknown-103", "X", &server_universe, 103 },
+ { "unknown-104", "X", &server_universe, 104 },
+ { "unknown-105", "X", &server_universe, 105 },
+ { "unknown-106", "X", &server_universe, 106 },
+ { "unknown-107", "X", &server_universe, 107 },
+ { "unknown-108", "X", &server_universe, 108 },
+ { "unknown-109", "X", &server_universe, 109 },
+ { "unknown-110", "X", &server_universe, 110 },
+ { "unknown-111", "X", &server_universe, 111 },
+ { "unknown-112", "X", &server_universe, 112 },
+ { "unknown-113", "X", &server_universe, 113 },
+ { "unknown-114", "X", &server_universe, 114 },
+ { "unknown-115", "X", &server_universe, 115 },
+ { "unknown-116", "X", &server_universe, 116 },
+ { "unknown-117", "X", &server_universe, 117 },
+ { "unknown-118", "X", &server_universe, 118 },
+ { "unknown-119", "X", &server_universe, 119 },
+ { "unknown-120", "X", &server_universe, 120 },
+ { "unknown-121", "X", &server_universe, 121 },
+ { "unknown-122", "X", &server_universe, 122 },
+ { "unknown-123", "X", &server_universe, 123 },
+ { "unknown-124", "X", &server_universe, 124 },
+ { "unknown-125", "X", &server_universe, 125 },
+ { "unknown-126", "X", &server_universe, 126 },
+ { "unknown-127", "X", &server_universe, 127 },
+ { "unknown-128", "X", &server_universe, 128 },
+ { "unknown-129", "X", &server_universe, 129 },
+ { "unknown-130", "X", &server_universe, 130 },
+ { "unknown-131", "X", &server_universe, 131 },
+ { "unknown-132", "X", &server_universe, 132 },
+ { "unknown-133", "X", &server_universe, 133 },
+ { "unknown-134", "X", &server_universe, 134 },
+ { "unknown-135", "X", &server_universe, 135 },
+ { "unknown-136", "X", &server_universe, 136 },
+ { "unknown-137", "X", &server_universe, 137 },
+ { "unknown-138", "X", &server_universe, 138 },
+ { "unknown-139", "X", &server_universe, 139 },
+ { "unknown-140", "X", &server_universe, 140 },
+ { "unknown-141", "X", &server_universe, 141 },
+ { "unknown-142", "X", &server_universe, 142 },
+ { "unknown-143", "X", &server_universe, 143 },
+ { "unknown-144", "X", &server_universe, 144 },
+ { "unknown-145", "X", &server_universe, 145 },
+ { "unknown-146", "X", &server_universe, 146 },
+ { "unknown-147", "X", &server_universe, 147 },
+ { "unknown-148", "X", &server_universe, 148 },
+ { "unknown-149", "X", &server_universe, 149 },
+ { "unknown-150", "X", &server_universe, 150 },
+ { "unknown-151", "X", &server_universe, 151 },
+ { "unknown-152", "X", &server_universe, 152 },
+ { "unknown-153", "X", &server_universe, 153 },
+ { "unknown-154", "X", &server_universe, 154 },
+ { "unknown-155", "X", &server_universe, 155 },
+ { "unknown-156", "X", &server_universe, 156 },
+ { "unknown-157", "X", &server_universe, 157 },
+ { "unknown-158", "X", &server_universe, 158 },
+ { "unknown-159", "X", &server_universe, 159 },
+ { "unknown-160", "X", &server_universe, 160 },
+ { "unknown-161", "X", &server_universe, 161 },
+ { "unknown-162", "X", &server_universe, 162 },
+ { "unknown-163", "X", &server_universe, 163 },
+ { "unknown-164", "X", &server_universe, 164 },
+ { "unknown-165", "X", &server_universe, 165 },
+ { "unknown-166", "X", &server_universe, 166 },
+ { "unknown-167", "X", &server_universe, 167 },
+ { "unknown-168", "X", &server_universe, 168 },
+ { "unknown-169", "X", &server_universe, 169 },
+ { "unknown-170", "X", &server_universe, 170 },
+ { "unknown-171", "X", &server_universe, 171 },
+ { "unknown-172", "X", &server_universe, 172 },
+ { "unknown-173", "X", &server_universe, 173 },
+ { "unknown-174", "X", &server_universe, 174 },
+ { "unknown-175", "X", &server_universe, 175 },
+ { "unknown-176", "X", &server_universe, 176 },
+ { "unknown-177", "X", &server_universe, 177 },
+ { "unknown-178", "X", &server_universe, 178 },
+ { "unknown-179", "X", &server_universe, 179 },
+ { "unknown-180", "X", &server_universe, 180 },
+ { "unknown-181", "X", &server_universe, 181 },
+ { "unknown-182", "X", &server_universe, 182 },
+ { "unknown-183", "X", &server_universe, 183 },
+ { "unknown-184", "X", &server_universe, 184 },
+ { "unknown-185", "X", &server_universe, 185 },
+ { "unknown-186", "X", &server_universe, 186 },
+ { "unknown-187", "X", &server_universe, 187 },
+ { "unknown-188", "X", &server_universe, 188 },
+ { "unknown-189", "X", &server_universe, 189 },
+ { "unknown-190", "X", &server_universe, 190 },
+ { "unknown-191", "X", &server_universe, 191 },
+ { "unknown-192", "X", &server_universe, 192 },
+ { "unknown-193", "X", &server_universe, 193 },
+ { "unknown-194", "X", &server_universe, 194 },
+ { "unknown-195", "X", &server_universe, 195 },
+ { "unknown-196", "X", &server_universe, 196 },
+ { "unknown-197", "X", &server_universe, 197 },
+ { "unknown-198", "X", &server_universe, 198 },
+ { "unknown-199", "X", &server_universe, 199 },
+ { "unknown-200", "X", &server_universe, 200 },
+ { "unknown-201", "X", &server_universe, 201 },
+ { "unknown-202", "X", &server_universe, 202 },
+ { "unknown-203", "X", &server_universe, 203 },
+ { "unknown-204", "X", &server_universe, 204 },
+ { "unknown-205", "X", &server_universe, 205 },
+ { "unknown-206", "X", &server_universe, 206 },
+ { "unknown-207", "X", &server_universe, 207 },
+ { "unknown-208", "X", &server_universe, 208 },
+ { "unknown-209", "X", &server_universe, 209 },
+ { "unknown-210", "X", &server_universe, 210 },
+ { "unknown-211", "X", &server_universe, 211 },
+ { "unknown-212", "X", &server_universe, 212 },
+ { "unknown-213", "X", &server_universe, 213 },
+ { "unknown-214", "X", &server_universe, 214 },
+ { "unknown-215", "X", &server_universe, 215 },
+ { "unknown-216", "X", &server_universe, 216 },
+ { "unknown-217", "X", &server_universe, 217 },
+ { "unknown-218", "X", &server_universe, 218 },
+ { "unknown-219", "X", &server_universe, 219 },
+ { "unknown-220", "X", &server_universe, 220 },
+ { "unknown-221", "X", &server_universe, 221 },
+ { "unknown-222", "X", &server_universe, 222 },
+ { "unknown-223", "X", &server_universe, 223 },
+ { "unknown-224", "X", &server_universe, 224 },
+ { "unknown-225", "X", &server_universe, 225 },
+ { "unknown-226", "X", &server_universe, 226 },
+ { "unknown-227", "X", &server_universe, 227 },
+ { "unknown-228", "X", &server_universe, 228 },
+ { "unknown-229", "X", &server_universe, 229 },
+ { "unknown-230", "X", &server_universe, 230 },
+ { "unknown-231", "X", &server_universe, 231 },
+ { "unknown-232", "X", &server_universe, 232 },
+ { "unknown-233", "X", &server_universe, 233 },
+ { "unknown-234", "X", &server_universe, 234 },
+ { "unknown-235", "X", &server_universe, 235 },
+ { "unknown-236", "X", &server_universe, 236 },
+ { "unknown-237", "X", &server_universe, 237 },
+ { "unknown-238", "X", &server_universe, 238 },
+ { "unknown-239", "X", &server_universe, 239 },
+ { "unknown-240", "X", &server_universe, 240 },
+ { "unknown-241", "X", &server_universe, 241 },
+ { "unknown-242", "X", &server_universe, 242 },
+ { "unknown-243", "X", &server_universe, 243 },
+ { "unknown-244", "X", &server_universe, 244 },
+ { "unknown-245", "X", &server_universe, 245 },
+ { "unknown-246", "X", &server_universe, 246 },
+ { "unknown-247", "X", &server_universe, 247 },
+ { "unknown-248", "X", &server_universe, 248 },
+ { "unknown-249", "X", &server_universe, 249 },
+ { "unknown-250", "X", &server_universe, 250 },
+ { "unknown-251", "X", &server_universe, 251 },
+ { "unknown-252", "X", &server_universe, 252 },
+ { "unknown-253", "X", &server_universe, 253 },
+ { "unknown-254", "X", &server_universe, 254 },
+ { "option-end", "e", &server_universe, 255 },
};
struct enumeration_value ddns_styles_values [] = {
agent_universe.store_tag = putUChar;
agent_universe.store_length = putUChar;
universes [agent_universe.index] = &agent_universe;
- agent_universe.hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&agent_universe.hash, 1, MDL);
if (!agent_universe.hash)
log_fatal ("Can't allocate agent option hash table.");
for (i = 0; i < 256; i++) {
server_universe.store_length = putUChar;
server_universe.index = universe_count++;
universes [server_universe.index] = &server_universe;
- server_universe.hash = new_hash (0, 0, 1, MDL);
+ option_new_hash (&server_universe.hash, 1, MDL);
if (!server_universe.hash)
log_fatal ("Can't allocate server option hash table.");
for (i = 0; i < 256; i++) {
authoritative;
+class "even" {
+ match if ((extract-int (suffix
+ (pick-first-value (option dhcp-client-identifier,
+ hardware), 1), 8) % 2) = 0);
+}
+class "odd" {
+ match if ((extract-int (suffix
+ (pick-first-value (option dhcp-client-identifier,
+ hardware), 1), 8) % 2) = 1);
+}
+
lease-file-name "dhcp-1.leases";
pid-file-name "dhcp-1.pid";
ddns-update-style none;
port 51000;
peer address 10.0.0.1;
peer port 51001;
- max-response-delay 7;
+ max-response-delay 60;
max-unacked-updates 10;
mclt 100;
hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
}
}
-shared-network LOCAL {
- subnet 127.0.0.0 netmask 255.255.255.0 {
- }
- subnet 10.0.2.0 netmask 255.255.255.0 {
- pool {
- deny dynamic bootp clients;
- failover peer "foo";
- range 10.0.2.100 10.0.2.200;
- }
- }
-}
-
shared-network NET-187 {
subnet 204.152.187.0 netmask 255.255.255.0 {
}
subnet 10.0.0.0 netmask 255.255.255.0 {
pool {
deny dynamic bootp clients;
- deny members of "sniffer";
+ allow members of "even";
+ option impress-servers 10.0.0.0;
+ failover peer "foo";
+ range 10.0.0.10 10.0.0.54;
+ range 10.0.0.100 10.0.0.149;
+ }
+ pool {
+ deny dynamic bootp clients;
+ allow members of "odd";
failover peer "foo";
- range 10.0.0.10 10.0.0.200;
+ option impress-servers 10.0.0.1;
+ range 10.0.0.55 10.0.0.99;
+ range 10.0.0.150 10.0.0.200;
}
pool {
deny dynamic bootp clients;
authoritative;
+class "even" {
+ match if ((extract-int (suffix
+ (pick-first-value (option dhcp-client-identifier,
+ hardware), 1), 8) % 2) = 0);
+}
+class "odd" {
+ match if ((extract-int (suffix
+ (pick-first-value (option dhcp-client-identifier,
+ hardware), 1), 8) % 2) = 1);
+}
+
lease-file-name "dhcp-2.leases";
pid-file-name "dhcp-2.pid";
local-port 50000;
port 51001;
peer address 10.0.0.1;
peer port 51000;
- max-response-delay 7;
+ max-response-delay 60;
max-unacked-updates 10;
mclt 100;
load balance max seconds 2;
shared-network 187-NET {
subnet 204.152.187.0 netmask 255.255.255.0 {
}
+ subnet 205.140.116.224 netmask 255.255.255.248 {
+ }
subnet 10.0.1.0 netmask 255.255.255.0 {
pool {
deny dynamic bootp clients;
subnet 10.0.0.0 netmask 255.255.255.0 {
pool {
deny dynamic bootp clients;
- deny members of "sniffer";
+ allow members of "even";
+ option impress-servers 10.0.0.0;
+ failover peer "foo";
+ range 10.0.0.10 10.0.0.54;
+ range 10.0.0.100 10.0.0.149;
+ }
+ pool {
+ deny dynamic bootp clients;
+ allow members of "odd";
failover peer "foo";
- range 10.0.0.10 10.0.0.200;
+ option impress-servers 10.0.0.1;
+ range 10.0.0.55 10.0.0.99;
+ range 10.0.0.150 10.0.0.200;
}
pool {
deny dynamic bootp clients;