merge dhcp-3.0.3

This commit is contained in:
drochner 2005-08-11 17:13:21 +00:00
parent 1b6f9e91ef
commit 9fbefaf7c9
131 changed files with 5182 additions and 4566 deletions

48
dist/dhcp/Makefile vendored
View File

@ -1,42 +1,32 @@
# Makefile
#
# Copyright (c) 2002 Internet Software Consortium.
# All rights reserved.
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
# Copyright (c) 1995-2003 by Internet Software Consortium
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of Internet Software Consortium nor the names
# of its contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
# CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# Internet Systems Consortium, Inc.
# 950 Charter Street
# Redwood City, CA 94063
# <info@isc.org>
# http://www.isc.org/
#
# This software has been written for the Internet Software Consortium
# This software has been written for Internet Systems Consortium
# by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
# To learn more about the Internet Software Consortium, see
# To learn more about Internet Systems Consortium, see
# ``http://www.isc.org/''. To learn more about Vixie Enterprises,
# see ``http://www.vix.com''. To learn more about Nominum, Inc., see
# ``http://www.nominum.com''.
#
all:
@sysname=`./configure --print-sysname`; \

View File

@ -1,21 +1,25 @@
# Makefile.conf
#
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
# Copyright (c) 1995-2003 by Internet Software Consortium
#
# http://www.isc.org/isc-license-1.0.html.
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Internet Systems Consortium, Inc.
# 950 Charter Street
# Redwood City, CA 94063
# <info@isc.org>
# http://www.isc.org/
## Defaults...
SCRIPT = none
@ -43,6 +47,7 @@ INCDIR=/usr/local/include
LIBS =
COPTS = $(BINDDEF) $(CC_OPTIONS)
DEBUG = -g
#WARNERR = -Werror
RANLIB = ranlib
MKDEP = mkdep
CLIENT_PATH = '"PATH=/usr/ucb:/usr/bin:/usr/sbin:/bin:/sbin"'
@ -123,7 +128,7 @@ MINORVERSION=MinorVersion
#LIBS = -lresolv -lsocket -lnsl -lgen
#CC=gcc
#COPTS = $(BINDDEF) -Wall -Wno-unused -Wno-implicit -Wno-comment \
# -Wno-uninitialized -Wno-char-subscripts -Wno-switch -Werror \
# -Wno-uninitialized -Wno-char-subscripts -Wno-switch $(WARNERR) \
# -DSOLARIS_MAJOR=$(MAJORVERSION) -DSOLARIS_MINOR=$(MINORVERSION) \
# $(CC_OPTIONS)
#CF = cf/sunos5-5.h
@ -199,6 +204,7 @@ MINORVERSION=MinorVersion
## FreeBSD
##--freebsd--
#CF = cf/freebsd.h
#COPTS = -O -Wall -Wno-unused $(WARNERR) $(CC_OPTIONS)
#SCRIPT=freebsd
##--freebsd--
@ -206,7 +212,7 @@ MINORVERSION=MinorVersion
##--rhapsody--
#CF = cf/rhapsody.h
#COPTS = -Wall -Wno-unused -Wno-implicit -Wno-comment \
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF) $(CC_OPTIONS)
# -Wno-uninitialized -Wno-switch $(WARNERR) -pipe $(BINDDEF) $(CC_OPTIONS)
##SCRIPT=rhapsody
##--rhapsody--
@ -214,7 +220,7 @@ MINORVERSION=MinorVersion
##--darwin--
#CF = cf/rhapsody.h
#COPTS = -Ddarwin -Wall -Wno-unused -Wno-implicit -Wno-comment \
# -Wno-uninitialized -Wno-switch -Werror -pipe $(BINDDEF) $(CC_OPTIONS)
# -Wno-uninitialized -Wno-switch $(WARNERR) -pipe $(BINDDEF) $(CC_OPTIONS)
#SCRIPT=freebsd
##--darwin--
@ -222,30 +228,13 @@ MINORVERSION=MinorVersion
##--netbsd--
#CF = cf/netbsd.h
#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-comment \
# -Wno-uninitialized -Werror \
# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
# -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes \
# -Wmissing-declarations -Wnested-externs \
# -pipe $(BINDDEF) $(CC_OPTIONS)
#SCRIPT=netbsd
##MKDEP=makedepend
##--netbsd--
## NetBSD nocast
## Some versions of the arm32 gcc have a problem in cast conversions.
## The Alpha definitely has a problem - if you pass '6' where a size_t
## is expected, you get a warning. So on these architectures, we do
## not ask for that sort of warning.
##--netbsd-nocast--
#CF = cf/netbsd.h
#COPTS = -Wall -Wstrict-prototypes -Wno-unused -Wno-comment \
# -Wno-uninitialized -Werror \
# -Wno-uninitialized $(WARNERR) \
# -Wimplicit-function-declaration -Wpointer-arith -Wcast-qual \
# -Wwrite-strings -Wmissing-prototypes \
# -Wmissing-declarations -Wnested-externs \
# -pipe $(BINDDEF) $(CC_OPTIONS)
#SCRIPT=netbsd
##--netbsd-nocast--
##--netbsd--
## Ultrix
##--ultrix--

View File

@ -1,21 +1,26 @@
# Makefile.dist
#
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
# Copyright (c) 1995-2003 by Internet Software Consortium
#
# http://www.isc.org/isc-license-1.0.html.
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Internet Systems Consortium, Inc.
# 950 Charter Street
# Redwood City, CA 94063
# <info@isc.org>
# http://www.isc.org/
SUBDIRS= common $(MINIRES) dst omapip server client relay dhcpctl

85
dist/dhcp/README vendored
View File

@ -1,7 +1,6 @@
Internet Software Consortium DHCP Distribution
Version 3.0.1
Release Candidate 9
April 28, 2002
Internet Systems Consortium DHCP Distribution
Version 3.0.3
July 22, 2005
README FILE
@ -97,15 +96,15 @@ system.
RELEASE STATUS
This is the tenth release candidate of version 3.0.1 of the ISC DHCP
Distribution. Development of this release is approaching the point at
which it will be frozen, and no significant new features will be
added.
This is the first beta release of ISC DHCP 3.0.3. This is a maintenance
release which seeks only to fix bugs present in versions 3.0.2 and
earlier. No new features have or will be added in subsequent
release candidates of this release.
In this release, the server and relay agent are currently fully
functional on NetBSD, Linux systems with kernel version 2.2 or later,
FreeBSD, OpenBSD, BSD/OS, Digital Tru64 Unix and Solaris. The
software will also run on HP-UX, but only supports a single network
FreeBSD, OpenBSD, BSD/OS, Digital Tru64 Unix and Solaris. The software
will also run on AIX and HP-UX, but only supports a single network
interface. Ports also exist for QNX, SCO, NeXTStep, and MacOS X, but
are not in wide use, with all that implies. We are not aware of an
easy way to get this software running on HP-UX.
@ -143,17 +142,17 @@ information. On Digital Unix, type ``man pfilt''.
To build the DHCP Distribution, unpack the compressed tar file using
the tar utility and the gzip command - type something like:
zcat dhcp-3.0.1rc11.tar.gz |tar xvf -
zcat dhcp-3.0.3.tar.gz |tar xvf -
On BSD/OS, you have to type gzcat, not zcat, and you may run into
similar problems on other operating systems.
CONFIGURING IT
Now, cd to the dhcp-3.0.1rc11 subdirectory that you've just
created and configure the source tree by typing:
Now, cd to the dhcp-3.0.3 subdirectory that you've just created and
configure the source tree by typing:
./configure
./configure
If the configure utility can figure out what sort of system you're
running on, it will create a custom Makefile for you for that
@ -466,22 +465,46 @@ rather than using the ISC DHCP client. The feature set of the Solaris
client is different (not necessarily better or worse) than that of the
ISC client, but in most cases it will be a lot easier for you to just
use that. Please do not ask for help in using the Solaris DHCP client
on Internet Software Consortium mailing lists - that's why you're
on Internet Systems Consortium mailing lists - that's why you're
paying Sun the big bucks. If you're having a problem with the
Solaris client interoperating with the ISC dhcp server, that's another
matter, but please check with Sun first.
AIX
The AIX support uses the BSD socket API, which cannot differentiate on
which network interface a broadcast packet was received; thus the DHCP
server and relay will work only on a single interface. (They do work
on multi-interface machines if configured to listen on only one of the
interfaces.)
The ISC DHCP distribution does not include a dhclient-script for AIX--
AIX comes with a DHCP client. Contribution of a working dhclient-script
for AIX would be welcome.
SUPPORT
The Internet Software Consortium DHCP server is not a commercial
product, and is not supported by the ISC. However, it has attracted a
fairly sizable following on the Internet, which means that there are a
lot of knowledgable users who may be able to help you if you get
stuck. These people generally read the dhcp-server@isc.org mailing
list.
The Internet Systems Consortium DHCP server is developed and distributed
by ISC in the public trust, thanks to the generous donations of its
sponsors. ISC now also fofers commercial quality support contracts for
ISC DHCP, more information about ISC Support Contracts can be found at
the following URL:
http://www.isc.org/ops/support/
No donators, as yet, have asked for their dollars to be spent providing
free support to all who ask. Please understand that we may not respond
to support inquiries unless you have a support contract. ISC will
continue its practice of always responding to critical items that effect
the entire community.
However, ISC DHCP has attracted a fairly sizable following on the
Internet, which means that there are a lot of knowledgable users who
may be able to help you if you get stuck. These people generally read
the dhcp-server@isc.org mailing list.
If you are going to use dhcpd, you should probably subscribe to the
dhcp-server and dhcp-announce mailing lists. If you will be using
dhcp-server or dhcp-announce mailing lists. If you will be using
dhclient, you should subscribe to the dhcp-client mailing list.
If you need help, you should ask on the dhcp-server or dhcp-client
@ -492,6 +515,12 @@ If you are having trouble with a combination of the client and server,
send the request to dhcp-server@isc.org. Please do not cross-post to
both lists under any circumstances.
WHERE TO SEND FEATURE REQUESTS: We like to hear your feedback. We may
not respond to it all the time, but we do read it. If ISC DHCP doesn't
work well for you, or you have an idea that would improve it for your
use, please send your suggestion to dhcp-suggest@isc.org. This is also
an excellent place to send patches that add new features.
WHERE TO REPORT BUGS: If you want the act of sending in a bug report
to result in you getting help in the form of a fixed piece of
software, you are asking for help. Your bug report is helpful to us,
@ -499,7 +528,7 @@ but fundamentally you are making a support request, so please use the
addresses described in the previous paragraphs. If you are _sure_ that
your problem is a bug, and not user error, or if your bug report
includes a patch, you can send it to dhcp-bugs@isc.org without
subscribing. This mailing list goes into a bug tracking system, so
subscribing. This e-mail address goes into a bug tracking system, so
you don't need to check periodically to see if we still remember the
bug - if you haven't been notified that the bug has been closed, we
still consider it a bug, and still have it in the system.
@ -508,8 +537,9 @@ PLEASE DO NOT REPORT BUGS IN OLD SOFTWARE RELEASES! Fetch the latest
release and see if the bug is still in that version of the software,
and if it's not, _then_ report it. It's okay to report bugs in the
latest patchlevel of a major version that's not the most recent major
version, though - for example, if you're running 2.0, you don't have
to upgrade to 3.0 before you can report bugs.
version, though - for example, if you're running 3.0.2, you don't have
to upgrade to a 3.0.3rc (release candidate) or even a 3.1.x release
before you can report bugs.
PLEASE DO NOT REPORT BUGS IF YOU ARE RUNNING A VERSION OF THE ISC
DHCP DISTRIBUTION THAT YOU DIDN'T GET FROM THE ISC! Free operating
@ -639,7 +669,6 @@ If you are having problems with a client whose executable is called
dhcpcd, this is _not_ the ISC DHCP client, and we probably can't help
you with it.
Please see http://www.isc.org/services/public/lists/dhcp-lists.html
for details on how to subscribe to the ISC DHCP mailing lists.
Please see http://www.isc.org/sw/dhcp/ for details on how to subscribe
to the ISC DHCP mailing lists.

380
dist/dhcp/RELNOTES vendored
View File

@ -1,7 +1,6 @@
Internet Software Consortium DHCP Distribution
Version 3.0.1
Release Candidate 10
June, 2002
Internet Systems Consortium DHCP Distribution
Version 3.0.3
July 22, 2005
Release Notes
@ -23,11 +22,9 @@ that are new since version 2.0:
- Many bug fixes, performance enhancements, and minor new DHCP
protocol features.
This is a release candidate for a minor bug fix release to follow ISC
DHCP 3.0. The main bug fixed here is a bug in the subclass allocation
code that could result in a memory smash. Any users of the ISC DHCP server
who are using subclasses should seriously consider upgrading to 3.0.1
either now or when the final 3.0.1 release comes out.
The main bug fixed here is a bug in the subclass allocation code that
could result in a memory smash. Any users of the ISC DHCP server who
are using subclasses should seriously consider upgrading to 3.0.1.
If you are running 3.0 beta 1 and are doing dynamic DNS updates, the
lease file is no longer forward-compatible to 3.0 final. A script
@ -46,6 +43,371 @@ Murrell at BC Tel Advanced Communications. I'd like to express my
thanks to all of these good people here, both for working on the code
and for prodding me into improving it.
Changes since 3.0.3b3
- dhclient.conf documentation for interface {} was updated to reflect recent
discussion on the dhcp-hackers mailing list.
- In response to reports that the software does not compile on GCC 4.0.0,
-Werror was removed from Makefile.conf for all platforms that used it.
We will address the true problem in a future release; this is a temporary
workaround.
Changes since 3.0.3b2
- An error in code changes introduced in 3.0.3b2 was corrected, which caused
static BOOTP clients to receive random addresses.
Changes since 3.0.3b1
- A bug was fixed in BOOTPREQUEST handling code wherein stale references to
host records would be left behind on leases that were not allocated to the
client currently booting (eg in the case where the host was denied booting).
- The dhcpd.conf.5 manpage was updated to be more clear in regards to
multiple host declarations (thanks to Vincent McIntyre). 'Interim' style
dynamic updates were also retouched.
Changes since 3.0.2
- A bug was fixed where a server might load balance a DHCP REQUEST to its
peer after already choosing not to load balance the preceeding DISCOVER.
The peer cannot allocate the originating server's lease.
- In the case where a secondary server lost its stable storage while the
primary was still in communications-interrupted, and came back online,
the lease databases would not be fully transferred to the secondary.
This was due to the secondary errantly sending an extra UPDREQ message
when the primary made its state transition to PARTNER-DOWN known.
- The package will now compile cleanly in gcc 3.3 and 3.4. As a side effect,
lease structures will be 9 bytes smaller on all platforms. Thanks to
Jason Vas Dias at Redhat.
- Interface discovery code in DISCOVER_UNCONFIGURED mode is now
properly restricted to only detecting broadcast interfaces. Thanks
to a patch from Jason Vas Dias at RedHat.
- decode_udp_ip_header was changed so that the IP address was copied out
to a variable, rather than referenced by a pointer. This enforces 4-byte
alignment of the 32-bit IP address value. Thanks to a patch from Dr.
Peter Poeml.
- An incorrect log message was corrected thanks to a patch from
Dr. Peter Poeml.
- A bug in DDNS was repaired, where if the server's first DDNS action was
a DDNS removal rather than a DDNS update, the resolver library's
retransmit timer and retry timer was set to the default, implying a
15 second timeout interval. Which is a little excessive in a synchronous,
single-threaded system. In all cases, ISC DHCP should now hold fast to
a 1-second timeout, trying only once.
- The siaddr field was being improperly set to the server-identifier when
responding to DHCP messages. RFC2131 clarified the siaddr field as
meaning the 'next server in the bootstrap process', eg a tftp server.
The siaddr field is now left zeroed unless next-server is configured.
- mockup_lease() could have returned in an error condition (or in the
condition where no fixed-address was found matching the shared
network) with stale references to a host record. This is probably not
a memory leak since host records generally never die anyway.
- A bug was repaired where failover servers would let stale client identifiers
persist on leases that were reallocated to new clients not sending an id.
- Binding scopes ("set var = value;") are now removed from leases allocated
by failover peers if the lease had expired. This should help reduce the
number of stale binding scopes on leases.
- A small memory leak was closed involving client identifiers larger than
7 bytes, and failover.
- Configuring a subnet in dhcpd.conf with a subnet mask of 32 bits might
cause an internal function to overflow heap. Thanks to Jason Vas Dias
at Redhat.
- Some inconsistencies in treating numbers that the lexer parsed as 'NUMBER'
or 'NUMBER_OR_NAME' was repaired. Hexadecimal parsing is affected, and
should work better.
- In several cases, parse warnings were being issued before the lexical
token had been advanced to the token whose value was causing an error...
causing parse warnings to claim the problem is on the wrong token.
- Host declarations matching on client identifier for dynamic leases will
no longer match fixed-address host declarations (this is now identical
to behaviour for host records matching on hardware address).
Changes since 3.0.2rc3
- A previously undocumented configuration directive, 'local-address',
was documented in the dhcpd.conf manpage.
Changes since 3.0.2rc2
- Two varaibles introduced in 3.0.2b1 were used without being initialized
in the case where neither the FILE nor SNAME fields were available for
overloading. This was repaired.
- A heretofore believed to be impossible corner case of the option
overloading implementation turned out to be possible ("Unable to sort
overloaded options after 10 tries."). The implementation was reworked
to consider the case of an option so large it would require more than
three chunks to fit.
- Many other instances of variables being used without being initialized
were repaired.
- An uninitialized variable in omapi_io_destroy() led to the discovery
that this function may result in orphaned pointers (and hence, a memory
leak).
Changes since 3.0.2rc1
- allocate_lease() was rewritten to repair a bug in which the server would
try to allocate an ABANDONED lease when FREE leases were available.
Changes since 3.0.2b1
- Some dhcp-eval.5 manpage formatting was repaired.
Changes since 3.0.1
- A bug was fixed in the server's 'option overloading' implementation,
where options loaded into the 'file' and 'sname' packet fields were
not aligned precisely as rfc2131 dictates.
- The FreeBSD client script was changed to support the case where a domain
name was not provided by the server.
- A memory leak in 'omshell' per each command line parsed was
repaired, thanks to a patch from Jarkko Torppa.
- Log functions writing to stderr were adjusted to use the STDERR_FILENO
system definition rather than '2'. This is a no-op for 90% of platforms.
- One call to trace_write_packet_iov() counted the number of io vectors
incorrectly, causing inconsistent tracefiles. This was fixed.
- Some expression parse failure memory leaks were closed.
- A host byte order problem in tracefiles was repaired.
- Pools configured in DHCPD for failover possessing permission lists that
previously were assumed to not include dyanmic bootp clients are now
a little more pessimistic. The result is, dhcpd will nag you about just
about most pools that possess a 'allow' statement with no 'deny' that
would definitely match a dynamic bootp client.
- The 'ddns-update-style' configuration warning bit now insists that
the configuration be globally scoped.
- Two memory leaks in dhclient were closed thanks to a patch from Felix
Farkas.
- Some minor but excellently pedantic documentation errors were fixed
thanks to a patch from Thomas Klausner.
- Bugs in operator precedence in executable statements have been repaired
once again. More legal syntaxes should be parsed legally.
- Failing to initialize a tracefile for any reason if a tracefile was
specified is now a fatal error. Thanks to a patch from Albert Herranz.
- Corrected a bug in which the number of leases transferred as calculated
by the failover primary and sent to peers in POOLRESP responses may be
incorrect. This value is not believed to be used by other failover
implementations, excepting perhaps as logged information.
- Corrected a bug in which 'dhcp_failover_send_poolresp()' was in fact
sending POOLREQ messages instead of POOLRESP mesasges. This message
was essentially ignored since failover secondaries effectively do not
respond to POOLREQ messages.
- Type definitions for various bitwidths of integers in the sunos5-5
build of ISC DHCP have been fixed. It should compile and run more
easily when built in 64-bit for this platform.
- "allow known-clients;" is now a legal syntax, to avoid confusion.
- If one dhcp server chooses to 'load balance' a request to its failover
peer, it first checks to see if it believes said peer has a free
lease to allocate before ignoring the DISCOVER.
- log() was logging a work buffer, rather than the value returned by
executing the statements configured by the user. In some cases,
the work buffer and the intended results were the same. In some other
cases, they were not. This was fixed thanks to a patch from Gunnar
Fjone and directconnect.no.
- Compiler warnings for some string type conversions was fixed, thanks
to Andreas Gustafsson.
- The netbsd build environments were simplified to one, in which
-Wconversion is not used, thanks to Andreas Gustafsson.
- How randomness in the backoff-cutoff dhclient configuration variable
is implemented was better documented in the manpage, and the behaviour
of dhclient in REQUEST timeout handling was changed to match that of
DISCOVER timeout handling.
- Omapi was hardened against clients that pass in null values, thanks
to a patch from Mark Jason Dominus.
- A bug was fixed in dhclient that kept it from doing client-side
ddns updates. Thanks to a patch from Andreas Gustafsson, which
underwent some modification after review by Jason Vas Dias.
- Failover implementations disconnected due to the network between
them (rather than one of the two shutting down) will now try to
re-establish the failover connection every 5 seconds, rather than
to simply try once and give up until one of them is restarted.
Thanks to a patch from Ulf Ekberg from Infoblox, and field testing
by Greger V. Teigre which led to an enhancement to it.
- A problem that kept DHCP Failover secondaries from tearing down
ddns records was repaired. Thanks to a patch from Ulf Ekberg from
Infoblox.
- 64bit pointer sizes are detected properly on FreeBSD now.
- A bug was repaired where the DHCP server would leave stale references
to host records on leases it once thought about offering to certain
clients. The result would be to apply host and 'known' scopes to the
wrong clients (possibly denying booting). NOTE: The 'mis-host' patch
that was being circulated as a workaround is not the way this bug was
fixed. If you were a victim of this bug in 3.0.1, you are cautioned
to proceed carefully and see if it fixes your problem.
- A bug was repaired in the server's DHCPINFORM handling, where it
tried to divine the client's address from the source packet and
would get it wrong. Thanks to Anshuman Singh Rawat.
- A log message was introduced to help illuminate the case where the
server was unable to find a lease to assign to any BOOTP client.
Thanks to Daniel Baker.
- A minor dhcpd.conf.5 manpage error was fixed.
Changes since 3.0.1rc14
- The global variable 'cur_time' was centralized and is now uniformly of a
type #defined in system-dependent headers. It had previously been defined
in one of many places as a 32-bit value, and this causes mayhem on 64-bit
big endian systems. It probably wasn't too healthy on little endian
systems either.
- A printf format string error introduced in rc14 was repaired.
- AIX system-dependent header file was altered to only define NO_SNPRINTF
if the condition used to #ifdef in vsnprintf in AIX' header files
is false.
- The Alpha/OSF system-dependent header file was altered to define
NO_SNPRINTF on OS revisions older than 4.0G.
- omapip/test.c had string.h added to its includes.
Changes since 3.0.1rc13
! CAN-2004-0460 - CERT VU#317350: Five stack overflow exploits were closed
in logging messages with excessively long hostnames provided by the
clients. It is highly probable that these could have been used by
attackers to gain arbitrary root access on systems using ISC DHCP 3.0.1
release candidates 12 or 13. Special thanks to Gregory Duchemin for
both finding and solving the problem.
! CAN-2004-0461 - CERT VU#654390: Once the above was closed, an opening
in log_*() functions was evidented, on some specific platforms where
vsnprintf() was not believed to be available and calls were wrapped to
sprintf() instead. Again, credit goes to Gregory Duchemin for finding
the problem. Calls to snprintf() are now linked to a distribution-local
snprintf implementation, only in those cases where the architecture is
not known to provide one (see includes/cf/[arch].h). If you experience
linking problems with snprintf/vsnprintf or 'isc_print_' functions, this
is where to look. This vulnerability did not exist in any previously
published version of ISC DHCP.
- Compilation on hpux 11.11 was repaired.
- 'The cross-compile bug fix' was backed out.
Changes since 3.0.1rc12
- Fixed a bug in omapi lease lookup function, to form the hardware
address for the hash lookup correctly, thanks to a patch from
Richard Hirst.
- Fixed a bug where dhcrelay was sending relayed responses back to the
broadcast address, but with the source's unicast mac address. Should
now conform to rfc2131 section 4.1.
- Cross-compile bug fix; use $(AR) instead of ar. Thanks to Morten Brorup.
- Fixed a crash bug in dhclient where dhcpd servers that do not provide
renewal times results in an FPE. As a side effect, dhclient can now
properly handle 0xFFFFFFFF (-1) expiry times supplied by servers. Thanks
to a patch from Burt Silverman.
- The 'ping timeout' debugs from rc12 were removed to -DDEBUG only,
and reformatted to correct a compilation error on solaris platforms.
- A patch was applied which fixes a case where leases read from the
leases database do not properly over-ride previously read leases.
- dhcpctl.3 manpage was tweaked.
Changes since 3.0.1rc11
- A patch from Steve Campbell was applied with minor modifications to
permit reverse dns PTR record updates with values containing spaces.
- A patch from Florian Lohoff was applied with some modifications to
dhcrelay. It now discards packets whose hop count exceeds 10 by default,
and a command-line option (-c) can be used to set this threshold.
- A failover bug relating to identifying peers by name length instead of
by name was fixed.
- Delcaring failover configs within shared-network statements should no
longer result in error.
- The -nw command line option to dhclient now works.
- Thanks to a patch from Michael Richardson:
- Some problems with long option processing have been fixed.
- Some fixes to minires so that updates of KEY records will work.
- contrib/ms2isc was updated by Shu-Min Chang of the Intel Corporation.
see contrib/ms2isc/readme.txt for revision notes.
- Dhclient no longer uses shell commands to kill another instance of
itself, it sends the signal directly. Thanks to a patch from Martin
Blapp.
- The FreeBSD dhclient-script was changed so that a failure to write to
/etc/resolv.conf does not prematurely end the script. This keeps dhclient
from looping infinitely when this is the case. Thanks to a patch from
Martin Blapp.
- A patch from Bill Stephens was applied which resolves a problem with lease
expiry times in failover configurations.
- A memory leak in configuration parsing was closed thanks to a patch from
Steve G.
- The function which discovers interfaces will now skip non-broadcast or
point-to-point interfaces, thanks to a patch from David Brownlee.
- Options not yet known by the dhcpd or dhclient have had their names
changed such that they do not contain # symbols, in case they should ever
appear in a lease file. An option that might have been named "#144" is
now "unknown-144".
- Another patch from Bill Stephens which allows the ping-check timeout to
be configured as 'ping-timeout'. Defaults to 1.
Changes since 3.0.1rc10
- Potential buffer overflows in minires repaired.

View File

@ -1,21 +1,25 @@
# Makefile.dist
#
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
# Copyright (c) 1996-2003 by Internet Software Consortium
#
# http://www.isc.org/isc-license-1.0.html.
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Internet Systems Consortium, Inc.
# 950 Charter Street
# Redwood City, CA 94063
# <info@isc.org>
# http://www.isc.org/
CATMANPAGES = dhclient.cat8 dhclient.conf.cat5 dhclient-script.cat8 \
dhclient.leases.cat5

View File

@ -3,39 +3,30 @@
Parser for dhclient config and lease files... */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,11 +34,13 @@
#ifndef lint
static char copyright[] =
"$Id: clparse.c,v 1.9 2005/06/02 11:10:00 lukem Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: clparse.c,v 1.10 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
static TIME parsed_time;
struct client_config top_level_config;
u_int32_t default_requested_options [] = {
@ -88,8 +81,8 @@ isc_result_t read_client_conf ()
top_level_config.bootp_policy = P_ACCEPT;
top_level_config.script_name = path_dhclient_script;
top_level_config.requested_options = default_requested_options;
top_level_config.do_forward_update = 1;
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)
@ -636,34 +629,41 @@ void parse_option_list (cfile, list)
struct parse *cfile;
u_int32_t **list;
{
int ix, i;
int ix;
int token;
const char *val;
pair p = (pair)0, q = (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;
@ -794,9 +794,7 @@ int interface_or_dummy (struct interface_info **pi, const char *name)
/* If we didn't find an interface, make a dummy interface as
a placeholder. */
if (!ip) {
isc_result_t status;
status = interface_allocate (&ip, MDL);
if (status != ISC_R_SUCCESS)
if ((status = interface_allocate (&ip, MDL)) != ISC_R_SUCCESS)
log_fatal ("Can't record interface %s: %s",
name, isc_result_totext (status));
strcpy (ip -> name, name);
@ -809,6 +807,8 @@ int interface_or_dummy (struct interface_info **pi, const char *name)
}
if (pi)
status = interface_reference (pi, ip, MDL);
else
status = ISC_R_FAILURE;
interface_dereference (&ip, MDL);
if (status != ISC_R_SUCCESS)
return 0;

View File

@ -1,41 +1,34 @@
.\" dhclient-script.8
.\"
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of The Internet Software Consortium nor the names
.\" of its contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" This software has been written for the Internet Software Consortium
.\" Internet Systems Consortium, Inc.
.\" 950 Charter Street
.\" Redwood City, CA 94063
.\" <info@isc.org>
.\" http://www.isc.org/
.\"
.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
.\" To learn more about the Internet Software Consortium, see
.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
.\" $Id: dhclient-script.8,v 1.4 2003/02/18 17:08:39 drochner Exp $
.\" $Id: dhclient-script.8,v 1.5 2005/08/11 17:13:21 drochner Exp $
.\"
.TH dhclient-script 8
.SH NAME
@ -200,8 +193,8 @@ $new_static_routes, but current scripts do not do this.
.SH FILES
Each operating system should generally have its own script file,
although the script files for similar operating systems may be similar
or even identical. The script files included in the Internet
Software Consortium DHCP distribution appear in the distribution tree
or even identical. The script files included in Internet
Systems Consortium DHCP distribution appear in the distribution tree
under client/scripts, and bear the names of the operating systems on
which they are intended to work.
.SH BUGS
@ -218,9 +211,9 @@ dhclient(8), dhcpd(8), dhcrelay(8), dhclient.conf(5) and
dhclient.leases(5).
.SH AUTHOR
.B dhclient-script(8)
has been written for the Internet Software Consortium
has been written for Internet Systems Consortium
by Ted Lemon in cooperation with Vixie
Enterprises. To learn more about the Internet Software Consortium,
Enterprises. To learn more about Internet Systems Consortium,
see
.B http://www.isc.org.
To learn more about Vixie

View File

@ -1,22 +1,27 @@
.\" dhclient.8
.\"
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Use is subject to license terms which appear in the file named
.\" ISC-LICENSE that should have accompanied this file when you
.\" received it. If a file named ISC-LICENSE did not accompany this
.\" file, or you are not sure the one you have is correct, you may
.\" obtain an applicable copy of the license at:
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
.\" http://www.isc.org/isc-license-1.0.html.
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" This file is part of the ISC DHCP distribution. The documentation
.\" associated with this file is listed in the file DOCUMENTATION,
.\" included in the top-level directory of this release.
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" Support and other services are available for ISC products - see
.\" http://www.isc.org for more information.
.\" Internet Systems Consortium, Inc.
.\" 950 Charter Street
.\" Redwood City, CA 94063
.\" <info@isc.org>
.\" http://www.isc.org/
.\"
.\" $Id: dhclient.8,v 1.8 2005/07/01 01:19:02 mellon Exp $
.\" $Id: dhclient.8,v 1.9 2005/08/11 17:13:21 drochner Exp $
.\"
.TH dhclient 8
.SH NAME
@ -82,7 +87,7 @@ relay
]
]
.SH DESCRIPTION
The Internet Software Consortium DHCP Client, dhclient, provides a
The Internet Systems Consortium DHCP Client, dhclient, provides a
means for configuring one or more network interfaces using the Dynamic
Host Configuration Protocol, BOOTP protocol, or if these protocols
fail, by statically assigning an address.
@ -301,9 +306,9 @@ 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
@ -316,7 +321,7 @@ Stanford.
.PP
The current version owes much to Elliot's Linux enhancements, but
was substantially reorganized and partially rewritten by Ted Lemon
so as to use the same networking framework that the Internet Software
so as to use the same networking framework that the Internet Systems
Consortium DHCP server uses. Much system-specific configuration code
was moved into a shell script so that as support for more operating
systems is added, it will not be necessary to port and maintain

View File

@ -3,35 +3,26 @@
DHCP Client. */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This code is based on the original client state machine that was
* written by Elliot Poger. The code has been extensively hacked on
@ -41,13 +32,12 @@
#ifndef lint
static char ocopyright[] =
"$Id: dhclient.c,v 1.15 2005/07/01 01:19:02 mellon Exp $ Copyright (c) 1995-2002 Internet Software Consortium. All rights reserved.\n";
"$Id: dhclient.c,v 1.16 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
#include "version.h"
TIME cur_time;
TIME default_lease_time = 43200; /* 12 hours... */
TIME max_lease_time = 86400; /* 24 hours... */
@ -71,9 +61,9 @@ struct in_addr giaddr;
assert (state_is == state_shouldbe). */
#define ASSERT_STATE(state_is, state_shouldbe) {}
static char copyright[] = "Copyright 1995-2002 Internet Software Consortium.";
static char copyright[] = "Copyright 2004-2005 Internet Systems Consortium.";
static char arr [] = "All rights reserved.";
static char message [] = "Internet Software Consortium DHCP Client";
static char message [] = "Internet Systems Consortium DHCP Client";
static char url [] = "For info, please visit http://www.isc.org/products/DHCP";
u_int16_t local_port=0;
@ -210,6 +200,8 @@ int main (argc, argv, envp)
if (++i == argc)
usage ();
relay = argv [i];
} else if (!strcmp (argv [i], "-nw")) {
nowait = 1;
} else if (!strcmp (argv [i], "-n")) {
/* do not start up any interfaces */
interfaces_requested = 1;
@ -230,8 +222,6 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "--version")) {
log_info ("isc-dhclient-%s", DHCP_VERSION);
exit (0);
} else if (!strcmp (argv [i], "-nw")) {
nowait = 1;
} else if (argv [i][0] == '-') {
usage ();
} else {
@ -271,15 +261,24 @@ int main (argc, argv, envp)
/* first kill of any currently running client */
if (release_mode) {
/* XXX inelegant hack to prove concept */
char command[1024];
FILE *pidfd;
pid_t oldpid;
long temp;
int e;
#if !defined (NO_SNPRINTF)
snprintf (command, 1024, "kill `cat %s`", path_dhclient_pid);
#else
sprintf (command, "kill `cat %s`", path_dhclient_pid);
#endif
system (command);
oldpid = 0;
if ((pidfd = fopen(path_dhclient_pid, "r")) != NULL) {
e = fscanf(pidfd, "%ld\n", &temp);
oldpid = (pid_t)temp;
if (e != 0 && e != EOF) {
if (oldpid) {
if (kill(oldpid, SIGTERM) == 0)
unlink(path_dhclient_pid);
}
}
fclose(pidfd);
}
}
/* This isn't the final pid, but it may be needed so that
@ -812,11 +811,15 @@ void dhcpack (packet)
/* If it wasn't specified by the server, calculate it. */
if (!client -> new -> renewal)
client -> new -> renewal =
client -> new -> expiry / 2;
client -> new -> renewal = client -> new -> expiry / 2 + 1;
if (client -> new -> renewal <= 0)
client -> new -> renewal = TIME_MAX;
/* Now introduce some randomness to the renewal time: */
client -> new -> renewal = (((client -> new -> renewal + 3) * 3 / 4) +
if (client -> new -> renewal <= TIME_MAX / 3 - 3)
client -> new -> renewal =
(((client -> new -> renewal + 3) * 3 / 4) +
(random () % /* XXX NUMS */
((client -> new -> renewal + 3) / 4)));
@ -835,14 +838,25 @@ void dhcpack (packet)
} else
client -> new -> rebind = 0;
if (!client -> new -> rebind)
client -> new -> rebind =
(client -> new -> expiry * 7) / 8; /* XXX NUMS */
if (client -> new -> rebind <= 0) {
if (client -> new -> expiry <= TIME_MAX / 7)
client -> new -> rebind =
client -> new -> expiry * 7 / 8;
else
client -> new -> rebind =
client -> new -> expiry / 8 * 7;
}
/* Make sure our randomness didn't run the renewal time past the
rebind time. */
if (client -> new -> renewal > client -> new -> rebind)
client -> new -> renewal = (client -> new -> rebind * 3) / 4;
if (client -> new -> renewal > client -> new -> rebind) {
if (client -> new -> rebind <= TIME_MAX / 3)
client -> new -> renewal =
client -> new -> rebind * 3 / 4;
else
client -> new -> renewal =
client -> new -> rebind / 4 * 3;
}
client -> new -> expiry += cur_time;
/* Lease lengths can never be negative. */
@ -952,6 +966,8 @@ void state_bound (cpp)
client -> destination.len = 4;
} else
client -> destination = iaddr_broadcast;
data_string_forget (&ds, MDL);
} else
client -> destination = iaddr_broadcast;
@ -1264,7 +1280,7 @@ struct client_lease *packet_to_lease (packet, client)
break;
lease -> server_name = dmalloc (len + 1, MDL);
if (!lease -> server_name) {
log_error ("dhcpoffer: no memory for filename.\n");
log_error ("dhcpoffer: no memory for server name.\n");
destroy_client_lease (lease);
return (struct client_lease *)0;
} else {
@ -1411,9 +1427,9 @@ void send_discover (cpp)
/* If we're supposed to increase the interval, do so. If it's
currently zero (i.e., we haven't sent any packets yet), set
it to one; otherwise, add to it a random number between
zero and two times itself. On average, this means that it
will double with every transmission. */
it to initial_interval; otherwise, add to it a random number
between zero and two times itself. On average, this means
that it will double with every transmission. */
if (increase) {
if (!client -> interval)
client -> interval =
@ -1657,7 +1673,8 @@ void send_request (cpp)
client -> config -> backoff_cutoff)
client -> interval =
((client -> config -> backoff_cutoff / 2)
+ ((random () >> 2) % client -> interval));
+ ((random () >> 2) %
client -> config -> backoff_cutoff));
/* If the backoff would take us to the expiry time, just set the
timeout to the expiry time. */
@ -1897,10 +1914,17 @@ void make_discover (client, lease)
/* Set up the option buffer... */
client -> packet_length =
cons_options ((struct packet *)0, &client -> packet,
(struct lease *)0, client, 0,
(struct option_state *)0, options,
&global_scope, 0, 0, 0, (struct data_string *)0,
(struct lease *)0, client,
/* maximum packet size */1500,
(struct option_state *)0,
options,
/* scope */ &global_scope,
/* overload */ 0,
/* terminate */0,
/* bootpp */0,
(struct data_string *)0,
client -> config -> vendor_space_name);
option_state_dereference (&options, MDL);
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
@ -1950,6 +1974,9 @@ void make_request (client, lease)
else
oc = (struct option_cache *)0;
if (client -> sent_options)
option_state_dereference (&client -> sent_options, MDL);
make_client_options (client, lease, &request, oc,
((client -> state == S_REQUESTING ||
client -> state == S_REBOOTING)
@ -1961,11 +1988,17 @@ void make_request (client, lease)
/* Set up the option buffer... */
client -> packet_length =
cons_options ((struct packet *)0, &client -> packet,
(struct lease *)0, client, 0,
(struct option_state *)0, client -> sent_options,
&global_scope, 0, 0, 0, (struct data_string *)0,
(struct lease *)0, client,
/* maximum packet size */1500,
(struct option_state *)0,
client -> sent_options,
/* scope */ &global_scope,
/* overload */ 0,
/* terminate */0,
/* bootpp */0,
(struct data_string *)0,
client -> config -> vendor_space_name);
option_state_dereference (&client -> sent_options, MDL);
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
@ -2088,10 +2121,17 @@ void make_release (client, lease)
/* Set up the option buffer... */
client -> packet_length =
cons_options ((struct packet *)0, &client -> packet,
(struct lease *)0, client, 0,
(struct option_state *)0, options,
&global_scope, 0, 0, 0, (struct data_string *)0,
(struct lease *)0, client,
/* maximum packet size */1500,
(struct option_state *)0,
options,
/* scope */ &global_scope,
/* overload */ 0,
/* terminate */0,
/* bootpp */0,
(struct data_string *)0,
client -> config -> vendor_space_name);
if (client -> packet_length < BOOTP_MIN_LEN)
client -> packet_length = BOOTP_MIN_LEN;
option_state_dereference (&options, MDL);
@ -2811,6 +2851,8 @@ void do_release(client)
client -> destination.len = 4;
} else
client -> destination = iaddr_broadcast;
data_string_forget (&ds, MDL);
} else
client -> destination = iaddr_broadcast;
client -> first_sending = cur_time;
@ -3135,7 +3177,8 @@ isc_result_t client_dns_update (struct client_state *client, int addp, int ttl)
rcode = ddns_remove_a (&ddns_fwd_name,
client -> active -> address,
&ddns_dhcid);
}
} else
rcode = ISC_R_FAILURE;
data_string_forget (&ddns_fwd_name, MDL);
data_string_forget (&ddns_dhcid, MDL);

View File

@ -1,49 +1,39 @@
.\" dhclient.conf.5
.\" $Id: dhclient.conf.5,v 1.8 2005/08/11 17:13:21 drochner Exp $
.\"
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of The Internet Software Consortium nor the names
.\" of its contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" This software has been written for the Internet Software Consortium
.\" Internet Systems Consortium, Inc.
.\" 950 Charter Street
.\" Redwood City, CA 94063
.\" <info@isc.org>
.\" http://www.isc.org/
.\"
.\" This software has been written for Internet Software Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
.\" To learn more about the Internet Software Consortium, see
.\" To learn more about Internet Software Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
.\" $Id: dhclient.conf.5,v 1.7 2004/03/30 20:05:01 mellon Exp $
.\"
.TH dhclient.conf 5
.SH NAME
dhclient.conf - DHCP client configuration file
.SH DESCRIPTION
The dhclient.conf file contains configuration information for
.IR dhclient,
the Internet Software Consortium DHCP Client.
the Internet Systems Consortium DHCP Client.
.PP
The dhclient.conf file is a free-form ASCII text file. It is parsed by
the recursive-descent parser built into dhclient. The file may contain
@ -155,7 +145,8 @@ so that if many clients try to configure themselves at the same time,
they will not make their requests in lock-step. The
.I backoff-cutoff
statement determines the maximum amount of time that the client is
allowed to back off. It defaults to two minutes.
allowed to back off, the actual value will be evaluated randomly between
1/2 to 1 1/2 times the \fItime\fR specified. It defaults to two minutes.
.PP
.I The
.B initial-interval
@ -469,7 +460,7 @@ automatically determine the type of network to which they are
connected. The media setup string is a system-dependent parameter
which is passed to the dhcp client configuration script when
initializing the interface. On Unix and Unix-like systems, the
argument is passed on the ifconfig command line when configuring te
argument is passed on the ifconfig command line when configuring the
interface.
.PP
The dhcp client automatically declares this parameter if it uses a
@ -518,7 +509,7 @@ second also a number between 0 and 59.
Some DHCP clients running TCP/IP roaming protocols may require that in
addition to the lease they may acquire via DHCP, their interface also
be configured with a predefined IP alias so that they can have a
permanent IP address even while roaming. The Internet Software
permanent IP address even while roaming. The Internet Systems
Consortium DHCP client doesn't support roaming with fixed addresses
directly, but in order to facilitate such experimentation, the dhcp
client can be set up to configure an IP alias using the
@ -553,6 +544,15 @@ parameters will then be used only for the interface that matches the
specified name. Interfaces for which there is no interface
declaration will use the parameters declared outside of any interface
declaration, or the default settings.
.PP
.B Note well:
ISC dhclient only maintains one list of interfaces, which is either
determined at startup from command line arguments, or otherwise is
autodetected. If you supplied the list of interfaces on the command
line, this configuration clause will add the named interface to the
list in such a way that will cause it to be configured by DHCP. Which
may not be the result you had intended. This is an undesirable side
effect that will be addressed in a future release.
.PP
\fBpseudo "\fIname\fR" "\fIreal-name\fB" { \fIdeclarations ... \fB }
.PP
@ -650,6 +650,6 @@ RFC2131.
.B dhclient(8)
was written by Ted Lemon
under a contract with Vixie Labs. Funding
for this project was provided by the Internet Software Consortium.
Information about the Internet Software Consortium can be found at
for this project was provided by Internet Systems Consortium.
Information about Internet Systems Consortium can be found at
.B http://www.isc.org.

View File

@ -1,48 +1,36 @@
.\" dhclient.conf.5
.\" $Id: dhclient.leases.5,v 1.6 2005/08/11 17:13:21 drochner Exp $
.\"
.\" Copyright (c) 1997-2002 The Internet Software Consortium.
.\" All rights reserved.
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 1997-2003 by Internet Software Consortium
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of The Internet Software Consortium nor the names
.\" of its contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\" Internet Systems Consortium, Inc.
.\" 950 Charter Street
.\" Redwood City, CA 94063
.\" <info@isc.org>
.\" http://www.isc.org/
.\"
.\" This software has been written for the Internet Software Consortium
.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie
.\" Enterprises. To learn more about the Internet Software Consortium,
.\" Enterprises. To learn more about Internet Systems Consortium,
.\" see ``http://www.isc.org/isc''. To learn more about Vixie
.\" Enterprises, see ``http://www.vix.com''.
.\"
.\" $Id: dhclient.leases.5,v 1.5 2003/03/31 17:32:28 perry 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,
@ -60,6 +48,6 @@ dhcpd.conf(5), RFC2132, RFC2131.
.B dhclient(8)
was written by Ted Lemon
under a contract with Vixie Labs. Funding
for this project was provided by the Internet Software Consortium.
Information about the Internet Software Consortium can be found at
for this project was provided by Internet Systems Consortium.
Information about Internet Systems Consortium can be found at
.B http://www.isc.org.

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# $Id: freebsd,v 1.3 2003/02/18 17:08:40 drochner Exp $
# $Id: freebsd,v 1.4 2005/08/11 17:13:21 drochner Exp $
#
# $FreeBSD$
@ -13,13 +13,24 @@ fi
make_resolv_conf() {
if [ x"$new_domain_name_servers" != x ]; then
if [ "x$new_domain_name" != x ]; then
echo search $new_domain_name >/etc/resolv.conf
( echo search $new_domain_name >/etc/resolv.conf )
exit_status=$?
else
rm /etc/resolv.conf
if [ -e /etc/resolv.conf ] ; then
( rm /etc/resolv.conf )
exit_status=$?
else
( touch /etc/resolv.conf )
exit_status=$?
fi
fi
if [ $exit_status -ne 0 ]; then
$LOGGER "WARNING: Unable to update resolv.conf: Error $exit_status"
else
for nameserver in $new_domain_name_servers; do
( echo nameserver $nameserver >>/etc/resolv.conf )
done
fi
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver >>/etc/resolv.conf
done
fi
}

View File

@ -1,15 +1,35 @@
# Makefile.dist
#
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Internet Systems Consortium, Inc.
# 950 Charter Street
# Redwood City, CA 94063
# <info@isc.org>
# http://www.isc.org/
CATMANPAGES = dhcp-options.cat5 dhcp-eval.cat5
SEDMANPAGES = dhcp-options.man5 dhcp-eval.man5
SRC = raw.c parse.c nit.c icmp.c dispatch.c conflex.c upf.c bpf.c socket.c \
lpf.c dlpi.c packet.c tr.c ethernet.c memory.c print.c options.c \
inet.c tree.c tables.c alloc.c fddi.c ctrace.c \
dns.c resolv.c execute.c discover.c comapi.c
inet.c tree.c tables.c alloc.c fddi.c ctrace.c dns.c resolv.c \
execute.c discover.c comapi.c
OBJ = raw.o parse.o nit.o icmp.o dispatch.o conflex.o upf.o bpf.o socket.o \
lpf.o dlpi.o packet.o tr.o ethernet.o memory.o print.o options.o \
inet.o tree.o tables.o alloc.o fddi.o ctrace.o \
dns.o resolv.o execute.o discover.o comapi.o
inet.o tree.o tables.o alloc.o fddi.o ctrace.o dns.o resolv.o \
execute.o discover.o comapi.o
MAN = dhcp-options.5 dhcp-eval.5
INCLUDES = -I$(TOP) $(BINDINC) -I$(TOP)/includes

View File

@ -3,39 +3,30 @@
Memory allocation... */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: alloc.c,v 1.4 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: alloc.c,v 1.5 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,42 +3,29 @@
BPF socket interface code, originally contributed by Archie Cobbs. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software was contributed to the Internet Software Consortium
* by Archie Cobbs, and is now maintained by Ted Lemon in cooperation
* with Nominum, Inc. To learn more about the Internet Software
* Consortium, see ``http://www.isc.org/''. To learn more about Vixie
* Enterprises, see ``http://www.vix.com''. To learn more about
* Nominum, Inc., see ``http://www.nominum.com''.
* This software was contributed to Internet Systems Consortium
* by Archie Cobbs.
*
* Patches for FDDI support on Digital Unix were written by Bill
* Stapleton, and maintained for a while by Mike Meredith before he
@ -47,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: bpf.c,v 1.9 2004/12/01 23:45:12 christos Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: bpf.c,v 1.10 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -115,11 +102,8 @@ int if_register_bpf (info)
char filename[50];
int b;
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) {
@ -519,7 +503,6 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
interface -> rbuf,
interface -> rbuf_offset,
from,
(unsigned char *)0,
hdr.bh_caplen, &paylen);
/* If the IP or UDP checksum was bad, skip the packet... */

View File

@ -3,39 +3,30 @@
OMAPI object interfaces for the DHCP server. */
/*
* Copyright (c) 1999-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -50,7 +41,7 @@
#ifndef lint
static char copyright[] =
"$Id: comapi.c,v 1.5 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1999-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: comapi.c,v 1.6 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,39 +3,30 @@
Lexical scanner for dhcpd config file... */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: conflex.c,v 1.4 2005/06/02 11:10:01 lukem Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: conflex.c,v 1.5 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -312,8 +303,8 @@ static enum dhcp_token read_string (cfile)
int i;
int bs = 0;
int c;
int value;
int hex;
int value = 0;
int hex = 0;
value = 0; /* XXXGCC -Wuninitialized */
hex = 0; /* XXXGCC -Wuninitialized */
@ -422,22 +413,62 @@ static enum dhcp_token read_number (c, cfile)
int c;
struct parse *cfile;
{
#ifdef OLD_LEXER
int seenx = 0;
#endif
int i = 0;
int token = NUMBER;
cfile -> tokbuf [i++] = c;
for (; i < sizeof cfile -> tokbuf; i++) {
c = get_char (cfile);
if (!seenx && c == 'x') {
seenx = 1;
#ifndef OLD_LEXER
} else if (isascii (c) && !isxdigit (c) &&
(c == '-' || c == '_' || isalpha (c))) {
token = NAME;
} else if (isascii (c) && !isdigit (c) && isxdigit (c)) {
token = NUMBER_OR_NAME;
#endif
/* Promote NUMBER -> NUMBER_OR_NAME -> NAME, never demote.
* Except in the case of '0x' syntax hex, which gets called
* a NAME at '0x', and returned to NUMBER_OR_NAME once it's
* verified to be at least 0xf or less.
*/
switch(isascii(c) ? token : BREAK) {
case NUMBER:
if(isdigit(c))
break;
/* FALLTHROUGH */
case NUMBER_OR_NAME:
if(isxdigit(c)) {
token = NUMBER_OR_NAME;
break;
}
/* FALLTHROUGH */
case NAME:
if((i == 2) && isxdigit(c) &&
(cfile->tokbuf[0] == '0') &&
((cfile->tokbuf[1] == 'x') ||
(cfile->tokbuf[1] == 'X'))) {
token = NUMBER_OR_NAME;
break;
} else if(((c == '-') || (c == '_') || isalnum(c))) {
token = NAME;
break;
}
/* FALLTHROUGH */
case BREAK:
/* At this point c is either EOF or part of the next
* token. If not EOF, rewind the file one byte so
* the next token is read from there.
*/
if(c != EOF) {
cfile->bufix--;
cfile->ugflag = 1;
}
goto end_read;
default:
log_fatal("read_number():%s:%d: impossible case", MDL);
}
#else /* OLD_LEXER */
if (!seenx && (c == 'x') {
seenx = 1;
} else if (!isascii (c) || !isxdigit (c)) {
if (c != EOF) {
cfile -> bufix--;
@ -445,16 +476,22 @@ static enum dhcp_token read_number (c, cfile)
}
break;
}
#endif /* OLD_LEXER */
cfile -> tokbuf [i] = c;
}
if (i == sizeof cfile -> tokbuf) {
parse_warn (cfile,
"numeric token larger than internal buffer");
--i;
}
end_read:
cfile -> tokbuf [i] = 0;
cfile -> tlen = i;
cfile -> tval = cfile -> tokbuf;
return token;
}
@ -754,8 +791,13 @@ static enum dhcp_token intern (atom, dfv)
return IGNORE;
break;
case 'k':
if (!strcasecmp (atom + 1, "nown"))
return KNOWN;
if (!strncasecmp (atom + 1, "nown", 4)) {
if (!strcasecmp (atom + 5, "-clients"))
return KNOWN_CLIENTS;
if (!atom[5])
return KNOWN;
break;
}
if (!strcasecmp (atom + 1, "ey"))
return KEY;
break;

View File

@ -3,42 +3,38 @@
Subroutines that support dhcp tracing... */
/*
* Copyright (c) 2001-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2001-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon, as part of a project for Nominum, Inc. To learn more
* about the Internet Software Consortium, see http://www.isc.org/. To
* about Internet Systems Consortium, see http://www.isc.org/. To
* learn more about Nominum, Inc., see ``http://www.nominum.com''.
*/
#ifndef lint
static char copyright[] =
"$Id: ctrace.c,v 1.3 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
#if defined (TRACING)
@ -155,6 +151,7 @@ void trace_inpacket_stash (struct interface_info *interface,
return;
tip.from_port = from_port;
tip.from = from;
tip.from.len = htonl (tip.from.len);
if (hfrom) {
tip.hfrom = *hfrom;
tip.havehfrom = 1;
@ -182,6 +179,7 @@ void trace_inpacket_input (trace_type_t *ttype, unsigned len, char *buf)
}
tip = (trace_inpacket_t *)buf;
index = ntohl (tip -> index);
tip -> from.len = ntohl (tip -> from.len);
if (index > interface_count ||
index < 0 ||

View File

@ -1,36 +1,29 @@
.\" dhcp-eval.5
.\" $Id: dhcp-eval.5,v 1.7 2005/08/11 17:13:21 drochner Exp $
.\"
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of The Internet Software Consortium nor the names
.\" of its contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" This software has been written for the Internet Software Consortium
.\" Internet Systems Consortium, Inc.
.\" 950 Charter Street
.\" Redwood City, CA 94063
.\" <info@isc.org>
.\" http://www.isc.org/
.\"
.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
.\" To learn more about the Internet Software Consortium, see
.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
@ -38,7 +31,7 @@
.SH NAME
dhcp-eval - ISC DHCP conditional evaluation
.SH DESCRIPTION
The Internet Software Consortium DHCP client and server both provide
The Internet Systems Consortium DHCP client and server both provide
the ability to perform conditional behavior depending on the contents
of packets they receive. The syntax for specifying this conditional
behaviour is documented here.
@ -254,11 +247,11 @@ contents packet as in the \fBsubstring\fR operator.
A string, enclosed in quotes, may be specified as a data expression,
and returns the text between the quotes, encoded in ASCII. The
backslash ('\e') character is treated specially, as in C programming: '\et'
means TAB, '\er' means carriage return, '\en' means newline, and '\eb'
means bell. Any octal value can be specified with '\ennn',
where nnn is any positive octal number less than 0400. Any
hexadecimal value can be specified with '\exnn', where nn is any
positive hexadecimal number less than 0xff.
means TAB, '\er' means carriage return, '\\n' means newline, and '\eb' means
bell. Any octal value can be specified with '\ennn', where nnn is any
positive octal number less than 0400. Any hexadecimal value can be
specified with '\exnn', where nn is any positive hexadecimal number less
than or equal to 0xff.
.RE
.PP
.I colon-separated hexadecimal list
@ -324,6 +317,7 @@ Numeric-expr is evaluated and encoded as a data string of the
specified width, in network byte order (most significant byte first).
If the numeric expression evaluates to the null value, the result is
also null.
.RE
.PP
.B pick-first-value (\fIdata-expr1\fR [ ... \fIexpr\fRn ] \fB)\fR
.RS 0.25i
@ -453,7 +447,7 @@ right hand side of the RR and the ttl that should be applied to the
record. The simplest example of the use of the function can be found
in the reference section of the dhcpd.conf file, where events are
described. In this example several statements are being used to make
the arguments to the \fBdns-update\f\R.
the arguments to the \fBdns-update\fR.
.PP
In the example, the first argument to the first \f\Bdns-update\fR
expression is a data expression that evaluates to the A RR type. The
@ -477,8 +471,8 @@ of the client to which the address is being leased.
dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcp-eval(5), dhcpd(8),
dhclient(8), RFC2132, RFC2131.
.SH AUTHOR
The Internet Software Consortium DHCP Distribution was written by Ted
The Internet Systems Consortium DHCP Distribution was written by Ted
Lemon under a contract with Vixie Labs. Funding for
this project was provided through the Internet Software Consortium.
Information about the Internet Software Consortium can be found at
this project was provided through Internet Systems Consortium.
Information about Internet Systems Consortium can be found at
.B http://www.isc.org.

View File

@ -1,42 +1,32 @@
.\" dhcp-options.5
.\" $Id: dhcp-options.5,v 1.6 2005/08/11 17:13:21 drochner Exp $
.\"
.\" Copyright (c) 1996-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 1996-2003 by Internet Software Consortium
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of The Internet Software Consortium nor the names
.\" of its contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" This software has been written for the Internet Software Consortium
.\" Internet Systems Consortium, Inc.
.\" 950 Charter Street
.\" Redwood City, CA 94063
.\" <info@isc.org>
.\" http://www.isc.org/
.\"
.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
.\" To learn more about the Internet Software Consortium, see
.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.
.\"
.\" $Id: dhcp-options.5,v 1.5 2003/02/18 17:08:40 drochner Exp $
.\"
.TH dhcpd-options 5
.SH NAME
dhcp-options - Dynamic Host Configuration Protocol options
@ -221,7 +211,7 @@ sending TCP segments. The minimum value is 1.
.B option \fBdhcp-client-identifier\fR \fIstring\fR\fB;\fR
.RS 0.25i
.PP
This option can be used to specify the a DHCP client identifier in a
This option can be used to specify a DHCP client identifier in a
host declaration, so that dhcpd can find the host record by matching
against the client identifier.
.PP
@ -411,8 +401,8 @@ RFC2132.
\fIip-address\fR... ]\fB;\fR
.RS 0.25i
.PP
The Finger server option specifies a list of Finger available to the
client. Servers should be listed in order of preference.
The Finger server option specifies a list of Finger servers available
to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBfont-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
@ -481,8 +471,8 @@ forwarding, and a value of true means enable IP forwarding.
\fIip-address\fR... ]\fB;\fR
.RS 0.25i
.PP
The IRC server option specifies a list of IRC available to the
client. Servers should be listed in order of preference.
The IRC server option specifies a list of IRC servers available
to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBlog-servers\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
@ -589,7 +579,7 @@ Possible node types are:
B-node: Broadcast - no WINS
.TP
.I 2
P-node: Peer - WINS only.
P-node: Peer - WINS only
.TP
.I 4
M-node: Mixed - broadcast, then WINS
@ -644,8 +634,8 @@ preference.
\fIip-address\fR... ]\fB;\fR
.RS 0.25i
.PP
The NNTP server option specifies a list of NNTP available to the
client. Servers should be listed in order of preference.
The NNTP server option specifies a list of NNTP servesr available
to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBnon-local-source-routing\fR \fIflag\fR\fB;\fR
@ -729,8 +719,8 @@ See STD 3 (RFC1122) for further information.
.B option \fBpop-server\fR \fIip-address\fR [\fB,\fR \fIip-address\fR... ]\fB;\fR
.RS 0.25i
.PP
The POP3 server option specifies a list of POP3 available to the
client. Servers should be listed in order of preference.
The POP3 server option specifies a list of POP3 servers available
to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBresource-location-servers\fR \fIip-address\fR
@ -901,8 +891,8 @@ This specifies the IP address of the client's swap server.
.B option \fBtcp-keepalive-garbage\fR \fIflag\fR\fB;\fR
.RS 0.25i
.PP
This option specifies the whether or not the client should send TCP
keepalive messages with a octet of garbage for compatibility with
This option specifies whether or not the client should send TCP
keepalive messages with an octet of garbage for compatibility with
older implementations. A value of false indicates that a garbage octet
should not be sent. A value of true indicates that a garbage octet
should be sent.
@ -982,12 +972,12 @@ this identifier, usually as a text string.
This option is used by some DHCP clients to identify the vendor
type and possibly the configuration of a DHCP client. The information
is a string of bytes whose contents are specific to the vendor and are
not specified in a standard. To see what vendor class identifier a
not specified in a standard. To see what vendor class identifier
clients are sending, you can write the following in your DHCP server
configuration file:
.nf
.PP
set vendor-class option vendor-class-identifier;
set vendor-string = option vendor-class-identifier;
.fi
.PP
This will result in all entries in the DHCP server lease database file
@ -995,14 +985,14 @@ for clients that sent vendor-class-identifier options having a set
statement that looks something like this:
.nf
.PP
set vendor-class "SUNW.Ultra-5_10";
set vendor-string = "SUNW.Ultra-5_10";
.fi
.PP
The vendor-class-identifier option is normally used by the DHCP server
to determine the options that are returned in the
.B vendor-encapsulated-options
option. Please see the VENDOR ENCAPSULATED OPTIONS section of the
dhcpd.conf manual page for further information.
option. Please see the VENDOR ENCAPSULATED OPTIONS section later in this
manual page for further information.
.RE
.PP
.B option \fBvendor-encapsulated-options\fR \fIstring\fR\fB;\fR
@ -1019,16 +1009,15 @@ that basis.
Some default behaviours for well-known DHCP client vendors (currently,
the Microsoft Windows 2000 DHCP client) are configured automatically,
but otherwise this must be configured manually - see the VENDOR
ENCAPSULATED OPTIONS section of the \fIdhcpd.conf\fI manual page for
details.
ENCAPSULATED OPTIONS section later in this manual page for details.
.RE
.PP
.B option \fBwww-server\fR \fIip-address\fR [\fB,\fR
\fIip-address\fR... ]\fB;\fR
.RS 0.25i
.PP
The WWW server option specifies a list of WWW available to the
client. Servers should be listed in order of preference.
The WWW server option specifies a list of WWW servers available
to the client. Servers should be listed in order of preference.
.RE
.PP
.B option \fBx-display-manager\fR \fIip-address\fR [\fB,\fR \fIip-address\fR...
@ -1223,7 +1212,7 @@ utility uses this value as Primary DSS server when configuring a
secondary DSS server.
.RE
.SH DEFINING NEW OPTIONS
The Internet Software Consortium DHCP client and server provide the
The Internet Systems Consortium DHCP client and server provide the
capability to define new options. Each DHCP option has a name, a
code, and a structure. The name is used by you to refer to the
option. The code is a number, used by the DHCP server and client to
@ -1519,8 +1508,8 @@ option.
dhcpd.conf(5), dhcpd.leases(5), dhclient.conf(5), dhcp-eval(5), dhcpd(8),
dhclient(8), RFC2132, RFC2131, draft-ietf-dhc-agent-options-??.txt.
.SH AUTHOR
The Internet Software Consortium DHCP Distribution was written by Ted
The Internet Systems Consortium DHCP Distribution was written by Ted
Lemon under a contract with Vixie Labs. Funding for
this project was provided through the Internet Software Consortium.
Information about the Internet Software Consortium can be found at
this project was provided through Internet Systems Consortium.
Information about Internet Systems Consortium can be found at
.B http://www.isc.org.

View File

@ -3,39 +3,30 @@
Network input dispatcher... */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: discover.c,v 1.6 2003/05/16 15:16:41 abs Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: discover.c,v 1.7 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -419,6 +410,18 @@ void discover_interfaces (state)
if (tmp)
continue;
strncpy (ifr.ifr_name, name, IFNAMSIZ);
/* Skip non broadcast interfaces (plus loopback and
* point-to-point in case an OS incorrectly marks them
* as broadcast).
*/
if ((ioctl (sock, SIOCGIFFLAGS, &ifr) < 0) ||
(!(ifr.ifr_flags & IFF_BROADCAST)) ||
(ifr.ifr_flags & IFF_LOOPBACK ) ||
(ifr.ifr_flags & IFF_POINTOPOINT))
continue;
/* Otherwise, allocate one. */
tmp = (struct interface_info *)0;
status = interface_allocate (&tmp, MDL);

View File

@ -3,39 +3,30 @@
Network input dispatcher... */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: dispatch.c,v 1.2 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: dispatch.c,v 1.3 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,39 +3,30 @@
Data Link Provider Interface (DLPI) network interface code. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software was written for the Internet Software Consortium
* This software was written for Internet Systems Consortium
* by Eric James Negaard, <lmdejn@lmd.ericsson.se>. To learn more about
* the Internet Software Consortium, see ``http://www.isc.org''.
* Internet Systems Consortium, see ``http://www.isc.org''.
*
* Joost Mulders has also done considerable work in debugging the DLPI API
* support on Solaris and getting this code to work properly on a variety
@ -88,7 +79,7 @@
#ifndef lint
static char copyright[] =
"$Id: dlpi.c,v 1.2 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: dlpi.c,v 1.3 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -688,7 +679,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
length -= offset;
#endif
offset = decode_udp_ip_header (interface, dbuf, bufix,
from, (unsigned char *)0, length);
from, length);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0) {

View File

@ -3,46 +3,37 @@
Domain Name Service subroutines. */
/*
* Copyright (c) 2001-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2001-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
#ifndef lint
static char copyright[] =
"$Id: dns.c,v 1.5 2003/02/18 17:08:40 drochner Exp $ Copyright (c) 2001-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: dns.c,v 1.6 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -539,15 +530,11 @@ isc_result_t ddns_update_a (struct data_string *ddns_fwd_name,
if (ddns_addr.len != 4)
return ISC_R_INVALIDARG;
#ifndef NO_SNPRINTF
snprintf (ddns_address, 16, "%d.%d.%d.%d",
/* %Audit% Cannot exceed 16 bytes. %2004.06.17,Safe% */
sprintf (ddns_address, "%u.%u.%u.%u",
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
#else
sprintf (ddns_address, "%d.%d.%d.%d",
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
#endif
/*
* When a DHCP client or server intends to update an A RR, it first
@ -793,16 +780,10 @@ isc_result_t ddns_remove_a (struct data_string *ddns_fwd_name,
if (ddns_addr.len != 4)
return ISC_R_INVALIDARG;
#ifndef NO_SNPRINTF
snprintf (ddns_address, 16, "%d.%d.%d.%d",
/* %Audit% Cannot exceed 16 bytes. %2004.06.17,Safe% */
sprintf (ddns_address, "%u.%u.%u.%u",
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
#else
sprintf (ddns_address, "%d.%d.%d.%d",
ddns_addr.iabuf[0], ddns_addr.iabuf[1],
ddns_addr.iabuf[2], ddns_addr.iabuf[3]);
#endif
/*
* The entity chosen to handle the A record for this client (either the

View File

@ -3,39 +3,30 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: ethernet.c,v 1.2 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: ethernet.c,v 1.3 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,39 +3,30 @@
Support for executable statements. */
/*
* Copyright (c) 1998-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1998-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: execute.c,v 1.6 2005/06/05 19:08:28 chs Exp $ Copyright (c) 1998-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: execute.c,v 1.7 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -377,7 +368,9 @@ int execute_statements (result, packet, lease, client_state,
goto blb;
}
}
}
} else
binding = NULL;
if (ns && binding) {
status = (evaluate_expression
(&binding -> value, packet, lease,
@ -427,19 +420,19 @@ int execute_statements (result, packet, lease, client_state,
switch (r -> data.log.priority) {
case log_priority_fatal:
log_fatal ("%.*s", (int)ds.len,
ds.buffer -> data);
ds.data);
break;
case log_priority_error:
log_error ("%.*s", (int)ds.len,
ds.buffer -> data);
ds.data);
break;
case log_priority_debug:
log_debug ("%.*s", (int)ds.len,
ds.buffer -> data);
ds.data);
break;
case log_priority_info:
log_info ("%.*s", (int)ds.len,
ds.buffer -> data);
ds.data);
break;
}
data_string_forget (&ds, MDL);
@ -856,7 +849,7 @@ void write_statements (file, statements, indent)
case log_statement:
indent_spaces (file, indent);
fprintf (file, "log ");
col = token_print_indent (file, col, indent + 4,
col = token_print_indent (file, indent + 4, indent + 4,
"", "", "(");
switch (r -> data.log.priority) {
case log_priority_fatal:

View File

@ -3,39 +3,30 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: fddi.c,v 1.4 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: fddi.c,v 1.5 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -57,7 +48,7 @@ static char copyright[] =
#if defined (NETBSD_FDDI)
#include <net/if_fddi.h>
#include <net/if_llc.h>
#define LLC_SNAP_LEN LLC_SNAPFRAMELEN
#define LLC_SNAP_LEN LLC_SNAPFRAMELEN
#endif /* NETBSD_FDDI */
#if defined (PACKET_ASSEMBLY) || defined (PACKET_DECODING)

View File

@ -4,39 +4,30 @@
responses. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -44,7 +35,7 @@
#ifndef lint
static char copyright[] =
"$Id: icmp.c,v 1.5 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: icmp.c,v 1.6 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -4,39 +4,30 @@
way... */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -44,7 +35,7 @@
#ifndef lint
static char copyright[] =
"$Id: inet.c,v 1.3 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: inet.c,v 1.4 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -58,6 +49,12 @@ struct iaddr subnet_number (addr, mask)
int i;
struct iaddr rv;
if (addr.len > sizeof(addr.iabuf))
log_fatal("subnet_number():%s:%d: Invalid addr length.", MDL);
if (addr.len != mask.len)
log_fatal("subnet_number():%s:%d: Addr/mask length mismatch.",
MDL);
rv.len = 0;
/* Both addresses must have the same length... */
@ -84,6 +81,12 @@ struct iaddr ip_addr (subnet, mask, host_address)
struct iaddr rv;
unsigned char habuf [sizeof swaddr];
if (subnet.len > sizeof(subnet.iabuf))
log_fatal("ip_addr():%s:%d: Invalid addr length.", MDL);
if (subnet.len != mask.len)
log_fatal("ip_addr():%s:%d: Addr/mask length mismatch.",
MDL);
swaddr = htonl (host_address);
memcpy (habuf, &swaddr, sizeof swaddr);
@ -124,6 +127,12 @@ struct iaddr broadcast_addr (subnet, mask)
int i;
struct iaddr rv;
if (subnet.len > sizeof(subnet.iabuf))
log_fatal("broadcast_addr():%s:%d: Invalid addr length.", MDL);
if (subnet.len != mask.len)
log_fatal("broadcast_addr():%s:%d: Addr/mask length mismatch.",
MDL);
if (subnet.len != mask.len) {
rv.len = 0;
return rv;
@ -145,6 +154,12 @@ u_int32_t host_addr (addr, mask)
u_int32_t swaddr;
struct iaddr rv;
if (addr.len > sizeof(addr.iabuf))
log_fatal("host_addr():%s:%d: Invalid addr length.", MDL);
if (addr.len != mask.len)
log_fatal("host_addr():%s:%d: Addr/mask length mismatch.",
MDL);
rv.len = 0;
/* Mask out the network bits... */
@ -162,6 +177,9 @@ u_int32_t host_addr (addr, mask)
int addr_eq (addr1, addr2)
struct iaddr addr1, addr2;
{
if (addr1.len > sizeof(addr1.iabuf))
log_fatal("addr_eq():%s:%d: Invalid addr length.", MDL);
if (addr1.len != addr2.len)
return 0;
return memcmp (addr1.iabuf, addr2.iabuf, addr1.len) == 0;
@ -174,22 +192,8 @@ char *piaddr (addr)
char *s = pbuf;
int i;
if (addr.len == 0) {
strcpy (s, "<null address>");
}
for (i = 0; i < addr.len; i++) {
sprintf (s, "%s%d", i ? "." : "", addr.iabuf [i]);
s += strlen (s);
}
return pbuf;
}
char *piaddr1 (addr)
struct iaddr addr;
{
static char pbuf [4 * 16];
char *s = pbuf;
int i;
if (addr.len > sizeof(addr.iabuf))
log_fatal("piaddr():%s:%d: Address length too long.", MDL);
if (addr.len == 0) {
strcpy (s, "<null address>");
@ -204,39 +208,40 @@ char *piaddr1 (addr)
char *piaddrmask (struct iaddr addr, struct iaddr mask,
const char *file, int line)
{
char *s, *t;
int i, mw;
unsigned len;
char *s, tbuf[sizeof("255.255.255.255/32")];
int mw;
unsigned i, oct, bit;
for (i = 0; i < 32; i++) {
if (!mask.iabuf [3 - i / 8])
i += 7;
else if (mask.iabuf [3 - i / 8] & (1 << (i % 8)))
if (addr.len != 4)
log_fatal("piaddrmask():%s:%d: Address length %d invalid",
MDL, addr.len);
if (addr.len != mask.len)
log_fatal("piaddrmask():%s:%d: Address and mask size mismatch",
MDL);
/* Determine netmask width in bits. */
for (mw = 32; mw > 0; ) {
oct = (mw - 1) / 8;
bit = 0x80 >> ((mw - 1) % 8);
if (!mask.iabuf [oct])
mw -= 8;
else if (mask.iabuf [oct] & bit)
break;
}
mw = 32 - i;
len = mw > 9 ? 2 : 1;
len += 4; /* three dots and a slash. */
for (i = 0; i < (mw / 8) + 1; i++) {
if (addr.iabuf [i] > 99)
len += 3;
else if (addr.iabuf [i] > 9)
len += 2;
else
len++;
mw--;
}
s = dmalloc (len + 1, file, line);
s = tbuf;
for (i = 0 ; i <= oct ; i++) {
sprintf(s, "%s%d", i ? "." : "", addr.iabuf[i]);
s += strlen(s);
}
sprintf(s, "/%d", mw);
s = dmalloc (strlen(tbuf) + 1, file, line);
if (!s)
return s;
t = s;
sprintf (t, "%d", addr.iabuf [0]);
t += strlen (t);
for (i = 1; i < (mw / 8) + 1; i++) {
sprintf (t, ".%d", addr.iabuf [i]);
t += strlen (t);
}
*t++ = '/';
sprintf (t, "%d", mw);
strcpy(s, tbuf);
return s;
}

View File

@ -4,40 +4,31 @@
Support Services in Vancouver, B.C. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*/
#ifndef lint
static char copyright[] =
"$Id: lpf.c,v 1.2 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: lpf.c,v 1.3 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -369,7 +360,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix, from,
(unsigned char *)0, (unsigned)length);
(unsigned)length);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)

View File

@ -3,39 +3,30 @@
Memory-resident database... */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: memory.c,v 1.4 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: memory.c,v 1.5 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -4,39 +4,30 @@
with one crucial tidbit of help from Stu Grossmen. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -44,7 +35,7 @@
#ifndef lint
static char copyright[] =
"$Id: nit.c,v 1.2 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: nit.c,v 1.3 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -379,7 +370,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
from, (unsigned char *)0, length);
from, length);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)

View File

@ -3,39 +3,30 @@
DHCP options parsing and reassembly. */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: options.c,v 1.4 2002/06/11 14:12:58 drochner Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
"$Id: options.c,v 1.5 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
@ -118,6 +109,7 @@ int parse_option_buffer (options, buffer, length, universe)
{
unsigned len, offset;
int code;
struct option_cache *op = (struct option_cache *)0;
struct buffer *bp = (struct buffer *)0;
if (!buffer_allocate (&bp, length, MDL)) {
@ -158,15 +150,36 @@ int parse_option_buffer (options, buffer, length, universe)
the parse fails, or the option isn't an encapsulation (by
far the most common case), or the option isn't entirely
an encapsulation, keep the raw data as well. */
if (!((universe -> options [code] -> format [0] == 'e' ||
if (universe -> options [code] &&
!((universe -> options [code] -> format [0] == 'e' ||
universe -> options [code] -> format [0] == 'E') &&
(parse_encapsulated_suboptions
(options, universe -> options [code],
buffer + offset + 2, len,
universe, (const char *)0)))) {
save_option_buffer (universe, options, bp,
&bp -> data [offset + 2], len,
universe -> options [code], 1);
op = lookup_option (universe, options, code);
if (op) {
struct data_string new;
memset (&new, 0, sizeof new);
if (!buffer_allocate (&new.buffer, op -> data.len + len,
MDL)) {
log_error ("parse_option_buffer: No memory.");
return 0;
}
memcpy (new.buffer -> data, op -> data.data,
op -> data.len);
memcpy (&new.buffer -> data [op -> data.len],
&bp -> data [offset + 2], len);
new.len = op -> data.len + len;
new.data = new.buffer -> data;
data_string_forget (&op -> data, MDL);
data_string_copy (&op -> data, &new, MDL);
data_string_forget (&new, MDL);
} else {
save_option_buffer (universe, options, bp,
&bp -> data [offset + 2], len,
universe -> options [code], 1);
}
}
offset += len + 2;
}
@ -446,6 +459,8 @@ int cons_options (inpacket, outpacket, lease, client_state,
unsigned char buffer [4096]; /* Really big buffer... */
unsigned main_buffer_size;
unsigned mainbufix, bufix, agentix;
int fileix;
int snameix;
unsigned option_size;
unsigned length;
int i;
@ -453,6 +468,8 @@ int cons_options (inpacket, outpacket, lease, client_state,
struct data_string ds;
pair pp, *hash;
int need_endopt = 0;
int ocount = 0;
int ofbuf1=0, ofbuf2=0;
memset (&ds, 0, sizeof ds);
@ -460,14 +477,18 @@ int cons_options (inpacket, outpacket, lease, client_state,
and no alternate maximum message size has been specified, take the
one in the packet. */
if (!mms && inpacket &&
if (inpacket &&
(op = lookup_option (&dhcp_universe, inpacket -> options,
DHO_DHCP_MAX_MESSAGE_SIZE))) {
evaluate_option_cache (&ds, inpacket,
lease, client_state, in_options,
cfg_options, scope, op, MDL);
if (ds.len >= sizeof (u_int16_t))
mms = getUShort (ds.data);
if (ds.len >= sizeof (u_int16_t)) {
i = getUShort (ds.data);
if(!mms || (i < mms))
mms = i;
}
data_string_forget (&ds, MDL);
}
@ -600,18 +621,35 @@ int cons_options (inpacket, outpacket, lease, client_state,
DHO_VENDOR_ENCAPSULATED_OPTIONS;
}
/* Figure out the overload buffer offset(s). */
if (overload) {
ofbuf1 = main_buffer_size - 4;
if (overload == 3)
ofbuf2 = main_buffer_size - 4 + DHCP_FILE_LEN;
}
/* Copy the options into the big buffer... */
option_size = store_options (buffer,
(main_buffer_size - 7 +
option_size = store_options (&ocount, buffer,
(main_buffer_size - 4 +
((overload & 1) ? DHCP_FILE_LEN : 0) +
((overload & 2) ? DHCP_SNAME_LEN : 0)),
inpacket, lease, client_state,
in_options, cfg_options, scope,
priority_list, priority_len,
main_buffer_size,
(main_buffer_size +
((overload & 1) ? DHCP_FILE_LEN : 0)),
terminate, vuname);
ofbuf1, ofbuf2, terminate, vuname);
/* If store_options failed. */
if (option_size == 0)
return 0;
if (overload) {
if (ocount == 1 && (overload & 1))
overload = 1;
else if (ocount == 1 && (overload & 2))
overload = 2;
else if (ocount == 3)
overload = 3;
else
overload = 0;
}
/* Put the cookie up front... */
memcpy (outpacket -> options, DHCP_OPTIONS_COOKIE, 4);
@ -621,70 +659,43 @@ int cons_options (inpacket, outpacket, lease, client_state,
option at the beginning. If we can, though, just store the
whole thing in the packet's option buffer and leave it at
that. */
if (option_size <= main_buffer_size - mainbufix) {
memcpy (&outpacket -> options [mainbufix],
buffer, option_size);
mainbufix += option_size;
agentix = mainbufix;
if (mainbufix < main_buffer_size)
need_endopt = 1;
length = DHCP_FIXED_NON_UDP + mainbufix;
} else {
memcpy (&outpacket -> options [mainbufix],
buffer, option_size);
mainbufix += option_size;
if (overload) {
outpacket -> options [mainbufix++] = DHO_DHCP_OPTION_OVERLOAD;
outpacket -> options [mainbufix++] = 1;
if (option_size > main_buffer_size - mainbufix + DHCP_FILE_LEN)
outpacket -> options [mainbufix++] = 3;
else
outpacket -> options [mainbufix++] = 1;
outpacket -> options [mainbufix++] = overload;
memcpy (&outpacket -> options [mainbufix],
buffer, main_buffer_size - mainbufix);
length = DHCP_FIXED_NON_UDP + main_buffer_size;
agentix = main_buffer_size;
bufix = main_buffer_size - mainbufix;
if (overload & 1) {
if (option_size - bufix <= DHCP_FILE_LEN) {
memcpy (outpacket -> file,
&buffer [bufix], option_size - bufix);
mainbufix = option_size - bufix;
if (mainbufix < DHCP_FILE_LEN)
outpacket -> file [mainbufix++]
= DHO_END;
while (mainbufix < DHCP_FILE_LEN)
outpacket -> file [mainbufix++]
= DHO_PAD;
memcpy (outpacket -> file,
&buffer [ofbuf1], DHCP_FILE_LEN);
}
if (overload & 2) {
if (ofbuf2) {
memcpy (outpacket -> sname, &buffer [ofbuf2],
DHCP_SNAME_LEN);
} else {
memcpy (outpacket -> file,
&buffer [bufix], DHCP_FILE_LEN);
bufix += DHCP_FILE_LEN;
memcpy (outpacket -> sname, &buffer [ofbuf1],
DHCP_SNAME_LEN);
}
}
if ((overload & 2) && option_size < bufix) {
memcpy (outpacket -> sname,
&buffer [bufix], option_size - bufix);
mainbufix = option_size - bufix;
if (mainbufix < DHCP_SNAME_LEN)
outpacket -> file [mainbufix++]
= DHO_END;
while (mainbufix < DHCP_SNAME_LEN)
outpacket -> file [mainbufix++]
= DHO_PAD;
}
}
agentix = mainbufix;
if (mainbufix < main_buffer_size)
need_endopt = 1;
length = DHCP_FIXED_NON_UDP + mainbufix;
/* Now hack in the agent options if there are any. */
priority_list [0] = DHO_DHCP_AGENT_OPTIONS;
priority_len = 1;
agentix +=
store_options (&outpacket -> options [agentix],
store_options (0, &outpacket -> options [agentix],
1500 - DHCP_FIXED_LEN - agentix,
inpacket, lease, client_state,
in_options, cfg_options, scope,
priority_list, priority_len,
1500 - DHCP_FIXED_LEN - agentix,
1500 - DHCP_FIXED_LEN - agentix, 0, (char *)0);
0, 0, 0, (char *)0);
/* Tack a DHO_END option onto the packet if we need to. */
if (agentix < 1500 - DHCP_FIXED_LEN && need_endopt)
@ -697,9 +708,10 @@ int cons_options (inpacket, outpacket, lease, client_state,
/* Store all the requested options into the requested buffer. */
int store_options (buffer, buflen, packet, lease, client_state,
int store_options (ocount, buffer, buflen, packet, lease, client_state,
in_options, cfg_options, scope, priority_list, priority_len,
first_cutoff, second_cutoff, terminate, vuname)
int *ocount;
unsigned char *buffer;
unsigned buflen;
struct packet *packet;
@ -714,14 +726,31 @@ int store_options (buffer, buflen, packet, lease, client_state,
int terminate;
const char *vuname;
{
int bufix = 0;
int bufix = 0, six = 0, tix = 0;
int i;
int ix;
int tto;
int bufend, sbufend;
struct data_string od;
struct option_cache *oc;
unsigned code;
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);
/* Eliminate duplicate options in the parameter request list.
@ -747,10 +776,11 @@ int store_options (buffer, buflen, packet, lease, client_state,
/* Number of bytes left to store (some may already
have been stored by a previous pass). */
unsigned length;
int optstart;
int optstart, soptstart, toptstart;
struct universe *u;
int have_encapsulation = 0;
struct data_string encapsulation;
int splitup;
memset (&encapsulation, 0, sizeof encapsulation);
@ -886,46 +916,118 @@ int store_options (buffer, buflen, packet, lease, client_state,
in any case, if the option data will cross a buffer
boundary, split it across that boundary. */
if (length > 255)
splitup = 1;
else
splitup = 0;
ix = 0;
optstart = bufix;
soptstart = six;
toptstart = tix;
while (length) {
unsigned char incr = length > 255 ? 255 : length;
/* If this hunk of the buffer will cross a
boundary, only go up to the boundary in this
pass. */
if (bufix < first_cutoff &&
bufix + incr > first_cutoff)
incr = first_cutoff - bufix;
else if (bufix < second_cutoff &&
bufix + incr > second_cutoff)
incr = second_cutoff - bufix;
/* If this option is going to overflow the buffer,
skip it. */
if (bufix + 2 + incr > buflen) {
bufix = optstart;
break;
}
/* Everything looks good - copy it in! */
buffer [bufix] = code;
buffer [bufix + 1] = incr;
if (tto && incr == length) {
memcpy (buffer + bufix + 2,
od.data + ix, (unsigned)(incr - 1));
buffer [bufix + 2 + incr - 1] = 0;
unsigned incr = length;
int *pix;
char *base;
/* Try to fit it in the options buffer. */
if (!splitup &&
((!six && !tix && (i == priority_len - 1) &&
(bufix + 2 + length < bufend)) ||
(bufix + 5 + length < bufend))) {
base = buffer;
pix = &bufix;
/* Try to fit it in the second buffer. */
} else if (!splitup && first_cutoff &&
(first_cutoff + six + 3 + length < sbufend)) {
base = &buffer[first_cutoff];
pix = &six;
/* Try to fit it in the third buffer. */
} else if (!splitup && second_cutoff &&
(second_cutoff + tix + 3 + length < buflen)) {
base = &buffer[second_cutoff];
pix = &tix;
/* Split the option up into the remaining space. */
} else {
memcpy (buffer + bufix + 2,
splitup = 1;
/* Use any remaining options space. */
if (bufix + 6 < bufend) {
incr = bufend - bufix - 5;
base = buffer;
pix = &bufix;
/* Use any remaining first_cutoff space. */
} else if (first_cutoff &&
(first_cutoff + six + 4 < sbufend)) {
incr = sbufend - (first_cutoff + six) - 3;
base = &buffer[first_cutoff];
pix = &six;
/* Use any remaining second_cutoff space. */
} else if (second_cutoff &&
(second_cutoff + tix + 4 < buflen)) {
incr = buflen - (second_cutoff + tix) - 3;
base = &buffer[second_cutoff];
pix = &tix;
/* Give up, roll back this option. */
} else {
bufix = optstart;
six = soptstart;
tix = toptstart;
break;
}
}
if (incr > length)
incr = length;
if (incr > 255)
incr = 255;
/* Everything looks good - copy it in! */
base [*pix] = code;
base [*pix + 1] = (unsigned char)incr;
if (tto && incr == length) {
if (incr > 1)
memcpy (base + *pix + 2,
od.data + ix, (unsigned)(incr - 1));
base [*pix + 2 + incr - 1] = 0;
} else {
memcpy (base + *pix + 2,
od.data + ix, (unsigned)incr);
}
length -= incr;
ix += incr;
bufix += 2 + incr;
*pix += 2 + incr;
}
data_string_forget (&od, MDL);
}
/* If we can overload, and we have, then PAD and END those spaces. */
if (first_cutoff && six) {
if ((first_cutoff + six + 1) < sbufend)
memset (&buffer[first_cutoff + six + 1], DHO_PAD,
sbufend - (first_cutoff + six + 1));
else if (first_cutoff + six >= sbufend)
log_fatal("Second buffer overflow in overloaded options.");
buffer[first_cutoff + six] = DHO_END;
*ocount |= 1; /* So that caller knows there's data there. */
}
if (second_cutoff && tix) {
if (second_cutoff + tix + 1 < buflen) {
memset (&buffer[second_cutoff + tix + 1], DHO_PAD,
buflen - (second_cutoff + tix + 1));
} else if (second_cutoff + tix >= buflen)
log_fatal("Third buffer overflow in overloaded options.");
buffer[second_cutoff + tix] = DHO_END;
*ocount |= 2; /* So that caller knows there's data there. */
}
if ((six || tix) && (bufix + 3 > bufend))
log_fatal("Not enough space for option overload option.");
return bufix;
}

View File

@ -3,35 +3,26 @@
Packet assembly code, originally contributed by Archie Cobbs. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This code was originally contributed by Archie Cobbs, and is still
* very similar to that contribution, although the packet checksum code
@ -42,7 +33,7 @@
#ifndef lint
static char copyright[] =
"$Id: packet.c,v 1.6 2005/06/02 11:10:01 lukem Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: packet.c,v 1.7 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -219,16 +210,16 @@ ssize_t decode_hw_header (interface, buf, bufix, from)
/* UDP header and IP header decoded together for convenience. */
ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen, rbuflen)
ssize_t decode_udp_ip_header (interface, buf, bufix, from, buflen, rbuflen)
struct interface_info *interface;
unsigned char *buf;
unsigned bufix;
struct sockaddr_in *from;
unsigned char *data;
unsigned buflen;
unsigned *rbuflen;
{
struct ip *ip;
unsigned char *data;
struct ip ip;
struct udphdr *udp;
u_int32_t ip_len = (buf [bufix] & 0xf) << 2;
u_int32_t sum, usum;
@ -242,13 +233,13 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen, rbuflen
unsigned ulen;
int ignore = 0;
ip = (struct ip *)(buf + bufix);
memcpy(&ip, buf + bufix, sizeof (struct ip));
udp = (struct udphdr *)(buf + bufix + ip_len);
len = 0; /* XXXGCC -Wuninitialized */
#ifdef USERLAND_FILTER
/* Is it a UDP packet? */
if (ip -> ip_p != IPPROTO_UDP)
if (ip.ip_p != IPPROTO_UDP)
return -1;
/* Is it to the port we're serving? */
@ -277,46 +268,44 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen, rbuflen
}
/* 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;
@ -325,8 +314,8 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen, rbuflen
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))));
@ -345,7 +334,7 @@ ssize_t decode_udp_ip_header (interface, buf, bufix, from, data, buflen, rbuflen
/* Copy out the port... */
memcpy (&from -> sin_port, &udp -> uh_sport, sizeof udp -> uh_sport);
*rbuflen = ntohs (ip->ip_len) - ip_len - sizeof *udp;
*rbuflen = ntohs (ip.ip_len) - ip_len - sizeof *udp;
return ip_len + sizeof *udp;
}
#endif /* PACKET_DECODING */

View File

@ -3,39 +3,30 @@
Common parser code for dhcpd and dhclient. */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: parse.c,v 1.8 2004/10/29 21:19:32 dsl Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: parse.c,v 1.9 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004-2005 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -726,7 +717,7 @@ TIME parse_date (cfile)
return (TIME)0;
}
/* Month... */
/* Day of month... */
token = next_token (&val, (unsigned *)0, cfile);
if (token != NUMBER) {
parse_warn (cfile, "numeric day of month expected.");
@ -2716,6 +2707,7 @@ int parse_data_expression (expr, cfile, lose)
if (!is_data_expression (*expr) &&
(*expr) -> op != expr_variable_reference &&
(*expr) -> op != expr_funcall) {
expression_dereference (expr, MDL);
parse_warn (cfile, "Expecting a data expression.");
*lose = 1;
return 0;
@ -2742,6 +2734,7 @@ int parse_numeric_expression (expr, cfile, lose)
if (!is_numeric_expression (*expr) &&
(*expr) -> op != expr_variable_reference &&
(*expr) -> op != expr_funcall) {
expression_dereference (expr, MDL);
parse_warn (cfile, "Expecting a numeric expression.");
*lose = 1;
return 0;
@ -2776,6 +2769,7 @@ int parse_dns_expression (expr, cfile, lose)
if (!is_dns_expression (*expr) &&
(*expr) -> op != expr_variable_reference &&
(*expr) -> op != expr_funcall) {
expression_dereference (expr, MDL);
parse_warn (cfile, "Expecting a dns update subexpression.");
*lose = 1;
return 0;
@ -4037,6 +4031,34 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
goto new_rhs;
}
/* If the next binary operator is of greater precedence than the
* current operator, then rhs we have parsed so far is actually
* the lhs of the next operator. To get this value, we have to
* recurse.
*/
if (binop != expr_none && next_op != expr_none &&
op_precedence (binop, next_op) < 0) {
/* Eat the subexpression operator token, which we pass to
* parse_expression...we only peek()'d earlier.
*/
token = next_token (&val, (unsigned *)0, cfile);
/* Continue parsing of the right hand side with that token. */
tmp = rhs;
rhs = (struct expression *)0;
if (!parse_expression (&rhs, cfile, lose, op_context (next_op),
&tmp, next_op)) {
if (!*lose) {
parse_warn (cfile,
"expecting a subexpression");
*lose = 1;
}
return 0;
}
next_op = expr_none;
}
if (binop != expr_none) {
rhs_context = expression_context(rhs);
lhs_context = expression_context(lhs);
@ -4120,27 +4142,6 @@ int parse_expression (expr, cfile, lose, context, plhs, binop)
/* Eat the operator token - we now know it was a binary operator... */
token = next_token (&val, (unsigned *)0, cfile);
/* If the binary operator we saw previously has a lower precedence
than the next operator, then the rhs we just parsed for that
operator is actually the lhs of the operator with the higher
precedence - to get the real rhs, we need to recurse on the
new operator. */
if (binop != expr_none &&
op_precedence (binop, next_op) < 0) {
tmp = rhs;
rhs = (struct expression *)0;
if (!parse_expression (&rhs, cfile, lose, op_context (next_op),
&tmp, next_op)) {
if (!*lose) {
parse_warn (cfile,
"expecting a subexpression");
*lose = 1;
}
return 0;
}
next_op = expr_none;
}
/* Now combine the LHS and the RHS using binop. */
tmp = (struct expression *)0;
if (!expression_allocate (&tmp, MDL))
@ -4310,15 +4311,15 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
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);
@ -4343,18 +4344,21 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
return 0;
}
t -> op = expr_const_data;
} else if (token == STRING) {
token = next_token (&val, &len, cfile);
if (!make_const_data (&t, (const unsigned char *)val,
len, 1, 1, MDL))
log_fatal ("No memory for \"%s\"", val);
} else {
if ((*fmt) [1] != 'o') {
token = next_token (&val, &len, cfile);
if(token == STRING) {
if (!make_const_data (&t,
(const unsigned char *)val,
len, 1, 1, MDL))
log_fatal ("No memory for \"%s\"", val);
} else if ((*fmt) [1] != 'o') {
parse_warn (cfile, "expecting string %s.",
"or hexadecimal data");
skip_to_semi (cfile);
} else {
return 0;
}
return 0;
}
break;
@ -4369,7 +4373,7 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
goto make_string;
case 't': /* Text string... */
token = peek_token (&val, (unsigned *)0, cfile);
token = next_token (&val, &len, cfile);
if (token != STRING && !is_identifier (token)) {
if ((*fmt) [1] != 'o') {
parse_warn (cfile, "expecting string.");
@ -4378,7 +4382,6 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
}
return 0;
}
token = next_token (&val, &len, cfile);
make_string:
if (!make_const_data (&t, (const unsigned char *)val,
len, 1, 1, MDL))
@ -4425,10 +4428,9 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
break;
case 'T': /* Lease interval. */
token = peek_token (&val, (unsigned *)0, cfile);
token = next_token (&val, (unsigned *)0, cfile);
if (token != INFINITE)
goto check_number;
token = next_token (&val, (unsigned *)0, cfile);
putLong (buf, -1);
if (!make_const_data (&t, buf, 4, 0, 1, MDL))
return 0;
@ -4436,9 +4438,9 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
case 'L': /* Unsigned 32-bit integer... */
case 'l': /* Signed 32-bit integer... */
token = peek_token (&val, (unsigned *)0, cfile);
token = next_token (&val, (unsigned *)0, cfile);
check_number:
if (token != NUMBER) {
if ((token != NUMBER) && (token != NUMBER_OR_NAME)) {
need_number:
if ((*fmt) [1] != 'o') {
parse_warn (cfile, "expecting number.");
@ -4447,7 +4449,6 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
}
return 0;
}
token = next_token (&val, (unsigned *)0, cfile);
convert_num (cfile, buf, val, 0, 32);
if (!make_const_data (&t, buf, 4, 0, 1, MDL))
return 0;
@ -4455,10 +4456,9 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
case 's': /* Signed 16-bit integer. */
case 'S': /* Unsigned 16-bit integer. */
token = peek_token (&val, (unsigned *)0, cfile);
if (token != NUMBER)
goto need_number;
token = next_token (&val, (unsigned *)0, cfile);
if ((token != NUMBER) && (token != NUMBER_OR_NAME))
goto need_number;
convert_num (cfile, buf, val, 0, 16);
if (!make_const_data (&t, buf, 2, 0, 1, MDL))
return 0;
@ -4466,17 +4466,16 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
case 'b': /* Signed 8-bit integer. */
case 'B': /* Unsigned 8-bit integer. */
token = peek_token (&val, (unsigned *)0, cfile);
if (token != NUMBER)
goto need_number;
token = next_token (&val, (unsigned *)0, cfile);
if ((token != NUMBER) && (token != NUMBER_OR_NAME))
goto need_number;
convert_num (cfile, buf, val, 0, 8);
if (!make_const_data (&t, buf, 1, 0, 1, MDL))
return 0;
break;
case 'f': /* Boolean flag. */
token = peek_token (&val, (unsigned *)0, cfile);
token = next_token (&val, (unsigned *)0, cfile);
if (!is_identifier (token)) {
if ((*fmt) [1] != 'o')
parse_warn (cfile, "expecting identifier.");
@ -4500,7 +4499,6 @@ int parse_option_token (rv, cfile, fmt, expr, uniform, lookups)
parse_warn (cfile, "expecting boolean.");
goto bad_flag;
}
token = next_token (&val, (unsigned *)0, cfile);
if (!make_const_data (&t, buf, 1, 0, 1, MDL))
return 0;
break;
@ -4639,7 +4637,8 @@ int parse_option_decl (oc, cfile)
case 'l': /* Signed 32-bit integer... */
token = next_token (&val,
(unsigned *)0, cfile);
if (token != NUMBER) {
if ((token != NUMBER) &&
(token != NUMBER_OR_NAME)) {
need_number:
parse_warn (cfile,
"expecting number.");
@ -4656,7 +4655,8 @@ int parse_option_decl (oc, cfile)
case 'S': /* Unsigned 16-bit integer. */
token = next_token (&val,
(unsigned *)0, cfile);
if (token != NUMBER)
if ((token != NUMBER) &&
(token != NUMBER_OR_NAME))
goto need_number;
convert_num (cfile, buf, val, 0, 16);
len = 2;
@ -4667,7 +4667,8 @@ int parse_option_decl (oc, cfile)
case 'B': /* Unsigned 8-bit integer. */
token = next_token (&val,
(unsigned *)0, cfile);
if (token != NUMBER)
if ((token != NUMBER) &&
(token != NUMBER_OR_NAME))
goto need_number;
convert_num (cfile, buf, val, 0, 8);
len = 1;
@ -4794,13 +4795,11 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
unsigned i, lix;
do_percentm (mbuf, fmt);
#ifndef NO_SNPRINTF
/* %Audit% This is log output. %2004.06.17,Safe%
* If we truncate we hope the user can get a hint from the log.
*/
snprintf (fbuf, sizeof fbuf, "%s line %d: %s",
cfile -> tlname, cfile -> lexline, mbuf);
#else
sprintf (fbuf, "%s line %d: %s",
cfile -> tlname, cfile -> lexline, mbuf);
#endif
va_start (list, fmt);
@ -4830,13 +4829,14 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
#endif
if (log_perror) {
write (2, mbuf, strlen (mbuf));
write (2, "\n", 1);
write (2, cfile -> token_line, strlen (cfile -> token_line));
write (2, "\n", 1);
write (STDERR_FILENO, mbuf, strlen (mbuf));
write (STDERR_FILENO, "\n", 1);
write (STDERR_FILENO, cfile -> token_line,
strlen (cfile -> token_line));
write (STDERR_FILENO, "\n", 1);
if (cfile -> lexchar < 81)
write (2, lexbuf, lix);
write (2, "^\n", 2);
write (STDERR_FILENO, lexbuf, lix);
write (STDERR_FILENO, "^\n", 2);
}
cfile -> warnings_occurred = 1;

View File

@ -3,39 +3,30 @@
Turn data structures into printable text. */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: print.c,v 1.6 2004/10/29 21:19:32 dsl Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: print.c,v 1.7 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -223,7 +214,7 @@ void print_lease (lease)
lease -> host ? lease -> host -> name : "<none>");
}
#if defined (DEBUG)
#if defined (DEBUG_PACKET)
void dump_packet_option (struct option_cache *oc,
struct packet *packet,
struct lease *lease,
@ -304,19 +295,46 @@ void dump_raw (buf, len)
char lbuf [80];
int lbix = 0;
lbuf [0] = 0;
/*
1 2 3 4 5 6 7
01234567890123456789012345678901234567890123456789012345678901234567890123
280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .................
*/
memset(lbuf, ' ', 79);
lbuf [79] = 0;
for (i = 0; i < len; i++) {
if ((i & 15) == 0) {
if (lbix)
log_info ("%s", lbuf);
sprintf (lbuf, "%03x:", i);
lbix = 4;
if (lbix) {
lbuf[53]=' ';
lbuf[54]=' ';
lbuf[55]=' ';
lbuf[73]='\0';
log_info ("%s", lbuf);
}
memset(lbuf, ' ', 79);
lbuf [79] = 0;
sprintf (lbuf, "%03x:", i);
lbix = 4;
} else if ((i & 7) == 0)
lbuf [lbix++] = ' ';
if(isprint(buf[i])) {
lbuf[56+(i%16)]=buf[i];
} else {
lbuf[56+(i%16)]='.';
}
sprintf (&lbuf [lbix], " %02x", buf [i]);
lbix += 3;
lbuf[lbix]=' ';
}
lbuf[53]=' ';
lbuf[54]=' ';
lbuf[55]=' ';
lbuf[73]='\0';
log_info ("%s", lbuf);
}
@ -396,8 +414,13 @@ char *print_dotted_quads (len, data)
i = 0;
/* %Audit% Loop bounds checks to 21 bytes. %2004.06.17,Safe%
* The sprintf can't exceed 18 bytes, and since the loop enforces
* 21 bytes of space per iteration at no time can we exit the
* loop without at least 3 bytes spare.
*/
do {
sprintf (s, "%d.%d.%d.%d, ",
sprintf (s, "%u.%u.%u.%u, ",
data [i], data [i + 1], data [i + 2], data [i + 3]);
s += strlen (s);
i += 4;
@ -1246,6 +1269,9 @@ void print_dns_status (int status, ns_updque *uq)
case T_TXT:
en = "TXT";
break;
case T_KEY:
en = "KEY";
break;
case T_CNAME:
en = "CNAME";
break;
@ -1266,13 +1292,19 @@ void print_dns_status (int status, ns_updque *uq)
if (s + 1 < end)
*s++ = '"';
}
if (s + u -> r_size < end) {
memcpy (s, u -> r_data, u -> r_size);
s += u -> r_size;
if (u -> r_type == T_TXT) {
if (s + 1 < end)
*s++ = '"';
}
if(u->r_type == T_KEY) {
strcat(s, "<keydata>");
s+=strlen("<keydata>");
}
else {
if (s + u -> r_size < end) {
memcpy (s, u -> r_data, u -> r_size);
s += u -> r_size;
if (u -> r_type == T_TXT) {
if (s + 1 < end)
*s++ = '"';
}
}
}
}
if (position) {

View File

@ -16,39 +16,30 @@
Sigh. */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -56,7 +47,7 @@
#ifndef lint
static char copyright[] =
"$Id: raw.c,v 1.3 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: raw.c,v 1.4 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,39 +3,30 @@
Parser for /etc/resolv.conf file. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: resolv.c,v 1.3 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: resolv.c,v 1.4 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,39 +3,30 @@
BSD socket interface code... */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -51,7 +42,7 @@
#ifndef lint
static char copyright[] =
"$Id: socket.c,v 1.6 2003/09/25 01:01:39 mycroft Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: socket.c,v 1.7 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

File diff suppressed because it is too large Load Diff

45
dist/dhcp/common/tr.c vendored
View File

@ -4,40 +4,31 @@
Contributed in May of 1999 by Andrew Chittenden */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*/
#ifndef lint
static char copyright[] =
"$Id: tr.c,v 1.2 2003/02/18 17:08:41 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: tr.c,v 1.3 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"

View File

@ -3,39 +3,30 @@
Routines for manipulating parse trees... */
/*
* Copyright (c) 1995-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: tree.c,v 1.5 2005/06/02 11:10:01 lukem Exp $ Copyright (c) 1995-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: tree.c,v 1.6 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -711,8 +702,10 @@ int evaluate_dns_expression (result, packet, lease, client_state, in_options,
in_options, cfg_options, scope,
expr -> data.ns_add.rrdata, MDL);
}
} else
} else {
r2 = 0;
tname = NULL;
}
if (r0 && r1 && (r2 || expr -> op != expr_ns_add)) {
*result = minires_mkupdrec (((expr -> op == expr_ns_add ||
expr -> op == expr_ns_delete)
@ -744,10 +737,13 @@ int evaluate_dns_expression (result, packet, lease, client_state, in_options,
goto dpngood;
(*result) -> r_data =
(*result) -> r_data_ephem;
/*%Audit% 16 bytes max. %2004.06.17,Safe%*/
sprintf ((char *)(*result) -> r_data_ephem,
"%d.%d.%d.%d",
data.data [0], data.data [1],
data.data [2], data.data [3]);
"%u.%u.%u.%u",
data.data [0] & 0xff,
data.data [1] & 0xff,
data.data [2] & 0xff,
data.data [3] & 0xff);
(*result) -> r_size =
strlen ((const char *)
(*result) -> r_data);
@ -1717,6 +1713,7 @@ int evaluate_data_expression (result, packet, lease, client_state,
if (len != 8 && len != 16 && len != 32) {
log_info ("binary_to_ascii: %s %ld!",
"invalid width", len);
status = 0;
goto b2a_out;
}
len /= 8;
@ -3104,18 +3101,20 @@ static int op_val (op)
case expr_equal:
case expr_not_equal:
return 4;
case expr_or:
case expr_and:
return 3;
case expr_and:
case expr_add:
case expr_subtract:
return 2;
case expr_multiply:
case expr_divide:
case expr_remainder:
return 1;
case expr_or:
case expr_add:
case expr_subtract:
return 2;
}
return 100;
}

View File

@ -3,39 +3,30 @@
Ultrix PacketFilter interface code. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -43,7 +34,7 @@
#ifndef lint
static char copyright[] =
"$Id: upf.c,v 1.2 2003/02/18 17:08:42 drochner Exp $ Copyright (c) 1996-2002 The Internet Software Consortium. All rights reserved.\n";
"$Id: upf.c,v 1.3 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@ -88,11 +79,9 @@ int if_register_upf (info)
/* Open a UPF device */
for (b = 0; 1; b++) {
#ifndef NO_SNPRINTF
snprintf(filename, sizeof(filename), "/dev/pf/pfilt%d", b);
#else
/* %Audit% Cannot exceed 36 bytes. %2004.06.17,Safe% */
sprintf(filename, "/dev/pf/pfilt%d", b);
#endif
sock = open (filename, O_RDWR, 0);
if (sock < 0) {
if (errno == EBUSY) {
@ -332,7 +321,7 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
/* Decode the IP and UDP headers... */
offset = decode_udp_ip_header (interface, ibuf, bufix,
from, (unsigned char *)0, length);
from, length);
/* If the IP or UDP checksum was bad, skip the packet... */
if (offset < 0)

29
dist/dhcp/configure vendored
View File

@ -70,6 +70,26 @@ if [ "$sysname" = "" ]; then
OSF1)
if [ $machine = 'alpha' ]; then
sysname=alphaosf
# OSF1 has libc snprintf/vsnprintf support as of 4.0F. There is
# no v4 & v5 portable compile-time way of knowing the system's
# version (we can #include a version-identing file, but it is only
# present in v5).
#
# So we rely on a system command, 'sizer', and default to
# no-snprintf if we can't find it.
if [ -x /usr/sbin/sizer ] ; then
release=`/usr/sbin/sizer -v | cut -d ' ' -f 4 | cut -c 2-`
major=`echo $release | cut -d . -f 1`
minor=`echo $release | cut -d . -f 2`
incr=`echo $minor | sed 's/[0-9]//g' | tr '[A-Z]' '[0-9]'`
minor=`echo $minor | sed 's/[A-Z]//g'`
if [ $major -gt 4 -o \
$major -eq 4 -a $minor -gt 0 -o \
$major -eq 4 -a $minor -eq 0 -a $incr -gt 5 ]; then
copts="$copts -DHAVE_SNPRINTF"
fi
fi
fi;;
Linux)
release=`uname -r`
@ -114,14 +134,7 @@ if [ "$sysname" = "" ]; then
fi;;
esac;;
NetBSD)
hw=`uname -m`
case $hw in
arm32) sysname=netbsd-nocast;;
alpha) sysname=netbsd-nocast;;
sparc) sysname=netbsd-nocast;;
sparc64) sysname=netbsd-nocast;;
*) sysname=netbsd;;
esac;;
sysname=netbsd;;
OpenBSD)
sysname=openbsd;;
FreeBSD)

View File

@ -3,7 +3,7 @@
# Start Date: Mon, 26 Mar 2001 14:24:09 +0200
# Time-stamp: <Monday, 26 March 2001 16:09:44 by brister>
# File: leaseconvertor.pl
# RCSId: $Id: 3.0b1-lease-convert,v 1.1.1.1 2001/08/03 11:35:34 drochner Exp $
# RCSId: $Id: 3.0b1-lease-convert,v 1.2 2005/08/11 17:13:21 drochner Exp $
#
# Description: Convert 3.0b1 to 3.0b2/final lease file format
#
@ -11,7 +11,7 @@
require 5.004;
my $rcsID =<<'EOM';
$Id: 3.0b1-lease-convert,v 1.1.1.1 2001/08/03 11:35:34 drochner Exp $
$Id: 3.0b1-lease-convert,v 1.2 2005/08/11 17:13:21 drochner Exp $
EOM
use strict;

View File

@ -1,20 +1,25 @@
# Makefile.dist
#
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
# Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
# Copyright (c) 1996-2003 by Internet Software Consortium
#
# http://www.isc.org/isc-license-1.0.html.
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
# Internet Systems Consortium, Inc.
# 950 Charter Street
# Redwood City, CA 94063
# <info@isc.org>
# http://www.isc.org/
#
CATMANPAGES = dhcpctl.cat3 omshell.cat1
@ -73,7 +78,7 @@ depend:
$(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
clean:
-rm -f $(OBJ) test.o svtest cltest.o cltest
-rm -f $(OBJ) omshell.o omshell cltest.o cltest
realclean: clean
-rm -f libdhcpctl.a *~ $(CATMANPAGES) $(SEDMANPAGES)

View File

@ -3,44 +3,40 @@
The dhcpctl callback object. */
/*
* Copyright (c) 1999-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
#ifndef lint
static char copyright[] =
"$Id: callback.c,v 1.4 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
#include "dhcpctl.h"

View File

@ -2,40 +2,37 @@
Example program that uses the dhcpctl library. */
/* Copyright (C) 2000-2002 Internet Software Consortium
* All rights reserved.
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2000-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software was contributed to the Internet Software Consortium
* This software was contributed to Internet Systems Consortium
* by Brian Murrell.
*/
#ifndef lint
static char ocopyright[] =
"$Id: cltest.c,v 1.3 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <time.h>
#include <sys/time.h>
#include <stdio.h>

View File

@ -2,9 +2,29 @@
.\"
.\" Project: DHCP
.\" File: dhcpctl.3
.\" RCSId: $Id: dhcpctl.3,v 1.2 2003/03/17 07:28:59 wiz Exp $
.\" RCSId: $Id: dhcpctl.3,v 1.3 2005/08/11 17:13:21 drochner Exp $
.\"
.\" Copyright (C) 2000 Nominum, Inc.
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 2000-2003 by Internet Software Consortium
.\" Copyright (c) 2000 Nominum, Inc.
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" Internet Systems Consortium, Inc.
.\" 950 Charter Street
.\" Redwood City, CA 94063
.\" <info@isc.org>
.\" http://www.isc.org/
.\"
.\" Description: dhcpctl man page.
.\"
@ -24,7 +44,6 @@
.\"
.Sh SYNOPSIS
.Fd #include <dhcpctl/dhcpctl.h>
.Fd
.Ft dhcpctl_status
.Fo dhcpctl_initialize
.Fa void
@ -325,6 +344,8 @@ values must all match what the server uses and are defined in its
configuration file. The created object is returned through the first parameter
and must be used as the 4th parameter to
.Fn dhcpctl_connect .
Note that the 'secret' value must not be base64 encoded, which is different
from how the value appears in the dhcpd.conf file.
.\"
.\"
.\"
@ -468,7 +489,5 @@ int main (int argc, char **argv) {
.Xr dhcpd 8
.Sh AUTHORS
.Nm
was written by Ted Lemon of Nominum, Inc. Information about Nominum
and support contracts for DHCP and BIND can be found at
http://www.nominum.com. This preliminary documentation was
written by James Brister of Nominum, Inc.
was written by Ted Lemon of Nominum, Inc.
This preliminary documentation was written by James Brister of Nominum, Inc.

View File

@ -3,44 +3,40 @@
Subroutines providing general support for objects. */
/*
* Copyright (c) 1999-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
#ifndef lint
static char copyright[] =
"$Id: dhcpctl.c,v 1.5 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
#include "dhcpctl.h"

View File

@ -1,41 +1,32 @@
/* dhcpctl.h
/* $Id: dhcpctl.h,v 1.3 2005/08/11 17:13:21 drochner Exp $
Subroutines providing general support for objects. */
/*
* Copyright (c) 1999-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.

View File

@ -1,36 +1,29 @@
.\" omshell.1
.\" $Id: omshell.1,v 1.3 2005/08/11 17:13:21 drochner Exp $
.\"
.\" Copyright (c) 2001-2002 Internet Software Consortium.
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (c) 2001-2003 by Internet Software Consortium
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of The Internet Software Consortium nor the names
.\" of its contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
.\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
.\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" This software has been written for the Internet Software Consortium
.\" Internet Systems Consortium, Inc.
.\" 950 Charter Street
.\" Redwood City, CA 94063
.\" <info@isc.org>
.\" http://www.isc.org/
.\"
.\" This software has been written for Internet Systems Consortium
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
.\" To learn more about the Internet Software Consortium, see
.\" To learn more about Internet Systems Consortium, see
.\" ``http://www.isc.org/''. To learn more about Vixie Enterprises,
.\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see
.\" ``http://www.nominum.com''.

View File

@ -3,44 +3,40 @@
Examine and modify omapi objects. */
/*
* Copyright (c) 2001-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2001-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
#ifndef lint
static char copyright[] =
"$Id: omshell.c,v 1.5 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@ -713,6 +709,7 @@ int main (int argc, char **argv, char **envp)
break;
}
end_parse (&cfile);
} while (1);
exit (0);

View File

@ -3,44 +3,40 @@
The dhcpctl remote object. */
/*
* Copyright (c) 1999-2003 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
*/
#ifndef lint
static char copyright[] =
"$Id: remote.c,v 1.5 2005/08/11 17:13:21 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>
#include "dhcpctl.h"

View File

@ -1,21 +1,25 @@
# Makefile.dist
#
# Copyright (c) 1996-2002 Internet Software Consortium.
# Use is subject to license terms which appear in the file named
# ISC-LICENSE that should have accompanied this file when you
# received it. If a file named ISC-LICENSE did not accompany this
# file, or you are not sure the one you have is correct, you may
# obtain an applicable copy of the license at:
# Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
# Copyright (c) 1996-2003 by Internet Software Consortium
#
# http://www.isc.org/isc-license-1.0.html.
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# This file is part of the ISC DHCP distribution. The documentation
# associated with this file is listed in the file DOCUMENTATION,
# included in the top-level directory of this release.
#
# Support and other services are available for ISC products - see
# http://www.isc.org for more information.
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Internet Systems Consortium, Inc.
# 950 Charter Street
# Redwood City, CA 94063
# <info@isc.org>
# http://www.isc.org/
SRC = dst_support.c dst_api.c hmac_link.c md5_dgst.c base64.c prandom.c
OBJ = dst_support.o dst_api.o hmac_link.o md5_dgst.o base64.o prandom.o

View File

@ -1,18 +1,24 @@
/*
* Copyright (c) 1996-1999 by Internet Software Consortium.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*/
/*
@ -41,9 +47,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
#if 0
static const char rcsid[] = "$Id: base64.c,v 1.2 2002/06/15 01:32:13 matt Exp $";
#endif
static const char rcsid[] = "$Id: base64.c,v 1.3 2005/08/11 17:13:21 drochner Exp $";
#endif /* not lint */
#include <sys/types.h>

View File

@ -1,7 +1,5 @@
#ifndef LINT
#if 0
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_api.c,v 1.4 2004/10/29 21:19:32 dsl Exp $";
#endif
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_api.c,v 1.5 2005/08/11 17:13:21 drochner Exp $";
#endif
/*

View File

@ -1,6 +1,4 @@
#if 0
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_support.c,v 1.2 2002/06/15 01:32:13 matt Exp $";
#endif
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/dst_support.c,v 1.3 2005/08/11 17:13:21 drochner Exp $";
/*

View File

@ -1,8 +1,6 @@
#ifdef HMAC_MD5
#ifndef LINT
#if 0
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/hmac_link.c,v 1.3 2003/02/18 17:08:42 drochner Exp $";
#endif
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/hmac_link.c,v 1.4 2005/08/11 17:13:21 drochner Exp $";
#endif
/*
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.

View File

@ -1,7 +1,5 @@
#ifndef LINT
#if 0
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/prandom.c,v 1.3 2002/06/15 01:32:13 matt Exp $";
#endif
static const char rcsid[] = "$Header: /cvsroot/src/dist/dhcp/dst/Attic/prandom.c,v 1.4 2005/08/11 17:13:21 drochner Exp $";
#endif
/*
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.

View File

@ -28,24 +28,30 @@
*/
/*
* Copyright (c) 1996-1999 by Internet Software Consortium.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*/
/*
* $Id: nameser.h,v 1.2 2003/08/07 09:21:07 agc Exp $
* $Id: nameser.h,v 1.3 2005/08/11 17:13:26 drochner Exp $
*/
#ifndef _ARPA_NAMESER_H_

View File

@ -28,7 +28,7 @@
/*
* from nameser.h 8.1 (Berkeley) 6/2/93
* $Id: nameser_compat.h,v 1.2 2003/08/07 09:21:07 agc Exp $
* $Id: nameser_compat.h,v 1.3 2005/08/11 17:13:26 drochner Exp $
*/
#ifndef _ARPA_NAMESER_COMPAT_

View File

@ -3,39 +3,30 @@
System dependencies for FreeBSD... */
/*
* Copyright (c) 1996-1999 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -68,6 +59,11 @@ extern int h_errno;
#define va_dcl
#define VA_start(list, last) va_start (list, last)
#if defined(__alpha__) || defined(__amd64__) || defined(__ia64__) || \
defined(__sparc64__)
# define PTRSIZE_64BIT
#endif
#ifndef _PATH_DHCPD_PID
#define _PATH_DHCPD_PID "/var/run/dhcpd.pid"
#endif

View File

@ -5,39 +5,30 @@
Based on a configuration originally supplied by Jonathan Stone. */
/*
* Copyright (c) 1996-1999 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -105,9 +96,6 @@ extern int h_errno;
#define VA_start(list, last) va_start (list, last)
#define va_dcl
#define vsnprintf(buf, size, fmt, list) vsprintf (buf, fmt, list)
#define NO_SNPRINTF
#define VOIDPTR void *
#define EOL '\n'

View File

@ -3,39 +3,30 @@
System dependencies for NetBSD... */
/*
* Copyright (c) 1996-1999 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.

View File

@ -3,39 +3,30 @@
Protocol structures... */
/*
* Copyright (c) 1995-2001 The Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises. To learn more
* about the Internet Software Consortium, see ``http://www.isc.org''.
* about Internet Systems Consortium, see ``http://www.isc.org''.
* To learn more about Vixie Enterprises, see ``http://www.vix.com''.
*/

View File

@ -3,39 +3,30 @@
Definitions for dhcpd... */
/*
* Copyright (c) 1996-2001 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -267,15 +258,14 @@ typedef struct {
} dhcp_control_object_t;
/* Lease states: */
typedef enum {
FTS_FREE = 1,
FTS_ACTIVE = 2,
FTS_EXPIRED = 3,
FTS_RELEASED = 4,
FTS_ABANDONED = 5,
FTS_RESET = 6,
FTS_BACKUP = 7
} binding_state_t;
#define FTS_FREE 1
#define FTS_ACTIVE 2
#define FTS_EXPIRED 3
#define FTS_RELEASED 4
#define FTS_ABANDONED 5
#define FTS_RESET 6
#define FTS_BACKUP 7
typedef u_int8_t binding_state_t;
/* FTS_LAST is the highest value that is valid for a lease binding state. */
#define FTS_LAST FTS_BACKUP
@ -318,9 +308,9 @@ struct lease {
# define EPHEMERAL_FLAGS (MS_NULL_TERMINATION | \
UNICAST_BROADCAST_HACK)
binding_state_t __attribute__ ((mode (__byte__))) binding_state;
binding_state_t __attribute__ ((mode (__byte__))) next_binding_state;
binding_state_t __attribute__ ((mode (__byte__))) desired_binding_state;
binding_state_t binding_state;
binding_state_t next_binding_state;
binding_state_t desired_binding_state;
struct lease_state *state;
@ -423,6 +413,11 @@ struct lease_state {
#define SV_UPDATE_STATIC_LEASES 43
#define SV_LOG_FACILITY 44
#define SV_DO_FORWARD_UPDATES 45
#define SV_PING_TIMEOUT 46
#if !defined (DEFAULT_PING_TIMEOUT)
# define DEFAULT_PING_TIMEOUT 1
#endif
#if !defined (DEFAULT_DEFAULT_LEASE_TIME)
# define DEFAULT_DEFAULT_LEASE_TIME 43200
@ -983,7 +978,7 @@ int cons_options PROTO ((struct packet *, struct dhcp_packet *, struct lease *,
int, int, int, struct data_string *, const char *));
int fqdn_universe_decode (struct option_state *,
const unsigned char *, unsigned, struct universe *);
int store_options PROTO ((unsigned char *, unsigned, struct packet *,
int store_options PROTO ((int *, unsigned char *, unsigned, struct packet *,
struct lease *, struct client_state *,
struct option_state *,
struct option_state *, struct binding_scope **,
@ -1378,7 +1373,7 @@ void dhcpdecline PROTO ((struct packet *, int));
void dhcpinform PROTO ((struct packet *, int));
void nak_lease PROTO ((struct packet *, struct iaddr *cip));
void ack_lease PROTO ((struct packet *, struct lease *,
unsigned int, TIME, char *, int));
unsigned int, TIME, char *, int, struct host_decl *));
void dhcp_reply PROTO ((struct lease *));
int find_lease PROTO ((struct lease **, struct packet *,
struct shared_network *, int *, int *, struct lease *,
@ -1838,7 +1833,6 @@ u_int32_t host_addr PROTO ((struct iaddr, struct iaddr));
int addr_eq PROTO ((struct iaddr, struct iaddr));
char *piaddr PROTO ((struct iaddr));
char *piaddrmask (struct iaddr, struct iaddr, const char *, int);
char *piaddr1 PROTO ((struct iaddr));
/* dhclient.c */
extern const char *path_dhclient_conf;
@ -1940,7 +1934,7 @@ ssize_t decode_hw_header PROTO ((struct interface_info *, unsigned char *,
unsigned, struct hardware *));
ssize_t decode_udp_ip_header PROTO ((struct interface_info *, unsigned char *,
unsigned, struct sockaddr_in *,
unsigned char *, unsigned, unsigned *));
unsigned, unsigned *));
/* ethernet.c */
void assemble_ethernet_header PROTO ((struct interface_info *, unsigned char *,

View File

@ -3,39 +3,30 @@
Tokens for config file lexer and parser. */
/*
* Copyright (c) 1996-2002 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -316,7 +307,8 @@ enum dhcp_token {
REMOVE = 611,
REFRESH = 612,
DOMAIN_NAME = 613,
DO_FORWARD_UPDATE = 614
DO_FORWARD_UPDATE = 614,
KNOWN_CLIENTS = 615
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \

View File

@ -3,39 +3,30 @@
Definitions for address trees... */
/*
* Copyright (c) 2000-2001 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2000-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -316,6 +307,8 @@ typedef struct _dhcp_failover_state {
queue. */
int pool_count; /* Number of pools referencing this
failover state object. */
int curUPD; /* If an UPDREQ* message is in motion,
this value indicates which one. */
} dhcp_failover_state_t;
#define DHCP_FAILOVER_VERSION 1

View File

@ -1,18 +1,24 @@
/*
* 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"

View File

@ -22,7 +22,7 @@
*/
/*
* $Id: res_update.h,v 1.1.1.2 2005/08/11 16:54:42 drochner Exp $
* $Id: res_update.h,v 1.2 2005/08/11 17:13:26 drochner Exp $
*/
#ifndef __RES_UPDATE_H

View File

@ -28,25 +28,31 @@
*/
/*
* 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.2 2003/08/07 09:21:07 agc Exp $
* $Id: resolv.h,v 1.3 2005/08/11 17:13:26 drochner Exp $
*/
#ifndef _RESOLV_H_

View File

@ -1,4 +1,4 @@
/* $NetBSD: udp.h,v 1.2 2003/08/07 09:21:08 agc Exp $ */
/* $NetBSD: udp.h,v 1.3 2005/08/11 17:13:26 drochner Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -31,6 +31,29 @@
* @(#)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.

View File

@ -3,39 +3,30 @@
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''.

View File

@ -3,39 +3,30 @@
Definitions for hashing... */
/*
* 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''.

View File

@ -3,39 +3,30 @@
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''.

View File

@ -3,39 +3,30 @@
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''.
@ -142,6 +133,14 @@
# 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
@ -310,7 +309,11 @@
#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__ */

View File

@ -3,39 +3,30 @@
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''.

View File

@ -1,3 +1,3 @@
/* Current version of ISC DHCP Distribution. */
#define DHCP_VERSION "V3.0.1rc11"
#define DHCP_VERSION "V3.0.3"

View File

@ -1,22 +1,28 @@
/*
* 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 2004/10/29 21:19:32 dsl Exp $";
static const char rcsid[] = "$Id: ns_date.c,v 1.3 2005/08/11 17:13:26 drochner Exp $";
#endif
/* Import. */

View File

@ -1,22 +1,28 @@
/*
* Copyright (c) 1996,1999-2003 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.3 2003/02/18 17:08:43 drochner Exp $";
static const char rcsid[] = "$Id: ns_name.c,v 1.4 2005/08/11 17:13:26 drochner Exp $";
#endif
#include <sys/types.h>

View File

@ -1,22 +1,28 @@
/*
* 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.5 2002/06/11 15:22:57 wiz Exp $";
static const char rcsid[] = "$Id: ns_parse.c,v 1.6 2005/08/11 17:13:26 drochner Exp $";
#endif
/* Import. */

View File

@ -1,22 +1,28 @@
/*
* Copyright (c) 1995,1999-2003 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 2003/02/18 17:08:43 drochner Exp $";
static const char rcsid[] = "$Id: ns_samedomain.c,v 1.4 2005/08/11 17:13:26 drochner Exp $";
#endif
#include <sys/types.h>

View File

@ -1,22 +1,28 @@
/*
* Copyright (c) 1999-2003 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.3 2003/02/18 17:08:43 drochner Exp $";
static const char rcsid[] = "$Id: ns_sign.c,v 1.4 2005/08/11 17:13:26 drochner Exp $";
#endif
#if defined (TRACING)

View File

@ -1,22 +1,28 @@
/*
* 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.2 2002/03/18 20:13:54 bjh21 Exp $";
static const char rcsid[] = "$Id: ns_verify.c,v 1.3 2005/08/11 17:13:26 drochner Exp $";
#endif
#define time(x) trace_mr_time (x)

View File

@ -48,25 +48,31 @@
*/
/*
* 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 2003/08/07 09:21:09 agc Exp $";
static const char rcsid[] = "$Id: res_comp.c,v 1.3 2005/08/11 17:13:26 drochner Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>

View File

@ -1,22 +1,28 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: res_findzonecut.c,v 1.4 2003/02/18 17:08:43 drochner Exp $";
static const char rcsid[] = "$Id: res_findzonecut.c,v 1.5 2005/08/11 17:13:26 drochner Exp $";
#endif /* not lint */
/*
* Copyright (c) 1999-2003 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. */

View File

@ -48,25 +48,31 @@
*/
/*
* 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.3 2004/10/29 21:19:32 dsl Exp $";
static const char rcsid[] = "$Id: res_init.c,v 1.4 2005/08/11 17:13:26 drochner Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>

View File

@ -48,25 +48,31 @@
*/
/*
* 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.2 2003/08/07 09:21:09 agc Exp $";
static const char rcsid[] = "$Id: res_mkquery.c,v 1.3 2005/08/11 17:13:26 drochner Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>

View File

@ -1,18 +1,24 @@
/*
* Copyright (c) 1996-1999 by Internet Software Consortium.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
* CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*/
/*
@ -21,7 +27,7 @@
*/
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: res_mkupdate.c,v 1.3 2003/01/02 10:04:32 tron Exp $";
static const char rcsid[] = "$Id: res_mkupdate.c,v 1.4 2005/08/11 17:13:26 drochner Exp $";
#endif /* not lint */
#include <sys/types.h>
@ -48,12 +54,11 @@ static const char rcsid[] = "$Id: res_mkupdate.c,v 1.3 2003/01/02 10:04:32 tron
#define MAXPORT 1024
static int getnum_str(const u_char **, const u_char *);
#if 0
static int gethexnum_str(const u_char **, const u_char *);
#endif
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 {
@ -98,16 +103,13 @@ res_nmkupdate(res_state statp,
ns_updrec *rrecp;
struct in_addr ina;
char buf2[MAXDNAME];
#if 0
u_char buf3[MAXDNAME];
#endif
int section, numrrs = 0, counts[ns_s_max];
u_int16_t rtype, rclass;
u_int32_t n1, rttl;
u_char *dnptrs[20], **dpp, **lastdnptr;
#if 0
unsigned siglen, keylen, certlen;
#endif
unsigned certlen;
int keylen;
unsigned buflen = *blp;
u_char *buf = (unsigned char *)bp;
@ -240,7 +242,7 @@ res_nmkupdate(res_state statp,
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)
@ -555,36 +557,6 @@ res_nmkupdate(res_state statp,
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;
@ -619,6 +591,38 @@ res_nmkupdate(res_state statp,
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);
@ -651,6 +655,8 @@ res_nmkupdate(res_state statp,
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);
@ -694,6 +700,35 @@ getword_str(char *buf, int size, const u_char **startpp, const u_char *endp) {
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
@ -773,7 +808,6 @@ getstr_str(char *buf, int size, const u_char **startpp, const u_char *endp) {
*cp = '\0';
return ((cp == buf)? (seen_quote? 0: -1): (cp - buf));
}
#if 0
/*
* Get a whitespace delimited base 16 number from a string (not file) into buf
* update the start pointer to point after the number in the string.
@ -822,7 +856,6 @@ gethexnum_str(const u_char **startpp, const u_char *endp) {
}
return (n + m);
}
#endif
/*
* Get a whitespace delimited base 16 number from a string (not file) into buf

View File

@ -48,25 +48,31 @@
*/
/*
* 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.3 2004/10/29 21:19:32 dsl Exp $";
static const char rcsid[] = "$Id: res_query.c,v 1.4 2005/08/11 17:13:26 drochner Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>

View File

@ -48,25 +48,31 @@
*/
/*
* 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.3 2003/08/07 09:21:10 agc Exp $";
static const char rcsid[] = "$Id: res_send.c,v 1.4 2005/08/11 17:13:26 drochner Exp $";
#endif /* LIBC_SCCS and not lint */
/* Rename the I/O functions in case we're tracing. */

View File

@ -1,22 +1,28 @@
#if !defined(lint) && !defined(SABER)
static const char rcsid[] = "$Id: res_update.c,v 1.2 2002/06/10 00:30:35 itojun Exp $";
static const char rcsid[] = "$Id: res_update.c,v 1.3 2005/08/11 17:13:26 drochner 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/
*/
/*

View File

@ -4,39 +4,30 @@
protocol... */
/*
* Copyright (c) 1999-2003 Internet Software Consortium.
* All rights reserved.
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of The Internet Software Consortium nor the names
* of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
* CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* Internet Systems Consortium, Inc.
* 950 Charter Street
* Redwood City, CA 94063
* <info@isc.org>
* http://www.isc.org/
*
* This software has been written for the Internet Software Consortium
* This software has been written for Internet Systems Consortium
* by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
* To learn more about the Internet Software Consortium, see
* To learn more about Internet Systems Consortium, see
* ``http://www.isc.org/''. To learn more about Vixie Enterprises,
* see ``http://www.vix.com''. To learn more about Nominum, Inc., see
* ``http://www.nominum.com''.
@ -523,8 +514,11 @@ isc_result_t omapi_object_allocate (omapi_object_t **o,
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);
@ -795,11 +789,11 @@ isc_result_t omapi_typed_data_new (const char *file, int line,
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);

View File

@ -3,39 +3,30 @@
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''.

View File

@ -3,39 +3,30 @@
Subroutines having to do with authentication. */
/*
* 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''.
@ -43,7 +34,7 @@
#ifndef lint
static char ocopyright[] =
"$Id: auth.c,v 1.2 2002/06/11 14:00:04 drochner Exp $ Copyright 1998-2000 The Internet Software Consortium.";
"$Id: auth.c,v 1.3 2005/08/11 17:13:30 drochner Exp $ Copyright 2004 Internet Systems Consortium.";
#endif
#include <omapip/omapip_p.h>

View File

@ -3,39 +3,30 @@
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''.

View File

@ -3,39 +3,30 @@
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''.
@ -710,12 +701,10 @@ static isc_result_t make_dst_key (DST_KEY **dst_key, omapi_object_t *a) {
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;
int algorithm_id = UNKNOWN_KEYALG;
char *name_str = NULL;
isc_result_t status = ISC_R_SUCCESS;
algorithm_id = 0; /* XXXGCC -Wuninitialized */
if (status == ISC_R_SUCCESS)
status = omapi_get_value_str
(a, (omapi_object_t *)0, "name", &name);

View File

@ -4,39 +4,30 @@
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''.
@ -44,7 +35,7 @@
#ifndef lint
static char copyright[] =
"$Id: convert.c,v 1.4 2005/06/02 05:30:12 lukem Exp $ Copyright (c) 1996-1999 The Internet Software Consortium. All rights reserved.\n";
"$Id: convert.c,v 1.5 2005/08/11 17:13:30 drochner Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include <omapip/omapip_p.h>

Some files were not shown because too many files have changed in this diff Show More