getdns-1.6.0 release

-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEE3DTuXbJBe8wVHlEA5fj4IS93pJgFAl5ZKkAUHHdpbGxlbUBu
 bG5ldGxhYnMubmwACgkQ5fj4IS93pJjVeA/+MIMCZm0pSET6kAIauItpeA506/2a
 U6Us1mQRKFu3kAq655CiCC2amXH+oPZg8ESKBqFn4AbbzSiWMcHEQh91v6vHGYe9
 0V1CciUUScFW2PlodKg/Ulxy+COmrmonkz4X/NbepsikYXUu4xmVL+FgfGw1xvAu
 mxLMWW3oZi7Rgr3zAixgNLE3t7KgjVVRXBNVDb9on3IyydAkgssUJQHAsupJJQy+
 CCPrqpj4s3nLGSACVkCQPJIYewYKAnvTwLSy2+9mOP8clIgmVonoeEaYwM5x0RU/
 boeqXR7A6iA6CvReeG/vQa/MVcVIIY/p7FSYZwtxrHef8cPXG9H8GVKy9s+xlNEO
 7tEG6uhwGq52i9zDfVi36TXwWe/FW9ER5cytmlhcMOIkMnH6KHn3iZrx6mVhInob
 93cwl+vVGd/MSt7JnDwsvRI1uUsdSapbqK58c/aCrC9aag9YWhwnGPMByqfyXJUf
 5Yv43/AI9wI0UY2BPzvtZbtfwL+30VotZLUJRmoBtmKJQ6XQ98LG3NPeq83v5Wzd
 DxRcCqLNwEBh0qADtdfEd07H+Hf5F7GT6xqJo+IWrTaZ+naZNMsVajGJtSpCthCq
 k02naEtEMegc9C+fsrbFfQeuvvBPnFgUJKFVQJH6UrMG278tkEklmHmJwnZKtSFY
 ZhNgm/04AG1hcdU=
 =pOTk
 -----END PGP SIGNATURE-----

Merge tag 'v1.6.0'

getdns-1.6.0 release
This commit is contained in:
Willem Toorop 2020-02-28 16:03:59 +01:00
commit e19e6bd464
175 changed files with 3834 additions and 6381 deletions

18
.gitattributes vendored Normal file
View File

@ -0,0 +1,18 @@
/.dir-locals.el export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.gitmodules export-ignore
/.indent.pro export-ignore
/.travis.yml export-ignore
/getdns.pmdoc export-ignore
/gldns/compare.sh export-ignore
/gldns/import.sh export-ignore
/project-doc export-ignore
/src/test/tpkg export-ignore
/src/test/README export-ignore
/src/tools/Dockerfile export-ignore
/src/tools/README.adoc export-ignore
/src/util/import.sh export-ignore
/src/mk-const-info.c.sh export-ignore
/src/mk-symfiles.sh export-ignore
/README export-ignore

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
*~ *~
.DS_Store .DS_Store
build*/
tests*/
getdns*.tar.gz getdns*.tar.gz
*.o *.o
*.so *.so

4
.gitmodules vendored
View File

@ -12,5 +12,5 @@
branch = develop branch = develop
[submodule "src/ssl_dane"] [submodule "src/ssl_dane"]
path = src/ssl_dane path = src/ssl_dane
url = https://github.com/getdnsapi/ssl_dane url = https://github.com/banburybill/ssl_dane
branch = getdns branch = feature/windows-native-build

View File

@ -1,5 +1,5 @@
sudo: false sudo: false
dist: xenial dist: bionic
language: c language: c
compiler: compiler:
- gcc - gcc
@ -9,7 +9,7 @@ addons:
packages: packages:
- libssl-dev - libssl-dev
- libunbound-dev - libunbound-dev
- libidn11-dev - libidn2-0-dev
- libyaml-dev - libyaml-dev
- check - check
- libevent-dev - libevent-dev
@ -23,4 +23,4 @@ script:
- mkdir tests - mkdir tests
- cd tests - cd tests
- ../src/test/tpkg/run-all.sh - ../src/test/tpkg/run-all.sh
# - ../src/test/tpkg/run-one.sh 225-stub-only-valgrind-checks # - ../src/test/tpkg/run-one.sh 275-server-capabilities.tpkg -V

1157
CMakeLists.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,27 @@
* 2020-02-28: Version 1.6.0
* Issues #457, #458, #461: New symbols with libnettle >= 3.4.
Thanks hanvinke & kometchtech for testing & reporting.
* Issue #432: answer_ipv4_address and answer_ipv6_address in reply
and response dicts.
* Issue #430: Record and guard UDP max payload size with servers.
* Issue #407: Run only offline-tests option with:
src/test/tpkg/run-offline-only.sh (only with git checkouts).
* Issue #175: Include the packet the stub resolver sent to the
upstream the call_reporting dict. Thanks Tom Pusateri
* Issue #169: Build eventloop support libraries if event libraries
are available. Thanks Tom Pusateri
* 2019-12-20: Version 1.6.0-beta.1
* Migration of build system to cmake. Build now works on Ubuntu,
Windows 10 and macOS.
Some notes on minor differences in the new cmake build:
* OpenSSL 1.0.2 or higher is now required
* libunbound 1.5.9 is now required
* Only libidn2 2.0.0 and later is supported (not libidn)
* Windows uses ENABLE_STUB_ONLY=ON as the default
* Unit and regression tests work on Linux/macOS
(but not Windows yet)
* 2019-04-03: Version 1.5.2 * 2019-04-03: Version 1.5.2
* PR #424: Two small trust anchor fetcher fixes * PR #424: Two small trust anchor fetcher fixes
Thanks Maciej S. Szmigiero Thanks Maciej S. Szmigiero

401
INSTALL
View File

@ -1,401 +0,0 @@
Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
(Options specific to getdns are listed at the end of this document.)
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX `make' updates targets which have the same time stamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as `configure' are involved. Use GNU `make'
instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
On Mac OSX getdns will not build against the version of OpenSSL shipped with
OSX. If you link against a self-complied version of OpenSSL then manual
configuration of certificates into the default OpenSSL directory
/usr/local/etc/openssl/certs is currently required for TLS authentication to work.
However if linking against the version of OpenSSL installed via Homebrew TLS
authentication will work out of the box.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
getdns-specific Options
=======================
`--with-libidn=pathname'
path to libidn (default: search /usr/local ..)
`--with-libunbound=pathname'
path to libunbound (default: search /usr/local ..)
`--with-libevent'
path to libevent (default: search /usr/local ..)
`--with-libuv'
path to libuv (default: search /usr/local ..)
`--with-libev'
path to libev (default: search /usr/local ..)
`--with-trust-anchor=KEYFILE'
Default location of the trust anchor file.
[default=SYSCONFDIR/unbound/getdns-root.key]

View File

@ -1,328 +0,0 @@
#
# @configure_input@
#
#
# Copyright (c) 2013, Verisign, Inc., NLnet Labs
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the names of the copyright holders nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package = @PACKAGE_NAME@
version = @PACKAGE_VERSION@@RELEASE_CANDIDATE@
tarname = @PACKAGE_TARNAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
distdir = $(tarname)-$(version)
bintar = $(distdir)-bin.tar.gz
prefix = @prefix@
datarootdir=@datarootdir@
exec_prefix = @exec_prefix@
bindir = @bindir@
docdir = @docdir@
libdir = @libdir@
srcdir = @srcdir@
INSTALL = @INSTALL@
all : default @GETDNS_QUERY@ @GETDNS_SERVER_MON@
everything: default
cd src/test && $(MAKE)
default:
cd src && $(MAKE) $@
install-lib:
cd src && $(MAKE) install
install: getdns.pc getdns_ext_event.pc install-lib @INSTALL_GETDNS_QUERY@ @INSTALL_GETDNS_SERVER_MON@
$(INSTALL) -m 755 -d $(DESTDIR)$(docdir)
$(INSTALL) -m 644 $(srcdir)/AUTHORS $(DESTDIR)$(docdir)
$(INSTALL) -m 644 $(srcdir)/ChangeLog $(DESTDIR)$(docdir)
$(INSTALL) -m 644 $(srcdir)/COPYING $(DESTDIR)$(docdir)
$(INSTALL) -m 644 $(srcdir)/INSTALL $(DESTDIR)$(docdir)
$(INSTALL) -m 644 $(srcdir)/LICENSE $(DESTDIR)$(docdir)
$(INSTALL) -m 644 $(srcdir)/NEWS $(DESTDIR)$(docdir)
$(INSTALL) -m 644 $(srcdir)/README.md $(DESTDIR)$(docdir)
$(INSTALL) -m 755 -d $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 getdns.pc $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 644 getdns_ext_event.pc $(DESTDIR)$(libdir)/pkgconfig
$(INSTALL) -m 755 -d $(DESTDIR)$(docdir)/spec
$(INSTALL) -m 644 $(srcdir)/spec/index.html $(DESTDIR)$(docdir)/spec
cd doc && $(MAKE) install
@echo "***"
@echo "*** !!! IMPORTANT !!!!"
@echo "***"
@echo "*** From release 1.2.0, getdns comes with built-in DNSSEC"
@echo "*** trust anchor management. External trust anchor management,"
@echo "*** for example with unbound-anchor, is no longer necessary"
@echo "*** and no longer recommended."
@echo "***"
@echo "*** Previously installed trust anchors, in the default location -"
@echo "***"
@echo "*** @TRUST_ANCHOR_FILE@"
@echo "***"
@echo "*** - will be preferred and used for DNSSEC validation, however"
@echo "*** getdns will fallback to trust-anchors obtained via built-in"
@echo "*** trust anchor management when the anchors from the default"
@echo "*** location fail to validate the root DNSKEY rrset."
@echo "***"
@echo "*** To prevent expired DNSSEC trust anchors to be used for"
@echo "*** validation, we strongly recommend removing the trust anchors"
@echo "*** on the default location when there is no active external"
@echo "*** trust anchor management keeping it up-to-date."
@echo "***"
uninstall: @UNINSTALL_GETDNS_QUERY@ @UNINSTALL_GETDNS_SERVER_MON@
rm -rf $(DESTDIR)$(docdir)
cd doc && $(MAKE) $@
cd src && $(MAKE) $@
doc: FORCE
cd doc && $(MAKE) $@
example:
cd spec/example && $(MAKE) $@
test: default
cd src/test && $(MAKE) $@
getdns_query: default
cd src/tools && $(MAKE) $@
getdns_server_mon: default
cd src/tools && $(MAKE) $@
stubby:
cd src && $(MAKE) $@
scratchpad: default
cd src/test && $(MAKE) $@
pad: scratchpad
src/test/scratchpad || ./libtool exec gdb src/test/scratchpad
install-getdns_query: install-lib
cd src/tools && $(MAKE) $@
uninstall-getdns_query:
cd src/tools && $(MAKE) $@
install-getdns_server_mon: install-lib @INSTALL_GETDNS_QUERY@
cd src/tools && $(MAKE) $@
uninstall-getdns_server_mon:
cd src/tools && $(MAKE) $@
install-stubby:
cd src && $(MAKE) $@
uninstall-stubby:
cd src && $(MAKE) $@
clean:
cd src && $(MAKE) $@
cd doc && $(MAKE) $@
cd spec/example && $(MAKE) $@
rm -f *.o *.pc
depend:
cd src && $(MAKE) $@
cd spec/example && $(MAKE) $@
distclean:
cd src && $(MAKE) $@
rmdir src 2>/dev/null || true
cd doc && $(MAKE) $@
rmdir doc 2>/dev/null || true
cd spec/example && $(MAKE) $@
rmdir spec/example 2>/dev/null || true
rmdir spec 2>/dev/null || true
rm -f config.log config.status Makefile libtool getdns.pc getdns_ext_event.pc
rm -fR autom4te.cache
rm -f m4/libtool.m4
rm -f m4/lt~obsolete.m4
rm -f m4/ltoptions.m4
rm -f m4/ltsugar.m4
rm -f m4/ltversion.m4
rm -f $(distdir).tar.gz $(distdir).tar.gz.sha256 $(distdir).tar.gz.sha1
rm -f $(distdir).tar.gz.md5 $(distdir).tar.gz.asc
megaclean:
cd $(srcdir) && rm -fr * .dir-locals.el .gitignore .indent.pro .travis.yml && git reset --hard && git submodule update --init
autoclean: megaclean
libtoolize -ci
autoreconf -fi
dist: $(distdir).tar.gz
pub: $(distdir).tar.gz.sha256 $(distdir).tar.gz.md5 $(distdir).tar.gz.asc $(distdir).tar.gz.sha1
$(distdir).tar.gz.sha256: $(distdir).tar.gz
openssl sha256 $(distdir).tar.gz >$@
$(distdir).tar.gz.sha1: $(distdir).tar.gz
openssl sha1 $(distdir).tar.gz >$@
$(distdir).tar.gz.md5: $(distdir).tar.gz
openssl md5 $(distdir).tar.gz >$@
$(distdir).tar.gz.asc: $(distdir).tar.gz
gpg --armor --detach-sig $(distdir).tar.gz
bindist: $(bintar)
$(bintar): $(distdir)
chown -R 0:0 $(distdir) 2>/dev/null || true
cd $(distdir); ./configure; make
tar chof - $(distdir) | gzip -9 -c > $@
rm -rf $(distdir)
$(distdir).tar.gz: $(distdir)
chown -R 0:0 $(distdir) 2>/dev/null || true
tar chof - $(distdir) | gzip -9 -c > $@
rm -rf $(distdir)
$(distdir):
mkdir -p $(distdir)/m4
mkdir -p $(distdir)/src
mkdir -p $(distdir)/src/getdns
mkdir -p $(distdir)/src/test
mkdir -p $(distdir)/src/extension
mkdir -p $(distdir)/src/compat
mkdir -p $(distdir)/src/util
mkdir -p $(distdir)/src/gldns
mkdir -p $(distdir)/src/tls/validator
mkdir -p $(distdir)/src/gnutls
mkdir -p $(distdir)/src/openssl
mkdir -p $(distdir)/src/tools
mkdir -p $(distdir)/src/jsmn
mkdir -p $(distdir)/src/yxml
mkdir -p $(distdir)/src/ssl_dane
mkdir -p $(distdir)/doc
mkdir -p $(distdir)/spec
mkdir -p $(distdir)/spec/example
mkdir -p $(distdir)/stubby
mkdir -p $(distdir)/stubby/src
mkdir -p $(distdir)/stubby/src/yaml
mkdir -p $(distdir)/stubby/doc
mkdir -p $(distdir)/stubby/systemd
mkdir -p $(distdir)/stubby/contrib/upstart
cp $(srcdir)/configure.ac $(distdir)
cp $(srcdir)/configure $(distdir)
cp $(srcdir)/AUTHORS $(distdir)
cp $(srcdir)/ChangeLog $(distdir)
cp $(srcdir)/COPYING $(distdir)
cp $(srcdir)/INSTALL $(distdir)
cp $(srcdir)/LICENSE $(distdir)
cp $(srcdir)/NEWS $(distdir)
cp $(srcdir)/README.md $(distdir)
cp $(srcdir)/Makefile.in $(distdir)
cp $(srcdir)/install-sh $(distdir)
cp $(srcdir)/config.sub $(distdir)
cp $(srcdir)/config.guess $(distdir)
cp $(srcdir)/getdns.pc.in $(distdir)
cp $(srcdir)/getdns_ext_event.pc.in $(distdir)
cp libtool $(distdir)
cp $(srcdir)/ltmain.sh $(distdir)
cp $(srcdir)/m4/*.m4 $(distdir)/m4
cp $(srcdir)/src/*.in $(distdir)/src
cp $(srcdir)/src/*.[ch] $(distdir)/src
cp $(srcdir)/src/*.symbols $(distdir)/src
cp $(srcdir)/src/extension/*.[ch] $(distdir)/src/extension
cp $(srcdir)/src/extension/*.symbols $(distdir)/src/extension
cp $(srcdir)/src/getdns/*.in $(distdir)/src/getdns
cp $(srcdir)/src/getdns/getdns_*.h $(distdir)/src/getdns
cp $(srcdir)/src/test/Makefile.in $(distdir)/src/test
cp $(srcdir)/src/test/*.[ch] $(distdir)/src/test
cp $(srcdir)/src/test/*.sh $(distdir)/src/test
cp $(srcdir)/src/test/*.good $(distdir)/src/test
cp $(srcdir)/src/compat/*.[ch] $(distdir)/src/compat
cp $(srcdir)/src/util/*.[ch] $(distdir)/src/util
cp -r $(srcdir)/src/util/orig-headers $(distdir)/src/util
cp -r $(srcdir)/src/util/auxiliary $(distdir)/src/util
cp $(srcdir)/src/gldns/*.[ch] $(distdir)/src/gldns
cp $(srcdir)/src/tls/*.[ch] $(distdir)/src/tls
cp $(srcdir)/src/tls/validator/*.[ch] $(distdir)/src/tls/validator
cp $(srcdir)/src/gnutls/*.[ch] $(distdir)/src/gnutls
cp $(srcdir)/src/openssl/*.[ch] $(distdir)/src/openssl
cp $(srcdir)/doc/Makefile.in $(distdir)/doc
cp $(srcdir)/doc/*.in $(distdir)/doc
cp $(srcdir)/doc/manpgaltnames $(distdir)/doc
cp $(srcdir)/spec/*.html $(distdir)/spec
cp $(srcdir)/spec/example/Makefile.in $(distdir)/spec/example
cp $(srcdir)/spec/example/*.[ch] $(distdir)/spec/example
cp $(srcdir)/src/tools/Makefile.in $(distdir)/src/tools
cp $(srcdir)/src/tools/*.[ch] $(distdir)/src/tools
cp $(srcdir)/stubby/stubby.yml.example $(distdir)/stubby
cp $(srcdir)/stubby/macos/stubby-setdns-macos.sh $(distdir)/stubby
cp $(srcdir)/stubby/src/*.[ch] $(distdir)/stubby/src
cp $(srcdir)/stubby/src/yaml/*.[ch] $(distdir)/stubby/src/yaml
cp $(srcdir)/stubby/COPYING $(distdir)/stubby
cp $(srcdir)/stubby/README.md $(distdir)/stubby
cp $(srcdir)/stubby/doc/stubby.1.in $(distdir)/stubby/doc
cp $(srcdir)/stubby/systemd/README.md $(distdir)/stubby/systemd
cp $(srcdir)/stubby/systemd/stubby.conf $(distdir)/stubby/systemd
cp $(srcdir)/stubby/systemd/stubby.service $(distdir)/stubby/systemd
cp $(srcdir)/stubby/contrib/upstart/stubby.conf $(distdir)/stubby/contrib/upstart
cp $(srcdir)/src/jsmn/*.[ch] $(distdir)/src/jsmn
cp $(srcdir)/src/jsmn/LICENSE $(distdir)/src/jsmn
cp $(srcdir)/src/jsmn/README.md $(distdir)/src/jsmn
cp $(srcdir)/src/yxml/*.[ch] $(distdir)/src/yxml
cp $(srcdir)/src/yxml/COPYING $(distdir)/src/yxml
cp $(srcdir)/src/yxml/yxml.pod $(distdir)/src/yxml
cp $(srcdir)/src/ssl_dane/danessl.[ch] $(distdir)/src/ssl_dane
cp $(srcdir)/src/ssl_dane/README.md $(distdir)/src/ssl_dane
rm -f $(distdir)/Makefile $(distdir)/src/Makefile $(distdir)/src/getdns/getdns.h $(distdir)/spec/example/Makefile $(distdir)/src/test/Makefile $(distdir)/doc/Makefile $(distdir)/src/config.h
distcheck: $(distdir).tar.gz
gzip -cd $(distdir).tar.gz | tar xvf -
cd $(distdir) && ./configure
cd $(distdir) && $(MAKE) all
cd $(distdir) && $(MAKE) check
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
if test "$${remaining}" -ne 0; then
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
exit 1; \
fi
cd $(distdir) && $(MAKE) clean
rm -rf $(distdir)
@echo "*** Package $(distdir).tar.gz is ready for distribution"
getdns.pc: $(srcdir)/getdns.pc.in
./config.status $@
getdns_ext_event.pc: $(srcdir)/getdns_ext_event.pc.in
./config.status $@
Makefile: $(srcdir)/Makefile.in config.status
./config.status $@
configure.status: configure
./config.status --recheck
.PHONY: all distclean clean default doc test
FORCE:

195
README.md
View File

@ -40,7 +40,7 @@ The project home page at [getdnsapi.net](https://getdnsapi.net) provides documen
If you are just getting started with the library take a look at the section below that describes building and handling external dependencies for the library. If you are just getting started with the library take a look at the section below that describes building and handling external dependencies for the library.
### Examples ### Examples
Once it is built you should take a look at src/examples to see how the library is used. Once it is built you should take a look at `spec/example` to see how the library is used.
# Download # Download
@ -50,7 +50,7 @@ or from [getdnsapi.net](https://getdnsapi.net) and verify the download using
the checksums (SHA1 or MD5) or using gpg to verify the signature. Our keys are the checksums (SHA1 or MD5) or using gpg to verify the signature. Our keys are
available from the [pgp keyservers](https://keyserver.pgp.com) available from the [pgp keyservers](https://keyserver.pgp.com)
* willem@nlnetlabs.nl, key id E5F8F8212F77A498 * `willem@nlnetlabs.nl`, key id E5F8F8212F77A498
# Releases # Releases
@ -59,68 +59,96 @@ approach. The code is currently under active development.
The following requirements were met as conditions for the present release: The following requirements were met as conditions for the present release:
* code compiles cleanly on at least the primary target platforms: OSX, RHEL/CentOS Linux, FreeBSD * code compiles cleanly on at least the primary target platforms: OSX, Linux (RHEL/CentOS, Ubuntu), FreeBSD
* examples must compile and run cleanly * examples must compile and run cleanly
* there must be clear documentation of supported and unsupported elements of the API * there must be clear documentation of supported and unsupported elements of the API
# Building and External Dependencies # External Dependencies
If you are installing from packages, you have to install the library and also the library-devel (or -dev) for your package management system to get the the necessary compile time files. If you are installing from packages, you have to install the library and also the library-devel (or -dev) for your package management system to get the the necessary compile time files.
External dependencies are linked outside the getdns API build tree (we rely on configure to find them). We would like to keep the dependency tree short. Please refer to section for building on Windows for separate dependency and build instructions for that platform. External dependencies are linked outside the getdns API build tree (we rely on CMake to find them). We would like to keep the dependency tree short, see [Minimising Dependancies](#minimizing-dependancies) for more details.
* [libunbound from NLnet Labs](https://unbound.net/) version 1.4.16 or later. Required for all builds:
* [libidn from the FSF](https://www.gnu.org/software/libidn/) version 1 or 2 (from version 2.0.0 and higher). (Note that the libidn version means the conversions between A-labels and U-labels may permit conversion of formally invalid labels under IDNA2008.)
* [libssl and libcrypto from the OpenSSL Project](https://www.openssl.org/) version 0.9.7 or later. (Note: version 1.0.1 or later is required for TLS support, version 1.0.2 or later is required for TLS hostname authentication)
* Doxygen is used to generate documentation; while this is not technically necessary for the build it makes things a lot more pleasant.
For example, to build on a recent version of Ubuntu, you would need the following packages: * [libssl and libcrypto from the OpenSSL Project](https://www.openssl.org/) version 1.0.2 or later. Using OpenSSL 1.1 is recommended due to TSL 1.3 support.
# apt install build-essential libunbound-dev libidn2-dev libssl-dev libtool m4 autoconf Required for all builds that include recursive functionality:
* [libunbound from NLnet Labs](https://unbound.net/) version 1.5.9 or later. (Note: linking to libunbound is not yet supported on Windows, see [Windows 10](#microsoft-windows-10))
Required for all builds that include IDN functionality:
* [libidn2 from the FSF](https://www.gnu.org/software/libidn/) version 2.0.0 and higher.
Required to build the documentation:
* [Doxygen](http://www.doxygen.nl) is used to generate documentation; while this is not technically necessary for the build it makes things a lot more pleasant.
For example, to build on Ubuntu 18.04 or later, you would need the following packages for a full build:
# apt install build-essential libunbound-dev libidn2-dev libssl-dev cmake
# Building
If you are building from git, you need to do the following before building: If you are building from git, you need to do the following before building:
# git submodule update --init # git submodule update --init
# libtoolize -ci # (use glibtoolize for OS X, libtool is installed as glibtool to avoid name conflict on OS X) From release 1.6.0 getdns uses CMake (previous versions used autoconf/libtool). To build from this release and later use:
# autoreconf -fi
# cmake .
# make
As well as building the getdns library three other tools may be installed: If you are unfamiliar with CMake, see our [CMake Quick Start](https://getdnsapi.net/quick-start/cmake-quick-start/) for how to use CMake options to customise the getdns build.
* getdns_query: a command line test script wrapper for getdns As well as building the getdns library two other tools are installed by default:
* stubby: an experimental DNS Privacy enabled client
* getdns_query: a command line test script wrapper for getdns. This can be used to quickly check the functionality of the library, see (#using-getdnsquery)
* getdns_server_mon: test DNS server function and capabilities * getdns_server_mon: test DNS server function and capabilities
Note: If you only want to build stubby, then use the `--with-stubby` option when running 'configure'. Additionally `Stubby` a DNS Privacy enabled client can also be built and installed by using the `BUILD_STUBBY` option when running `cmake`, see [Stubby](#stubby).
## Minimizing dependencies ## Minimizing dependencies
* getdns can be configured for stub resolution mode only with the `--enable-stub-only` option to configure. This removes the dependency on `libunbound`. * getdns can be configured for stub resolution mode only with the `ENABLE_STUB_ONLY` option to `cmake`. This removes the dependency on `libunbound`.
* Currently getdns only offers two helper functions to deal with IDN: `getdns_convert_ulabel_to_alabel` and `getdns_convert_alabel_to_ulabel`. If you do not need these functions, getdns can be configured to compile without them with the `--without-libidn` and `--without-libidn2` options to configure. * Currently getdns only offers two helper functions to deal with IDN: `getdns_convert_ulabel_to_alabel` and `getdns_convert_alabel_to_ulabel`. If you do not need these functions, getdns can be configured to compile without them by setting the`USE_LIBIDN2` option to `cmake` to OFF.
* When `--enable-stub-only`, `--without-libidn` and `--without-libidn2` options are used, getdns has only one dependency left, which is OpenSSL. * When `ENABLE_STUB_ONLY` is ON, and `USE_LIBIDN2` is OFF, getdns has only one dependency left, which is OpenSSL.
## Extensions and Event loop dependencies ## Extensions and Event loop dependencies
The implementation works with a variety of event loops, each built as a separate shared library. See [this Doxygen page](https://getdnsapi.net/doxygen/group__eventloops.html) and [this man page](https://getdnsapi.net/documentation/manpages/#ASYNCHRONOUS USE) for more details. The implementation works with a variety of event loops, each built as a separate shared library. See [this Doxygen page](https://getdnsapi.net/doxygen/group__eventloops.html) and [this man page](https://getdnsapi.net/documentation/manpages/#ASYNCHRONOUS USE) for more details.
* [libevent](http://libevent.org). Note: the examples *require* this and should work with either libevent 1.x or 2.x. 2.x is preferred. * [libevent](http://libevent.org). Note: the examples *require* this. libevent 2.x is required.
* [libuv](https://github.com/joyent/libuv) * [libuv](https://libuv.org/)
* [libev](http://software.schmorp.de/pkg/libev.html) * [libev](http://software.schmorp.de/pkg/libev.html)
## Using getdns_query
Example test queries using `getdns_query` (pointed at Google Public DNS) and requesting the `call_reporting` extension which provides information on the transport and query time:
getdns_query -s example.com A @8.8.8.8 +return_call_reporting (UDP)
getdns_query -s example.com A @8.8.8.8 -T +return_call_reporting (TCP)
getdns_query -s example.com A @8.8.8.8 -L +return_call_reporting (TLS without authentication)
getdns_query -s getdnsapi.net A +dnssec_return_status +return_call_reporting (DNSSEC)
## Stubby ## Stubby
* Stubby is an experimental implementation of a DNS Privacy enabled stub resolver than encrypts DNS queries using TLS. It is currently suitable for advanced/technical users - all feedback is welcome! * Stubby is an implementation of a DNS Privacy enabled stub resolver that encrypts DNS queries using TLS. It is currently suitable for advanced/technical users - all feedback is welcome!
* Details on how to use Stubby can be found in the [Stubby Reference Guide](https://dnsprivacy.org/wiki/x/JYAT). * Details on how to use Stubby can be found in the [Stubby Reference Guide](https://dnsprivacy.org/wiki/x/JYAT).
* Also see [dnsprivacy.org](https://dnsprivacy.org) for more information on DNS Privacy. * Also see [dnsprivacy.org](https://dnsprivacy.org) for more information on DNS Privacy.
## Experimental support for GnuTLS
A project to allow user selection of either OpenSSL or GnuTLS is currently a work in progress. At present a user may select to use GnuTLS for the majority of the supported functionality, however, OpenSSL is still required for some cryptographic functions.
## Regression Tests ## Regression Tests
A suite of regression tests are included with the library, if you make changes or just A suite of regression tests are included with the library, if you make changes or just
want to sanity check things on your system take a look at src/test. You will need want to sanity check things on your system take a look at src/test. You will need
to install [libcheck](https://libcheck.github.io/check/). The check library is also available from many of the package repositories for the more popular operating systems. to install [libcheck](https://libcheck.github.io/check/). The check library is also available from many of the package repositories for the more popular operating systems.
Note: The tests currently do not run on Windows because of a dependancy on bash.
## DNSSEC dependencies ## DNSSEC dependencies
@ -130,7 +158,7 @@ The library will try to load the root trust anchor from
or more `DS` or `DNSKEY` resource records in presentation (i.e. zone file) or more `DS` or `DNSKEY` resource records in presentation (i.e. zone file)
format. Note that this is different than the format of BIND.keys. format. Note that this is different than the format of BIND.keys.
##$ Zero configuration DNSSEC ## Zero configuration DNSSEC
When the root trust anchor is not installed in the default location and a DNSSEC query is done, getdns will try to use the trust anchors published here: http://data.iana.org/root-anchors/root-anchors.xml . When the root trust anchor is not installed in the default location and a DNSSEC query is done, getdns will try to use the trust anchors published here: http://data.iana.org/root-anchors/root-anchors.xml .
It will validate these anchors with the ICANN Certificate Authority certificate following the procedure described in [RFC7958]. It will validate these anchors with the ICANN Certificate Authority certificate following the procedure described in [RFC7958].
@ -146,9 +174,7 @@ Support
## Mailing lists ## Mailing lists
We have a [getdns users list](https://getdnsapi.net/mailman/listinfo/users) for this implementation. We have a [getdns users list](https://lists.getdnsapi.net/mailman/listinfo/users) for this implementation.
The [getdns-api mailing list](https://getdnsapi.net/mailman/listinfo/spec) is a good place to engage in discussions regarding the design of the API.
## Tickets and Bug Reports ## Tickets and Bug Reports
@ -162,8 +188,8 @@ Features of this release
The goals of this implementation of the getdns API are: The goals of this implementation of the getdns API are:
* Provide an open source implementation, in C, of the formally described getdns API by getdns API team at <https://getdnsapi.net/spec.html> * Provide an open source implementation, in C, of the formally described getdns API by getdns API team at <https://getdnsapi.net/spec.html>
* Support FreeBSD, OSX, Linux (CentOS/RHEL, Ubuntu) via functional "configure" script * Support FreeBSD, OSX, Linux (CentOS/RHEL, Ubuntu)
* Support Windows 8.1 * Support Windows 10
* Include examples and tests as part of the build * Include examples and tests as part of the build
* Document code using doxygen * Document code using doxygen
* Leverage github as much as possible for project coordination * Leverage github as much as possible for project coordination
@ -204,69 +230,37 @@ Stub mode does not support:
# Supported Platforms # Supported Platforms
The primary platforms targeted are Linux and FreeBSD, other platform are supported as we get time. The names listed here are intended to help ensure that we catch platform specific breakage, not to limit the work that folks are doing. The platforms listed here are intended to help ensure that we catch platform specific breakage prior to release.
* RHEL/CentOS 6.4 * Ubuntu 18.04 LTS and newer LTS releases
* OSX 10.8 * Microsoft Windows 10
* Ubuntu 16.04 * FreeBSD 11.3 and newer
* Microsoft Windows 8.1 * RHEL/CentOS 8
* OSX 10.14 and 10.15
We intend to add Android and other platforms to future releases as we have time to port it.
## Platform Specific Build Reports ### Platform Specific Build Notes
[![Build Status](https://travis-ci.org/getdnsapi/getdns.png?branch=master)](https://travis-ci.org/getdnsapi/getdns) [![Build Status](https://travis-ci.org/getdnsapi/getdns.png?branch=master)](https://travis-ci.org/getdnsapi/getdns)
### FreeBSD ## FreeBSD
If you're using [FreeBSD](https://www.freebsd.org/), you may install getdns via the [ports tree](https://www.freshports.org/dns/getdns/) by running: `cd /usr/ports/dns/getdns && make install clean` If you're using [FreeBSD](https://www.freebsd.org/), you may install getdns via the [ports tree](https://www.freshports.org/dns/getdns/) by running: `cd /usr/ports/dns/getdns && make install clean`
If you are using FreeBSD 10 getdns can be intalled via 'pkg install getdns'. If you are using FreeBSD 10 getdns can be intalled via 'pkg install getdns'.
### CentOS and RHEL 6.5 ## Ubuntu
We rely on the most excellent package manager fpm to build the linux packages, which getdns should also work on Ubuntu 16.04, however if you require IDN functionality you will have to install a recent version of libidn2 via a ppa e.g. from https://launchpad.net/~ondrej/+archive/ubuntu/php
means that the packaging platform requires ruby 2.1.0. There are other ways to
build the packages; this is simply the one we chose to use.
# cat /etc/redhat-release You will also have to build Unbound from source code to provide libunbound at version >= 1.5.9.
CentOS release 6.5 (Final)
# uname -a
Linux host-10-1-1-6 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
# cd getdns-0.2.0rc1
# ./configure --prefix=/home/deploy/build
# make; make install
# cd /home/deploy/build
# mv lib lib64
# . /usr/local/rvm/config/alias
# fpm -x "*.la" -a native -s dir -t rpm -n getdns -v 0.2.0rc1 -d "unbound" -d "libevent" -d "libidn" --prefix /usr --vendor "Verisign Inc., NLnet Labs" --license "BSD New" --url "https://getdnsapi.net" --description "Modern asynchronous API to the DNS" .
### OSX ## OSX
# sw_vers A self-compiled version of OpenSSL or the version installed via Homebrew is required and the options OPENSSL_ROOT_DIR, OPENSSL_CRYPTO_LIBRARY and OPENSSL_SSL_LIBRARY can be used to specify the location of the libraries.
ProductName: Mac OS X
ProductVersion: 10.8.5
BuildVersion: 12F45
Built using PackageMaker, libevent2.
# ./configure --with-libevent --prefix=$HOME/getdnsosx/export
# make
# make install
edit/fix hardcoded paths in lib/*.la to reference /usr/local
update getdns.pmdoc to match release info
build package using PackageMaker
create dmg
A self-compiled version of OpenSSL or the version installed via Homebrew is required.
Note: If using a self-compiled version, manual configuration of certificates into /usr/local/etc/openssl/certs is required for TLS authentication to work. Note: If using a self-compiled version, manual configuration of certificates into /usr/local/etc/openssl/certs is required for TLS authentication to work.
#### Homebrew ### Homebrew
If you're using [Homebrew](http://brew.sh/), you may run `brew install getdns`. By default, this will only build the core library without any 3rd party event loop support. If you're using [Homebrew](http://brew.sh/), you may run `brew install getdns`. By default, this will only build the core library without any 3rd party event loop support.
@ -274,48 +268,37 @@ To install the [event loop integration libraries](https://getdnsapi.net/doxygen/
Note that in order to compile the examples, the `--with-libevent` switch is required. Note that in order to compile the examples, the `--with-libevent` switch is required.
Additionally, the OpenSSL library installed by Homebrew is linked against. Note that the Homebrew OpenSSL installation clones the Keychain certificates to the default OpenSSL location so TLS certificate authentication should work out of the box. Additionally, getdns is linked against the the OpenSSL library installed by Homebrew. Note that the Homebrew OpenSSL installation clones the Keychain certificates to the default OpenSSL location so TLS certificate authentication should work out of the box.
### Microsoft Windows 8.1 ## Microsoft Windows 10
The build has been tested using the following: You will need CMake for Windows. Installers can be downloaded from https://cmake.org/download/.
32 bit only Mingw: [Mingw(3.21.0) and Msys 1.0](http://www.mingw.org/) on Windows 8.1
32 bit build on a 64 bit Mingw [Download latest from: http://mingw-w64.org/doku.php/download/mingw-builds and http://msys2.github.io/]. IMPORTANT: Install tested ONLY on the "x86_64" for 64-bit installer of msys2.
#### Dependencies Windows versions of the following libraries are available using [the vcpkg package manager](https://docs.microsoft.com/en-us/cpp/build/vcpkg).
The following dependencies are
* openssl-1.0.2j
* libidn
Instructions to build openssl-1.0.2j: * OpenSSL
Open the mingw32_shell.bat from msys2 in order to build: * libevent
* libiconv (required for libidn2)
* libidn2
* libyaml
* libuv
If necessary, install the following using pacman: Once these are installed, set CMake variables CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to the vcpkg include and library directories e.g. `../vcpkg/installed/x64-windows/include` and `../vcpkg/installed/x64-windows/lib`.
pacman -S pkg-config libtool automake To generate a project suitable for use in Visual Studio, select the appropriate Visual Studio generator in CMake. Once generated, the cmake-gui Open Project button can be used to load the project into Visual Studio.
pacman -S autoconf automake-wrapper
tar -xvf openssl-1.0.2j.tar ### Limitations on Windows
cd openssl-1.0.2j/
./Configure --prefix=${LOCALDESTDIR} --openssldir=${LOCALDESTDIR}/etc/ssl --libdir=lib shared zlib-dynamic mingw
make
make install
To configure: Full support for Windows is a work in progress. The following limitations will be addresses in future:
./configure --enable-stub-only --with-trust-anchor="c:\\\MinGW\\\msys\\\1.0\\\etc\\\unbound\\\getdns-root.key" --with-ssl=<location of openssl from above> --with-getdns_query * At present, no native Windows DLL version of libunbound exists; support for linking against libunbound is not currently available. The default build option for ENABLE_STUB_ONLY_ is ON for Windows.
The trust anchor is also installed by unbound on `c:\program Files (X86)\unbound\root.key` and can be referenced from there * The getdns unit tests (built with `make test`) require libcheck which is not currently available for Windows and so cannot be built.
or anywhere else that the user chooses to configure it.
After configuring, do a `make` and `make install` to build getdns for Windows. * The getdns tpkg test suite is not currently supported on Windows.
Example test queries: * The detection of the location of the `/etc/hosts` file should be optimised - it currently assumes Windows is installed in the default directory on the C: drive
./getdns_query.exe -s gmadkat.com A @64.6.64.6 +return_call_reporting (UDP)
./getdns_query.exe -s gmadkat.com A @64.6.64.6 -T +return_call_reporting (TCP)
./getdns_query.exe -s gmadkat.com A -l L @185.49.141.37 +return_call_reporting (TLS without authentication)
./getdns_query.exe -s www.huque.com A +dnssec_return_status +return_call_reporting (DNSSEC)
Contributors Contributors
============ ============
@ -368,4 +351,4 @@ Contributors
Acknowledgements Acknowledgements
================ ================
The development team explicitly acknowledges Paul Hoffman for his initiative and efforts to develop a consensus based DNS API. We would like to thank the participants of the [mailing list](https://getdnsapi.net/mailman/listinfo/spec) for their contributions. The development team explicitly acknowledges Paul Hoffman for his initiative and efforts to develop a consensus based DNS API. We would like to thank the participants of the getdns-api mailing list (discontinued) for their contributions.

View File

@ -0,0 +1,528 @@
#ifndef CONFIG_H
#define CONFIG_H
#cmakedefine PACKAGE "@PACKAGE@"
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
#cmakedefine PACKAGE_URL "@PACKAGE_URL@"
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
#cmakedefine HAVE_ASSERT_H 1
#cmakedefine HAVE_INTTYPES_H 1
#cmakedefine HAVE_LIMITS_H 1
#cmakedefine HAVE_SYS_LIMITS_H 1
#cmakedefine HAVE_STDARG_H 1
#cmakedefine HAVE_STDINT_H 1
#cmakedefine HAVE_STDIO_H 1
#cmakedefine HAVE_STDLIB_H 1
#cmakedefine HAVE_STRING_H 1
#cmakedefine HAVE_TIME_H 1
#cmakedefine HAVE_UNISTD_H 1
#cmakedefine HAVE_FCNTL_H 1
#cmakedefine HAVE_SIGNAL_H 1
#cmakedefine HAVE_SYS_POLL_H 1
#cmakedefine HAVE_POLL_H 1
#cmakedefine HAVE_RESOURCE_H 1
#cmakedefine HAVE_SYS_TYPES_H 1
#cmakedefine HAVE_SYS_STAT_H 1
#cmakedefine HAVE_ENDIAN_H 1
#cmakedefine HAVE_NETDB_H 1
#cmakedefine HAVE_ARPA_INET_H 1
#cmakedefine HAVE_NETINET_IN_H 1
#cmakedefine HAVE_NETINET_TCP_H 1
#cmakedefine HAVE_SYS_SELECT_H 1
#cmakedefine HAVE_SYS_SOCKET_H 1
#cmakedefine HAVE_SYS_SYSCTL_H 1
#cmakedefine HAVE_SYS_TIME_H 1
#cmakedefine HAVE_SYS_WAIT_H 1
#cmakedefine HAVE_WINDOWS_H 1
#cmakedefine HAVE_WINSOCK_H 1
#cmakedefine HAVE_WINSOCK2_H 1
#cmakedefine HAVE_WS2TCPIP_H 1
#cmakedefine GETDNS_ON_WINDOWS 1
#cmakedefine USE_WINSOCK 1
#cmakedefine HAVE_SSL 1
#cmakedefine USE_DANESSL 1
#cmakedefine HAVE_OPENSSL_SSL_H 1
#cmakedefine HAVE_OPENSSL_EVP_H 1
#cmakedefine HAVE_OPENSSL_ERR_H 1
#cmakedefine HAVE_OPENSSL_RAND_H 1
#cmakedefine HAVE_OPENSSL_CONF_H 1
#cmakedefine HAVE_OPENSSL_ENGINE_H 1
#cmakedefine HAVE_DSA_SIG_SET0 1
#cmakedefine HAVE_DSA_SET0_PQG 1
#cmakedefine HAVE_DSA_SET0_KEY 1
#cmakedefine HAVE_RSA_SET0_KEY 1
#cmakedefine HAVE_EVP_MD5 1
#cmakedefine HAVE_EVP_SHA1 1
#cmakedefine HAVE_EVP_SHA224 1
#cmakedefine HAVE_EVP_SHA256 1
#cmakedefine HAVE_EVP_SHA384 1
#cmakedefine HAVE_EVP_SHA512 1
#cmakedefine HAVE_EVP_DSS1 1
#cmakedefine HAVE_EVP_DIGESTVERIFY 1
#cmakedefine HAVE_EVP_MD_CTX_NEW 1
#cmakedefine HAVE_HMAC_CTX_NEW 1
#cmakedefine HAVE_NETTLE_GET_SECP_256R1 1
#cmakedefine HAVE_NETTLE_GET_SECP_384R1 1
#cmakedefine HAVE_TLS_CLIENT_METHOD 1
#cmakedefine HAVE_OPENSSL_VERSION_NUM 1
#cmakedefine HAVE_OPENSSL_VERSION 1
#cmakedefine HAVE_SSL_CTX_DANE_ENABLE 1
#cmakedefine HAVE_SSL_CTX_SET_CIPHERSUITS 1
#cmakedefine HAVE_SSL_SET_CIPHERSUITS 1
#cmakedefine HAVE_OPENSSL_INIT_CRYPTO 1
#cmakedefine HAVE_SSL_DANE_ENABLE 1
#cmakedefine HAVE_DECL_SSL_CTX_SET1_CURVES_LIST 1
#cmakedefine HAVE_DECL_SSL_SET1_CURVES_LIST 1
#cmakedefine HAVE_DECL_SSL_SET_MIN_PROTO_VERSION 1
#cmakedefine HAVE_X509_GET_NOTAFTER 1
#cmakedefine HAVE_X509_GET0_NOTAFTER 1
#cmakedefine HAVE_PTHREAD 1
#cmakedefine HAVE_WINDOWS_THREADS 1
#cmakedefine RUNSTATEDIR "@RUNSTATEDIR@"
#cmakedefine TRUST_ANCHOR_FILE "@PATH_TRUST_ANCHOR_FILE@"
#cmakedefine GETDNS_FN_RESOLVCONF "@PATH_RESOLVCONF@"
#cmakedefine GETDNS_FN_HOSTS "@PATH_HOSTS@"
#cmakedefine DNSSEC_ROADBLOCK_AVOIDANCE 1
#cmakedefine HAVE_MDNS_SUPPORT 1
#cmakedefine STUB_NATIVE_DNSSEC 1
#cmakedefine MAXIMUM_UPSTREAM_OPTION_SPACE @MAXIMUM_UPSTREAM_OPTION_SPACE@
#cmakedefine EDNS_PADDING_OPCODE @EDNS_PADDING_OPCODE@
#cmakedefine MAX_CNAME_REFERRALS @MAX_CNAME_REFERRALS@
#cmakedefine DRAFT_RRTYPES @DRAFT_RRTYPES@
#cmakedefine EDNS_COOKIES 1
#cmakedefine EDNS_COOKIE_OPCODE @EDNS_COOKIE_OPCODE@
#cmakedefine EDNS_COOKIE_ROLLOVER_TIME @EDNS_COOKIE_ROLLOVER_TIME@
#cmakedefine UDP_MAX_BACKOFF @MAX_UDP_BACKOFF@
#cmakedefine HAVE_DECL_GETENTROPY 1
#cmakedefine HAVE_DECL_INET_PTON 1
#cmakedefine HAVE_DECL_INET_NTOP 1
#cmakedefine HAVE_WIN_DECL_INET_PTON 1
#cmakedefine HAVE_WIN_DECL_INET_NTOP 1
#cmakedefine HAVE_DECL_MKSTEMP 1
#cmakedefine HAVE_DECL_SIGEMPTYSET 1
#cmakedefine HAVE_DECL_SIGFILLSET 1
#cmakedefine HAVE_DECL_SIGADDSET 1
#cmakedefine HAVE_DECL_STRPTIME 1
#cmakedefine HAVE_DECL_TCP_FASTOPEN 1
#cmakedefine HAVE_DECL_TCP_FASTOPEN_CONNECT 1
#cmakedefine HAVE_DECL_MSG_FASTOPEN 1
#if defined(HAVE_DECL_INET_PTON) || defined(HAVE_WIN_DECL_INET_PTON)
#undef HAVE_DECL_INET_PTON
#define HAVE_DECL_INET_PTON 1
#endif
#if defined(HAVE_DECL_INET_NTOP) || defined(HAVE_WIN_DECL_INET_NTOP)
#undef HAVE_DECL_INET_NTOP
#define HAVE_DECL_INET_NTOP 1
#endif
#cmakedefine HAVE_FCNTL 1
#cmakedefine HAVE_GETTIMEOFDAY 1
#cmakedefine HAVE_IOCTLSOCKET 1
#cmakedefine HAVE_SIGEMPTYSET 1
#cmakedefine HAVE_SIGFILLSET 1
#cmakedefine HAVE_SIGADDSET 1
#cmakedefine HAVE_STRPTIME 1
#cmakedefine HAVE_SIGSET_T 1
#cmakedefine HAVE__SIGSET_T 1
#cmakedefine HAVE_BSD_STDLIB_H 1
#cmakedefine HAVE_BSD_STRING_H 1
#cmakedefine HAVE_DECL_STRLCPY 1
#cmakedefine HAVE_DECL_ARC4RANDOM 1
#cmakedefine HAVE_DECL_ARC4RANDOM_UNIFORM 1
#cmakedefine HAVE_BSD_DECL_STRLCPY 1
#cmakedefine HAVE_BSD_DECL_ARC4RANDOM 1
#cmakedefine HAVE_BSD_DECL_ARC4RANDOM_UNIFORM 1
#cmakedefine HAVE_STRLCPY 1
#cmakedefine HAVE_ARC4RANDOM 1
#cmakedefine HAVE_ARC4RANDOM_UNIFORM 1
#cmakedefine HAVE_LIBUNBOUND 1
#cmakedefine HAVE_UNBOUND_EVENT_H 1
#cmakedefine HAVE_UNBOUND_EVENT_API 1
#cmakedefine HAVE_UB_CTX_SET_STUB 1
#cmakedefine HAVE_LIBIDN 1
#cmakedefine HAVE_LIBIDN2 1
#cmakedefine HAVE_NETTLE 1
#cmakedefine HAVE_NETTLE_DSA_COMPAT_H 1
#cmakedefine HAVE_NETTLE_EDDSA_H 1
#cmakedefine HAVE_EVENT2_EVENT_H 1
#cmakedefine HAVE_EVENT_BASE_NEW 1
#cmakedefine HAVE_EVENT_BASE_FREE 1
#cmakedefine DEFAULT_EVENTLOOP "@DEFAULT_EVENTLOOP@"
#cmakedefine USE_POLL_DEFAULT_EVENTLOOP 1
#cmakedefine STRPTIME_WORKS 1
#cmakedefine FD_SETSIZE @FD_SETSIZE@
#cmakedefine REQ_DEBUG 1
#cmakedefine SCHED_DEBUG 1
#cmakedefine STUB_DEBUG 1
#cmakedefine DAEMON_DEBUG 1
#cmakedefine SEC_DEBUG 1
#cmakedefine SERVER_DEBUG 1
#cmakedefine ANCHOR_DEBUG 1
#cmakedefine KEEP_CONNECTIONS_OPEN_DEBUG 1
#cmakedefine USE_SHA1 1
#cmakedefine USE_SHA2 1
#cmakedefine USE_GOST 1
#cmakedefine USE_ECDSA 1
#cmakedefine USE_DSA 1
#cmakedefine USE_ED25519 1
#cmakedefine USE_ED448 1
#cmakedefine USE_OSX_TCP_FASTOPEN 1
#cmakedefine HAVE_NEW_UV_TIMER_CB 1
#cmakedefine HAVE_TARGET_ENDIANNESS
#cmakedefine TARGET_IS_BIG_ENDIAN
#cmakedefine HAVE___FUNC__ 1
#ifdef HAVE___FUNC__
#define __FUNC__ __func__
#else
#define __FUNC__ __FUNCTION__
#endif
#ifdef GETDNS_ON_WINDOWS
/* On windows it is allowed to increase the FD_SETSIZE
* (and nescessary to make our custom eventloop work)
* See: https://support.microsoft.com/en-us/kb/111855
*/
# ifndef FD_SETSIZE
# define FD_SETSIZE 1024
# endif
/* the version of the windows API enabled */
# ifndef WINVER
# define WINVER 0x0600 // 0x0502
# endif
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0600 // 0x0502
# endif
# ifdef HAVE_WS2TCPIP_H
# include <ws2tcpip.h>
# endif
# ifdef _MSC_VER
# if _MSC_VER >= 1800
# define PRIsz "zu"
# else
# define PRIsz "Iu"
# endif
# include <BaseTsd.h>
typedef SSIZE_T ssize_t;
# else
# define PRIsz "Iu"
# endif
# ifdef HAVE_WINSOCK2_H
# include <winsock2.h>
# endif
/* detect if we need to cast to unsigned int for FD_SET to avoid warnings */
# ifdef HAVE_WINSOCK2_H
# define FD_SET_T (u_int)
# else
# define FD_SET_T
# endif
/* Windows wants us to use _strdup instead of strdup */
# ifndef strdup
# define strdup _strdup
# endif
/* Windows doesn't have strcasecmp and strncasecmp. */
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
#else
# define PRIsz "zu"
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_ASSERT_H
#include <assert.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
#ifdef HAVE_BSD_STDLIB_H
#include <bsd/stdlib.h>
#endif
#ifdef HAVE_BSD_STRING_H
#include <bsd/string.h>
#endif
#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY || !defined(strlcpy)
size_t strlcpy(char *dst, const char *src, size_t siz);
#else
#ifndef __BSD_VISIBLE
#define __BSD_VISIBLE 1
#endif
#endif
#if !defined(HAVE_ARC4RANDOM) || !HAVE_DECL_ARC4RANDOM
uint32_t arc4random(void);
#endif
#if !defined(HAVE_ARC4RANDOM_UNIFORM) || !HAVE_DECL_ARC4RANDOM_UNIFORM
uint32_t arc4random_uniform(uint32_t upper_bound);
#endif
#ifndef HAVE_ARC4RANDOM
void explicit_bzero(void* buf, size_t len);
int getentropy(void* buf, size_t len);
void arc4random_buf(void* buf, size_t n);
void _ARC4_LOCK(void);
void _ARC4_UNLOCK(void);
#endif
#ifdef COMPAT_SHA512
#ifndef SHA512_DIGEST_LENGTH
#define SHA512_BLOCK_LENGTH 128
#define SHA512_DIGEST_LENGTH 64
#define SHA512_DIGEST_STRING_LENGTH (SHA512_DIGEST_LENGTH * 2 + 1)
typedef struct _SHA512_CTX {
uint64_t state[8];
uint64_t bitcount[2];
uint8_t buffer[SHA512_BLOCK_LENGTH];
} SHA512_CTX;
#endif /* SHA512_DIGEST_LENGTH */
void SHA512_Init(SHA512_CTX*);
void SHA512_Update(SHA512_CTX*, void*, size_t);
void SHA512_Final(uint8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
unsigned char *SHA512(void* data, unsigned int data_len, unsigned char *digest);
#endif /* COMPAT_SHA512 */
#ifdef USE_WINSOCK
# ifndef _CUSTOM_VSNPRINTF
# define _CUSTOM_VSNPRINTF
static inline int _gldns_custom_vsnprintf(char *str, size_t size, const char *format, va_list ap)
{ int r = vsnprintf(str, size, format, ap); return r == -1 ? _vscprintf(format, ap) : r; }
# define vsnprintf _gldns_custom_vsnprintf
# endif
#endif
#ifdef __cplusplus
}
#endif
/** Use on-board gldns */
#define USE_GLDNS 1
#ifdef HAVE_SSL
# define GLDNS_BUILD_CONFIG_HAVE_SSL 1
#endif
#ifdef HAVE_STDARG_H
#include <stdarg.h>
#endif
#include <errno.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef HAVE_SYS_LIMITS_H
#include <sys/limits.h>
#endif
#ifdef PATH_MAX
#define _GETDNS_PATH_MAX PATH_MAX
#else
#define _GETDNS_PATH_MAX 2048
#endif
#ifndef PRIu64
#define PRIu64 "llu"
#endif
#ifdef HAVE_ATTR_FORMAT
# define ATTR_FORMAT(archetype, string_index, first_to_check) \
__attribute__ ((format (archetype, string_index, first_to_check)))
#else /* !HAVE_ATTR_FORMAT */
# define ATTR_FORMAT(archetype, string_index, first_to_check) /* empty */
#endif /* !HAVE_ATTR_FORMAT */
#if defined(DOXYGEN)
# define ATTR_UNUSED(x) x
#elif defined(__cplusplus)
# define ATTR_UNUSED(x)
#elif defined(HAVE_ATTR_UNUSED)
# define ATTR_UNUSED(x) x __attribute__((unused))
#else /* !HAVE_ATTR_UNUSED */
# define ATTR_UNUSED(x) x
#endif /* !HAVE_ATTR_UNUSED */
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
#define strptime unbound_strptime
struct tm;
char *strptime(const char *s, const char *format, struct tm *tm);
#endif
#if !defined(HAVE_SIGSET_T) && defined(HAVE__SIGSET_T)
typedef _sigset_t sigset_t;
#endif
#if !defined(HAVE_SIGEMPTYSET)
# define sigemptyset(pset) (*(pset) = 0)
#endif
#if !defined(HAVE_SIGFILLSET)
# define sigfillset(pset) (*(pset) = (sigset_t)-1)
#endif
#if !defined(HAVE_SIGADDSET)
# define sigaddset(pset, num) (*(pset) |= (1L<<(num)))
#endif
#ifdef HAVE_LIBUNBOUND
# include <unbound.h>
# ifdef HAVE_UNBOUND_EVENT_H
# include <unbound-event.h>
# else
# ifdef HAVE_UNBOUND_EVENT_API
# ifndef _UB_EVENT_PRIMITIVES
# define _UB_EVENT_PRIMITIVES
struct ub_event_base;
struct ub_ctx* ub_ctx_create_ub_event(struct ub_event_base* base);
typedef void (*ub_event_callback_t)(void*, int, void*, int, int, char*);
int ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
int rrclass, void* mydata, ub_event_callback_t callback, int* async_id);
# endif
# endif
# endif
#endif
#ifndef HAVE_DECL_INET_PTON
int inet_pton(int af, const char* src, void* dst);
#endif
#ifndef HAVE_DECL_INET_NTOP
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
#endif
#ifndef HAVE_DECL_MKSTEMP
int mkstemp(char *template);
#endif
#ifndef HAVE_GETTIMEOFDAY
int gettimeofday(struct timeval* tv, void* tz);
#endif
#ifdef __cplusplus
}
#endif
#endif /* CONFIG_H */

View File

@ -0,0 +1,19 @@
1 VERSIONINFO
FILEVERSION @version_current@,@version_revision@,@version_age@,0
PRODUCTVERSION @version_current@,@version_revision@,0,0
FILEOS 4
FILETYPE 2
FILESUBTYPE 0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "getdns project\0"
VALUE "ProductName", "getdns\0"
VALUE "FileVersion", "@version_current@.@version_revision@\0"
VALUE "ProductVersion", "@version_current@.@version_revision@\0"
VALUE "LegalCopyright", "NLnet Labs, Sinodun, No Mountain Software. New BSD licence.\0"
END
END
END

View File

@ -0,0 +1,98 @@
#[=======================================================================[.rst:
FindCheck
--------
Find the Check (Unit Testing Framework for C) library
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` targets:
``Check::Check``
The Check library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``Check_FOUND``
If false, do not try to use Check.
``CHECK_INCLUDE_DIR``
where to find check.h, etc.
``CHECK_LIBRARIES``
the libraries needed to use Check.
``CHECK_VERSION``
the version of the Check library found
#]=======================================================================]
find_path(CHECK_INCLUDE_DIR check.h
HINTS
"${CHECK_DIR}"
"${CHECK_DIR}/include"
)
# Check for PIC and non-PIC libraries. If PIC present, use that
# in preference (as per Debian check.pc).
find_library(CHECK_LIBRARY NAMES check_pic libcheck_pic
HINTS
"${CHECK_DIR}"
"${CHECK_DIR}/lib"
)
if (NOT CHECK_LIBRARY)
find_library(CHECK_LIBRARY NAMES check libcheck
HINTS
"${CHECK_DIR}"
"${CHECK_DIR}/lib"
)
endif ()
set(CHECK_LIBRARIES "")
# Check may need the math, subunit and rt libraries on Unix
if (UNIX)
find_library(CHECK_MATH_LIBRARY m)
find_library(CHECK_RT_LIBRARY rt)
find_library(CHECK_SUBUNIT_LIBRARY subunit)
if (CHECK_MATH_LIBRARY)
list(APPEND CHECK_LIBRARIES "${CHECK_MATH_LIBRARY}")
endif ()
if (CHECK_RT_LIBRARY)
list(APPEND CHECK_LIBRARIES "${CHECK_RT_LIBRARY}")
endif ()
if (CHECK_SUBUNIT_LIBRARY)
list(APPEND CHECK_LIBRARIES "${CHECK_SUBUNIT_LIBRARY}")
endif ()
endif()
if (CHECK_INCLUDE_DIR AND CHECK_LIBRARY)
if (NOT TARGET Check::Check)
add_library(Check::Check UNKNOWN IMPORTED)
set_target_properties(Check::Check PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CHECK_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${CHECK_LIBRARIES}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${CHECK_LIBRARY}"
)
endif ()
if (NOT CHECK_VERSION AND CHECK_INCLUDE_DIR AND EXISTS "${CHECK_INCLUDE_DIR}/check.h")
file(STRINGS "${CHECK_INCLUDE_DIR}/check.h" CHECK_H REGEX "^#define CHECK_M[A-Z]+_VERSION")
string(REGEX REPLACE "^.*\(([0-9]+)\).*\(([0-9]+)\).*\(([0-9]+)\).*$" "\\1.\\2.\\3" CHECK_VERSION "${CHECK_H}")
endif ()
endif()
list(APPEND CHECK_LIBRARIES "${CHECK_LIBRARY}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Check
REQUIRED_VARS CHECK_LIBRARIES CHECK_INCLUDE_DIR
VERSION_VAR CHECK_VERSION
)
mark_as_advanced(CHECK_INCLUDE_DIR CHECK_LIBRARIES CHECK_LIBRARY
CHECK_MATH_LIBRARY CHECK_RT_LIBRARY CHECK_SUBUNIT_LIBRARY)

View File

@ -0,0 +1,85 @@
#[=======================================================================[.rst:
FindGnuTLS
----------
Find the GnuTLS library.
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` targets:
``GnuTLS::GnuTLS``
The GnuTLS library, if found.
``GnuTLS::Dane``
The GnuTLS DANE library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``GnuTLS_FOUND``
If false, do not try to use GnuTLS.
``GNUTLS_INCLUDE_DIR``
where to find GnuTLS headers.
``GNUTLS_LIBRARIES``
the libraries needed to use GnuTLS.
``GNUTLS_VERSION``
the version of the GnuTLS library found
#]=======================================================================]
find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h
HINTS
"${GNUTLS_DIR}"
"${GNUTLS_DIR}/include"
)
find_library(GNUTLS_LIBRARY NAMES gnutls libgnutls
HINTS
"${GNUTLS_DIR}"
"${GNUTLS_DIR}/lib"
)
find_library(GNUTLS_DANE_LIBRARY NAMES gnutls-dane libgnutls-dane
HINTS
"${GNUTLS_DIR}"
"${GNUTLS_DIR}/lib"
)
set(GNUTLS_LIBRARIES "")
if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARY AND GNUTLS_DANE_LIBRARY)
if (NOT TARGET GnuTLS::GnuTLS)
add_library(GnuTLS::GnuTLS UNKNOWN IMPORTED)
set_target_properties(GnuTLS::GnuTLS PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${GNUTLS_LIBRARY}"
)
endif ()
if (NOT TARGET GnuTLS::Dane)
add_library(GnuTLS::Dane UNKNOWN IMPORTED)
set_target_properties(GnuTLS::Dane PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${GNUTLS_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${GNUTLS_DANE_LIBRARY}"
)
endif ()
if (NOT GNUTLS_VERSION AND GNUTLS_INCLUDE_DIR)
file(STRINGS "${GNUTLS_INCLUDE_DIR}/gnutls/gnutls.h" GNUTLS_VER_H REGEX "^#define GNUTLS_VERSION_(MAJOR|MINOR|PATCH) ")
string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3c" GNUTLS_VERSION "${GNUTLS_VER_H}")
endif ()
endif()
list(APPEND GNUTLS_LIBRARIES "${GNUTLS_LIBRARY}" "${GNUTLS_DANE_LIBRARY}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GnuTLS
REQUIRED_VARS GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR
VERSION_VAR GNUTLS_VERSION
)
mark_as_advanced(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARIES GNUTLS_LIBRARY GNUTLS_DANE_LIBRARY)

View File

@ -0,0 +1,63 @@
#[=======================================================================[.rst:
FindLibev
---------
Find the Libev library.
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` targets:
``Libev::Libev``
The Libev library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``Libev_FOUND``
If false, do not try to use Libev.
``LIBEV_INCLUDE_DIR``
where to find libev headers.
``LIBEV_LIBRARIES``
the libraries needed to use Libev.
``LIBEV_VERSION``
the version of the Libev library found
#]=======================================================================]
find_path(LIBEV_INCLUDE_DIR ev.h
HINTS
"${LIBEV_DIR}"
"${LIBEV_DIR}/include"
)
find_library(LIBEV_LIBRARY NAMES ev libev
HINTS
"${LIBEV_DIR}"
"${LIBEV_DIR}/lib"
)
set(LIBEV_LIBRARIES "")
if (LIBEV_INCLUDE_DIR AND LIBEV_LIBRARY)
if (NOT TARGET Libev::Libev)
add_library(Libev::Libev UNKNOWN IMPORTED)
set_target_properties(Libev::Libev PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBEV_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LIBEV_LIBRARY}"
)
endif ()
endif()
list(APPEND LIBEV_LIBRARIES "${LIBEV_LIBRARY}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libev
REQUIRED_VARS LIBEV_LIBRARIES LIBEV_INCLUDE_DIR
)
mark_as_advanced(LIBEV_INCLUDE_DIR LIBEV_LIBRARIES LIBEV_LIBRARY)

View File

@ -0,0 +1,69 @@
#[=======================================================================[.rst:
FindLibevent2
-------------
Find the Libevent2 library. For now this finds the core library only.
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` targets:
``Libevent2::Libevent_core``
The Libevent2 library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``Libevent2_FOUND``
If false, do not try to use Libevent2.
``LIBEVENT2_INCLUDE_DIR``
where to find libevent headers.
``LIBEVENT2_LIBRARIES``
the libraries needed to use Libevent2.
``LIBEVENT2_VERSION``
the version of the Libevent2 library found
#]=======================================================================]
find_path(LIBEVENT2_INCLUDE_DIR event2/event.h
HINTS
"${LIBEVENT2_DIR}"
"${LIBEVENT2_DIR}/include"
)
find_library(LIBEVENT2_LIBRARY NAMES event_core libevent_core
HINTS
"${LIBEVENT2_DIR}"
"${LIBEVENT2_DIR}/lib"
)
set(LIBEVENT2_LIBRARIES "")
if (LIBEVENT2_INCLUDE_DIR AND LIBEVENT2_LIBRARY)
if (NOT TARGET Libevent2::Libevent_core)
add_library(Libevent2::Libevent_core UNKNOWN IMPORTED)
set_target_properties(Libevent2::Libevent_core PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBEVENT2_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LIBEVENT2_LIBRARY}"
)
endif ()
if (NOT LIBEVENT2_VERSION AND LIBEVENT2_INCLUDE_DIR AND EXISTS "${LIBEVENT2_INCLUDE_DIR}/event2/event.h")
file(STRINGS "${LIBEVENT2_INCLUDE_DIR}/event2/event-config.h" LIBEVENT2_H REGEX "^#define _?EVENT_+VERSION ")
string(REGEX REPLACE "^.*EVENT_+VERSION \"([^\"]+)\".*$" "\\1" LIBEVENT2_VERSION "${LIBEVENT2_H}")
endif ()
endif()
list(APPEND LIBEVENT2_LIBRARIES "${LIBEVENT2_LIBRARY}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libevent2
REQUIRED_VARS LIBEVENT2_LIBRARIES LIBEVENT2_INCLUDE_DIR
VERSION_VAR LIBEVENT2_VERSION
)
mark_as_advanced(LIBEVENT2_INCLUDE_DIR LIBEVENT2_LIBRARIES LIBEVENT2_LIBRARY)

View File

@ -0,0 +1,69 @@
#[=======================================================================[.rst:
FindLibidn2
-----------
Find the Libidn2 library
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` targets:
``Libidn2::Libidn2``
The Libidn2 library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``Libidn2_FOUND``
If false, do not try to use Libidn2.
``LIBIDN2_INCLUDE_DIR``
where to find libidn2 headers.
``LIBIDN2_LIBRARIES``
the libraries needed to use Libidn2.
``LIBIDN2_VERSION``
the version of the Libidn2 library found
#]=======================================================================]
find_path(LIBIDN2_INCLUDE_DIR idn2.h
HINTS
"${LIBIDN2_DIR}"
"${LIBIDN2_DIR}/include"
)
find_library(LIBIDN2_LIBRARY NAMES idn2 libidn2
HINTS
"${LIBIDN2_DIR}"
"${LIBIDN2_DIR}/lib"
)
set(LIBIDN2_LIBRARIES "")
if (LIBIDN2_INCLUDE_DIR AND LIBIDN2_LIBRARY)
if (NOT TARGET Libidn2::Libidn2)
add_library(Libidn2::Libidn2 UNKNOWN IMPORTED)
set_target_properties(Libidn2::Libidn2 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBIDN2_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LIBIDN2_LIBRARY}"
)
endif ()
if (NOT LIBIDN2_VERSION AND LIBIDN2_INCLUDE_DIR AND EXISTS "${LIBIDN2_INCLUDE_DIR}/unbound.h")
file(STRINGS "${LIBIDN2_INCLUDE_DIR}/idn2.h" LIBIDN2_H REGEX "^#define IDN2_VERSION ")
string(REGEX REPLACE "^.*IDN2_VERSION \"([0-9.]+)\".*$" "\\1" LIBIDN2_VERSION "${LIBIDN2_H}")
endif ()
endif()
list(APPEND LIBIDN2_LIBRARIES "${LIBIDN2_LIBRARY}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libidn2
REQUIRED_VARS LIBIDN2_LIBRARIES LIBIDN2_INCLUDE_DIR
VERSION_VAR LIBIDN2_VERSION
)
mark_as_advanced(LIBIDN2_INCLUDE_DIR LIBIDN2_LIBRARIES LIBIDN2_LIBRARY)

View File

@ -0,0 +1,90 @@
#[=======================================================================[.rst:
FindLibunbound
--------------
Find the Libunbound library
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` targets:
``Libunbound::Libunbound``
The Libunbound library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``Libunbound_FOUND``
If false, do not try to use Libunbound.
``LIBUNBOUND_INCLUDE_DIR``
where to find libunbound headers.
``LIBUNBOUND_LIBRARIES``
the libraries needed to use Libunbound.
``LIBUNBOUND_VERSION``
the version of the Libunbound library found
#]=======================================================================]
find_path(LIBUNBOUND_INCLUDE_DIR unbound.h
HINTS
"${LIBUNBOUND_DIR}"
"${LIBUNBOUND_DIR}/include"
)
find_library(LIBUNBOUND_LIBRARY NAMES unbound
HINTS
"${LIBUNBOUND_DIR}"
"${LIBUNBOUND_DIR}/lib"
)
set(LIBUNBOUND_LIBRARIES "")
if (UNIX)
find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED)
list(APPEND LIBUNBOUND_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
list(APPEND LIBUNBOUND_LIBRARIES "${OPENSSL_LIBRARIES}")
endif()
if (LIBUNBOUND_INCLUDE_DIR AND LIBUNBOUND_LIBRARY)
if (NOT TARGET Libunbound::Libunbound)
add_library(Libunbound::Libunbound UNKNOWN IMPORTED)
set_target_properties(Libunbound::Libunbound PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBUNBOUND_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LIBUNBOUND_LIBRARY}"
)
if(UNIX AND TARGET Threads::Threads)
set_property(TARGET Libunbound::Libunbound APPEND PROPERTY
INTERFACE_LINK_LIBRARIES Threads::Threads)
endif ()
if(UNIX AND TARGET OpenSSL::SSL)
set_property(TARGET Libunbound::Libunbound APPEND PROPERTY
INTERFACE_LINK_LIBRARIES OpenSSL::SSL)
endif ()
if(UNIX AND TARGET OpenSSL::Crypto)
set_property(TARGET Libunbound::Libunbound APPEND PROPERTY
INTERFACE_LINK_LIBRARIES OpenSSL::Crypto)
endif ()
endif ()
if (NOT LIBUNBOUND_VERSION AND LIBUNBOUND_INCLUDE_DIR AND EXISTS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h")
file(STRINGS "${LIBUNBOUND_INCLUDE_DIR}/unbound.h" LIBUNBOUND_H REGEX "^#define UNBOUND_VERSION_M[A-Z]+")
string(REGEX REPLACE "^.*MAJOR ([0-9]+).*MINOR ([0-9]+).*MICRO ([0-9]+).*$" "\\1.\\2.\\3" LIBUNBOUND_VERSION "${LIBUNBOUND_H}")
endif ()
endif()
list(APPEND LIBUNBOUND_LIBRARIES "${LIBUNBOUND_LIBRARY}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libunbound
REQUIRED_VARS LIBUNBOUND_LIBRARIES LIBUNBOUND_INCLUDE_DIR
VERSION_VAR LIBUNBOUND_VERSION
)
mark_as_advanced(LIBUNBOUND_INCLUDE_DIR LIBUNBOUND_LIBRARIES LIBUNBOUND_LIBRARY)

View File

@ -0,0 +1,73 @@
#[=======================================================================[.rst:
FindLibuv
---------
Find the Libuv library.
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` targets:
``Libuv::Libuv``
The Libuv library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``Libuv_FOUND``
If false, do not try to use Libuv.
``LIBUV_INCLUDE_DIR``
where to find libuv headers.
``LIBUV_LIBRARIES``
the libraries needed to use Libuv.
``LIBUV_VERSION``
the version of the Libuv library found
#]=======================================================================]
find_path(LIBUV_INCLUDE_DIR uv.h
HINTS
"${LIBUV_DIR}"
"${LIBUV_DIR}/include"
)
find_library(LIBUV_LIBRARY NAMES uv libuv
HINTS
"${LIBUV_DIR}"
"${LIBUV_DIR}/lib"
)
set(LIBUV_LIBRARIES "")
if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARY)
if (NOT TARGET Libuv::Libuv)
add_library(Libuv::Libuv UNKNOWN IMPORTED)
set_target_properties(Libuv::Libuv PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBUV_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${LIBUV_LIBRARY}"
)
endif ()
if (NOT LIBUV_VERSION AND LIBUV_INCLUDE_DIR)
if (EXISTS "${LIBUV_INCLUDE_DIR}/uv-version.h")
file(STRINGS "${LIBUV_INCLUDE_DIR}/uv-version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ")
elseif (EXISTS "${LIBUV_INCLUDE_DIR}/uv/version.h")
file(STRINGS "${LIBUV_INCLUDE_DIR}/uv/version.h" LIBUV_VER_H REGEX "^#define UV_VERSION_(MAJOR|MINOR|PATCH) ")
endif ()
string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*_PATCH ([0-9]+).*$" "\\1.\\2.\\3" LIBUV_VERSION "${LIBUV_VER_H}")
endif ()
endif()
list(APPEND LIBUV_LIBRARIES "${LIBUV_LIBRARY}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Libuv
REQUIRED_VARS LIBUV_LIBRARIES LIBUV_INCLUDE_DIR
VERSION_VAR LIBUV_VERSION
)
mark_as_advanced(LIBUV_INCLUDE_DIR LIBUV_LIBRARIES LIBUV_LIBRARY)

View File

@ -0,0 +1,95 @@
#[=======================================================================[.rst:
FindNettle
----------
Find the Nettle library.
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` targets:
``Nettle::Nettle``
The Nettle library, if found.
``Nettle::Hogweed``
The Hogweed library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``Nettle_FOUND``
If false, do not try to use Nettle.
``NETTLE_INCLUDE_DIR``
where to find Nettle headers.
``NETTLE_LIBRARIES``
the libraries needed to use Nettle.
``NETTLE_VERSION``
the version of the Nettle library found
#]=======================================================================]
find_path(NETTLE_INCLUDE_DIR nettle/version.h
HINTS
"${NETTLE_DIR}"
"${NETTLE_DIR}/include"
)
find_library(NETTLE_LIBRARY NAMES nettle libnettle
HINTS
"${NETTLE_DIR}"
"${NETTLE_DIR}/lib"
)
find_library(HOGWEED_LIBRARY NAMES hogweed libhogweed
HINTS
"${NETTLE_DIR}"
"${NETTLE_DIR}/lib"
)
set(NETTLE_LIBRARIES "")
# May need gmp library on Unix.
if (UNIX)
find_library(NETTLE_GMP_LIBRARY gmp)
if (NETTLE_GMP_LIBRARY)
list(APPEND NETTLE_LIBRARIES "${NETTLE_GMP_LIBRARY}")
endif ()
endif ()
if (NETTLE_INCLUDE_DIR AND NETTLE_LIBRARY AND HOGWEED_LIBRARY)
if (NOT TARGET Nettle::Nettle)
add_library(Nettle::Nettle UNKNOWN IMPORTED)
set_target_properties(Nettle::Nettle PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES "${NETTLE_LIBRARIES}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${NETTLE_LIBRARY}"
)
endif ()
if (NOT TARGET Nettle::Hogweed)
add_library(Nettle::Hogweed UNKNOWN IMPORTED)
set_target_properties(Nettle::Hogweed PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${NETTLE_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${HOGWEED_LIBRARY}"
)
endif ()
if (NOT NETTLE_VERSION AND NETTLE_INCLUDE_DIR)
file(STRINGS "${NETTLE_INCLUDE_DIR}/nettle/version.h" NETTLE_VER_H REGEX "^#define NETTLE_VERSION_(MAJOR|MINOR) ")
string(REGEX REPLACE "^.*_MAJOR ([0-9]+).*_MINOR ([0-9]+).*$" "\\1.\\2" NETTLE_VERSION "${NETTLE_VER_H}")
endif ()
endif()
list(APPEND NETTLE_LIBRARIES "${NETTLE_LIBRARY}" "${HOGWEED_LIBRARY}")
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Nettle
REQUIRED_VARS NETTLE_LIBRARIES NETTLE_INCLUDE_DIR
VERSION_VAR NETTLE_VERSION
)
mark_as_advanced(NETTLE_INCLUDE_DIR NETTLE_LIBRARIES NETTLE_LIBRARY HOGWEED_LIBRARY)

View File

@ -0,0 +1,27 @@
# Export only named entry points from shared library.
function(target_shared_library_exports lib libname symbols)
if (WIN32)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.def" "LIBRARY ${libname}\n EXPORTS\n")
foreach (symbol IN LISTS symbols)
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.def" " ${symbol}\n")
endforeach ()
target_sources(${lib} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.def")
elseif (APPLE)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.syms" "")
foreach (symbol IN LISTS symbols)
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.syms" "_${symbol}\n")
endforeach ()
target_sources(${lib} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.syms")
target_link_libraries(${lib} PRIVATE "-exported_symbols_list ${libname}.syms")
elseif (UNIX)
# Assume GNU ld.
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${libname}.ver" "{ global:\n")
foreach (symbol IN LISTS symbols)
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.ver" " ${symbol};\n")
endforeach ()
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/${libname}.ver" "local:\n *;\n};\n")
target_link_libraries(${lib} PRIVATE "-Wl,--version-script=getdns.ver")
else ()
message(WARNING "Unknown platform, ${lib} exports not set.")
endif ()
endfunction ()

View File

@ -0,0 +1,25 @@
# Add version to given shared library linkage.
function(target_shared_library_version lib version_current version_revision version_age)
if (APPLE)
# Follow libtool. Add one to major version, as version 0 doesn't work.
# But tag dynlib name with current-age.
math(EXPR major_version "${version_current}+1")
math(EXPR dynlib_version "${version_current}-${version_age}")
set_target_properties(${lib} PROPERTIES VERSION "${dynlib_version}")
target_link_libraries(${lib} PRIVATE "-compatibility_version ${major_version}")
target_link_libraries(${lib} PRIVATE "-current_version ${major_version}.${version_revision}")
elseif (UNIX OR MINGW OR MSYS OR CYGWIN)
# Assume GNU ld, and again follow libtool. Major version is current-age.
math(EXPR compat_version "${version_current}-${version_age}")
set_target_properties(${lib} PROPERTIES VERSION "${compat_version}.${version_age}.${version_revision}" SOVERSION "${compat_version}")
elseif (WIN32)
set(rc_template "${CMAKE_CURRENT_SOURCE_DIR}/cmake/include/${lib}_version.rc.in")
if (EXISTS ${rc_template})
configure_file(${rc_template} ${lib}.rc @ONLY)
target_sources(${lib} PRIVATE ${lib}.rc)
endif ()
target_link_libraries(${lib} PRIVATE "-VERSION:${version_current}.${version_revision}")
else ()
message(WARNING "Unknown platform, ${lib} will not be versioned.")
endif ()
endfunction ()

View File

@ -0,0 +1,4 @@
int main (int ac, char *av[])
{
char *s = __func__;
}

11
cmake/tests/test_poll.c Normal file
View File

@ -0,0 +1,11 @@
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
#else
#include <poll.h>
#endif
int main (int ac, char *av[])
{
int rc;
rc = poll((struct pollfd *)(0), 0, 0);
}

12
cmake/tests/test_uv_cb.c Normal file
View File

@ -0,0 +1,12 @@
#include <uv.h>
void test_cb(uv_timer_t *handle)
{
(void) handle;
}
int main(int ac, char *av[])
{
uv_timer_cb cb = test_cb;
(*cb)(0);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,93 +0,0 @@
#
# @configure_input@
#
#
# Copyright (c) 2013, Verisign, Inc., NLnet Labs
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the names of the copyright holders nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package = @PACKAGE_NAME@
version = @PACKAGE_VERSION@
tarname = @PACKAGE_TARNAME@
distdir = $(tarname)-$(version)
api_version = @API_VERSION@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
# datarootdir is here to please some checkers
datarootdir=@datarootdir@
mandir = @mandir@
INSTALL = @INSTALL@
srcdir = @srcdir@
VPATH = @srcdir@
EDITS=-e 's/@''version@/$(version)/g'
DOXYGEN = @DOXYGEN@
DOCDIRS = html latex man
MANPAGES3 = libgetdns.3 getdns_address.3 getdns_cancel_callback.3 getdns_context.3 getdns_context_set.3 getdns_context_set_context_update_callback.3 getdns_convert.3 getdns_dict.3 getdns_dict_get.3 getdns_dict_set.3 getdns_display_ip_address.3 getdns_general.3 getdns_hostname.3 getdns_list.3 getdns_list_get.3 getdns_list_set.3 getdns_pretty_print_dict.3 getdns_root_trust_anchor.3 getdns_service.3 getdns_validate_dnssec.3
default: all
all: doc
doc: $(MANPAGES3)
if test x_$(DOXYGEN) != x_ ; then cd ../src; doxygen; fi
.SUFFIXES: .3.in .3
.3.in.3:
sed $(EDITS) -e "s/@date@/$(api_version)/g" $< > $@
# we assume that we want a separate file for each "name" specified for each man page
# and consider these "alternate names" simple copies of the main man page
install: $(MANPAGES3)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man3
for x in $(MANPAGES3); do echo $(INSTALL) -m 644 $$x $(DESTDIR)$(mandir)/man3; $(INSTALL) -m 644 $$x $(DESTDIR)$(mandir)/man3; for altpg in $$($(srcdir)/manpgaltnames $$x); do cp $$x $$altpg; echo $(INSTALL) -m 644 $$altpg $(DESTDIR)$(mandir)/man3; $(INSTALL) -m 644 $$altpg $(DESTDIR)$(mandir)/man3; done; done
check: $(MANPAGES3)
for x in $(MANPAGES3); do LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z $$x 2>&1 >/dev/null | awk "-vpage=$$x" '{printf("%s: ", page);print}'; if ! lexgrog $$x >/dev/null 2>&1 ; then echo $$x: manpage-has-bad-whatis-entry; fi; done
uninstall:
for x in $(MANPAGES3); do echo rm -f $(DESTDIR)$(mandir)/man3/$$x; rm -f $(DESTDIR)$(mandir)/man3/$$x; for altpg in $$($(srcdir)/manpgaltnames $$x); do echo rm -f $(DESTDIR)$(mandir)/man3/$$altpg; rm -f $(DESTDIR)$(mandir)/man3/$$altpg; done; done
clean:
for x in $(MANPAGES3); do rm -f $$($(srcdir)/manpgaltnames $$x); done
rm -f tagfile
rm -rf $(DOCDIRS) $(MANPAGES3)
distclean : clean
rm -f Makefile config.status config.log
rm -Rf autom4te.cache
Makefile: Makefile.in ../config.status
cd .. && ./config.status $@
configure.status: configure
cd .. && ./config.status --recheck
.PHONY: clean $(DOC)

View File

@ -1,81 +0,0 @@
# Taken from acx_nlnetlabs.m4 - common macros for configure checks
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
# BSD licensed.
#
dnl Check getaddrinfo.
dnl Works on linux, solaris, bsd and windows(links winsock).
dnl defines HAVE_GETADDRINFO, USE_WINSOCK.
AC_DEFUN([ACX_CHECK_GETADDRINFO_WITH_INCLUDES],
[AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING(for getaddrinfo)
ac_cv_func_getaddrinfo=no
AC_LINK_IFELSE(
[AC_LANG_SOURCE([[
#ifdef __cplusplus
extern "C"
{
#endif
char* getaddrinfo();
char* (*f) () = getaddrinfo;
#ifdef __cplusplus
}
#endif
int main() {
;
return 0;
}
]])],
dnl this case on linux, solaris, bsd
[ac_cv_func_getaddrinfo="yes"
dnl see if on windows
if test "$ac_cv_header_windows_h" = "yes"; then
AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used])
USE_WINSOCK="1"
LIBS="$LIBS -lws2_32 -lcrypt32"
fi
],
dnl no quick getaddrinfo, try mingw32 and winsock2 library.
ORIGLIBS="$LIBS"
LIBS="$LIBS -lws2_32 -lcrypt32"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[
#define _WIN32_WINNT 0x0501
#ifdef HAVE_WINDOWS_H
#include <windows.h>
#endif
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include <stdio.h>
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
],
[
(void)getaddrinfo(NULL, NULL, NULL, NULL);
]
)],
[
ac_cv_func_getaddrinfo="yes"
dnl already: LIBS="$LIBS -lws2_32 -lcrypt32"
AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used])
USE_WINSOCK="1"
],
[
ac_cv_func_getaddrinfo="no"
LIBS="$ORIGLIBS"
])
)
AC_MSG_RESULT($ac_cv_func_getaddrinfo)
if test $ac_cv_func_getaddrinfo = yes; then
AC_DEFINE(HAVE_GETADDRINFO, 1, [Whether getaddrinfo is available])
fi
])dnl Endof AC_CHECK_GETADDRINFO_WITH_INCLUDES
dnl End of file

View File

@ -1,164 +0,0 @@
# Taken from acx_nlnetlabs.m4 - common macros for configure checks
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
# BSD licensed.
#
dnl Add a -R to the RUNTIME_PATH. Only if rpath is enabled and it is
dnl an absolute path.
dnl $1: the pathname to add.
AC_DEFUN([ACX_RUNTIME_PATH_ADD], [
if test "x$enable_rpath" = xyes; then
if echo "$1" | grep "^/" >/dev/null; then
RUNTIME_PATH="$RUNTIME_PATH -R$1"
fi
fi
])
dnl Common code for both ACX_WITH_SSL and ACX_WITH_SSL_OPTIONAL
dnl Takes one argument; the withval checked in those 2 functions
dnl sets up the environment for the given openssl path
AC_DEFUN([ACX_SSL_CHECKS], [
withval=$1
if test x_$withval != x_no; then
AC_MSG_CHECKING(for SSL)
if test x_$withval = x_ -o x_$withval = x_yes; then
withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr"
fi
for dir in $withval; do
ssldir="$dir"
if test -f "$dir/include/openssl/ssl.h"; then
found_ssl="yes"
AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.])
dnl assume /usr/include is already in the include-path.
if test "$ssldir" != "/usr"; then
CPPFLAGS="$CPPFLAGS -I$ssldir/include"
LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include"
fi
break;
fi
done
if test x_$found_ssl != x_yes; then
AC_MSG_ERROR(Cannot find the SSL libraries in $withval)
else
AC_MSG_RESULT(found in $ssldir)
HAVE_SSL=yes
dnl assume /usr is already in the lib and dynlib paths.
if test "$ssldir" != "/usr" -a "$ssldir" != ""; then
LDFLAGS="$LDFLAGS -L$ssldir/lib"
LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib"
ACX_RUNTIME_PATH_ADD([$ssldir/lib])
fi
AC_MSG_CHECKING([for HMAC_Update in -lcrypto])
LIBS="-lssl -lcrypto $LIBS"
LIBSSL_LIBS="-lssl -lcrypto $LIBSSL_LIBS"
AC_TRY_LINK(, [
int HMAC_Update(void);
(void)HMAC_Update();
], [
AC_DEFINE([HAVE_HMAC_UPDATE], 1,
[If you have HMAC_Update])
AC_MSG_RESULT(yes)
], [
AC_MSG_RESULT(no)
# check if -lwsock32 or -lgdi32 are needed.
BAKLIBS="$LIBS"
BAKSSLLIBS="$LIBSSL_LIBS"
LIBS="$LIBS -lgdi32"
LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
AC_MSG_CHECKING([if -lcrypto needs -lgdi32])
AC_TRY_LINK([], [
int HMAC_Update(void);
(void)HMAC_Update();
],[
AC_DEFINE([HAVE_HMAC_UPDATE], 1,
[If you have HMAC_Update])
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
LIBS="$BAKLIBS"
LIBSSL_LIBS="$BAKSSLLIBS"
LIBS="$LIBS -ldl"
LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
AC_MSG_CHECKING([if -lcrypto needs -ldl])
AC_TRY_LINK([], [
int HMAC_Update(void);
(void)HMAC_Update();
],[
AC_DEFINE([HAVE_HMAC_UPDATE], 1,
[If you have HMAC_Update])
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required])
])
])
])
fi
AC_SUBST(HAVE_SSL)
AC_SUBST(RUNTIME_PATH)
fi
AC_CHECK_HEADERS([openssl/ssl.h],,, [AC_INCLUDES_DEFAULT])
AC_CHECK_HEADERS([openssl/err.h],,, [AC_INCLUDES_DEFAULT])
AC_CHECK_HEADERS([openssl/rand.h],,, [AC_INCLUDES_DEFAULT])
dnl TLS v1.2 requires OpenSSL 1.0.1
AC_CHECK_FUNC(TLSv1_2_client_method,AC_DEFINE([HAVE_TLS_v1_2], [1],
[Define if you have libssl with tls 1.2]),[AC_MSG_WARN([Cannot find TLSv1_2_client_method in libssl library. TLS will not be available.])])
dnl Native OpenSSL hostname verification requires OpenSSL 1.0.2
AC_CHECK_FUNC(SSL_CTX_get0_param,AC_DEFINE([HAVE_SSL_HN_AUTH], [1],
[Define if you have libssl with host name verification]),[AC_MSG_WARN([Cannot find SSL_CTX_get0_param in libssl library. TLS hostname verification will not be available.])])
])
dnl Check for SSL, where SSL is mandatory
dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found
dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS.
dnl Checks main header files of SSL.
dnl
AC_DEFUN([ACX_WITH_SSL],
[
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
[enable SSL (will check /usr/local/ssl
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[
],[
withval="yes"
])
if test x_$withval = x_no; then
AC_MSG_ERROR([Need SSL library to do digital signature cryptography])
fi
ACX_SSL_CHECKS($withval)
])dnl End of ACX_WITH_SSL
dnl Check for SSL, where ssl is optional (--without-ssl is allowed)
dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found
dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS.
dnl Checks main header files of SSL.
dnl
AC_DEFUN([ACX_WITH_SSL_OPTIONAL],
[
AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
[enable SSL (will check /usr/local/ssl
/usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[
],[
withval="yes"
])
ACX_SSL_CHECKS($withval)
])dnl End of ACX_WITH_SSL_OPTIONAL
dnl Setup to use -lssl
dnl To use -lcrypto, use the ACX_WITH_SSL setup (before this one).
AC_DEFUN([ACX_LIB_SSL],
[
# check if libssl needs libdl
BAKLIBS="$LIBS"
LIBS="-lssl $LIBS"
AC_MSG_CHECKING([if libssl needs libdl])
AC_TRY_LINK_FUNC([SSL_CTX_new], [
AC_MSG_RESULT([no])
LIBS="$BAKLIBS"
] , [
AC_MSG_RESULT([yes])
LIBS="$BAKLIBS"
AC_SEARCH_LIBS([dlopen], [dl])
]) ])dnl End of ACX_LIB_SSL

View File

@ -1,74 +0,0 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
#
# DESCRIPTION
#
# Check whether the given FLAG works with the current language's compiler
# or gives an error. (Warnings, however, are ignored)
#
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
# success/failure.
#
# If EXTRA-FLAGS is defined, it is added to the current language's default
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
# force the compiler to issue an error when a bad flag is given.
#
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 3
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
[AS_VAR_SET(CACHEVAR,[yes])],
[AS_VAR_SET(CACHEVAR,[no])])
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
[m4_default([$2], :)],
[m4_default([$3], :)])
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS

View File

@ -1,80 +0,0 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_lib_nettle.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_LIB_NETTLE([yes|no|auto])
#
# DESCRIPTION
#
# Searches for the 'nettle' library with the --with... option.
#
# If found, define HAVE_NETTLE and macro NETTLE_LIBS. Also defines
# NETTLE_WITH_<algo> for the algorithms found available. Possible
# algorithms: AES ARCTWO BLOWFISH CAST128 DES DES3 SERPENT TWOFISH MD2 MD4
# MD5 SHA1 SHA256.
#
# The argument is used if no --with...-nettle option is set. Value "yes"
# requires the configuration by default. Value "no" does not require it by
# default. Value "auto" configures the library only if available.
#
# See also AX_LIB_BEECRYPT, AX_LIB_CRYPTO, and AX_LIB_GCRYPT.
#
# LICENSE
#
# Copyright (c) 2009 Fabien Coelho <autoconf.archive@coelho.net>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 10
# AX_CHECK_NETTLE_ALGO([name],[function])
AC_DEFUN([AX_CHECK_NETTLE_ALGO],[
AC_CHECK_LIB([nettle], [nettle_$2],
AC_DEFINE([NETTLE_WITH_$1],[1],[Algorithm $1 in nettle library]))
])
# AX_LIB_NETTLE([yes|no|auto])
AC_DEFUN([AX_LIB_NETTLE],[
AC_MSG_CHECKING([whether nettle is enabled])
AC_ARG_WITH([nettle],
AC_HELP_STRING([--with-nettle], [Require nettle library (required with GnuTLS)]),[
AC_MSG_RESULT([$withval])
ax_with_nettle=$withval
],[
AC_MSG_RESULT([$1])
ax_with_nettle=$1
])
if test "$ax_with_nettle" = "yes" -o "$ax_with_nettle" = "auto" ; then
AC_CHECK_HEADERS([nettle/nettle-meta.h],[
AC_CHECK_LIB([nettle],[nettle_base64_encode_final],[
AC_DEFINE([HAVE_NETTLE],[1],[Nettle library is available])
HAVE_NETTLE=1
AC_SUBST([NETTLE_LIBS],[-lnettle])
# ciphers
AX_CHECK_NETTLE_ALGO([AES],[aes_encrypt])
AX_CHECK_NETTLE_ALGO([ARCTWO],[arctwo_encrypt])
AX_CHECK_NETTLE_ALGO([BLOWFISH],[blowfish_encrypt])
AX_CHECK_NETTLE_ALGO([CAST128],[cast128_encrypt])
AX_CHECK_NETTLE_ALGO([DES],[des_encrypt])
AX_CHECK_NETTLE_ALGO([DES3],[des3_encrypt])
AX_CHECK_NETTLE_ALGO([SERPENT],[serpent_encrypt])
AX_CHECK_NETTLE_ALGO([TWOFISH],[twofish_encrypt])
# digests
AX_CHECK_NETTLE_ALGO([MD2],[md2_digest])
AX_CHECK_NETTLE_ALGO([MD4],[md4_digest])
AX_CHECK_NETTLE_ALGO([MD5],[md5_digest])
AX_CHECK_NETTLE_ALGO([SHA1],[sha1_digest])
AX_CHECK_NETTLE_ALGO([SHA256],[sha256_digest])
])
])
# complain only if explicitly required
if test "$ax_with_nettle" = "yes" -a "x$HAVE_NETTLE" = "x" ; then
AC_MSG_ERROR([cannot configure required nettle library])
fi
fi
])

214
m4/pkg.m4
View File

@ -1,214 +0,0 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])# PKG_CHECK_MODULES
# PKG_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable pkgconfigdir as the location where a module
# should install pkg-config .pc files. By default the directory is
# $libdir/pkgconfig, but the default can be changed by passing
# DIRECTORY. The user can override through the --with-pkgconfigdir
# parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_INSTALLDIR
# PKG_NOARCH_INSTALLDIR(DIRECTORY)
# -------------------------
# Substitutes the variable noarch_pkgconfigdir as the location where a
# module should install arch-independent pkg-config .pc files. By
# default the directory is $datadir/pkgconfig, but the default can be
# changed by passing DIRECTORY. The user can override through the
# --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
]) dnl PKG_NOARCH_INSTALLDIR
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------------------------------------
# Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR

View File

@ -0,0 +1,10 @@
pkg update
pkg upgrade
pkg install -y gawk unbound valgrind bash check cmake git libyaml libevent libuv
git clone git@github.com:getdnsapi/getdns.git
cd getdns/
git checkout remotes/origin/release/1.6.0-beta.1
mkdir test
cd test/
../src/test/tpkg/run-all.sh

21
project-doc/makedist.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
[ ! -f git-archive-all.sh ] && wget "https://raw.githubusercontent.com/meitar/git-archive-all.sh/master/git-archive-all.sh"
[ ! -x git-archive-all.sh ] && chmod +x git-archive-all.sh
[ ! -f git-archive-all.sh ] && exit 1
GIT_ARCHIVE="`pwd`/git-archive-all.sh"
git submodule update --init
GIT_ROOT=`git rev-parse --show-toplevel`
version=`awk '/^set\(PACKAGE_VERSION/{V=$2}
/^set\(RELEASE_CANDIDATE/{RC=$2}
END{print V""RC}' "$GIT_ROOT/CMakeLists.txt" | sed 's/[")]//g'`
output_file="getdns-${version}.tar.gz"
( cd "$GIT_ROOT" \
&& "$GIT_ARCHIVE" --prefix "getdns-$version/" --format tar.gz \
--worktree-attributes -- - ) > "$output_file"
openssl md5 "$output_file" > "${output_file}.md5"
openssl sha1 "$output_file" > "${output_file}.sha1"
openssl sha256 "$output_file" > "${output_file}.sha256"
gpg --armor --detach-sig "$output_file"
[ -f "$output_file" -a -f "${output_file}.md5" -a -f "${output_file}.sha1" -a -f "${output_file}.sha256" -a -f "${output_file}.asc" ] \
&& rm git-archive-all.sh

View File

@ -15,3 +15,6 @@ https://github.com/astlinux-project/astlinux/tree/master/package/getdns
For Genode, created and maintained by Emery Hemingway (ehmry) For Genode, created and maintained by Emery Hemingway (ehmry)
https://github.com/genodelabs/genode/blob/master/repos/ports/ports/getdns.port https://github.com/genodelabs/genode/blob/master/repos/ports/ports/getdns.port
For Gentoo, created and maintained by CaseOf (Quentin R.?)
https://packages.gentoo.org/packages/net-dns/getdns

View File

@ -1,172 +0,0 @@
#
# @configure_input@
#
# Copyright (c) 2013, Verisign, Inc., NLNet Labs
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the names of the copyright holders nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package = @PACKAGE_NAME@
version = @PACKAGE_VERSION@
tarname = @PACKAGE_TARNAME@
distdir = $(tarname)-$(version)
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
LIBTOOL = ../../libtool
srcdir = @srcdir@
EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@
EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@
EXTENSION_LIBEVENT_LIB=../../src/libgetdns_ext_event.la
CC=@CC@
CFLAGS=-I$(srcdir) -I$(srcdir)/../../src -I../../src @CFLAGS@
LDFLAGS=@LDFLAGS@ -L../../src
LDLIBS=../../src/libgetdns.la @LIBS@
OBJS=example-all-functions.lo example-simple-answers.lo example-tree.lo example-synchronous.lo example-reverse.lo
PROGRAMS=example-all-functions example-synchronous example-simple-answers example-tree example-reverse
.SUFFIXES: .c .o .a .lo .h
.c.o:
$(CC) $(CFLAGS) -c $< -o $@
.c.lo:
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $< -o $@
default: all
example: all
all: $(PROGRAMS)
$(OBJS):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@
example-all-functions: example-all-functions.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ example-all-functions.lo
example-synchronous: example-synchronous.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o $@ example-synchronous.lo
$(EXTENSION_LIBEVENT_LIB):
@echo "***"
@echo "*** Three examples from the specification need libevent."
@echo "*** libevent was not found or usable at configure time."
@echo "*** To compile and run all examples from the spec, make sure"
@echo "*** libevent is available and usable during configuration."
@echo "***"
@false
example-simple-answers: example-simple-answers.lo $(EXTENSION_LIBEVENT_LIB)
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) $(LDLIBS) -o $@ example-simple-answers.lo
example-tree: example-tree.lo $(EXTENSION_LIBEVENT_LIB)
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) $(LDLIBS) -o $@ example-tree.lo
example-reverse: example-reverse.lo $(EXTENSION_LIBEVENT_LIB)
$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) $(LDLIBS) -o $@ example-reverse.lo
clean:
rm -f *.o *.lo $(PROGRAMS)
rm -rf .libs
distclean : clean
rm -f Makefile config.status config.log
rm -Rf autom4te.cache
$(distdir): FORCE
mkdir -p $(distdir)/src
cp configure.ac $(distdir)
cp configure $(distdir)
cp Makefile.in $(distdir)
cp src/Makefile.in $(distdir)/src
distcheck: $(distdir).tar.gz
gzip -cd $(distdir).tar.gz | tar xvf -
cd $(distdir) && ./configure
cd $(distdir) && $(MAKE) all
cd $(distdir) && $(MAKE) check
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
if test "$${remaining}" -ne 0; then
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
exit 1; \
fi
cd $(distdir) && $(MAKE) clean
rm -rf $(distdir)
@echo "*** Package $(distdir).tar.gz is ready for distribution"
Makefile: $(srcdir)/Makefile.in ../../config.status
cd ../.. && ./config.status spec/example/Makefile
configure.status: configure
cd ../.. && ./config.status --recheck
.PHONY: clean
depend:
(cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new )
(blddir=`pwd`; cd $(srcdir) ; gcc -MM -I. -I../../src -I"$$blddir"/../../src *.c | \
sed -e "s? $$blddir/? ?g" \
-e 's? \([a-z_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \
-e 's? \$$(srcdir)/\.\./\.\./src/config\.h? ../../src/config.h?g' \
-e 's? $$(srcdir)/\.\./\.\./src/getdns/getdns_extra\.h? ../../src/getdns/getdns_extra.h?g' \
-e 's? \.\./\.\./src/getdns/getdns_ext_libevent\.h? $$(srcdir)/../../src/getdns/getdns_ext_libevent.h?g' \
-e 's? \.\./\.\./src/getdns/getdns_ext_libev\.h? $$(srcdir)/../../src/getdns/getdns_ext_libev.h?g' \
-e 's? \.\./\.\./src/getdns/getdns_ext_libuv\.h? $$(srcdir)/../../src/getdns/getdns_ext_libuv.h?g' \
-e 's? \.\./\.\./src/debug\.h? $$(srcdir)/../../src/debug.h?g' \
-e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new )
(cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \
|| mv Makefile.in.new Makefile.in )
# Dependencies for the examples
example-all-functions.lo example-all-functions.o: $(srcdir)/example-all-functions.c $(srcdir)/getdns_libevent.h \
../../src/config.h \
../../src/getdns/getdns.h \
$(srcdir)/../../src/getdns/getdns_ext_libevent.h \
../../src/getdns/getdns_extra.h
example-reverse.lo example-reverse.o: $(srcdir)/example-reverse.c $(srcdir)/getdns_libevent.h \
../../src/config.h \
../../src/getdns/getdns.h \
$(srcdir)/../../src/getdns/getdns_ext_libevent.h \
../../src/getdns/getdns_extra.h
example-simple-answers.lo example-simple-answers.o: $(srcdir)/example-simple-answers.c $(srcdir)/getdns_libevent.h \
../../src/config.h \
../../src/getdns/getdns.h \
$(srcdir)/../../src/getdns/getdns_ext_libevent.h \
../../src/getdns/getdns_extra.h
example-synchronous.lo example-synchronous.o: $(srcdir)/example-synchronous.c $(srcdir)/getdns_core_only.h \
../../src/getdns/getdns.h
example-tree.lo example-tree.o: $(srcdir)/example-tree.c $(srcdir)/getdns_libevent.h \
../../src/config.h \
../../src/getdns/getdns.h \
$(srcdir)/../../src/getdns/getdns_ext_libevent.h \
../../src/getdns/getdns_extra.h

View File

@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If # entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used. # left blank the current directory will be used.
OUTPUT_DIRECTORY = ../doc OUTPUT_DIRECTORY = doc
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and # directories (in 2 levels) under the output directory of each output format and

View File

@ -1,612 +0,0 @@
#
# @configure_input@
#
# Copyright (c) 2013, Verisign, Inc., NLnet Labs
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the names of the copyright holders nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package = @PACKAGE_NAME@
version = @PACKAGE_VERSION@
tarname = @PACKAGE_TARNAME@
distdir = $(tarname)-$(version)
libversion = @GETDNS_LIBVERSION@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libdir = @libdir@
includedir = @includedir@
sysconfdir = @sysconfdir@
localstatedir = @localstatedir@
runstatedir = @runstatedir@
stubbyconfdir = $(sysconfdir)/stubby
have_libevent = @have_libevent@
have_libuv = @have_libuv@
have_libev = @have_libev@
# datarootdir is here to please some checkers
datarootdir=@datarootdir@
mandir=@mandir@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
srcdir = @srcdir@
tlsdir = @TLSDIR@
stubbysrcdir = $(srcdir)/../stubby
LIBTOOL = ../libtool
CC=@CC@
CFLAGS=-I$(srcdir) -I. -I$(srcdir)/util/auxiliary -I$(srcdir)/tls -I$(srcdir)/$(tlsdir) -I$(stubbysrcdir)/src @CFLAGS@ @CPPFLAGS@ $(XTRA_CFLAGS)
WPEDANTICFLAG=@WPEDANTICFLAG@
WNOERRORFLAG=@WNOERRORFLAG@
LDFLAGS=@LDFLAGS@ @LIBS@
STUBBY_LDFLAGS=@STUBBY_LDFLAGS@ @STUBBY_LIBS@
EXTENSION_LIBEVENT_LIB=@EXTENSION_LIBEVENT_LIB@
EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@
EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@
EXTENSION_LIBEV_LIB=@EXTENSION_LIBEV_LIB@
EXTENSION_LIBEV_EXT_LIBS=@EXTENSION_LIBEV_EXT_LIBS@
EXTENSION_LIBEV_LDFLAGS=@EXTENSION_LIBEV_LDFLAGS@
EXTENSION_LIBUV_LIB=@EXTENSION_LIBUV_LIB@
EXTENSION_LIBUV_EXT_LIBS=@EXTENSION_LIBUV_EXT_LIBS@
EXTENSION_LIBUV_LDFLAGS=@EXTENSION_LIBUV_LDFLAGS@
C99COMPATFLAGS=@C99COMPATFLAGS@
DEFAULT_EVENTLOOP_OBJ=@DEFAULT_EVENTLOOP@.lo
GETDNS_OBJ=const-info.lo convert.lo dict.lo dnssec.lo general.lo \
list.lo request-internal.lo platform.lo rr-dict.lo \
rr-iter.lo server.lo stub.lo sync.lo ub_loop.lo util-internal.lo \
mdns.lo pubkey-pinning.lo
GLDNS_OBJ=keyraw.lo gbuffer.lo wire2str.lo parse.lo parseutil.lo rrdef.lo \
str2wire.lo
PROGRAMS=@STUBBY@
LIBOBJDIR=
LIBOBJS=@LIBOBJS@
COMPAT_OBJ=$(LIBOBJS:.o=.lo)
UTIL_OBJ=rbtree.lo lruhash.lo lookup3.lo locks.lo
JSMN_OBJ=jsmn.lo
TLS_OBJ=tls.lo pubkey-pinning-internal.lo keyraw-internal.lo
TLS_COMMON_OBJ=val_secalgo.lo anchor-internal.lo
YXML_OBJ=yxml.lo
YAML_OBJ=convert_yaml_to_json.lo
DANESSL_OBJ=danessl.lo
GETDNS_XTRA_OBJS=@GETDNS_XTRA_OBJS@ @DANESSL_XTRA_OBJS@
STUBBY_XTRA_OBJS=@STUBBY_XTRA_OBJS@
EXTENSION_OBJ=$(DEFAULT_EVENTLOOP_OBJ) libevent.lo libev.lo
NON_C99_OBJS=libuv.lo context.lo anchor.lo
.SUFFIXES: .c .o .a .lo .h
.c.o:
$(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $< -o $@
.c.lo:
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $< -o $@
default: all
all: libgetdns.la $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBUV_LIB) $(EXTENSION_LIBEV_LIB) $(PROGRAMS)
$(GETDNS_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $(srcdir)/$(@:.lo=.c) -o $@
$(GLDNS_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $(srcdir)/gldns/$(@:.lo=.c) -o $@
$(COMPAT_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/compat/$(@:.lo=.c) -o $@
$(UTIL_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WNOERRORFLAG) -c $(srcdir)/util/$(@:.lo=.c) -o $@
$(JSMN_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -DJSMN_GETDNS -c $(srcdir)/jsmn/$(@:.lo=.c) -o $@
$(TLS_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/$(tlsdir)/$(@:.lo=.c) -o $@
$(TLS_COMMON_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(srcdir)/tls/$(@:.lo=.c) -o $@
$(YAML_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -c $(stubbysrcdir)/src/yaml/$(@:.lo=.c) -o $@
$(DANESSL_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WNOERRORFLAG) -c $(srcdir)/ssl_dane/$(@:.lo=.c) -o $@
$(YXML_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) -I$(srcdir)/yxml -DYXML_GETDNS -Wno-unused-parameter -c $(srcdir)/yxml/$(@:.lo=.c) -o $@
$(EXTENSION_OBJ):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $(srcdir)/extension/$(@:.lo=.c) -o $@
anchor.lo:
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) $(C99COMPATFLAGS) -c $(srcdir)/anchor.c -o anchor.lo
context.lo:
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) $(C99COMPATFLAGS) -c $(srcdir)/context.c -o context.lo
libuv.lo:
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) $(C99COMPATFLAGS) -c $(srcdir)/extension/libuv.c -o libuv.lo
install-headers: getdns/getdns.h getdns/getdns_extra.h
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)
$(INSTALL) -m 755 -d $(DESTDIR)$(includedir)/getdns
$(INSTALL) -m 644 getdns/getdns.h $(DESTDIR)$(includedir)/getdns/getdns.h
$(INSTALL) -m 644 getdns/getdns_extra.h $(DESTDIR)$(includedir)/getdns/getdns_extra.h
if test $(have_libevent) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libevent.h $(DESTDIR)$(includedir)/getdns/ ; fi
if test $(have_libuv) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libuv.h $(DESTDIR)$(includedir)/getdns/ ; fi
if test $(have_libev) = 1 ; then $(INSTALL) -m 644 $(srcdir)/getdns/getdns_ext_libev.h $(DESTDIR)$(includedir)/getdns/ ; fi
uninstall-headers:
rm -rf $(DESTDIR)$(includedir)/getdns
install-libs: libgetdns.la $(EXTENSION_LIBEVENT_LIB) $(EXTENSION_LIBUV_LIB) $(EXTENSION_LIBEV_LIB)
$(INSTALL) -m 755 -d $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=install cp libgetdns.la $(DESTDIR)$(libdir)
if test $(have_libevent) = 1 ; then $(LIBTOOL) --mode=install cp $(EXTENSION_LIBEVENT_LIB) $(DESTDIR)$(libdir) ; fi
if test $(have_libuv) = 1 ; then $(LIBTOOL) --mode=install cp $(EXTENSION_LIBUV_LIB) $(DESTDIR)$(libdir) ; fi
if test $(have_libev) = 1 ; then $(LIBTOOL) --mode=install cp $(EXTENSION_LIBEV_LIB) $(DESTDIR)$(libdir) ; fi
$(LIBTOOL) --mode=finish $(DESTDIR)$(libdir)
uninstall-libs:
if test $(have_libevent) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBEVENT_LIB) ; fi
if test $(have_libuv) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBUV_LIB) ; fi
if test $(have_libev) = 1; then $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(EXTENSION_LIBEV_LIB) ; fi
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libgetdns.la
install: install-libs install-headers @INSTALL_STUBBY@
uninstall: @UNINSTALL_STUBBY@ uninstall-headers uninstall-libs
libgetdns_ext_event.la: libgetdns.la libevent.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ libevent.lo libgetdns.la $(LDFLAGS) $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libevent.symbols
libgetdns_ext_uv.la: libgetdns.la libuv.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ libuv.lo libgetdns.la $(LDFLAGS) $(EXTENSION_LIBUV_LDFLAGS) $(EXTENSION_LIBUV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libuv.symbols
libgetdns_ext_ev.la: libgetdns.la libev.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ libev.lo libgetdns.la $(LDFLAGS) $(EXTENSION_LIBEV_LDFLAGS) $(EXTENSION_LIBEV_EXT_LIBS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/extension/libev.symbols
libgetdns.la: $(GETDNS_OBJ) version.lo context.lo anchor.lo $(DEFAULT_EVENTLOOP_OBJ) $(GLDNS_OBJ) $(COMPAT_OBJ) $(UTIL_OBJ) $(JSMN_OBJ) $(TLS_OBJ) $(TLS_COMMON_OBJ) $(YXML_OBJ) $(GETDNS_XTRA_OBJS)
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(GETDNS_OBJ) version.lo context.lo anchor.lo $(DEFAULT_EVENTLOOP_OBJ) $(GLDNS_OBJ) $(COMPAT_OBJ) $(UTIL_OBJ) $(JSMN_OBJ) $(TLS_OBJ) $(TLS_COMMON_OBJ) $(YXML_OBJ) $(GETDNS_XTRA_OBJS) $(LDFLAGS) -rpath $(libdir) -version-info $(libversion) -no-undefined -export-symbols $(srcdir)/libgetdns.symbols
test: default
cd test && $(MAKE) $@
getdns_query: default
cd tools && $(MAKE) $@
getdns_server_mon: default
cd tools && $(MAKE) $@
stubby.1: $(stubbysrcdir)/doc/stubby.1.in
sed -e "s|@ETCDIR@|$(stubbyconfdir)|g" $(stubbysrcdir)/doc/stubby.1.in > $@
stubby.lo: $(stubbysrcdir)/src/stubby.c
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -DSTUBBYCONFDIR='"$(sysconfdir)/stubby"' -DRUNSTATEDIR='"$(runstatedir)"' -c $(stubbysrcdir)/src/stubby.c -o $@
stubby: stubby.lo libgetdns.la $(STUBBY_XTRA_OBJS)
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ stubby.lo $(STUBBY_XTRA_OBJS) $(STUBBY_LDFLAGS) libgetdns.la
install-stubby-files-unix: $(stubbysrcdir)/stubby.yml.example
$(INSTALL) -m 755 -d $(DESTDIR)$(stubbyconfdir)
test -f $(DESTDIR)$(stubbyconfdir)/stubby.yml || \
$(INSTALL_DATA) $(stubbysrcdir)/stubby.yml.example $(DESTDIR)$(stubbyconfdir)/stubby.yml
install-stubby-files-macos: $(stubbysrcdir)/macos/stubby-setdns-macos.sh install-stubby-files-unix
$(INSTALL) -m 755 -d $(DESTDIR)$(sbindir)
$(INSTALL) -m 755 $(stubbysrcdir)/macos/stubby-setdns-macos.sh $(DESTDIR)$(sbindir)
stubby.yml.windows: $(stubbysrcdir)/stubby.yml.example
awk "{sub(/$$/,\"\r\")}1" $(stubbysrcdir)/stubby.yml.example > stubby.yml.windows
install-stubby-files-windows: stubby.yml.windows
$(INSTALL) -m 755 -d $(DESTDIR)$(stubbyconfdir)
test -f $(DESTDIR)$(stubbyconfdir)/stubby.yml || \
$(INSTALL_DATA) stubby.yml.windows $(DESTDIR)$(stubbyconfdir)/stubby.yml
install-stubby: stubby stubby.1 install-stubby-files-@HOSTOS@
$(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
$(LIBTOOL) --mode=install cp stubby $(DESTDIR)$(bindir)
$(INSTALL) -m 755 -d $(DESTDIR)$(runstatedir)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)
$(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1
$(INSTALL) -m 644 stubby\.1 $(DESTDIR)$(mandir)/man1
uninstall-stubby:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/stubby
rm -f $(DESTDIR)$(sbindir)/stubby-setdns-macos.sh
rm -f $(DESTDIR)$(mandir)/man1/stubby.1
scratchpad: default
cd test && $(MAKE) $@
pad: scratchpad
clean:
cd tools && $(MAKE) $@
cd test && $(MAKE) $@
rm -f *.o *.lo extension/*.lo extension/*.o $(PROGRAMS) libgetdns.la libgetdns_ext_*.la
rm -rf .libs extension/.libs
distclean : clean
cd tools && $(MAKE) $@
cd test && $(MAKE) $@
rmdir test 2>/dev/null || true
rm -f Makefile config.status config.log Doxyfile config.h version.c getdns/Makefile getdns/getdns.h getdns/getdns_extra.h
rmdir getdns 2>/dev/null || true
rmdir extension 2>/dev/null || true
rm -Rf autom4te.cache
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && ./config.status src/Makefile
depend:
(cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new )
(blddir=`pwd`; cd $(srcdir) ; gcc -MM -I. -I"$$blddir" -Itls -I$(tlsdir) -Iyxml -Iutil/auxiliary -I../stubby/src *.c gldns/*.c compat/*.c util/*.c jsmn/*.c $(tlsdir)/*.c yxml/*.c extension/*.c ../stubby/src/*.c | \
sed -e "s? $$blddir/? ?g" \
-e 's? gldns/? $$(srcdir)/gldns/?g' \
-e 's? compat/? $$(srcdir)/compat/?g' \
-e 's? util/auxiliary/util/? $$(srcdir)/util/auxiliary/util/?g' \
-e 's? util/? $$(srcdir)/util/?g' \
-e 's? jsmn/? $$(srcdir)/jsmn/?g' \
-e 's? tls/? $$(srcdir)/tls/?g' \
-e 's? $(tlsdir)/? $$(srcdir)/$$(tlsdir)/?g' \
-e 's? yxml/? $$(srcdir)/yxml/?g' \
-e 's? extension/? $$(srcdir)/extension/?g' \
-e 's? \.\./stubby/? $$(stubbysrcdir)/?g' \
-e 's? \([a-z_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \
-e 's? \$$(srcdir)/config\.h? config.h?g' \
-e 's? \$$(srcdir)/getdns/getdns_extra\.h? getdns/getdns_extra.h?g' \
-e 's? \$$(srcdir)/version\.c? version.c?g' \
-e 's? getdns/getdns_ext_libevent\.h? $$(srcdir)/getdns/getdns_ext_libevent.h?g' \
-e 's? getdns/getdns_ext_libev\.h? $$(srcdir)/getdns/getdns_ext_libev.h?g' \
-e 's? getdns/getdns_ext_libuv\.h? $$(srcdir)/getdns/getdns_ext_libuv.h?g' \
-e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new )
(cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \
|| mv Makefile.in.new Makefile.in )
cd tools && $(MAKE) $@
cd test && $(MAKE) $@
.PHONY: clean test
FORCE:
# Dependencies for gldns, utils, the extensions and compat functions
anchor.lo anchor.o: $(srcdir)/anchor.c \
config.h $(srcdir)/debug.h \
$(srcdir)/anchor.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/types-internal.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/context.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h $(srcdir)/yxml/yxml.h $(srcdir)/gldns/parseutil.h $(srcdir)/gldns/str2wire.h \
$(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/keyraw.h $(srcdir)/$(tlsdir)/keyraw-internal.h \
$(srcdir)/general.h $(srcdir)/util-internal.h $(srcdir)/platform.h
const-info.lo const-info.o: $(srcdir)/const-info.c \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/const-info.h
context.lo context.o: $(srcdir)/context.c \
config.h $(srcdir)/anchor.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/types-internal.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/debug.h $(srcdir)/gldns/str2wire.h \
$(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h $(srcdir)/context.h $(srcdir)/extension/default_eventloop.h \
$(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/tls.h \
$(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/util-internal.h $(srcdir)/platform.h $(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h \
$(srcdir)/stub.h $(srcdir)/list.h $(srcdir)/dict.h $(srcdir)/pubkey-pinning.h $(srcdir)/const-info.h
convert.lo convert.o: $(srcdir)/convert.c \
config.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h \
$(srcdir)/util/orig-headers/rbtree.h $(srcdir)/extension/default_eventloop.h \
$(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h \
$(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h \
$(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h \
$(srcdir)/gldns/parseutil.h $(srcdir)/const-info.h $(srcdir)/dict.h $(srcdir)/list.h $(srcdir)/jsmn/jsmn.h $(srcdir)/convert.h
dict.lo dict.o: $(srcdir)/dict.c \
config.h \
$(srcdir)/types-internal.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/util-internal.h $(srcdir)/context.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/dict.h $(srcdir)/list.h $(srcdir)/const-info.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/parseutil.h
dnssec.lo dnssec.o: $(srcdir)/dnssec.c \
config.h $(srcdir)/debug.h \
getdns/getdns.h \
$(srcdir)/context.h \
getdns/getdns_extra.h \
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \
$(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/util-internal.h \
$(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h \
$(srcdir)/gldns/keyraw.h $(srcdir)/$(tlsdir)/keyraw-internal.h $(srcdir)/gldns/parseutil.h $(srcdir)/general.h \
$(srcdir)/dict.h $(srcdir)/list.h $(srcdir)/util/val_secalgo.h $(srcdir)/gldns/gbuffer.h
general.lo general.o: $(srcdir)/general.c \
config.h $(srcdir)/general.h \
getdns/getdns.h \
$(srcdir)/types-internal.h \
getdns/getdns_extra.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/ub_loop.h $(srcdir)/debug.h \
$(srcdir)/gldns/wire2str.h $(srcdir)/context.h $(srcdir)/extension/default_eventloop.h \
$(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/util-internal.h $(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h $(srcdir)/stub.h $(srcdir)/dict.h $(srcdir)/mdns.h
list.lo list.o: $(srcdir)/list.c $(srcdir)/types-internal.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/util-internal.h \
config.h $(srcdir)/context.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/list.h $(srcdir)/dict.h
mdns.lo mdns.o: $(srcdir)/mdns.c \
config.h $(srcdir)/debug.h \
$(srcdir)/context.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \
$(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/general.h \
$(srcdir)/gldns/rrdef.h $(srcdir)/util-internal.h $(srcdir)/platform.h $(srcdir)/mdns.h
platform.lo platform.o: $(srcdir)/platform.c $(srcdir)/platform.h \
config.h
pubkey-pinning.lo pubkey-pinning.o: $(srcdir)/pubkey-pinning.c \
config.h $(srcdir)/debug.h \
getdns/getdns.h \
$(srcdir)/context.h \
getdns/getdns_extra.h \
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h \
$(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/util-internal.h \
$(srcdir)/gldns/parseutil.h $(srcdir)/pubkey-pinning.h $(srcdir)/tls/pubkey-pinning-internal.h
request-internal.lo request-internal.o: $(srcdir)/request-internal.c \
config.h \
$(srcdir)/types-internal.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/util-internal.h $(srcdir)/context.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/gldns/rrdef.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/dict.h $(srcdir)/convert.h $(srcdir)/general.h
rr-dict.lo rr-dict.o: $(srcdir)/rr-dict.c $(srcdir)/rr-dict.h \
config.h \
getdns/getdns.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/util-internal.h $(srcdir)/context.h \
getdns/getdns_extra.h \
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/gldns/pkthdr.h \
$(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/dict.h
rr-iter.lo rr-iter.o: $(srcdir)/rr-iter.c $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
config.h \
getdns/getdns.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/gldns/rrdef.h
server.lo server.o: $(srcdir)/server.c \
config.h \
getdns/getdns_extra.h \
getdns/getdns.h \
$(srcdir)/context.h $(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/util-internal.h $(srcdir)/platform.h
stub.lo stub.o: $(srcdir)/stub.c \
config.h $(srcdir)/debug.h \
$(srcdir)/stub.h \
getdns/getdns.h \
$(srcdir)/types-internal.h \
getdns/getdns_extra.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h \
$(srcdir)/gldns/rrdef.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h $(srcdir)/rr-iter.h \
$(srcdir)/rr-dict.h $(srcdir)/context.h $(srcdir)/extension/default_eventloop.h \
$(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/server.h $(srcdir)/anchor.h \
$(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/util-internal.h $(srcdir)/platform.h $(srcdir)/general.h \
$(srcdir)/pubkey-pinning.h
sync.lo sync.o: $(srcdir)/sync.c \
getdns/getdns.h \
config.h $(srcdir)/context.h \
getdns/getdns_extra.h \
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/general.h $(srcdir)/util-internal.h $(srcdir)/dnssec.h $(srcdir)/gldns/rrdef.h $(srcdir)/stub.h $(srcdir)/gldns/wire2str.h
ub_loop.lo ub_loop.o: $(srcdir)/ub_loop.c $(srcdir)/ub_loop.h \
config.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/debug.h
util-internal.lo util-internal.o: $(srcdir)/util-internal.c \
config.h \
getdns/getdns.h \
$(srcdir)/dict.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/types-internal.h \
getdns/getdns_extra.h \
$(srcdir)/list.h $(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/extension/default_eventloop.h \
$(srcdir)/extension/poll_eventloop.h $(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h \
$(srcdir)/rr-iter.h $(srcdir)/rr-dict.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h \
$(srcdir)/$(tlsdir)/tls-internal.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/dnssec.h \
$(srcdir)/gldns/rrdef.h
gbuffer.lo gbuffer.o: $(srcdir)/gldns/gbuffer.c \
config.h \
$(srcdir)/gldns/gbuffer.h
keyraw.lo keyraw.o: $(srcdir)/gldns/keyraw.c \
config.h \
$(srcdir)/gldns/keyraw.h $(srcdir)/$(tlsdir)/keyraw-internal.h $(srcdir)/gldns/rrdef.h
parse.lo parse.o: $(srcdir)/gldns/parse.c \
config.h \
$(srcdir)/gldns/parse.h $(srcdir)/gldns/parseutil.h $(srcdir)/gldns/gbuffer.h
parseutil.lo parseutil.o: $(srcdir)/gldns/parseutil.c \
config.h \
$(srcdir)/gldns/parseutil.h
rrdef.lo rrdef.o: $(srcdir)/gldns/rrdef.c \
config.h \
$(srcdir)/gldns/rrdef.h $(srcdir)/gldns/parseutil.h
str2wire.lo str2wire.o: $(srcdir)/gldns/str2wire.c \
config.h \
$(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/wire2str.h $(srcdir)/gldns/gbuffer.h \
$(srcdir)/gldns/parse.h $(srcdir)/gldns/parseutil.h
wire2str.lo wire2str.o: $(srcdir)/gldns/wire2str.c \
config.h \
$(srcdir)/gldns/wire2str.h $(srcdir)/gldns/str2wire.h $(srcdir)/gldns/rrdef.h $(srcdir)/gldns/pkthdr.h \
$(srcdir)/gldns/parseutil.h $(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/keyraw.h \
$(srcdir)/$(tlsdir)/keyraw-internal.h
arc4_lock.lo arc4_lock.o: $(srcdir)/compat/arc4_lock.c \
config.h
arc4random.lo arc4random.o: $(srcdir)/compat/arc4random.c \
config.h \
$(srcdir)/compat/chacha_private.h
arc4random_uniform.lo arc4random_uniform.o: $(srcdir)/compat/arc4random_uniform.c \
config.h
explicit_bzero.lo explicit_bzero.o: $(srcdir)/compat/explicit_bzero.c \
config.h
getentropy_linux.lo getentropy_linux.o: $(srcdir)/compat/getentropy_linux.c \
config.h
getentropy_osx.lo getentropy_osx.o: $(srcdir)/compat/getentropy_osx.c \
config.h
getentropy_solaris.lo getentropy_solaris.o: $(srcdir)/compat/getentropy_solaris.c \
config.h
getentropy_win.lo getentropy_win.o: $(srcdir)/compat/getentropy_win.c
gettimeofday.lo gettimeofday.o: $(srcdir)/compat/gettimeofday.c \
config.h
inet_ntop.lo inet_ntop.o: $(srcdir)/compat/inet_ntop.c \
config.h
inet_pton.lo inet_pton.o: $(srcdir)/compat/inet_pton.c \
config.h
sha512.lo sha512.o: $(srcdir)/compat/sha512.c \
config.h
strlcpy.lo strlcpy.o: $(srcdir)/compat/strlcpy.c \
config.h
strptime.lo strptime.o: $(srcdir)/compat/strptime.c \
config.h
locks.lo locks.o: $(srcdir)/util/locks.c \
config.h $(srcdir)/util/locks.h \
$(srcdir)/util/orig-headers/locks.h $(srcdir)/util/auxiliary/util/log.h $(srcdir)/debug.h
lookup3.lo lookup3.o: $(srcdir)/util/lookup3.c \
config.h \
$(srcdir)/util/auxiliary/util/storage/lookup3.h $(srcdir)/util/lookup3.h \
$(srcdir)/util/orig-headers/lookup3.h
lruhash.lo lruhash.o: $(srcdir)/util/lruhash.c \
config.h \
$(srcdir)/util/auxiliary/util/storage/lruhash.h $(srcdir)/util/lruhash.h \
$(srcdir)/util/orig-headers/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/orig-headers/locks.h \
$(srcdir)/util/auxiliary/util/log.h $(srcdir)/debug.h $(srcdir)/util/auxiliary/util/fptr_wlist.h
rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c \
config.h \
$(srcdir)/util/auxiliary/log.h $(srcdir)/util/auxiliary/util/log.h $(srcdir)/debug.h \
$(srcdir)/util/auxiliary/fptr_wlist.h $(srcdir)/util/auxiliary/util/fptr_wlist.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h
jsmn.lo jsmn.o: $(srcdir)/jsmn/jsmn.c $(srcdir)/jsmn/jsmn.h
keyraw-internal.lo keyraw-internal.o: $(srcdir)/$(tlsdir)/keyraw-internal.c \
config.h \
$(srcdir)/gldns/keyraw.h $(srcdir)/$(tlsdir)/keyraw-internal.h $(srcdir)/gldns/rrdef.h
pubkey-pinning-internal.lo pubkey-pinning-internal.o: $(srcdir)/$(tlsdir)/pubkey-pinning-internal.c \
config.h $(srcdir)/debug.h \
getdns/getdns.h \
$(srcdir)/context.h \
getdns/getdns_extra.h \
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/util-internal.h $(srcdir)/context.h $(srcdir)/tls/pubkey-pinning-internal.h
tls.lo tls.o: $(srcdir)/$(tlsdir)/tls.c \
config.h $(srcdir)/debug.h \
$(srcdir)/context.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/const-info.h $(srcdir)/tls.h
yxml.lo yxml.o: $(srcdir)/yxml/yxml.c $(srcdir)/yxml/yxml.h
libev.lo libev.o: $(srcdir)/extension/libev.c \
config.h \
$(srcdir)/types-internal.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/getdns/getdns_ext_libev.h
libevent.lo libevent.o: $(srcdir)/extension/libevent.c \
config.h \
$(srcdir)/types-internal.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/getdns/getdns_ext_libevent.h
libuv.lo libuv.o: $(srcdir)/extension/libuv.c \
config.h $(srcdir)/debug.h \
$(srcdir)/types-internal.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/getdns/getdns_ext_libuv.h
poll_eventloop.lo poll_eventloop.o: $(srcdir)/extension/poll_eventloop.c \
config.h \
$(srcdir)/util-internal.h $(srcdir)/context.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/types-internal.h $(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h \
$(srcdir)/extension/default_eventloop.h $(srcdir)/extension/poll_eventloop.h \
$(srcdir)/types-internal.h $(srcdir)/ub_loop.h $(srcdir)/debug.h $(srcdir)/server.h $(srcdir)/rr-iter.h $(srcdir)/rr-dict.h \
$(srcdir)/gldns/gbuffer.h $(srcdir)/gldns/pkthdr.h $(srcdir)/anchor.h $(srcdir)/tls.h $(srcdir)/$(tlsdir)/tls-internal.h \
$(srcdir)/platform.h $(srcdir)/debug.h
select_eventloop.lo select_eventloop.o: $(srcdir)/extension/select_eventloop.c \
config.h $(srcdir)/debug.h \
$(srcdir)/types-internal.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(srcdir)/util/rbtree.h $(srcdir)/util/orig-headers/rbtree.h $(srcdir)/platform.h \
$(srcdir)/extension/select_eventloop.h
stubby.lo stubby.o: $(stubbysrcdir)/src/stubby.c \
config.h \
getdns/getdns.h \
getdns/getdns_extra.h \
$(stubbysrcdir)/src/yaml/convert_yaml_to_json.h

View File

@ -33,7 +33,7 @@
#include "debug.h" #include "debug.h"
#include "anchor.h" #include "anchor.h"
#include <fcntl.h> #include <fcntl.h>
#include <strings.h> #include <string.h>
#include <time.h> #include <time.h>
#include "types-internal.h" #include "types-internal.h"
#include "context.h" #include "context.h"
@ -1228,7 +1228,7 @@ void _getdns_start_fetching_ta(
{ {
getdns_return_t r; getdns_return_t r;
size_t scheduled; size_t scheduled;
char tas_hostname[256]; char tas_hostname[256] = "";
const char *verify_CA; const char *verify_CA;
const char *verify_email; const char *verify_email;

View File

@ -31,11 +31,11 @@
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifndef GETDNS_ON_WINDOWS
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
#ifndef GETDNS_ON_WINDOWS
#include <sys/mman.h> #include <sys/mman.h>
#endif #endif
#if defined(GETDNS_ON_WINDOWS) && !defined(MAP_INHERIT_ZERO) #if defined(GETDNS_ON_WINDOWS) && !defined(MAP_INHERIT_ZERO)
@ -212,7 +212,7 @@ _rs_stir(void)
static inline void static inline void
_rs_stir_if_needed(size_t len) _rs_stir_if_needed(size_t len)
{ {
#ifndef MAP_INHERIT_ZERO #if !defined(GETDNS_ON_WINDOWS) && !defined(MAP_INHERIT_ZERO)
static pid_t _rs_pid = 0; static pid_t _rs_pid = 0;
pid_t pid = getpid(); pid_t pid = getpid();

View File

@ -6,17 +6,12 @@
#include "config.h" #include "config.h"
#include <string.h> #include <string.h>
__attribute__((weak)) void
__explicit_bzero_hook(void *ATTR_UNUSED(buf), size_t ATTR_UNUSED(len))
{
}
void void
explicit_bzero(void *buf, size_t len) explicit_bzero(void *buf, size_t len)
{ {
#ifdef UB_ON_WINDOWS #ifdef GETDNS_ON_WINDOWS
SecureZeroMemory(buf, len); SecureZeroMemory(buf, len);
#endif #else
memset(buf, 0, len); memset(buf, 0, len);
__explicit_bzero_hook(buf, len); #endif
} }

View File

@ -21,8 +21,9 @@
*/ */
#include "config.h" #include "config.h"
#ifdef GETDNS_ON_WINDOWS #ifndef HAVE_GETTIMEOFDAY
int gettimeofday(struct timeval* tv, struct timezone* tz)
int gettimeofday(struct timeval* tv, void* tz)
{ {
FILETIME ft; FILETIME ft;
uint64_t now = 0; uint64_t now = 0;
@ -70,4 +71,4 @@ int gettimeofday(struct timeval* tv, struct timezone* tz)
return 0; return 0;
} }
#endif /* GETDNS_ON_WINDOWS */ #endif /* HAVE_GETTIMEOFDAY */

View File

@ -19,8 +19,6 @@
#include <config.h> #include <config.h>
#ifndef HAVE_INET_NTOP
#include <sys/param.h> #include <sys/param.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_SYS_SOCKET_H #ifdef HAVE_SYS_SOCKET_H
@ -214,5 +212,3 @@ inet_ntop6(const u_char *src, char *dst, size_t size)
strlcpy(dst, tmp, size); strlcpy(dst, tmp, size);
return (dst); return (dst);
} }
#endif /* !HAVE_INET_NTOP */

View File

@ -17,7 +17,6 @@
*/ */
#include <config.h> #include <config.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>

43
src/compat/mkstemp.c Normal file
View File

@ -0,0 +1,43 @@
/**
* \file mkstemp.c
* @brief Implementation of mkstemp for Windows.
*/
/*
* Copyright (c) 2019 Sinodun
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the names of the copyright holders nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
int mkstemp(char *template)
{
if (_mktemp_s(template, strlen(template) + 1) != 0)
return -1;
return open(template, _O_CREAT | _O_EXCL, _S_IWRITE);
}

View File

@ -18,7 +18,6 @@
/* OPENBSD ORIGINAL: lib/libc/string/strlcpy.c */ /* OPENBSD ORIGINAL: lib/libc/string/strlcpy.c */
#include <config.h> #include <config.h>
#ifndef HAVE_STRLCPY
#include <sys/types.h> #include <sys/types.h>
#include <string.h> #include <string.h>
@ -53,5 +52,3 @@ strlcpy(char *dst, const char *src, size_t siz)
return(s - src - 1); /* count does not include NUL */ return(s - src - 1); /* count does not include NUL */
} }
#endif /* !HAVE_STRLCPY */

View File

@ -55,7 +55,6 @@ typedef unsigned short in_port_t;
#include <sys/stat.h> #include <sys/stat.h>
#include <string.h> #include <string.h>
#include <strings.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -926,6 +925,7 @@ upstream_init(getdns_upstream *upstream,
/* For sharing a socket to this upstream with TCP */ /* For sharing a socket to this upstream with TCP */
upstream->fd = -1; upstream->fd = -1;
upstream->expires = 0;
upstream->tls_obj = NULL; upstream->tls_obj = NULL;
upstream->tls_session = NULL; upstream->tls_session = NULL;
upstream->tls_cipher_list = NULL; upstream->tls_cipher_list = NULL;
@ -1113,6 +1113,12 @@ set_os_defaults_windows(getdns_context *context)
return GETDNS_RETURN_GOOD; return GETDNS_RETURN_GOOD;
} /* set_os_defaults_windows */ } /* set_os_defaults_windows */
getdns_return_t
getdns_context_set_resolvconf(getdns_context *context, const char *resolvconf)
{
return GETDNS_RETURN_NOT_IMPLEMENTED;
}
#else #else
getdns_return_t getdns_return_t
@ -1161,7 +1167,7 @@ getdns_context_set_resolvconf(getdns_context *context, const char *resolvconf)
memset(&hints, 0, sizeof(struct addrinfo)); memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
hints.ai_socktype = 0; /* Datagram socket */ hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_flags = AI_NUMERICHOST; /* No reverse name lookups */ hints.ai_flags = AI_NUMERICHOST; /* No reverse name lookups */
hints.ai_protocol = 0; /* Any protocol */ hints.ai_protocol = 0; /* Any protocol */
hints.ai_canonname = NULL; hints.ai_canonname = NULL;
@ -2390,7 +2396,15 @@ getdns_context_set_dns_root_servers(
{ {
#ifdef HAVE_LIBUNBOUND #ifdef HAVE_LIBUNBOUND
# ifndef HAVE_UB_CTX_SET_STUB # ifndef HAVE_UB_CTX_SET_STUB
char tmpfn[FILENAME_MAX] = P_tmpdir "/getdns-root-dns-servers-XXXXXX"; char tmpfn[FILENAME_MAX];
# ifdef USE_WINSOCK
GetTempPathA(FILENAME_MAX, tmpfn);
strncat_s(tmpfn, FILENAME_MAX, "/getdns-root-dns-servers-XXXXXX", _TRUNCATE);
# else
strlcpy(tmpfn, P_tmpdir "/getdns-root-dns-servers-XXXXXX", FILENAME_MAX);
# endif
FILE *fh; FILE *fh;
int fd; int fd;
size_t dst_len; size_t dst_len;
@ -2736,7 +2750,7 @@ getdns_context_set_upstream_recursive_servers(struct getdns_context *context,
} }
memset(&hints, 0, sizeof(struct addrinfo)); memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
hints.ai_socktype = 0; /* Datagram socket */ hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_flags = AI_NUMERICHOST; /* No reverse name lookups */ hints.ai_flags = AI_NUMERICHOST; /* No reverse name lookups */
hints.ai_protocol = 0; /* Any protocol */ hints.ai_protocol = 0; /* Any protocol */
hints.ai_canonname = NULL; hints.ai_canonname = NULL;
@ -3473,7 +3487,7 @@ static getdns_return_t
ub_setup_recursing(struct ub_ctx *ctx, getdns_context *context) ub_setup_recursing(struct ub_ctx *ctx, getdns_context *context)
{ {
_getdns_rr_iter rr_spc, *rr; _getdns_rr_iter rr_spc, *rr;
char ta_str[8192]; char ta_str[8192] = "";
int r; int r;
if ((r = ub_ctx_set_fwd(ctx, NULL))) { if ((r = ub_ctx_set_fwd(ctx, NULL))) {

View File

@ -209,7 +209,10 @@ typedef struct getdns_upstream {
_getdns_tls_session* tls_session; _getdns_tls_session* tls_session;
getdns_tls_hs_state_t tls_hs_state; getdns_tls_hs_state_t tls_hs_state;
getdns_auth_state_t tls_auth_state; getdns_auth_state_t tls_auth_state;
uint64_t expires; /* Expire time of waiting netreqs.
* This is how long a handshake may
* take.
*/
/* TLS settings */ /* TLS settings */
char *tls_cipher_list; char *tls_cipher_list;
char *tls_ciphersuites; char *tls_ciphersuites;

View File

@ -41,9 +41,6 @@
#endif #endif
#if defined(HAVE_LIBIDN2) #if defined(HAVE_LIBIDN2)
#include <idn2.h> #include <idn2.h>
#elif defined(HAVE_LIBIDN)
#include <stringprep.h>
#include <idna.h>
#endif #endif
#include "getdns/getdns.h" #include "getdns/getdns.h"
#include "getdns/getdns_extra.h" #include "getdns/getdns_extra.h"
@ -124,32 +121,6 @@ getdns_convert_ulabel_to_alabel(const char *ulabel)
if (idn2_lookup_u8((uint8_t *)ulabel, &alabel, IDN2_TRANSITIONAL) == IDN2_OK) if (idn2_lookup_u8((uint8_t *)ulabel, &alabel, IDN2_TRANSITIONAL) == IDN2_OK)
return (char *)alabel; return (char *)alabel;
#elif defined(HAVE_LIBIDN)
char *alabel;
char *prepped;
char prepped2[BUFSIZ];
if (!ulabel) return NULL;
setlocale(LC_ALL, "");
if ((prepped = stringprep_locale_to_utf8(ulabel))) {
if(strlen(prepped)+1 > BUFSIZ) {
free(prepped);
return NULL;
}
memcpy(prepped2, prepped, strlen(prepped)+1);
free(prepped);
/* convert to utf8 fails, which it can, but continue anyway */
} else if (strlen(ulabel)+1 > BUFSIZ)
return NULL;
else
memcpy(prepped2, ulabel, strlen(ulabel)+1);
if (stringprep(prepped2, BUFSIZ, 0, stringprep_nameprep) == STRINGPREP_OK
&& idna_to_ascii_8z(prepped2, &alabel, 0) == IDNA_SUCCESS)
return alabel;
#else #else
(void)ulabel; (void)ulabel;
#endif #endif
@ -170,16 +141,12 @@ getdns_convert_ulabel_to_alabel(const char *ulabel)
char * char *
getdns_convert_alabel_to_ulabel(const char *alabel) getdns_convert_alabel_to_ulabel(const char *alabel)
{ {
#if defined(HAVE_LIBIDN2) || defined(HAVE_LIBIDN) #if defined(HAVE_LIBIDN2)
char *ulabel; char *ulabel;
if (!alabel) return NULL; if (!alabel) return NULL;
# if defined(HAVE_LIBIDN2)
if (idn2_to_unicode_8z8z(alabel, &ulabel, 0) == IDN2_OK) if (idn2_to_unicode_8z8z(alabel, &ulabel, 0) == IDN2_OK)
# else
if (idna_to_unicode_8z8z(alabel, &ulabel, 0) == IDNA_SUCCESS)
# endif
return ulabel; return ulabel;
#else #else
(void)alabel; (void)alabel;
@ -460,7 +427,7 @@ getdns_rr_dict2str_scan(
prev_str_len = *str_len; prev_str_len = *str_len;
sz = (size_t)*str_len; sz = (size_t)*str_len;
sz_needed = gldns_wire2str_rr_scan( sz_needed = gldns_wire2str_rr_scan(
&scan_buf, &scan_sz, str, &sz, NULL, 0); &scan_buf, &scan_sz, str, &sz, NULL, 0, NULL);
if (sz_needed > prev_str_len) { if (sz_needed > prev_str_len) {
*str = prev_str + sz_needed; *str = prev_str + sz_needed;
@ -1389,7 +1356,7 @@ static int _jsmn_get_int(const char *js, jsmntok_t *t, uint32_t *value)
static int _jsmn_get_const(const char *js, jsmntok_t *t, uint32_t *value) static int _jsmn_get_const(const char *js, jsmntok_t *t, uint32_t *value)
{ {
char value_str[80]; char value_str[80] = "";
int size = t->end - t->start; int size = t->end - t->start;
if (size <= 0 || size >= (int)sizeof(value_str)) if (size <= 0 || size >= (int)sizeof(value_str))

View File

@ -38,6 +38,10 @@
#include "types-internal.h" #include "types-internal.h"
#include <stdio.h> #include <stdio.h>
getdns_return_t
_getdns_wire2msg_dict_scan(struct mem_funcs *mf,
const uint8_t **wire, size_t *wire_len, getdns_dict **msg_dict);
getdns_return_t _getdns_wire2rr_dict(struct mem_funcs *mf, getdns_return_t _getdns_wire2rr_dict(struct mem_funcs *mf,
const uint8_t *wire, size_t wire_len, getdns_dict **rr_dict); const uint8_t *wire, size_t wire_len, getdns_dict **rr_dict);

View File

@ -83,7 +83,7 @@ static char *_json_ptr_first(const struct mem_funcs *mf,
static struct getdns_dict_item * static struct getdns_dict_item *
_find_dict_item(const getdns_dict *dict, const char *jptr) _find_dict_item(const getdns_dict *dict, const char *jptr)
{ {
char first_spc[1024], *first; char first_spc[1024] = "", *first;
struct getdns_dict_item *d; struct getdns_dict_item *d;
first = _json_ptr_first(&dict->mf, jptr, first = _json_ptr_first(&dict->mf, jptr,
@ -1149,7 +1149,9 @@ getdns_pp_dict(gldns_buffer * buf, size_t indent,
case t_bindata: case t_bindata:
if ((strcmp(item->node.key, "address_data") == 0 || if ((strcmp(item->node.key, "address_data") == 0 ||
strcmp(item->node.key, "ipv4_address") == 0 || strcmp(item->node.key, "ipv4_address") == 0 ||
strcmp(item->node.key, "ipv6_address") == 0 ) && strcmp(item->node.key, "ipv6_address") == 0 ||
strcmp(item->node.key, "answer_ipv4_address") == 0 ||
strcmp(item->node.key, "answer_ipv6_address") == 0) &&
(item->i.data.bindata->size == 4 || (item->i.data.bindata->size == 4 ||
item->i.data.bindata->size == 16 )) { item->i.data.bindata->size == 16 )) {

View File

@ -192,7 +192,6 @@
#include "debug.h" #include "debug.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h>
#include <ctype.h> #include <ctype.h>
#include "getdns/getdns.h" #include "getdns/getdns.h"
#include "context.h" #include "context.h"
@ -399,7 +398,7 @@ static inline void debug_sec_print_rr(const char *msg, _getdns_rr_iter *rr)
} }
(void) gldns_wire2str_rr_scan( (void) gldns_wire2str_rr_scan(
(UNCONST_UINT8_p *) &data, &data_len, &str, &str_len, (UNCONST_UINT8_p *) &data, &data_len, &str, &str_len,
(UNCONST_UINT8_p) rr->pkt, rr->pkt_end - rr->pkt); (UNCONST_UINT8_p) rr->pkt, rr->pkt_end - rr->pkt, NULL);
DEBUG_SEC("%s%s", msg, str_spc); DEBUG_SEC("%s%s", msg, str_spc);
} }
static inline void debug_sec_print_dname(const char *msg, const uint8_t *label) static inline void debug_sec_print_dname(const char *msg, const uint8_t *label)

View File

@ -33,7 +33,11 @@
#include "config.h" #include "config.h"
#include "types-internal.h" #include "types-internal.h"
#ifndef USE_WINSOCK
#include <sys/time.h> #include <sys/time.h>
#else
#include <winsock2.h>
#endif
#include "getdns/getdns_ext_libevent.h" #include "getdns/getdns_ext_libevent.h"
#ifdef HAVE_EVENT2_EVENT_H #ifdef HAVE_EVENT2_EVENT_H

View File

@ -651,6 +651,8 @@ getdns_general_ns(getdns_context *context, getdns_eventloop *loop,
req->is_dns_request = 0; req->is_dns_request = 0;
_getdns_call_user_callback _getdns_call_user_callback
( req, localnames_response); ( req, localnames_response);
if (return_netreq_p)
*return_netreq_p = NULL;
break; break;
} }
#ifdef HAVE_MDNS_SUPPORT #ifdef HAVE_MDNS_SUPPORT

View File

@ -36,10 +36,14 @@
#define _GETDNS_EXTRA_H_ #define _GETDNS_EXTRA_H_
#include <getdns/getdns.h> #include <getdns/getdns.h>
#include <sys/time.h>
#include <stdio.h>
#include <time.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h>
#if defined(_WIN32)
/* For struct timeval, see getdns_context_get_num_pending_requests */
#include <winsock2.h>
#else
#include <sys/time.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -3,7 +3,7 @@
# Meant to be run from this directory # Meant to be run from this directory
rm -fr gldns rm -fr gldns
mkdir gldns mkdir gldns
svn co https://nlnetlabs.nl/svn/unbound/trunk/sldns/ svn co https://github.com/NLnetLabs/unbound/trunk/sldns/
mv gbuffer.h sbuffer.h mv gbuffer.h sbuffer.h
mv gbuffer.c sbuffer.c mv gbuffer.c sbuffer.c
for f in sldns/*.[ch] for f in sldns/*.[ch]

View File

@ -14,6 +14,7 @@
#include "config.h" #include "config.h"
#include "gldns/gbuffer.h" #include "gldns/gbuffer.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h>
gldns_buffer * gldns_buffer *
gldns_buffer_new(size_t capacity) gldns_buffer_new(size_t capacity)

View File

@ -13,6 +13,12 @@
#ifndef GLDNS_SBUFFER_H #ifndef GLDNS_SBUFFER_H
#define GLDNS_SBUFFER_H #define GLDNS_SBUFFER_H
#include <stdint.h>
#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@ -16,16 +16,5 @@ then
mv sbuffer.h gbuffer.h mv sbuffer.h gbuffer.h
mv sbuffer.c gbuffer.c mv sbuffer.c gbuffer.c
else else
svn co https://nlnetlabs.nl/svn/unbound/trunk/sldns/ echo Run compare first
for f in ldns/*.[ch]
do
sed -e 's/sldns_/gldns_/g' \
-e 's/LDNS_/GLDNS_/g' \
-e 's/include "sldns/include "gldns/g' \
-e 's/<sldns\/rrdef\.h>/<gldns\/rrdef.h>/g' \
-e 's/sbuffer\.h/gbuffer.h/g' $f > ${f#ldns/}
done
mv sbuffer.h gbuffer.h
mv sbuffer.c gbuffer.c
rm -fr sldns
fi fi

View File

@ -13,7 +13,10 @@
#include "gldns/gbuffer.h" #include "gldns/gbuffer.h"
#include <limits.h> #include <limits.h>
#include <stdlib.h>
#ifdef HAVE_STRINGS_H
#include <strings.h> #include <strings.h>
#endif
gldns_lookup_table gldns_directive_types[] = { gldns_lookup_table gldns_directive_types[] = {
{ GLDNS_DIR_TTL, "$TTL" }, { GLDNS_DIR_TTL, "$TTL" },
@ -325,8 +328,14 @@ gldns_bget_token_par(gldns_buffer *b, char *token, const char *delim,
if (c == '\n' && p != 0) { if (c == '\n' && p != 0) {
/* in parentheses */ /* in parentheses */
/* do not write ' ' if we want to skip spaces */ /* do not write ' ' if we want to skip spaces */
if(!(skipw && (strchr(skipw, c)||strchr(skipw, ' ')))) if(!(skipw && (strchr(skipw, c)||strchr(skipw, ' ')))) {
/* check for space for the space character */
if (limit > 0 && (i >= limit || (size_t)(t-token) >= limit)) {
*t = '\0';
return -1;
}
*t++ = ' '; *t++ = ' ';
}
lc = c; lc = c;
continue; continue;
} }

View File

@ -14,8 +14,12 @@
#include "config.h" #include "config.h"
#include "gldns/parseutil.h" #include "gldns/parseutil.h"
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h> #include <sys/time.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h> #include <time.h>
#endif
#include <ctype.h> #include <ctype.h>
gldns_lookup_table * gldns_lookup_table *

View File

@ -16,6 +16,8 @@
#include "gldns/rrdef.h" #include "gldns/rrdef.h"
#include "gldns/parseutil.h" #include "gldns/parseutil.h"
#include <stdlib.h>
/* classes */ /* classes */
static gldns_lookup_table gldns_rr_classes_data[] = { static gldns_lookup_table gldns_rr_classes_data[] = {
{ GLDNS_RR_CLASS_IN, "IN" }, { GLDNS_RR_CLASS_IN, "IN" },
@ -248,7 +250,7 @@ static const gldns_rdf_type type_amtrelay_wireformat[] = {
*/ */
static gldns_rr_descriptor rdata_field_descriptors[] = { static gldns_rr_descriptor rdata_field_descriptors[] = {
/* 0 */ /* 0 */
{ 0, NULL, 0, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, NULL, 0, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* 1 */ /* 1 */
{GLDNS_RR_TYPE_A, "A", 1, 1, type_a_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_A, "A", 1, 1, type_a_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* 2 */ /* 2 */
@ -356,7 +358,7 @@ static gldns_rr_descriptor rdata_field_descriptors[] = {
/* 53 */ /* 53 */
{GLDNS_RR_TYPE_SMIMEA, "SMIMEA", 4, 4, type_tlsa_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_SMIMEA, "SMIMEA", 4, 4, type_tlsa_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* 54 */ /* 54 */
{GLDNS_RR_TYPE_NULL, "TYPE54", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE54", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* 55 /* 55
* Hip ends with 0 or more Rendezvous Servers represented as dname's. * Hip ends with 0 or more Rendezvous Servers represented as dname's.
* Hence the GLDNS_RDF_TYPE_DNAME _variable field and the _maximum field * Hence the GLDNS_RDF_TYPE_DNAME _variable field and the _maximum field
@ -370,8 +372,8 @@ static gldns_rr_descriptor rdata_field_descriptors[] = {
/* 57 */ /* 57 */
{GLDNS_RR_TYPE_RKEY, "RKEY", 4, 4, type_key_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_RKEY, "RKEY", 4, 4, type_key_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
#else #else
{GLDNS_RR_TYPE_NULL, "TYPE56", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE56", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE57", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE57", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
#endif #endif
/* 58 */ /* 58 */
{GLDNS_RR_TYPE_TALINK, "TALINK", 2, 2, type_talink_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 2 }, {GLDNS_RR_TYPE_TALINK, "TALINK", 2, 2, type_talink_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 2 },
@ -386,53 +388,53 @@ static gldns_rr_descriptor rdata_field_descriptors[] = {
{GLDNS_RR_TYPE_CSYNC, "CSYNC", 3, 3, type_csync_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_CSYNC, "CSYNC", 3, 3, type_csync_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* 63 */ /* 63 */
{GLDNS_RR_TYPE_ZONEMD, "ZONEMD", 4, 4, type_zonemd_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_ZONEMD, "ZONEMD", 4, 4, type_zonemd_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE64", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE64", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE65", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE65", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE66", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE66", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE67", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE67", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE68", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE68", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE69", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE69", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE70", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE70", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE71", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE71", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE72", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE72", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE73", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE73", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE74", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE74", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE75", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE75", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE76", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE76", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE77", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE77", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE78", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE78", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE79", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE79", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE80", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE80", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE81", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE81", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE82", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE82", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE83", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE83", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE84", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE84", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE85", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE85", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE86", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE86", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE87", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE87", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE88", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE88", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE89", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE89", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE90", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE90", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE91", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE91", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE92", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE92", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE93", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE93", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE94", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE94", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE95", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE95", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE96", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE96", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE97", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE97", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE98", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE98", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* 99 */ /* 99 */
{GLDNS_RR_TYPE_SPF, "SPF", 1, 0, NULL, GLDNS_RDF_TYPE_STR, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_SPF, "SPF", 1, 0, NULL, GLDNS_RDF_TYPE_STR, GLDNS_RR_NO_COMPRESS, 0 },
/* UINFO [IANA-Reserved] */ /* UINFO [IANA-Reserved] */
{GLDNS_RR_TYPE_NULL, "TYPE100", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE100", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* UID [IANA-Reserved] */ /* UID [IANA-Reserved] */
{GLDNS_RR_TYPE_NULL, "TYPE101", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE101", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* GID [IANA-Reserved] */ /* GID [IANA-Reserved] */
{GLDNS_RR_TYPE_NULL, "TYPE102", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE102", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* UNSPEC [IANA-Reserved] */ /* UNSPEC [IANA-Reserved] */
{GLDNS_RR_TYPE_NULL, "TYPE103", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE103", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* 104 */ /* 104 */
{GLDNS_RR_TYPE_NID, "NID", 2, 2, type_nid_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_NID, "NID", 2, 2, type_nid_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
@ -448,145 +450,145 @@ static gldns_rr_descriptor rdata_field_descriptors[] = {
/* 109 */ /* 109 */
{GLDNS_RR_TYPE_EUI64, "EUI64", 1, 1, type_eui64_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_EUI64, "EUI64", 1, 1, type_eui64_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE110", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE110", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE111", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE111", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE112", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE112", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE113", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE113", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE114", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE114", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE115", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE115", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE116", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE116", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE117", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE117", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE118", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE118", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE119", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE119", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE120", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE120", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE121", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE121", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE122", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE122", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE123", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE123", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE124", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE124", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE125", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE125", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE126", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE126", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE127", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE127", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE128", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE128", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE129", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE129", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE130", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE130", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE131", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE131", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE132", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE132", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE133", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE133", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE134", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE134", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE135", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE135", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE136", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE136", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE137", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE137", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE138", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE138", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE139", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE139", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE140", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE140", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE141", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE141", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE142", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE142", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE143", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE143", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE144", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE144", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE145", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE145", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE146", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE146", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE147", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE147", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE148", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE148", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE149", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE149", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE150", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE150", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE151", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE151", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE152", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE152", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE153", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE153", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE154", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE154", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE155", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE155", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE156", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE156", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE157", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE157", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE158", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE158", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE159", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE159", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE160", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE160", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE161", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE161", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE162", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE162", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE163", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE163", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE164", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE164", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE165", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE165", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE166", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE166", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE167", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE167", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE168", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE168", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE169", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE169", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE170", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE170", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE171", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE171", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE172", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE172", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE173", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE173", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE174", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE174", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE175", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE175", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE176", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE176", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE177", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE177", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE178", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE178", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE179", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE179", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE180", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE180", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE181", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE181", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE182", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE182", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE183", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE183", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE184", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE184", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE185", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE185", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE186", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE186", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE187", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE187", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE188", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE188", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE189", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE189", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE190", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE190", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE191", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE191", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE192", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE192", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE193", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE193", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE194", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE194", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE195", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE195", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE196", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE196", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE197", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE197", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE198", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE198", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE199", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE199", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE200", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE200", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE201", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE201", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE202", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE202", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE203", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE203", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE204", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE204", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE205", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE205", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE206", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE206", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE207", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE207", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE208", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE208", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE209", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE209", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE210", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE210", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE211", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE211", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE212", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE212", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE213", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE213", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE214", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE214", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE215", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE215", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE216", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE216", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE217", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE217", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE218", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE218", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE219", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE219", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE220", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE220", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE221", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE221", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE222", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE222", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE223", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE223", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE224", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE224", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE225", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE225", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE226", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE226", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE227", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE227", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE228", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE228", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE229", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE229", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE230", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE230", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE231", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE231", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE232", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE232", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE233", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE233", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE234", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE234", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE235", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE235", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE236", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE236", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE237", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE237", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE238", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE238", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE239", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE239", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE240", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE240", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE241", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE241", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE242", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE242", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE243", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE243", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE244", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE244", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE245", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE245", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE246", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE246", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE247", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE247", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE248", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE248", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
/* GLDNS_RDF_TYPE_INT16_DATA takes two fields (length and data) as one. /* GLDNS_RDF_TYPE_INT16_DATA takes two fields (length and data) as one.
* So, unlike RFC 2930 spec, we have 7 min/max rdf's i.s.o. 8/9. * So, unlike RFC 2930 spec, we have 7 min/max rdf's i.s.o. 8/9.
@ -622,9 +624,9 @@ static gldns_rr_descriptor rdata_field_descriptors[] = {
/* 260 */ /* 260 */
{GLDNS_RR_TYPE_AMTRELAY, "AMTRELAY", 1, 0, type_amtrelay_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_AMTRELAY, "AMTRELAY", 1, 0, type_amtrelay_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
#else #else
{GLDNS_RR_TYPE_NULL, "TYPE258", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE258", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE259", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE259", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
{GLDNS_RR_TYPE_NULL, "TYPE260", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE260", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
#endif #endif
/* split in array, no longer contiguous */ /* split in array, no longer contiguous */
@ -633,7 +635,7 @@ static gldns_rr_descriptor rdata_field_descriptors[] = {
/* 32768 */ /* 32768 */
{GLDNS_RR_TYPE_TA, "TA", 4, 4, type_ds_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {GLDNS_RR_TYPE_TA, "TA", 4, 4, type_ds_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
#else #else
{GLDNS_RR_TYPE_NULL, "TYPE32768", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }, {(enum gldns_enum_rr_type)0, "TYPE32768", 1, 1, type_0_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 },
#endif #endif
/* 32769 */ /* 32769 */
{GLDNS_RR_TYPE_DLV, "DLV", 4, 4, type_ds_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 } {GLDNS_RR_TYPE_DLV, "DLV", 4, 4, type_ds_wireformat, GLDNS_RDF_TYPE_NONE, GLDNS_RR_NO_COMPRESS, 0 }
@ -729,18 +731,18 @@ gldns_get_rr_type_by_name(const char *name)
/* special cases for query types */ /* special cases for query types */
if (strlen(name) == 4 && strncasecmp(name, "IXFR", 4) == 0) { if (strlen(name) == 4 && strncasecmp(name, "IXFR", 4) == 0) {
return 251; return GLDNS_RR_TYPE_IXFR;
} else if (strlen(name) == 4 && strncasecmp(name, "AXFR", 4) == 0) { } else if (strlen(name) == 4 && strncasecmp(name, "AXFR", 4) == 0) {
return 252; return GLDNS_RR_TYPE_AXFR;
} else if (strlen(name) == 5 && strncasecmp(name, "MAILB", 5) == 0) { } else if (strlen(name) == 5 && strncasecmp(name, "MAILB", 5) == 0) {
return 253; return GLDNS_RR_TYPE_MAILB;
} else if (strlen(name) == 5 && strncasecmp(name, "MAILA", 5) == 0) { } else if (strlen(name) == 5 && strncasecmp(name, "MAILA", 5) == 0) {
return 254; return GLDNS_RR_TYPE_MAILA;
} else if (strlen(name) == 3 && strncasecmp(name, "ANY", 3) == 0) { } else if (strlen(name) == 3 && strncasecmp(name, "ANY", 3) == 0) {
return 255; return GLDNS_RR_TYPE_ANY;
} }
return 0; return (enum gldns_enum_rr_type)0;
} }
gldns_rr_class gldns_rr_class

View File

@ -24,6 +24,7 @@
#ifdef HAVE_NETDB_H #ifdef HAVE_NETDB_H
#include <netdb.h> #include <netdb.h>
#endif #endif
#include <stdlib.h>
/** return an error */ /** return an error */
#define RET_ERR(e, off) ((int)((e)|((off)<<GLDNS_WIREPARSE_SHIFT))) #define RET_ERR(e, off) ((int)((e)|((off)<<GLDNS_WIREPARSE_SHIFT)))
@ -150,6 +151,10 @@ int gldns_str2wire_dname_buf_origin(const char* str, uint8_t* buf, size_t* len,
if(s) return s; if(s) return s;
if(rel && origin && dlen > 0) { if(rel && origin && dlen > 0) {
if((unsigned)dlen >= 0x00ffffffU ||
(unsigned)origin_len >= 0x00ffffffU)
/* guard against integer overflow in addition */
return RET_ERR(GLDNS_WIREPARSE_ERR_GENERAL, *len);
if(dlen + origin_len - 1 > GLDNS_MAX_DOMAINLEN) if(dlen + origin_len - 1 > GLDNS_MAX_DOMAINLEN)
return RET_ERR(GLDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW, return RET_ERR(GLDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW,
GLDNS_MAX_DOMAINLEN); GLDNS_MAX_DOMAINLEN);
@ -168,7 +173,9 @@ uint8_t* gldns_str2wire_dname(const char* str, size_t* len)
uint8_t dname[GLDNS_MAX_DOMAINLEN+1]; uint8_t dname[GLDNS_MAX_DOMAINLEN+1];
*len = sizeof(dname); *len = sizeof(dname);
if(gldns_str2wire_dname_buf(str, dname, len) == 0) { if(gldns_str2wire_dname_buf(str, dname, len) == 0) {
uint8_t* r = (uint8_t*)malloc(*len); uint8_t* r;
if(*len > sizeof(dname)) return NULL;
r = (uint8_t*)malloc(*len);
if(r) return memcpy(r, dname, *len); if(r) return memcpy(r, dname, *len);
} }
*len = 0; *len = 0;
@ -187,7 +194,10 @@ rrinternal_get_owner(gldns_buffer* strbuf, uint8_t* rr, size_t* len,
gldns_buffer_position(strbuf)); gldns_buffer_position(strbuf));
} }
if(strcmp(token, "@") == 0) { if(token_len < 2) /* make sure there is space to read "@" or "" */
return RET_ERR(GLDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL,
gldns_buffer_position(strbuf));
if(token[0]=='@' && token[1]=='\0') {
uint8_t* tocopy; uint8_t* tocopy;
if (origin) { if (origin) {
*dname_len = origin_len; *dname_len = origin_len;
@ -727,7 +737,7 @@ gldns_str2wire_rr_buf_internal(const char* str, uint8_t* rr, size_t* len,
{ {
int status; int status;
int not_there = 0; int not_there = 0;
char token[GLDNS_MAX_RDFLEN+1]; char token[GLDNS_MAX_RDFLEN+1] = "";
uint32_t ttl = 0; uint32_t ttl = 0;
uint16_t tp = 0, cl = 0; uint16_t tp = 0, cl = 0;
size_t ddlen = 0; size_t ddlen = 0;
@ -1096,7 +1106,7 @@ int gldns_str2wire_str_buf(const char* str, uint8_t* rd, size_t* len)
while(gldns_parse_char(&ch, &s)) { while(gldns_parse_char(&ch, &s)) {
if(sl >= 255) if(sl >= 255)
return RET_ERR(GLDNS_WIREPARSE_ERR_INVALID_STR, s-str); return RET_ERR(GLDNS_WIREPARSE_ERR_INVALID_STR, s-str);
if(*len < sl+1) if(*len < sl+2)
return RET_ERR(GLDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL, return RET_ERR(GLDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL,
s-str); s-str);
rd[++sl] = ch; rd[++sl] = ch;
@ -2097,6 +2107,8 @@ int gldns_str2wire_int16_data_buf(const char* str, uint8_t* rd, size_t* len)
char* s; char* s;
int n; int n;
n = strtol(str, &s, 10); n = strtol(str, &s, 10);
if(n < 0) /* negative number not allowed */
return GLDNS_WIREPARSE_ERR_SYNTAX;
if(*len < ((size_t)n)+2) if(*len < ((size_t)n)+2)
return GLDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL; return GLDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL;
if(n > 65535) if(n > 65535)

View File

@ -25,7 +25,9 @@
#ifdef HAVE_TIME_H #ifdef HAVE_TIME_H
#include <time.h> #include <time.h>
#endif #endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h> #include <sys/time.h>
#endif
#include <stdarg.h> #include <stdarg.h>
#include <ctype.h> #include <ctype.h>
#ifdef HAVE_NETDB_H #ifdef HAVE_NETDB_H
@ -252,13 +254,13 @@ int gldns_wire2str_pkt_buf(uint8_t* d, size_t dlen, char* s, size_t slen)
int gldns_wire2str_rr_buf(uint8_t* d, size_t dlen, char* s, size_t slen) int gldns_wire2str_rr_buf(uint8_t* d, size_t dlen, char* s, size_t slen)
{ {
/* use arguments as temporary variables */ /* use arguments as temporary variables */
return gldns_wire2str_rr_scan(&d, &dlen, &s, &slen, NULL, 0); return gldns_wire2str_rr_scan(&d, &dlen, &s, &slen, NULL, 0, NULL);
} }
int gldns_wire2str_rrquestion_buf(uint8_t* d, size_t dlen, char* s, size_t slen) int gldns_wire2str_rrquestion_buf(uint8_t* d, size_t dlen, char* s, size_t slen)
{ {
/* use arguments as temporary variables */ /* use arguments as temporary variables */
return gldns_wire2str_rrquestion_scan(&d, &dlen, &s, &slen, NULL, 0); return gldns_wire2str_rrquestion_scan(&d, &dlen, &s, &slen, NULL, 0, NULL);
} }
int gldns_wire2str_rdata_buf(uint8_t* rdata, size_t rdata_len, char* str, int gldns_wire2str_rdata_buf(uint8_t* rdata, size_t rdata_len, char* str,
@ -266,13 +268,13 @@ int gldns_wire2str_rdata_buf(uint8_t* rdata, size_t rdata_len, char* str,
{ {
/* use arguments as temporary variables */ /* use arguments as temporary variables */
return gldns_wire2str_rdata_scan(&rdata, &rdata_len, &str, &str_len, return gldns_wire2str_rdata_scan(&rdata, &rdata_len, &str, &str_len,
rrtype, NULL, 0); rrtype, NULL, 0, NULL);
} }
int gldns_wire2str_rr_unknown_buf(uint8_t* d, size_t dlen, char* s, size_t slen) int gldns_wire2str_rr_unknown_buf(uint8_t* d, size_t dlen, char* s, size_t slen)
{ {
/* use arguments as temporary variables */ /* use arguments as temporary variables */
return gldns_wire2str_rr_unknown_scan(&d, &dlen, &s, &slen, NULL, 0); return gldns_wire2str_rr_unknown_scan(&d, &dlen, &s, &slen, NULL, 0, NULL);
} }
int gldns_wire2str_rr_comment_buf(uint8_t* rr, size_t rrlen, size_t dname_len, int gldns_wire2str_rr_comment_buf(uint8_t* rr, size_t rrlen, size_t dname_len,
@ -310,7 +312,7 @@ int gldns_wire2str_opcode_buf(int opcode, char* s, size_t slen)
int gldns_wire2str_dname_buf(uint8_t* d, size_t dlen, char* s, size_t slen) int gldns_wire2str_dname_buf(uint8_t* d, size_t dlen, char* s, size_t slen)
{ {
/* use arguments as temporary variables */ /* use arguments as temporary variables */
return gldns_wire2str_dname_scan(&d, &dlen, &s, &slen, NULL, 0); return gldns_wire2str_dname_scan(&d, &dlen, &s, &slen, NULL, 0, NULL);
} }
int gldns_str_vprint(char** str, size_t* slen, const char* format, va_list args) int gldns_str_vprint(char** str, size_t* slen, const char* format, va_list args)
@ -365,7 +367,7 @@ static int print_remainder_hex(const char* pref, uint8_t** d, size_t* dlen,
int gldns_wire2str_pkt_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen) int gldns_wire2str_pkt_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen)
{ {
int w = 0; int w = 0, comprloop = 0;
unsigned qdcount, ancount, nscount, arcount, i; unsigned qdcount, ancount, nscount, arcount, i;
uint8_t* pkt = *d; uint8_t* pkt = *d;
size_t pktlen = *dlen; size_t pktlen = *dlen;
@ -382,25 +384,25 @@ int gldns_wire2str_pkt_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen)
w += gldns_str_print(s, slen, ";; QUESTION SECTION:\n"); w += gldns_str_print(s, slen, ";; QUESTION SECTION:\n");
for(i=0; i<qdcount; i++) { for(i=0; i<qdcount; i++) {
w += gldns_wire2str_rrquestion_scan(d, dlen, s, slen, w += gldns_wire2str_rrquestion_scan(d, dlen, s, slen,
pkt, pktlen); pkt, pktlen, &comprloop);
if(!*dlen) break; if(!*dlen) break;
} }
w += gldns_str_print(s, slen, "\n"); w += gldns_str_print(s, slen, "\n");
w += gldns_str_print(s, slen, ";; ANSWER SECTION:\n"); w += gldns_str_print(s, slen, ";; ANSWER SECTION:\n");
for(i=0; i<ancount; i++) { for(i=0; i<ancount; i++) {
w += gldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen); w += gldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen, &comprloop);
if(!*dlen) break; if(!*dlen) break;
} }
w += gldns_str_print(s, slen, "\n"); w += gldns_str_print(s, slen, "\n");
w += gldns_str_print(s, slen, ";; AUTHORITY SECTION:\n"); w += gldns_str_print(s, slen, ";; AUTHORITY SECTION:\n");
for(i=0; i<nscount; i++) { for(i=0; i<nscount; i++) {
w += gldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen); w += gldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen, &comprloop);
if(!*dlen) break; if(!*dlen) break;
} }
w += gldns_str_print(s, slen, "\n"); w += gldns_str_print(s, slen, "\n");
w += gldns_str_print(s, slen, ";; ADDITIONAL SECTION:\n"); w += gldns_str_print(s, slen, ";; ADDITIONAL SECTION:\n");
for(i=0; i<arcount; i++) { for(i=0; i<arcount; i++) {
w += gldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen); w += gldns_wire2str_rr_scan(d, dlen, s, slen, pkt, pktlen, &comprloop);
if(!*dlen) break; if(!*dlen) break;
} }
/* other fields: WHEN(time), SERVER(IP) not available here. */ /* other fields: WHEN(time), SERVER(IP) not available here. */
@ -449,7 +451,7 @@ static int gldns_rr_tcttl_scan(uint8_t** d, size_t* dl, char** s, size_t* sl)
} }
int gldns_wire2str_rr_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen, int gldns_wire2str_rr_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
uint8_t* pkt, size_t pktlen) uint8_t* pkt, size_t pktlen, int* comprloop)
{ {
int w = 0; int w = 0;
uint8_t* rr = *d; uint8_t* rr = *d;
@ -464,7 +466,7 @@ int gldns_wire2str_rr_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
/* try to scan the rdata with pretty-printing, but if that fails, then /* try to scan the rdata with pretty-printing, but if that fails, then
* scan the rdata as an unknown RR type */ * scan the rdata as an unknown RR type */
w += gldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen); w += gldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop);
w += gldns_str_print(s, slen, "\t"); w += gldns_str_print(s, slen, "\t");
dname_off = rrlen-(*dlen); dname_off = rrlen-(*dlen);
if(*dlen == 4) { if(*dlen == 4) {
@ -508,7 +510,8 @@ int gldns_wire2str_rr_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
w += print_remainder_hex(";Error partial rdata 0x", d, dlen, s, slen); w += print_remainder_hex(";Error partial rdata 0x", d, dlen, s, slen);
return w + gldns_str_print(s, slen, "\n"); return w + gldns_str_print(s, slen, "\n");
} }
w += gldns_wire2str_rdata_scan(d, &rdlen, s, slen, rrtype, pkt, pktlen); w += gldns_wire2str_rdata_scan(d, &rdlen, s, slen, rrtype, pkt, pktlen,
comprloop);
(*dlen) -= (ordlen-rdlen); (*dlen) -= (ordlen-rdlen);
/* default comment */ /* default comment */
@ -519,11 +522,11 @@ int gldns_wire2str_rr_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
} }
int gldns_wire2str_rrquestion_scan(uint8_t** d, size_t* dlen, char** s, int gldns_wire2str_rrquestion_scan(uint8_t** d, size_t* dlen, char** s,
size_t* slen, uint8_t* pkt, size_t pktlen) size_t* slen, uint8_t* pkt, size_t pktlen, int* comprloop)
{ {
int w = 0; int w = 0;
uint16_t t, c; uint16_t t, c;
w += gldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen); w += gldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop);
w += gldns_str_print(s, slen, "\t"); w += gldns_str_print(s, slen, "\t");
if(*dlen < 4) { if(*dlen < 4) {
if(*dlen == 0) if(*dlen == 0)
@ -543,11 +546,11 @@ int gldns_wire2str_rrquestion_scan(uint8_t** d, size_t* dlen, char** s,
} }
int gldns_wire2str_rr_unknown_scan(uint8_t** d, size_t* dlen, char** s, int gldns_wire2str_rr_unknown_scan(uint8_t** d, size_t* dlen, char** s,
size_t* slen, uint8_t* pkt, size_t pktlen) size_t* slen, uint8_t* pkt, size_t pktlen, int* comprloop)
{ {
size_t rdlen, ordlen; size_t rdlen, ordlen;
int w = 0; int w = 0;
w += gldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen); w += gldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop);
w += gldns_str_print(s, slen, "\t"); w += gldns_str_print(s, slen, "\t");
w += gldns_rr_tcttl_scan(d, dlen, s, slen); w += gldns_rr_tcttl_scan(d, dlen, s, slen);
w += gldns_str_print(s, slen, "\t"); w += gldns_str_print(s, slen, "\t");
@ -585,6 +588,7 @@ static int rr_comment_dnskey(char** s, size_t* slen, uint8_t* rr,
if(rrlen < dname_off + 10) return 0; if(rrlen < dname_off + 10) return 0;
rdlen = gldns_read_uint16(rr+dname_off+8); rdlen = gldns_read_uint16(rr+dname_off+8);
if(rrlen < dname_off + 10 + rdlen) return 0; if(rrlen < dname_off + 10 + rdlen) return 0;
if(rdlen < 2) return 0;
rdata = rr + dname_off + 10; rdata = rr + dname_off + 10;
flags = (int)gldns_read_uint16(rdata); flags = (int)gldns_read_uint16(rdata);
w += gldns_str_print(s, slen, " ;{"); w += gldns_str_print(s, slen, " ;{");
@ -698,7 +702,8 @@ int gldns_wire2str_header_scan(uint8_t** d, size_t* dlen, char** s,
} }
int gldns_wire2str_rdata_scan(uint8_t** d, size_t* dlen, char** s, int gldns_wire2str_rdata_scan(uint8_t** d, size_t* dlen, char** s,
size_t* slen, uint16_t rrtype, uint8_t* pkt, size_t pktlen) size_t* slen, uint16_t rrtype, uint8_t* pkt, size_t pktlen,
int* comprloop)
{ {
/* try to prettyprint, but if that fails, use unknown format */ /* try to prettyprint, but if that fails, use unknown format */
uint8_t* origd = *d; uint8_t* origd = *d;
@ -724,7 +729,7 @@ int gldns_wire2str_rdata_scan(uint8_t** d, size_t* dlen, char** s,
if(r_cnt != 0) if(r_cnt != 0)
w += gldns_str_print(s, slen, " "); w += gldns_str_print(s, slen, " ");
n = gldns_wire2str_rdf_scan(d, dlen, s, slen, rdftype, n = gldns_wire2str_rdf_scan(d, dlen, s, slen, rdftype,
pkt, pktlen); pkt, pktlen, comprloop);
if(n == -1) { if(n == -1) {
failed: failed:
/* failed, use unknown format */ /* failed, use unknown format */
@ -775,21 +780,27 @@ static int dname_char_print(char** s, size_t* slen, uint8_t c)
} }
int gldns_wire2str_dname_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen, int gldns_wire2str_dname_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
uint8_t* pkt, size_t pktlen) uint8_t* pkt, size_t pktlen, int* comprloop)
{ {
int w = 0; int w = 0;
/* spool labels onto the string, use compression if its there */ /* spool labels onto the string, use compression if its there */
uint8_t* pos = *d; uint8_t* pos = *d;
unsigned i, counter=0; unsigned i, counter=0;
const unsigned maxcompr = 1000; /* loop detection, max compr ptrs */ unsigned maxcompr = 1000; /* loop detection, max compr ptrs */
int in_buf = 1; int in_buf = 1;
if(comprloop) {
if(*comprloop != 0)
maxcompr = 30; /* for like ipv6 reverse name, per label */
if(*comprloop > 4)
maxcompr = 4; /* just don't want to spend time, any more */
}
if(*dlen == 0) return gldns_str_print(s, slen, "ErrorMissingDname"); if(*dlen == 0) return gldns_str_print(s, slen, "ErrorMissingDname");
if(*pos == 0) { if(*pos == 0) {
(*d)++; (*d)++;
(*dlen)--; (*dlen)--;
return gldns_str_print(s, slen, "."); return gldns_str_print(s, slen, ".");
} }
while(*pos) { while((!pkt || pos < pkt+pktlen) && *pos) {
/* read label length */ /* read label length */
uint8_t labellen = *pos++; uint8_t labellen = *pos++;
if(in_buf) { (*d)++; (*dlen)--; } if(in_buf) { (*d)++; (*dlen)--; }
@ -928,14 +939,14 @@ int gldns_wire2str_ttl_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen)
} }
int gldns_wire2str_rdf_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen, int gldns_wire2str_rdf_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
int rdftype, uint8_t* pkt, size_t pktlen) int rdftype, uint8_t* pkt, size_t pktlen, int* comprloop)
{ {
if(*dlen == 0) return 0; if(*dlen == 0) return 0;
switch(rdftype) { switch(rdftype) {
case GLDNS_RDF_TYPE_NONE: case GLDNS_RDF_TYPE_NONE:
return 0; return 0;
case GLDNS_RDF_TYPE_DNAME: case GLDNS_RDF_TYPE_DNAME:
return gldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen); return gldns_wire2str_dname_scan(d, dlen, s, slen, pkt, pktlen, comprloop);
case GLDNS_RDF_TYPE_INT8: case GLDNS_RDF_TYPE_INT8:
return gldns_wire2str_int8_scan(d, dlen, s, slen); return gldns_wire2str_int8_scan(d, dlen, s, slen);
case GLDNS_RDF_TYPE_INT16: case GLDNS_RDF_TYPE_INT16:
@ -987,7 +998,7 @@ int gldns_wire2str_rdf_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
return gldns_wire2str_atma_scan(d, dlen, s, slen); return gldns_wire2str_atma_scan(d, dlen, s, slen);
case GLDNS_RDF_TYPE_IPSECKEY: case GLDNS_RDF_TYPE_IPSECKEY:
return gldns_wire2str_ipseckey_scan(d, dlen, s, slen, pkt, return gldns_wire2str_ipseckey_scan(d, dlen, s, slen, pkt,
pktlen); pktlen, comprloop);
case GLDNS_RDF_TYPE_HIP: case GLDNS_RDF_TYPE_HIP:
return gldns_wire2str_hip_scan(d, dlen, s, slen); return gldns_wire2str_hip_scan(d, dlen, s, slen);
case GLDNS_RDF_TYPE_INT16_DATA: case GLDNS_RDF_TYPE_INT16_DATA:
@ -1006,7 +1017,7 @@ int gldns_wire2str_rdf_scan(uint8_t** d, size_t* dlen, char** s, size_t* slen,
return gldns_wire2str_long_str_scan(d, dlen, s, slen); return gldns_wire2str_long_str_scan(d, dlen, s, slen);
case GLDNS_RDF_TYPE_AMTRELAY: case GLDNS_RDF_TYPE_AMTRELAY:
return gldns_wire2str_amtrelay_scan(d, dlen, s, slen, pkt, return gldns_wire2str_amtrelay_scan(d, dlen, s, slen, pkt,
pktlen); pktlen, comprloop);
case GLDNS_RDF_TYPE_TSIGERROR: case GLDNS_RDF_TYPE_TSIGERROR:
return gldns_wire2str_tsigerror_scan(d, dlen, s, slen); return gldns_wire2str_tsigerror_scan(d, dlen, s, slen);
} }
@ -1532,7 +1543,7 @@ int gldns_wire2str_atma_scan(uint8_t** d, size_t* dl, char** s, size_t* sl)
/* internal scan routine that can modify arguments on failure */ /* internal scan routine that can modify arguments on failure */
static int gldns_wire2str_ipseckey_scan_internal(uint8_t** d, size_t* dl, static int gldns_wire2str_ipseckey_scan_internal(uint8_t** d, size_t* dl,
char** s, size_t* sl, uint8_t* pkt, size_t pktlen) char** s, size_t* sl, uint8_t* pkt, size_t pktlen, int* comprloop)
{ {
/* http://www.ietf.org/internet-drafts/draft-ietf-ipseckey-rr-12.txt*/ /* http://www.ietf.org/internet-drafts/draft-ietf-ipseckey-rr-12.txt*/
uint8_t precedence, gateway_type, algorithm; uint8_t precedence, gateway_type, algorithm;
@ -1560,7 +1571,7 @@ static int gldns_wire2str_ipseckey_scan_internal(uint8_t** d, size_t* dl,
w += gldns_wire2str_aaaa_scan(d, dl, s, sl); w += gldns_wire2str_aaaa_scan(d, dl, s, sl);
break; break;
case 3: /* dname */ case 3: /* dname */
w += gldns_wire2str_dname_scan(d, dl, s, sl, pkt, pktlen); w += gldns_wire2str_dname_scan(d, dl, s, sl, pkt, pktlen, comprloop);
break; break;
default: /* unknown */ default: /* unknown */
return -1; return -1;
@ -1574,12 +1585,12 @@ static int gldns_wire2str_ipseckey_scan_internal(uint8_t** d, size_t* dl,
} }
int gldns_wire2str_ipseckey_scan(uint8_t** d, size_t* dl, char** s, size_t* sl, int gldns_wire2str_ipseckey_scan(uint8_t** d, size_t* dl, char** s, size_t* sl,
uint8_t* pkt, size_t pktlen) uint8_t* pkt, size_t pktlen, int* comprloop)
{ {
uint8_t* od = *d; uint8_t* od = *d;
char* os = *s; char* os = *s;
size_t odl = *dl, osl = *sl; size_t odl = *dl, osl = *sl;
int w=gldns_wire2str_ipseckey_scan_internal(d, dl, s, sl, pkt, pktlen); int w=gldns_wire2str_ipseckey_scan_internal(d, dl, s, sl, pkt, pktlen, comprloop);
if(w == -1) { if(w == -1) {
*d = od; *d = od;
*s = os; *s = os;
@ -1712,7 +1723,7 @@ int gldns_wire2str_long_str_scan(uint8_t** d, size_t* dl, char** s, size_t* sl)
/* internal scan routine that can modify arguments on failure */ /* internal scan routine that can modify arguments on failure */
static int gldns_wire2str_amtrelay_scan_internal(uint8_t** d, size_t* dl, static int gldns_wire2str_amtrelay_scan_internal(uint8_t** d, size_t* dl,
char** s, size_t* sl, uint8_t* pkt, size_t pktlen) char** s, size_t* sl, uint8_t* pkt, size_t pktlen, int* comprloop)
{ {
/* https://www.ietf.org/id/draft-ietf-mboned-driad-amt-discovery-01.txt */ /* https://www.ietf.org/id/draft-ietf-mboned-driad-amt-discovery-01.txt */
uint8_t precedence, discovery_optional, relay_type; uint8_t precedence, discovery_optional, relay_type;
@ -1739,7 +1750,7 @@ static int gldns_wire2str_amtrelay_scan_internal(uint8_t** d, size_t* dl,
w += gldns_wire2str_aaaa_scan(d, dl, s, sl); w += gldns_wire2str_aaaa_scan(d, dl, s, sl);
break; break;
case 3: /* dname */ case 3: /* dname */
w += gldns_wire2str_dname_scan(d, dl, s, sl, pkt, pktlen); w += gldns_wire2str_dname_scan(d, dl, s, sl, pkt, pktlen, comprloop);
break; break;
default: /* unknown */ default: /* unknown */
return -1; return -1;
@ -1748,12 +1759,12 @@ static int gldns_wire2str_amtrelay_scan_internal(uint8_t** d, size_t* dl,
} }
int gldns_wire2str_amtrelay_scan(uint8_t** d, size_t* dl, char** s, size_t* sl, int gldns_wire2str_amtrelay_scan(uint8_t** d, size_t* dl, char** s, size_t* sl,
uint8_t* pkt, size_t pktlen) uint8_t* pkt, size_t pktlen, int* comprloop)
{ {
uint8_t* od = *d; uint8_t* od = *d;
char* os = *s; char* os = *s;
size_t odl = *dl, osl = *sl; size_t odl = *dl, osl = *sl;
int w=gldns_wire2str_amtrelay_scan_internal(d, dl, s, sl, pkt, pktlen); int w=gldns_wire2str_amtrelay_scan_internal(d, dl, s, sl, pkt, pktlen, comprloop);
if(w == -1) { if(w == -1) {
*d = od; *d = od;
*s = os; *s = os;
@ -1966,8 +1977,8 @@ int gldns_wire2str_edns_subnet_print(char** s, size_t* sl, uint8_t* data,
return w; return w;
} }
int gldns_wire2str_edns_keepalive_print(char** s, size_t* sl, uint8_t* data, static int gldns_wire2str_edns_keepalive_print(char** s, size_t* sl,
size_t len) uint8_t* data, size_t len)
{ {
int w = 0; int w = 0;
uint16_t timeout; uint16_t timeout;

View File

@ -156,10 +156,11 @@ int gldns_wire2str_pkt_scan(uint8_t** data, size_t* data_len, char** str,
* @param str_len: length of string buffer. * @param str_len: length of string buffer.
* @param pkt: packet for decompression, if NULL no decompression. * @param pkt: packet for decompression, if NULL no decompression.
* @param pktlen: length of packet buffer. * @param pktlen: length of packet buffer.
* @param comprloop: if pkt, bool detects compression loops.
* @return number of characters (except null) needed to print. * @return number of characters (except null) needed to print.
*/ */
int gldns_wire2str_rr_scan(uint8_t** data, size_t* data_len, char** str, int gldns_wire2str_rr_scan(uint8_t** data, size_t* data_len, char** str,
size_t* str_len, uint8_t* pkt, size_t pktlen); size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop);
/** /**
* Scan wireformat question rr to string, with user buffers. * Scan wireformat question rr to string, with user buffers.
@ -170,10 +171,11 @@ int gldns_wire2str_rr_scan(uint8_t** data, size_t* data_len, char** str,
* @param str_len: length of string buffer. * @param str_len: length of string buffer.
* @param pkt: packet for decompression, if NULL no decompression. * @param pkt: packet for decompression, if NULL no decompression.
* @param pktlen: length of packet buffer. * @param pktlen: length of packet buffer.
* @param comprloop: if pkt, bool detects compression loops.
* @return number of characters (except null) needed to print. * @return number of characters (except null) needed to print.
*/ */
int gldns_wire2str_rrquestion_scan(uint8_t** data, size_t* data_len, char** str, int gldns_wire2str_rrquestion_scan(uint8_t** data, size_t* data_len, char** str,
size_t* str_len, uint8_t* pkt, size_t pktlen); size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop);
/** /**
* Scan wireformat RR to string in unknown RR format, with user buffers. * Scan wireformat RR to string in unknown RR format, with user buffers.
@ -184,10 +186,11 @@ int gldns_wire2str_rrquestion_scan(uint8_t** data, size_t* data_len, char** str,
* @param str_len: length of string buffer. * @param str_len: length of string buffer.
* @param pkt: packet for decompression, if NULL no decompression. * @param pkt: packet for decompression, if NULL no decompression.
* @param pktlen: length of packet buffer. * @param pktlen: length of packet buffer.
* @param comprloop: if pkt, bool detects compression loops.
* @return number of characters (except null) needed to print. * @return number of characters (except null) needed to print.
*/ */
int gldns_wire2str_rr_unknown_scan(uint8_t** data, size_t* data_len, char** str, int gldns_wire2str_rr_unknown_scan(uint8_t** data, size_t* data_len, char** str,
size_t* str_len, uint8_t* pkt, size_t pktlen); size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop);
/** /**
* Print to string the RR-information comment in default format, * Print to string the RR-information comment in default format,
@ -228,10 +231,12 @@ int gldns_wire2str_header_scan(uint8_t** data, size_t* data_len, char** str,
* @param rrtype: RR type of Rdata, host format. * @param rrtype: RR type of Rdata, host format.
* @param pkt: packet for decompression, if NULL no decompression. * @param pkt: packet for decompression, if NULL no decompression.
* @param pktlen: length of packet buffer. * @param pktlen: length of packet buffer.
* @param comprloop: if pkt, bool detects compression loops.
* @return number of characters (except null) needed to print. * @return number of characters (except null) needed to print.
*/ */
int gldns_wire2str_rdata_scan(uint8_t** data, size_t* data_len, char** str, int gldns_wire2str_rdata_scan(uint8_t** data, size_t* data_len, char** str,
size_t* str_len, uint16_t rrtype, uint8_t* pkt, size_t pktlen); size_t* str_len, uint16_t rrtype, uint8_t* pkt, size_t pktlen,
int* comprloop);
/** /**
* Scan wireformat rdata to string in unknown format, with user buffers. * Scan wireformat rdata to string in unknown format, with user buffers.
@ -254,10 +259,17 @@ int gldns_wire2str_rdata_unknown_scan(uint8_t** data, size_t* data_len,
* @param str_len: length of string buffer. * @param str_len: length of string buffer.
* @param pkt: packet for decompression, if NULL no decompression. * @param pkt: packet for decompression, if NULL no decompression.
* @param pktlen: length of packet buffer. * @param pktlen: length of packet buffer.
* @param comprloop: inout bool, that is set true if compression loop failure
* happens. Pass in 0, if passsed in as true, a lower bound is set
* on compression loops to stop arbitrary long packet parse times.
* This is meant so you can set it to 0 at the start of a list of dnames,
* and then scan all of them in sequence, if a loop happens, it becomes
* true and then it becomes more strict for the next dnames in the list.
* You can leave it at NULL if there is no pkt (pkt is NULL too).
* @return number of characters (except null) needed to print. * @return number of characters (except null) needed to print.
*/ */
int gldns_wire2str_dname_scan(uint8_t** data, size_t* data_len, char** str, int gldns_wire2str_dname_scan(uint8_t** data, size_t* data_len, char** str,
size_t* str_len, uint8_t* pkt, size_t pktlen); size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop);
/** /**
* Scan wireformat rr type to string, with user buffers. * Scan wireformat rr type to string, with user buffers.
@ -492,11 +504,13 @@ int gldns_wire2str_dname_buf(uint8_t* dname, size_t dname_len, char* str,
* @param rdftype: the type of the rdata field, enum gldns_rdf_type. * @param rdftype: the type of the rdata field, enum gldns_rdf_type.
* @param pkt: packet for decompression, if NULL no decompression. * @param pkt: packet for decompression, if NULL no decompression.
* @param pktlen: length of packet buffer. * @param pktlen: length of packet buffer.
* @param comprloop: if pkt, bool detects compression loops.
* @return number of characters (except null) needed to print. * @return number of characters (except null) needed to print.
* Can return -1 on failure. * Can return -1 on failure.
*/ */
int gldns_wire2str_rdf_scan(uint8_t** data, size_t* data_len, char** str, int gldns_wire2str_rdf_scan(uint8_t** data, size_t* data_len, char** str,
size_t* str_len, int rdftype, uint8_t* pkt, size_t pktlen); size_t* str_len, int rdftype, uint8_t* pkt, size_t pktlen,
int* comprloop);
/** /**
* Scan wireformat int8 field to string, with user buffers. * Scan wireformat int8 field to string, with user buffers.
@ -793,11 +807,12 @@ int gldns_wire2str_atma_scan(uint8_t** data, size_t* data_len, char** str,
* @param str_len: length of string buffer. * @param str_len: length of string buffer.
* @param pkt: packet for decompression, if NULL no decompression. * @param pkt: packet for decompression, if NULL no decompression.
* @param pktlen: length of packet buffer. * @param pktlen: length of packet buffer.
* @param comprloop: if pkt, bool detects compression loops.
* @return number of characters (except null) needed to print. * @return number of characters (except null) needed to print.
* Can return -1 on failure. * Can return -1 on failure.
*/ */
int gldns_wire2str_ipseckey_scan(uint8_t** data, size_t* data_len, char** str, int gldns_wire2str_ipseckey_scan(uint8_t** data, size_t* data_len, char** str,
size_t* str_len, uint8_t* pkt, size_t pktlen); size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop);
/** /**
* Scan wireformat HIP (algo, HIT, pubkey) field to string, with user buffers. * Scan wireformat HIP (algo, HIT, pubkey) field to string, with user buffers.
@ -925,11 +940,12 @@ int gldns_wire2str_long_str_scan(uint8_t** data, size_t* data_len, char** str,
* @param str_len: length of string buffer. * @param str_len: length of string buffer.
* @param pkt: packet for decompression, if NULL no decompression. * @param pkt: packet for decompression, if NULL no decompression.
* @param pktlen: length of packet buffer. * @param pktlen: length of packet buffer.
* @param comprloop: if pkt, bool detects compression loops.
* @return number of characters (except null) needed to print. * @return number of characters (except null) needed to print.
* Can return -1 on failure. * Can return -1 on failure.
*/ */
int gldns_wire2str_amtrelay_scan(uint8_t** data, size_t* data_len, char** str, int gldns_wire2str_amtrelay_scan(uint8_t** data, size_t* data_len, char** str,
size_t* str_len, uint8_t* pkt, size_t pktlen); size_t* str_len, uint8_t* pkt, size_t pktlen, int* comprloop);
/** /**
* Print EDNS LLQ option data to string. User buffers, moves string pointers. * Print EDNS LLQ option data to string. User buffers, moves string pointers.

View File

@ -53,7 +53,8 @@
#define HAVE_TLS_CTX_CURVES_LIST 0 #define HAVE_TLS_CTX_CURVES_LIST 0
#define HAVE_TLS_CONN_CURVES_LIST 0 #define HAVE_TLS_CONN_CURVES_LIST 0
typedef struct getdns_log_config getdns_log_config; /* Forward declare type. */
struct getdns_log_config;
typedef struct _getdns_tls_context { typedef struct _getdns_tls_context {
struct mem_funcs* mfs; struct mem_funcs* mfs;
@ -64,7 +65,7 @@ typedef struct _getdns_tls_context {
gnutls_protocol_t max_tls; gnutls_protocol_t max_tls;
char* ca_trust_file; char* ca_trust_file;
char* ca_trust_path; char* ca_trust_path;
const getdns_log_config* log; const struct getdns_log_config* log;
} _getdns_tls_context; } _getdns_tls_context;
typedef struct _getdns_tls_connection { typedef struct _getdns_tls_connection {
@ -81,7 +82,7 @@ typedef struct _getdns_tls_connection {
dane_query_t dane_query; dane_query_t dane_query;
dane_state_t dane_state; dane_state_t dane_state;
char* tlsa; char* tlsa;
const getdns_log_config* log; const struct getdns_log_config* log;
} _getdns_tls_connection; } _getdns_tls_connection;
typedef struct _getdns_tls_session { typedef struct _getdns_tls_session {

View File

@ -1,527 +0,0 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

@ -1 +1 @@
Subproject commit c831c3869f56a571a79a3cbf58e0a366e588e256 Subproject commit 686a240cc8186a9a799ebafb0b32e67991b5abfc

View File

@ -54,20 +54,21 @@
#define GETDNS_TLS_MAX_DIGEST_LENGTH (EVP_MAX_MD_SIZE) #define GETDNS_TLS_MAX_DIGEST_LENGTH (EVP_MAX_MD_SIZE)
typedef struct sha256_pin sha256_pin_t; /* Forward declare type. */
typedef struct getdns_log_config getdns_log_config; struct sha256_pin;
struct getdns_log_config;
typedef struct _getdns_tls_context { typedef struct _getdns_tls_context {
SSL_CTX* ssl; SSL_CTX* ssl;
const getdns_log_config* log; const struct getdns_log_config* log;
} _getdns_tls_context; } _getdns_tls_context;
typedef struct _getdns_tls_connection { typedef struct _getdns_tls_connection {
SSL* ssl; SSL* ssl;
const getdns_log_config* log; const struct getdns_log_config* log;
#if defined(USE_DANESSL) #if defined(USE_DANESSL)
const char* auth_name; const char* auth_name;
const sha256_pin_t* pinset; const struct sha256_pin* pinset;
#endif #endif
} _getdns_tls_connection; } _getdns_tls_connection;

View File

@ -62,10 +62,10 @@ typedef u_short sa_family_t;
const char *_getdns_strerror(DWORD errnum); const char *_getdns_strerror(DWORD errnum);
#else /* USE_WINSOCK */ #else /* USE_WINSOCK */
#ifdef HAVE_SYS_POLL_H #ifndef HAVE_SYS_POLL_H
# include <sys/poll.h>
#else
# include <poll.h> # include <poll.h>
#else
# include <sys/poll.h>
#endif #endif
#define _getdns_EINTR (EINTR) #define _getdns_EINTR (EINTR)

View File

@ -102,6 +102,8 @@ struct connection {
struct sockaddr_storage remote_in; struct sockaddr_storage remote_in;
socklen_t addrlen; socklen_t addrlen;
size_t max_udp_size;
connection *next; connection *next;
connection **prev_next; connection **prev_next;
}; };
@ -326,6 +328,17 @@ getdns_reply(getdns_context *context,
else if (conn->l->transport == GETDNS_TRANSPORT_UDP) { else if (conn->l->transport == GETDNS_TRANSPORT_UDP) {
listener *l = conn->l; listener *l = conn->l;
if (len > conn->max_udp_size) {
_getdns_rr_iter qi_spc, *qi;
(void)memset(buf + 6, 0, 6);
GLDNS_TC_SET(buf);
if ((qi = _getdns_rr_iter_init(&qi_spc, buf, len))) {
DEBUG_SERVER("Truncating reply to: %d\n",
(int)(qi->nxt - buf));
len = qi->nxt - buf;
}
}
if (conn->l->fd >= 0 && sendto(conn->l->fd, (void *)buf, len, 0, if (conn->l->fd >= 0 && sendto(conn->l->fd, (void *)buf, len, 0,
(struct sockaddr *)&conn->remote_in, conn->addrlen) == -1) { (struct sockaddr *)&conn->remote_in, conn->addrlen) == -1) {
/* TODO: handle _getdns_socketerror_wants_retry() */ /* TODO: handle _getdns_socketerror_wants_retry() */
@ -545,6 +558,7 @@ static void tcp_accept_cb(void *userarg)
return; return;
(void) memset(conn, 0, sizeof(tcp_connection)); (void) memset(conn, 0, sizeof(tcp_connection));
conn->super.max_udp_size = 65536;
conn->super.l = l; conn->super.l = l;
conn->super.addrlen = sizeof(conn->super.remote_in); conn->super.addrlen = sizeof(conn->super.remote_in);
if ((conn->fd = accept(l->fd, (struct sockaddr *) if ((conn->fd = accept(l->fd, (struct sockaddr *)
@ -629,6 +643,7 @@ static void udp_read_cb(void *userarg)
conn->l = l; conn->l = l;
conn->addrlen = sizeof(conn->remote_in); conn->addrlen = sizeof(conn->remote_in);
conn->max_udp_size = 512;
if ((len = recvfrom(l->fd, (void *)buf, sizeof(buf), 0, if ((len = recvfrom(l->fd, (void *)buf, sizeof(buf), 0,
(struct sockaddr *)&conn->remote_in, &conn->addrlen)) == -1) { (struct sockaddr *)&conn->remote_in, &conn->addrlen)) == -1) {
if ( _getdns_socketerror_wants_retry() && if ( _getdns_socketerror_wants_retry() &&
@ -713,6 +728,8 @@ static void udp_read_cb(void *userarg)
; /* FROMERR on input, ignore */ ; /* FROMERR on input, ignore */
else { else {
uint32_t max_udp_size = 512;
/* Insert connection */ /* Insert connection */
conn->super.key = conn; conn->super.key = conn;
if (!_getdns_rbtree_insert( if (!_getdns_rbtree_insert(
@ -723,6 +740,15 @@ static void udp_read_cb(void *userarg)
} }
DEBUG_SERVER("[connection add] count: %d\n", DEBUG_SERVER("[connection add] count: %d\n",
(int)l->set->connections_set.count); (int)l->set->connections_set.count);
if (!getdns_dict_get_int(request_dict,
"/additional/0/udp_payload_size", &max_udp_size))
conn->max_udp_size = max_udp_size;
else if (!getdns_dict_get_int(request_dict,
"/additional/1/udp_payload_size", &max_udp_size))
conn->max_udp_size = max_udp_size;
if ((conn->next = l->connections)) if ((conn->next = l->connections))
conn->next->prev_next = &conn->next; conn->next->prev_next = &conn->next;
conn->prev_next = &l->connections; conn->prev_next = &l->connections;
@ -978,6 +1004,7 @@ getdns_return_t getdns_context_set_listen_addresses(
(void) memset(&hints, 0, sizeof(struct addrinfo)); (void) memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC; hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_NUMERICHOST; hints.ai_flags = AI_NUMERICHOST;
for (i = 0; !r && i < new_set_count; i++) { for (i = 0; !r && i < new_set_count; i++) {

@ -1 +1 @@
Subproject commit dd093e585a237e0321d303ec35e84c393ef739f4 Subproject commit 187838104f3cfc9634148ae41a717e00c0d68e67

View File

@ -68,7 +68,8 @@
#define STUB_TCP_ERROR -2 #define STUB_TCP_ERROR -2
/* Don't currently have access to the context whilst doing handshake */ /* Don't currently have access to the context whilst doing handshake */
#define TIMEOUT_TLS 2500 #define MIN_TLS_HS_TIMEOUT 2500
#define MAX_TLS_HS_TIMEOUT 7500
/* Arbritray number of message for EDNS keepalive resend*/ /* Arbritray number of message for EDNS keepalive resend*/
#define EDNS_KEEPALIVE_RESEND 5 #define EDNS_KEEPALIVE_RESEND 5
@ -241,7 +242,7 @@ match_edns_opt_rr(uint16_t code, uint8_t *response, size_t response_len,
uint8_t *data = (uint8_t *)rr_iter->pos; uint8_t *data = (uint8_t *)rr_iter->pos;
size_t data_len = rr_iter->nxt - rr_iter->pos; size_t data_len = rr_iter->nxt - rr_iter->pos;
(void) gldns_wire2str_rr_scan( (void) gldns_wire2str_rr_scan(
&data, &data_len, &str, &str_len, (uint8_t *)rr_iter->pkt, rr_iter->pkt_end - rr_iter->pkt); &data, &data_len, &str, &str_len, (uint8_t *)rr_iter->pkt, rr_iter->pkt_end - rr_iter->pkt, NULL);
DEBUG_STUB("%s %-35s: OPT RR: %s", DEBUG_STUB("%s %-35s: OPT RR: %s",
STUB_DEBUG_READ, __FUNC__, str_spc); STUB_DEBUG_READ, __FUNC__, str_spc);
#endif #endif
@ -455,7 +456,8 @@ tcp_connect(getdns_upstream *upstream, getdns_transport_list_t transport)
GETDNS_LOG_UPSTREAM_STATS, GETDNS_LOG_WARNING, GETDNS_LOG_UPSTREAM_STATS, GETDNS_LOG_WARNING,
"%-40s : Upstream : Could not setup TCP TFO\n", "%-40s : Upstream : Could not setup TCP TFO\n",
upstream->addr_str); upstream->addr_str);
# else
(void)transport;
# endif/* HAVE_DECL_TCP_FASTOPEN*/ # endif/* HAVE_DECL_TCP_FASTOPEN*/
# endif /* HAVE_DECL_TCP_FASTOPEN_CONNECT */ # endif /* HAVE_DECL_TCP_FASTOPEN_CONNECT */
#endif /* USE_OSX_TCP_FASTOPEN */ #endif /* USE_OSX_TCP_FASTOPEN */
@ -980,13 +982,23 @@ tls_do_handshake(getdns_upstream *upstream)
int r; int r;
while ((r = _getdns_tls_connection_do_handshake(upstream->tls_obj)) != GETDNS_RETURN_GOOD) while ((r = _getdns_tls_connection_do_handshake(upstream->tls_obj)) != GETDNS_RETURN_GOOD)
{ {
uint64_t timeout_tls = _getdns_ms_until_expiry(upstream->expires);
if (timeout_tls < MIN_TLS_HS_TIMEOUT)
timeout_tls = MIN_TLS_HS_TIMEOUT;
else if (timeout_tls > MAX_TLS_HS_TIMEOUT)
timeout_tls = MAX_TLS_HS_TIMEOUT;
DEBUG_STUB("%s %-35s: FD: %d, do_handshake -> %d (timeout: %d)\n",
STUB_DEBUG_SETUP_TLS, __FUNC__, upstream->fd, r, (int)timeout_tls);
switch (r) { switch (r) {
case GETDNS_RETURN_TLS_WANT_READ: case GETDNS_RETURN_TLS_WANT_READ:
GETDNS_CLEAR_EVENT(upstream->loop, &upstream->event); GETDNS_CLEAR_EVENT(upstream->loop, &upstream->event);
upstream->event.read_cb = upstream_read_cb; upstream->event.read_cb = upstream_read_cb;
upstream->event.write_cb = NULL; upstream->event.write_cb = NULL;
GETDNS_SCHEDULE_EVENT(upstream->loop, GETDNS_SCHEDULE_EVENT(upstream->loop,
upstream->fd, TIMEOUT_TLS, &upstream->event); upstream->fd, timeout_tls, &upstream->event);
upstream->tls_hs_state = GETDNS_HS_READ; upstream->tls_hs_state = GETDNS_HS_READ;
return STUB_TCP_RETRY; return STUB_TCP_RETRY;
case GETDNS_RETURN_TLS_WANT_WRITE: case GETDNS_RETURN_TLS_WANT_WRITE:
@ -994,7 +1006,7 @@ tls_do_handshake(getdns_upstream *upstream)
upstream->event.read_cb = NULL; upstream->event.read_cb = NULL;
upstream->event.write_cb = upstream_write_cb; upstream->event.write_cb = upstream_write_cb;
GETDNS_SCHEDULE_EVENT(upstream->loop, GETDNS_SCHEDULE_EVENT(upstream->loop,
upstream->fd, TIMEOUT_TLS, &upstream->event); upstream->fd, timeout_tls, &upstream->event);
upstream->tls_hs_state = GETDNS_HS_WRITE; upstream->tls_hs_state = GETDNS_HS_WRITE;
return STUB_TCP_RETRY; return STUB_TCP_RETRY;
default: default:
@ -1198,7 +1210,12 @@ stub_tls_write(getdns_upstream *upstream, getdns_tcp_state *tcp,
_getdns_tls_connection* tls_obj = upstream->tls_obj; _getdns_tls_connection* tls_obj = upstream->tls_obj;
uint16_t padding_sz; uint16_t padding_sz;
int q = tls_connected(upstream); int q;
if (netreq->owner->expires > upstream->expires)
upstream->expires = netreq->owner->expires;
q = tls_connected(upstream);
if (q != 0) if (q != 0)
return q; return q;
/* This is the case where the upstream is connected but it isn't an authenticated /* This is the case where the upstream is connected but it isn't an authenticated
@ -2225,8 +2242,16 @@ upstream_schedule_netreq(getdns_upstream *upstream, getdns_network_req *netreq)
/* Set a timeout on the upstream so we can catch failed setup*/ /* Set a timeout on the upstream so we can catch failed setup*/
upstream->event.timeout_cb = upstream_setup_timeout_cb; upstream->event.timeout_cb = upstream_setup_timeout_cb;
GETDNS_SCHEDULE_EVENT(upstream->loop, upstream->fd, GETDNS_SCHEDULE_EVENT(upstream->loop, upstream->fd,
_getdns_ms_until_expiry(netreq->owner->expires)/2, _getdns_ms_until_expiry(netreq->owner->expires)/5*4,
&upstream->event); &upstream->event);
#if defined(HAVE_DECL_TCP_FASTOPEN) && HAVE_DECL_TCP_FASTOPEN \
&& !(defined(HAVE_DECL_TCP_FASTOPEN_CONNECT) && HAVE_DECL_TCP_FASTOPEN_CONNECT) \
&& !(defined(HAVE_DECL_MSG_FASTOPEN) && HAVE_DECL_MSG_FASTOPEN)
if (upstream->transport == GETDNS_TRANSPORT_TCP) {
/* Write immediately! */
upstream_write_cb(upstream);
}
#endif
} else { } else {
GETDNS_SCHEDULE_EVENT(upstream->loop, GETDNS_SCHEDULE_EVENT(upstream->loop,
upstream->fd, TIMEOUT_FOREVER, &upstream->event); upstream->fd, TIMEOUT_FOREVER, &upstream->event);
@ -2292,78 +2317,14 @@ _getdns_submit_stub_request(getdns_network_req *netreq, uint64_t *now_ms)
case GETDNS_TRANSPORT_TLS: case GETDNS_TRANSPORT_TLS:
case GETDNS_TRANSPORT_TCP: case GETDNS_TRANSPORT_TCP:
upstream_schedule_netreq(netreq->upstream, netreq);
/* For TLS, set a short timeout to catch setup problems. This is reset
when the connection is successful.*/
GETDNS_CLEAR_EVENT(dnsreq->loop, &netreq->event); GETDNS_CLEAR_EVENT(dnsreq->loop, &netreq->event);
/*************************************************************
****** *****
****** Scheduling differences of *****
****** synchronous and asynchronous requests *****
****** *****
*************************************************************
*
* Besides the asynchronous event loop, which is typically
* shared with the application, every getdns context also
* has another event loop (not registered by the user) which
* is used specifically and only for synchronous requests:
* context->sync_eventloop.
*
* We do not use the asynchronous loop for the duration of the
* synchronous query, because:
* - Callbacks for outstanding (and thus asynchronous) queries
* might fire as a side effect.
* - But worse, since the asynchronous loop is created and
* managed by the user, which may well have her own non-dns
* related events scheduled against it, they will fire as
* well as a side effect of doing the synchronous request!
*
*
* Transports that keep connections open, have their own event
* structure to keep their connection state. The event is
* associated with the upstream struct. Note that there is a
* separate upstream struct for each state full transport, so
* each upstream has multiple transport structs!
*
* side note: The upstream structs have their own reference
* to the "context's" event loop so they can,
* in theory, be detached (to finish running
* queries for example).
*
* If a synchronous request is scheduled for such a transport,
* then the sync-loop temporarily has to "run" that
* upstream/transport's event! Outstanding requests for that
* upstream/transport might come in while processing the
* synchronous call. When this happens, they are queued up
* (at upstream->finished_queue) and an timeout event of 1
* will be scheduled against the asynchronous loop to start
* processing those received request as soon as the
* asynchronous loop will be run.
*
*
* When getdns is linked with libunbound 1.5.8 or older, then
* when a RECURSING synchronous request is made then
* outstanding asynchronously scheduled RECURSING requests
* may fire as a side effect, as we reuse the same code path
* For both synchronous and asynchronous calls,
* ub_resolve_async() is used under the hood.
*
* With libunbound versions newer than 1.5.8, libunbound will
* share the event loops used with getdns which will prevent
* these side effects from happening.
*
*
* The event loop used for a specific request is in
* dnsreq->loop. The asynchronous is always also available
* at the upstream as upstream->loop.
*/
GETDNS_SCHEDULE_EVENT( GETDNS_SCHEDULE_EVENT(
dnsreq->loop, -1, dnsreq->loop, -1,
_getdns_ms_until_expiry2(dnsreq->expires, now_ms), _getdns_ms_until_expiry2(dnsreq->expires, now_ms),
getdns_eventloop_event_init( getdns_eventloop_event_init(
&netreq->event, netreq, NULL, NULL, &netreq->event, netreq, NULL, NULL,
stub_timeout_cb)); stub_timeout_cb));
upstream_schedule_netreq(netreq->upstream, netreq);
return GETDNS_RETURN_GOOD; return GETDNS_RETURN_GOOD;
default: default:
return GETDNS_RETURN_GENERIC_ERROR; return GETDNS_RETURN_GENERIC_ERROR;

View File

@ -1,314 +0,0 @@
#
# @configure_input@
#
# Copyright (c) 2013, Verisign, Inc., NLNet Labs
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the names of the copyright holders nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package = @PACKAGE_NAME@
version = @PACKAGE_VERSION@
tarname = @PACKAGE_TARNAME@
distdir = $(tarname)-$(version)
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
INSTALL = @INSTALL@
LIBTOOL = ../../libtool
srcdir = @srcdir@
have_libevent = @have_libevent@
have_libuv = @have_libuv@
have_libev = @have_libev@
NOLIBCHECK = @NOLIBCHECK@
EXTENSION_LIBEVENT_EXT_LIBS=@EXTENSION_LIBEVENT_EXT_LIBS@
EXTENSION_LIBEVENT_LDFLAGS=@EXTENSION_LIBEVENT_LDFLAGS@
EXTENSION_LIBUV_EXT_LIBS=@EXTENSION_LIBUV_EXT_LIBS@
EXTENSION_LIBUV_LDFLAGS=@EXTENSION_LIBUV_LDFLAGS@
EXTENSION_LIBEV_EXT_LIBS=@EXTENSION_LIBEV_EXT_LIBS@
EXTENSION_LIBEV_LDFLAGS=@EXTENSION_LIBEV_LDFLAGS@
CHECK_GETDNS=@CHECK_GETDNS@
CHECK_UV_PROG=@CHECK_UV_PROG@
CHECK_EVENT_PROG=@CHECK_EVENT_PROG@
CHECK_EV_PROG=@CHECK_EV_PROG@
CC=@CC@
CFLAGS=-I$(srcdir)/.. -I$(srcdir) -I.. $(cflags) @CFLAGS@ @CPPFLAGS@ $(XTRA_CFLAGS)
WPEDANTICFLAG=@WPEDANTICFLAG@
LDFLAGS=-L.. @LDFLAGS@
LDLIBS=../libgetdns.la @LIBS@
CHECK_LIBS=@CHECK_LIBS@
CHECK_CFLAGS=@CHECK_CFLAGS@
CHECK_OBJS=check_getdns_common.lo check_getdns_context_set_timeout.lo \
check_getdns.lo check_getdns_transport.lo
ALL_OBJS=$(CHECK_OBJS) check_getdns_libevent.lo check_getdns_libev.lo \
check_getdns_selectloop.lo scratchpad.lo \
testmessages.lo tests_dict.lo tests_list.lo tests_namespaces.lo \
tests_stub_async.lo tests_stub_sync.lo
NON_C99_OBJS=check_getdns_libuv.lo
PROGRAMS=tests_dict tests_list tests_namespaces tests_stub_async tests_stub_sync $(CHECK_GETDNS) $(CHECK_EV_PROG) $(CHECK_EVENT_PROG) $(CHECK_UV_PROG)
.SUFFIXES: .c .o .a .lo .h
.c.o:
$(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $< -o $@
.c.lo:
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $< -o $@
default: all
all: $(PROGRAMS)
$(ALL_OBJS):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -c $(srcdir)/$(@:.lo=.c) -o $@
$(NON_C99_OBJS):
$(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600 -c $(srcdir)/$(@:.lo=.c) -o $@
tests_dict: tests_dict.lo testmessages.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_dict.lo testmessages.lo
tests_list: tests_list.lo testmessages.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_list.lo testmessages.lo
tests_namespaces: tests_namespaces.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_namespaces.lo
tests_stub_async: tests_stub_async.lo testmessages.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_stub_async.lo testmessages.lo
tests_stub_sync: tests_stub_sync.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ tests_stub_sync.lo
check_getdns_common: check_getdns_common.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) -o $@ check_getdns_common.lo
check_getdns: check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_selectloop.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) $(LDFLAGS) $(LDLIBS) $(CHECK_LIBS) -o $@ check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_selectloop.lo
check_getdns_event: check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libevent.lo ../libgetdns_ext_event.la
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libevent.lo $(LDFLAGS) $(LDLIBS) $(CHECK_LIBS) ../libgetdns_ext_event.la $(EXTENSION_LIBEVENT_LDFLAGS) $(EXTENSION_LIBEVENT_EXT_LIBS)
check_getdns_uv: check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libuv.lo ../libgetdns_ext_uv.la
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libuv.lo $(LDFLAGS) $(LDLIBS) $(CHECK_LIBS) ../libgetdns_ext_uv.la $(EXTENSION_LIBUV_LDFLAGS) $(EXTENSION_LIBUV_EXT_LIBS)
check_getdns_ev: check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libev.lo ../libgetdns_ext_ev.la
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ check_getdns.lo check_getdns_common.lo check_getdns_context_set_timeout.lo check_getdns_transport.lo check_getdns_libev.lo $(LDFLAGS) $(LDLIBS) $(CHECK_LIBS) ../libgetdns_ext_ev.la $(EXTENSION_LIBEV_LDFLAGS) $(EXTENSION_LIBEV_EXT_LIBS)
scratchpad: scratchpad.lo
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ scratchpad.lo $(LDFLAGS) $(LDLIBS)
scratchpad.lo: scratchpad.c
$(srcdir)/scratchpad.c: scratchpad.template.c
[ ! -f $(srcdir)/scratchpad.c ] && cp -p $(srcdir)/scratchpad.template.c $(srcdir)/scratchpad.c || true
install:
echo nothing to install
uninstall:
echo nothing to uninstall
nolibcheck:
@echo "***"
@echo "*** Cannot run unit tests, because they could not be compiled,"
@echo "*** because libcheck was not found or usable at configure time."
@echo "*** To compile and run unit tests make sure libcheck is available"
@echo "*** and usable during configuration"
@echo "***"
@false
test_noeventloop: $(NOLIBCHECK) all
rm -f $(CHECK_GETDNS).failed
GETDNS_TEST_PORT=43210 CK_TIMEOUT_MULTIPLIER=2 CK_LOG_FILE_NAME="$(CHECK_GETDNS).log" ./$(CHECK_GETDNS) || echo "$(CHECK_GETDNS) failed" >> $(CHECK_GETDNS).failed
test_libevent: $(NOLIBCHECK) all
rm -f $(CHECK_EVENT_PROG).failed
if test $(have_libevent) = 1 ; then GETDNS_TEST_PORT=44321 CK_TIMEOUT_MULTIPLIER=2 CK_LOG_FILE_NAME="$(CHECK_EVENT_PROG).log" ./$(CHECK_EVENT_PROG) || echo "$(CHECK_EVENT_PROG) failed" >> $(CHECK_EVENT_PROG).failed; fi
test_libev: $(NOLIBCHECK) all
rm -f $(CHECK_EV_PROG).failed
if test $(have_libev) = 1 ; then GETDNS_TEST_PORT=45432 CK_TIMEOUT_MULTIPLIER=2 CK_LOG_FILE_NAME="$(CHECK_EV_PROG).log" ./$(CHECK_EV_PROG) || echo "$(CHECK_EV_PROG) failed" >> $(CHECK_EV_PROG).failed; fi
test_libuv: $(NOLIBCHECK) all
rm -f $(CHECK_UV_PROG).failed
if test $(have_libev) = 1 ; then GETDNS_TEST_PORT=46543 CK_TIMEOUT_MULTIPLIER=2 CK_LOG_FILE_NAME="$(CHECK_UV_PROG).log" ./$(CHECK_UV_PROG) || echo "$(CHECK_UV_PROG) failed" >> $(CHECK_UV_PROG).failed; fi
test: test_noeventloop test_libevent test_libev test_libuv
rm -f fails
if test -f $(CHECK_GETDNS).failed ; then cat $(CHECK_GETDNS).failed >> fails ; fi
if test -f $(CHECK_EVENT_PROG).failed ; then cat $(CHECK_EVENT_PROG).failed >> fails ; fi
if test -f $(CHECK_EV_PROG).failed ; then cat $(CHECK_EV_PROG).failed >> fails ; fi
if test -f $(CHECK_UV_PROG).failed ; then cat $(CHECK_UV_PROG).failed >> fails ; fi
test ! -e fails
@echo "All tests OK"
clean:
rm -f *.o *.lo $(PROGRAMS) scratchpad
rm -rf .libs
rm -f check_getdns.log check_getdns_event.log check_getdns_ev.log check_getdns_uv.log
distclean : clean
rm -f scratchpad.c
rm -f Makefile config.status config.log
rm -f check_getdns_uv.core check_getdns.core check_getdns_event.core
rm -Rf autom4te.cache
$(distdir): FORCE
mkdir -p $(distdir)/src
cp configure.ac $(distdir)
cp configure $(distdir)
cp Makefile.in $(distdir)
cp src/Makefile.in $(distdir)/src
distcheck: $(distdir).tar.gz
gzip -cd $(distdir).tar.gz | tar xvf -
cd $(distdir) && ./configure
cd $(distdir) && $(MAKE) all
cd $(distdir) && $(MAKE) check
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install
cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall
@remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \
if test "$${remaining}" -ne 0; then
echo "@@@ $${remaining} file(s) remaining in stage directory!"; \
exit 1; \
fi
cd $(distdir) && $(MAKE) clean
rm -rf $(distdir)
@echo "*** Package $(distdir).tar.gz is ready for distribution"
Makefile: $(srcdir)/Makefile.in ../../config.status
cd ../.. && ./config.status src/test/Makefile
configure.status: configure
cd ../.. && ./config.status --recheck
depend:
(cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new )
(blddir=`pwd`; cd $(srcdir) ; gcc -MM -I. -I.. -I"$$blddir"/.. *.c | \
sed -e "s? $$blddir/? ?g" \
-e 's? \([a-z0-9_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \
-e 's? \.\./\([a-z0-9_-]*\)\.h? $$(srcdir)/../\1.h?g' \
-e 's? \.\./\([a-z0-9_-]*\)/\([a-z0-9_-]*\)\.h? $$(srcdir)/../\1/\2.h?g' \
-e 's? \$$(srcdir)/config\.h? ../config.h?g' \
-e 's? \$$(srcdir)/\.\./config\.h? ../config.h?g' \
-e 's? \$$(srcdir)/\.\./getdns/getdns\.h? ../getdns/getdns.h?g' \
-e 's? \$$(srcdir)/\.\./getdns/getdns_extra\.h? ../getdns/getdns_extra.h?g' \
-e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new )
(cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \
|| mv Makefile.in.new Makefile.in )
.PHONY: clean test
# Dependencies for the unit tests
check_getdns.lo check_getdns.o: $(srcdir)/check_getdns.c \
../getdns/getdns.h \
$(srcdir)/check_getdns_common.h \
../getdns/getdns_extra.h \
$(srcdir)/check_getdns_address.h $(srcdir)/check_getdns_address_sync.h \
$(srcdir)/check_getdns_cancel_callback.h $(srcdir)/check_getdns_context_create.h \
$(srcdir)/check_getdns_context_destroy.h \
$(srcdir)/check_getdns_context_set_context_update_callback.h \
$(srcdir)/check_getdns_context_set_dns_transport.h \
$(srcdir)/check_getdns_context_set_timeout.h \
$(srcdir)/check_getdns_context_set_upstream_recursive_servers.h \
$(srcdir)/check_getdns_convert_alabel_to_ulabel.h \
$(srcdir)/check_getdns_convert_ulabel_to_alabel.h $(srcdir)/check_getdns_dict_destroy.h \
$(srcdir)/check_getdns_dict_get_bindata.h $(srcdir)/check_getdns_dict_get_data_type.h \
$(srcdir)/check_getdns_dict_get_dict.h $(srcdir)/check_getdns_dict_get_int.h \
$(srcdir)/check_getdns_dict_get_list.h $(srcdir)/check_getdns_dict_get_names.h \
$(srcdir)/check_getdns_dict_set_bindata.h $(srcdir)/check_getdns_dict_set_dict.h \
$(srcdir)/check_getdns_dict_set_int.h $(srcdir)/check_getdns_dict_set_list.h \
$(srcdir)/check_getdns_display_ip_address.h $(srcdir)/check_getdns_general.h \
$(srcdir)/check_getdns_general_sync.h $(srcdir)/check_getdns_hostname.h \
$(srcdir)/check_getdns_hostname_sync.h $(srcdir)/check_getdns_list_get_bindata.h \
$(srcdir)/check_getdns_list_get_data_type.h $(srcdir)/check_getdns_list_get_dict.h \
$(srcdir)/check_getdns_list_get_int.h $(srcdir)/check_getdns_list_get_length.h \
$(srcdir)/check_getdns_list_get_list.h $(srcdir)/check_getdns_pretty_print_dict.h \
$(srcdir)/check_getdns_service.h $(srcdir)/check_getdns_service_sync.h \
$(srcdir)/check_getdns_transport.h
check_getdns_common.lo check_getdns_common.o: $(srcdir)/check_getdns_common.c \
../getdns/getdns.h \
../config.h \
$(srcdir)/check_getdns_common.h \
../getdns/getdns_extra.h \
$(srcdir)/check_getdns_eventloop.h
check_getdns_context_set_timeout.lo check_getdns_context_set_timeout.o: $(srcdir)/check_getdns_context_set_timeout.c \
$(srcdir)/check_getdns_context_set_timeout.h $(srcdir)/check_getdns_common.h \
../getdns/getdns.h \
../getdns/getdns_extra.h
check_getdns_libev.lo check_getdns_libev.o: $(srcdir)/check_getdns_libev.c $(srcdir)/check_getdns_eventloop.h \
../config.h \
../getdns/getdns.h \
$(srcdir)/../getdns/getdns_ext_libev.h \
../getdns/getdns_extra.h \
$(srcdir)/check_getdns_common.h
check_getdns_libevent.lo check_getdns_libevent.o: $(srcdir)/check_getdns_libevent.c $(srcdir)/check_getdns_eventloop.h \
../config.h \
../getdns/getdns.h \
$(srcdir)/../getdns/getdns_ext_libevent.h \
../getdns/getdns_extra.h \
$(srcdir)/check_getdns_libevent.h $(srcdir)/check_getdns_common.h
check_getdns_libuv.lo check_getdns_libuv.o: $(srcdir)/check_getdns_libuv.c $(srcdir)/check_getdns_eventloop.h \
../config.h \
../getdns/getdns.h \
$(srcdir)/../getdns/getdns_ext_libuv.h \
../getdns/getdns_extra.h \
$(srcdir)/check_getdns_common.h
check_getdns_selectloop.lo check_getdns_selectloop.o: $(srcdir)/check_getdns_selectloop.c \
$(srcdir)/check_getdns_eventloop.h \
../config.h \
../getdns/getdns.h \
../getdns/getdns_extra.h
check_getdns_transport.lo check_getdns_transport.o: $(srcdir)/check_getdns_transport.c \
$(srcdir)/check_getdns_transport.h $(srcdir)/check_getdns_common.h \
../getdns/getdns.h \
../getdns/getdns_extra.h
scratchpad.template.lo scratchpad.template.o: scratchpad.template.c \
../getdns/getdns.h \
../getdns/getdns_extra.h
testmessages.lo testmessages.o: $(srcdir)/testmessages.c $(srcdir)/testmessages.h
tests_dict.lo tests_dict.o: $(srcdir)/tests_dict.c $(srcdir)/testmessages.h \
../getdns/getdns.h
tests_list.lo tests_list.o: $(srcdir)/tests_list.c $(srcdir)/testmessages.h \
../getdns/getdns.h
tests_namespaces.lo tests_namespaces.o: $(srcdir)/tests_namespaces.c $(srcdir)/testmessages.h \
../getdns/getdns.h
tests_stub_async.lo tests_stub_async.o: $(srcdir)/tests_stub_async.c \
../config.h \
$(srcdir)/testmessages.h \
../getdns/getdns.h \
../getdns/getdns_extra.h
tests_stub_sync.lo tests_stub_sync.o: $(srcdir)/tests_stub_sync.c $(srcdir)/testmessages.h \
../getdns/getdns.h \
../getdns/getdns_extra.h

View File

@ -224,7 +224,9 @@
EVENT_BASE_CREATE; EVENT_BASE_CREATE;
ASSERT_RC(getdns_address(context, "hostnamedoesntexist.", NULL, // Ubuntu 18.04 system resolver - does not foward single labels, returns
// SERVFAIL so this must be a multilabel name
ASSERT_RC(getdns_address(context, "hostname.doesntexist.", NULL,
&fn_ref, &transaction_id, callbackfn), &fn_ref, &transaction_id, callbackfn),
GETDNS_RETURN_GOOD, "Return code from getdns_address()"); GETDNS_RETURN_GOOD, "Return code from getdns_address()");
@ -237,7 +239,8 @@
{ {
assert_nxdomain(ex_response); assert_nxdomain(ex_response);
assert_nodata(ex_response); assert_nodata(ex_response);
assert_soa_in_authority(ex_response); // Ubuntu 18.04 system resolver does not return an SOA
//assert_soa_in_authority(ex_response);
} }

View File

@ -145,7 +145,7 @@
START_TEST (getdns_address_sync_6) START_TEST (getdns_address_sync_6)
{ {
/* /*
* name = "willem.getdnsapi.net" need to replace this with domain from unbound zone * name = "d2a8n3.rootcanary.net" need to replace this with domain from unbound zone
* expect: NOERROR/NODATA response: * expect: NOERROR/NODATA response:
* status = GETDNS_RESPSTATUS_NO_DATA * status = GETDNS_RESPSTATUS_NO_DATA
* rcode = 0 * rcode = 0
@ -156,7 +156,7 @@
CONTEXT_CREATE(TRUE); CONTEXT_CREATE(TRUE);
ASSERT_RC(getdns_address_sync(context, "willem.getdnsapi.net", NULL, &response), ASSERT_RC(getdns_address_sync(context, "d2a8n3.rootcanary.net", NULL, &response),
GETDNS_RETURN_GOOD, "Return code from getdns_address_sync()"); GETDNS_RETURN_GOOD, "Return code from getdns_address_sync()");
EXTRACT_RESPONSE; EXTRACT_RESPONSE;

View File

@ -474,6 +474,7 @@
TCase *tc_pos = tcase_create("Positive"); TCase *tc_pos = tcase_create("Positive");
/* TODO: Test which specific lists are supported */ /* TODO: Test which specific lists are supported */
tcase_add_test(tc_pos, getdns_context_set_dns_transport_stub_5); tcase_add_test(tc_pos, getdns_context_set_dns_transport_stub_5);
tcase_set_timeout(tc_pos, 6.0); /* test 6 times out after 5 secs */
tcase_add_test(tc_pos, getdns_context_set_dns_transport_recursing_6); tcase_add_test(tc_pos, getdns_context_set_dns_transport_recursing_6);
tcase_add_test(tc_pos, getdns_context_set_dns_transport_recursing_7); tcase_add_test(tc_pos, getdns_context_set_dns_transport_recursing_7);
tcase_add_test(tc_pos, getdns_context_set_dns_transport_recursing_8); tcase_add_test(tc_pos, getdns_context_set_dns_transport_recursing_8);

View File

@ -427,7 +427,7 @@
EXTRACT_RESPONSE; EXTRACT_RESPONSE;
printf("the resp is %s\n", getdns_pretty_print_dict(response)); //printf("the resp is %s\n", getdns_pretty_print_dict(response));
assert_noerror(&ex_response); assert_noerror(&ex_response);

View File

@ -140,6 +140,7 @@
} }
END_TEST END_TEST
#if 0
START_TEST (getdns_general_6) START_TEST (getdns_general_6)
{ {
/* /*
@ -173,11 +174,12 @@
assert_noerror(ex_response); assert_noerror(ex_response);
assert_nodata(ex_response); assert_nodata(ex_response);
} }
#endif
START_TEST (getdns_general_7) START_TEST (getdns_general_7)
{ {
/* /*
* name = "google.com" * name = "nlnetlabs.nl"
* request_type = 65279 (maximum unassigned RRTYPE) * request_type = 65279 (maximum unassigned RRTYPE)
* expect: NOERROR/NODATA response: * expect: NOERROR/NODATA response:
* status = GETDNS_RESPSTATUS_NO_NAME * status = GETDNS_RESPSTATUS_NO_NAME
@ -193,7 +195,7 @@
CONTEXT_CREATE(TRUE); CONTEXT_CREATE(TRUE);
EVENT_BASE_CREATE; EVENT_BASE_CREATE;
ASSERT_RC(getdns_general(context, "google.com", 65279, NULL, ASSERT_RC(getdns_general(context, "nlnetlabs.nl", 65279, NULL,
&fn_ref, &transaction_id, callbackfn), &fn_ref, &transaction_id, callbackfn),
GETDNS_RETURN_GOOD, "Return code from getdns_general()"); GETDNS_RETURN_GOOD, "Return code from getdns_general()");
@ -313,13 +315,14 @@
{ {
assert_nxdomain(ex_response); assert_nxdomain(ex_response);
assert_nodata(ex_response); assert_nodata(ex_response);
assert_soa_in_authority(ex_response); // Ubuntu 18.04 system resolver does not return an SOA
//assert_soa_in_authority(ex_response);
} }
START_TEST (getdns_general_11) START_TEST (getdns_general_11)
{ {
/* /*
* name = "willem.getdnsapi.net" and unbound zone * name = "d2a8n3.rootcanary.net" and unbound zone
* request_type = GETDNS_RRTYPE_MX * request_type = GETDNS_RRTYPE_MX
* expect: NOERROR/NODATA response: * expect: NOERROR/NODATA response:
* status = GETDNS_RESPSTATUS_NO_NAME * status = GETDNS_RESPSTATUS_NO_NAME
@ -335,7 +338,7 @@
CONTEXT_CREATE(TRUE); CONTEXT_CREATE(TRUE);
EVENT_BASE_CREATE; EVENT_BASE_CREATE;
ASSERT_RC(getdns_general(context, "willem.getdnsapi.net", GETDNS_RRTYPE_MX, NULL, ASSERT_RC(getdns_general(context, "d2a8n3.rootcanary.net", GETDNS_RRTYPE_MX, NULL,
&fn_ref, &transaction_id, callbackfn), &fn_ref, &transaction_id, callbackfn),
GETDNS_RETURN_GOOD, "Return code from getdns_general()"); GETDNS_RETURN_GOOD, "Return code from getdns_general()");
@ -401,7 +404,8 @@
/* Positive test cases */ /* Positive test cases */
TCase *tc_pos = tcase_create("Positive"); TCase *tc_pos = tcase_create("Positive");
tcase_add_test(tc_pos, getdns_general_6); // Ubuntu 18.04 system resolver returns FORMERR for this query
//tcase_add_test(tc_pos, getdns_general_6);
tcase_add_test(tc_pos, getdns_general_7); tcase_add_test(tc_pos, getdns_general_7);
tcase_add_test(tc_pos, getdns_general_8); tcase_add_test(tc_pos, getdns_general_8);
tcase_add_test(tc_pos, getdns_general_9); tcase_add_test(tc_pos, getdns_general_9);

View File

@ -122,37 +122,37 @@
} }
END_TEST END_TEST
START_TEST (getdns_general_sync_6) // START_TEST (getdns_general_sync_6)
{ // {
/* // /*
* name = "google.com" // * name = "google.com"
* request_type = 0 (minimum valid RRTYPE) // * request_type = 0 (minimum valid RRTYPE)
* expect: NOERROR/NODATA response: // * expect: NOERROR/NODATA response:
* status = GETDNS_RESPSTATUS_NO_NAME // * status = GETDNS_RESPSTATUS_NO_NAME
* rcode = 0 // * rcode = 0
* ancount = 0 (number of records in ANSWER section) // * ancount = 0 (number of records in ANSWER section)
*/ // */
struct getdns_context *context = NULL; // struct getdns_context *context = NULL;
struct getdns_dict *response = NULL; // struct getdns_dict *response = NULL;
//
CONTEXT_CREATE(TRUE); // CONTEXT_CREATE(TRUE);
//
ASSERT_RC(getdns_general_sync(context, "google.com", 0, NULL, &response), // ASSERT_RC(getdns_general_sync(context, "google.com", 0, NULL, &response),
GETDNS_RETURN_GOOD, "Return code from getdns_general_sync()"); // GETDNS_RETURN_GOOD, "Return code from getdns_general_sync()");
//
EXTRACT_RESPONSE; // EXTRACT_RESPONSE;
//
assert_noerror(&ex_response); // assert_noerror(&ex_response);
assert_nodata(&ex_response); // assert_nodata(&ex_response);
//
CONTEXT_DESTROY; // CONTEXT_DESTROY;
} // }
END_TEST // END_TEST
START_TEST (getdns_general_sync_7) START_TEST (getdns_general_sync_7)
{ {
/* /*
* name = "google.com" * name = "nlnetlabs.nl"
* request_type = 65279 (maximum unassigned RRTYPE) * request_type = 65279 (maximum unassigned RRTYPE)
* expect: NOERROR/NODATA response: * expect: NOERROR/NODATA response:
* status = GETDNS_RESPSTATUS_NO_NAME * status = GETDNS_RESPSTATUS_NO_NAME
@ -164,7 +164,7 @@
CONTEXT_CREATE(TRUE); CONTEXT_CREATE(TRUE);
ASSERT_RC(getdns_general_sync(context, "google.com", 65279, NULL, &response), ASSERT_RC(getdns_general_sync(context, "nlnetlabs.nl", 65279, NULL, &response),
GETDNS_RETURN_GOOD, "Return code from getdns_general_sync()"); GETDNS_RETURN_GOOD, "Return code from getdns_general_sync()");
EXTRACT_RESPONSE; EXTRACT_RESPONSE;
@ -257,7 +257,8 @@
assert_nxdomain(&ex_response); assert_nxdomain(&ex_response);
assert_nodata(&ex_response); assert_nodata(&ex_response);
assert_soa_in_authority(&ex_response); // Ubuntu 18.04 system resolver does not return an SOA
//assert_soa_in_authority(&ex_response);
CONTEXT_DESTROY; CONTEXT_DESTROY;
} }
@ -266,7 +267,7 @@
START_TEST (getdns_general_sync_11) START_TEST (getdns_general_sync_11)
{ {
/* /*
* name = "willem.getdnsapi.net" an unbound zone (as in no MX) * name = "d2a8n3.rootcanary.net" an unbound zone (as in no MX)
* request_type = GETDNS_RRTYPE_MX * request_type = GETDNS_RRTYPE_MX
* expect: NOERROR/NODATA response: * expect: NOERROR/NODATA response:
* status = GETDNS_RESPSTATUS_NO_NAME * status = GETDNS_RESPSTATUS_NO_NAME
@ -278,7 +279,7 @@
CONTEXT_CREATE(TRUE); CONTEXT_CREATE(TRUE);
ASSERT_RC(getdns_general_sync(context, "willem.getdnsapi.net", GETDNS_RRTYPE_MX, NULL, &response), ASSERT_RC(getdns_general_sync(context, "d2a8n3.rootcanary.net", GETDNS_RRTYPE_MX, NULL, &response),
GETDNS_RETURN_GOOD, "Return code from getdns_general_sync()"); GETDNS_RETURN_GOOD, "Return code from getdns_general_sync()");
EXTRACT_RESPONSE; EXTRACT_RESPONSE;
@ -334,7 +335,8 @@
/* Positive test cases */ /* Positive test cases */
TCase *tc_pos = tcase_create("Positive"); TCase *tc_pos = tcase_create("Positive");
tcase_add_test(tc_pos, getdns_general_sync_6); // Ubuntu 18.04 system resolver returns FORMERR for this query
//tcase_add_test(tc_pos, getdns_general_sync_6);
tcase_add_test(tc_pos, getdns_general_sync_7); tcase_add_test(tc_pos, getdns_general_sync_7);
tcase_add_test(tc_pos, getdns_general_sync_8); tcase_add_test(tc_pos, getdns_general_sync_8);
tcase_add_test(tc_pos, getdns_general_sync_9); tcase_add_test(tc_pos, getdns_general_sync_9);

View File

@ -361,7 +361,7 @@
struct getdns_context *context = NULL; struct getdns_context *context = NULL;
struct getdns_dict *address = NULL; struct getdns_dict *address = NULL;
struct getdns_bindata address_type = { 5, (void *)"IPv4" }; struct getdns_bindata address_type = { 5, (void *)"IPv4" };
struct getdns_bindata address_data = { 4, (void *)"\xb9\x31\x8c\x00" }; struct getdns_bindata address_data = { 4, (void *)"\x08\x08\x08\x00" };
void* eventloop = NULL; void* eventloop = NULL;
getdns_transaction_t transaction_id = 0; getdns_transaction_t transaction_id = 0;
@ -390,7 +390,8 @@
{ {
assert_nxdomain(ex_response); assert_nxdomain(ex_response);
assert_nodata(ex_response); assert_nodata(ex_response);
assert_soa_in_authority(ex_response); // Ubuntu 18.04 system resolver does not return an SOA
//assert_soa_in_authority(ex_response);
} }
START_TEST (getdns_hostname_12) START_TEST (getdns_hostname_12)
@ -478,7 +479,8 @@
{ {
assert_nxdomain(ex_response); assert_nxdomain(ex_response);
assert_nodata(ex_response); assert_nodata(ex_response);
assert_soa_in_authority(ex_response); // Ubuntu 18.04 system resolver does not return an SOA
//assert_soa_in_authority(ex_response);
} }
Suite * Suite *

View File

@ -304,7 +304,7 @@
struct getdns_context *context = NULL; struct getdns_context *context = NULL;
struct getdns_dict *address = NULL; struct getdns_dict *address = NULL;
struct getdns_bindata address_type = { 5, (void *)"IPv4" }; struct getdns_bindata address_type = { 5, (void *)"IPv4" };
struct getdns_bindata address_data = { 4, (void *)"\xb9\x31\x8c\x00" }; struct getdns_bindata address_data = { 4, (void *)"\x08\x08\x08\x00" };
struct getdns_dict *response = NULL; struct getdns_dict *response = NULL;
CONTEXT_CREATE(TRUE); CONTEXT_CREATE(TRUE);
@ -322,7 +322,8 @@
assert_nxdomain(&ex_response); assert_nxdomain(&ex_response);
assert_nodata(&ex_response); assert_nodata(&ex_response);
assert_soa_in_authority(&ex_response); // Ubuntu 18.04 system resolver does not return an SOA
//assert_soa_in_authority(&ex_response);
DICT_DESTROY(address); DICT_DESTROY(address);
CONTEXT_DESTROY; CONTEXT_DESTROY;
@ -392,7 +393,8 @@
assert_nxdomain(&ex_response); assert_nxdomain(&ex_response);
assert_nodata(&ex_response); assert_nodata(&ex_response);
assert_soa_in_authority(&ex_response); // Ubuntu 18.04 system resolver does not return an SOA
//assert_soa_in_authority(&ex_response);
DICT_DESTROY(address); DICT_DESTROY(address);
CONTEXT_DESTROY; CONTEXT_DESTROY;

View File

@ -170,7 +170,8 @@
{ {
assert_nxdomain(ex_response); assert_nxdomain(ex_response);
assert_nodata(ex_response); assert_nodata(ex_response);
assert_soa_in_authority(ex_response); // Ubuntu 18.04 system resolver does not return an SOA
//assert_soa_in_authority(ex_response);
} }

View File

@ -135,7 +135,8 @@
assert_nxdomain(&ex_response); assert_nxdomain(&ex_response);
assert_nodata(&ex_response); assert_nodata(&ex_response);
assert_soa_in_authority(&ex_response); // Ubuntu 18.04 system resolver does not return an SOA
//assert_soa_in_authority(&ex_response);
} }
END_TEST END_TEST

View File

@ -9,7 +9,6 @@ CmdDepends:
Depends: Depends:
Help: Help:
Pre: 100-compile.pre Pre: 100-compile.pre
Post: 100-compile.post
Test: 100-compile.test Test: 100-compile.test
AuxFiles: AuxFiles:
Passed: Passed:

View File

@ -1,20 +0,0 @@
# #-- 100-compile.post --#
# source the master var file when it's there
if [ -f ../.tpkg.var.master ]
then
source ../.tpkg.var.master
else
(
cd ..
[ -f "${TPKG_SRCDIR}/setup-env.sh" ] \
&& sh "${TPKG_SRCDIR}/setup-env.sh"
) && source ../.tpkg.var.master
fi
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
for f in `cat restore-srcdir-configure-settings`
do
mv "${SRCROOT}/${f}.build" "${SRCROOT}/${f}"
done

View File

@ -13,16 +13,8 @@ fi
# use .tpkg.var.test for in test variable passing # use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test [ -f .tpkg.var.test ] && source .tpkg.var.test
echo "" > restore-srcdir-configure-settings
for f in `grep 'CONFIG_[FH][IE][LA][ED][SE]' "${SRCROOT}/configure.ac" | sed -e 's/^.*(\[//g' -e 's/\])//g'`
do
if [ -f "${SRCROOT}/$f" ]
then
mv "${SRCROOT}/${f}" "${SRCROOT}/${f}.build" && \
echo "$f" >> restore-srcdir-configure-settings
fi
done
rm -fr "${BUILDDIR}/build" rm -fr "${BUILDDIR}/build"
mkdir "${BUILDDIR}/build" mkdir "${BUILDDIR}/build"
cd "${BUILDDIR}/build" cd "${BUILDDIR}/build"
"${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install" rm -f CMakeCache.txt
cmake -E env CXXFLAGS="-g" cmake -DCMAKE_INSTALL_PREFIX=../install $* ${SRCROOT}

View File

@ -6,5 +6,5 @@
cd "${BUILDDIR}/build" cd "${BUILDDIR}/build"
make -j 4 install \ make -j 4 install \
&& echo "export GETDNS_QUERY=\"${BUILDDIR}/build/src/tools/getdns_query\"" \ && echo "export GETDNS_QUERY=\"${BUILDDIR}/build/getdns_query\"" \
>> ../.tpkg.var.master >> ../.tpkg.var.master

View File

@ -0,0 +1,57 @@
#! /usr/local/bin/gawk -f
# A script to extract the actual suppression info from the output of (for example) valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all ./minimal
# The desired bits are between ^{ and ^} (including the braces themselves).
# The combined output should either be appended to /usr/lib/valgrind/default.supp, or placed in a .supp of its own
# If the latter, either tell valgrind about it each time with --suppressions=<filename>, or add that line to ~/.valgrindrc
# NB This script uses the |& operator, which I believe is gawk-specific. In case of failure, check that you're using gawk rather than some other awk
# The script looks for suppressions. When it finds one it stores it temporarily in an array,
# and also feeds it line by line to the external app 'md5sum' which generates a unique checksum for it.
# The checksum is used as an index in a different array. If an item with that index already exists the suppression must be a duplicate and is discarded.
BEGIN { suppression=0; md5sum = "md5" }
# If the line begins with '{', it's the start of a supression; so set the var and initialise things
/^{/ {
suppression=1; i=0; next
}
# If the line begins with '}' its the end of a suppression
/^}/ {
if (suppression)
{ suppression=0;
close(md5sum, "to") # We've finished sending data to md5sum, so close that part of the pipe
ProcessInput() # Do the slightly-complicated stuff in functions
delete supparray # We don't want subsequent suppressions to append to it!
}
}
# Otherwise, it's a normal line. If we're inside a supression, store it, and pipe it to md5sum. Otherwise it's cruft, so ignore it
{ if (suppression)
{
supparray[++i] = $0
print |& md5sum
}
}
function ProcessInput()
{
# Pipe the result from md5sum, then close it
md5sum |& getline result
close(md5sum)
# gawk can't cope with enormous ints like $result would be, so stringify it first by prefixing a definite string
resultstring = "prefix"result
if (! (resultstring in chksum_array) )
{ chksum_array[resultstring] = 0; # This checksum hasn't been seen before, so add it to the array
OutputSuppression() # and output the contents of the suppression
}
}
function OutputSuppression()
{
# A suppression is surrounded by '{' and '}'. Its data was stored line by line in the array
print "{"
for (n=1; n <= i; ++n)
{ print supparray[n] }
print "}"
}

View File

@ -0,0 +1,14 @@
NS .
localhost
localhost.
A localhost.
-A getdnsapi.net
qwerlkjhasdfpuiqwyerm.1234kjhrqwersv.com
localhost.
-G TXT bogus.nlnetlabs.nl
-H 8.8.8.8
-H 2a04:b900:0:100::37
-a -A -x www.microsoft.com
-s
-S
-X

View File

@ -0,0 +1,80 @@
{
<bionic_leak_nettle_ecc_point_init>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:__gmp_default_allocate
fun:_nettle_gmp_alloc_limbs
fun:nettle_ecc_point_init
obj:/usr/lib/x86_64-linux-gnu/libunbound.so.2.5.6
}
{
<freebsd113_leak_pthread_attr_init>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc
fun:pthread_attr_init
obj:/usr/local/lib/libunbound.so.8.1.5
}
{
<insert_a_suppression_name_here>
Memcheck:Cond
obj:/lib/libc.so.7
obj:/lib/libc.so.7
obj:*
obj:/lib/libc.so.7
obj:*
obj:/lib/libc.so.7
obj:/lib/libc.so.7
obj:/lib/libc.so.7
obj:/root/getdns/tests/build/getdns_query
obj:/lib/libc.so.7
}
{
<insert_a_suppression_name_here>
Memcheck:Cond
obj:/lib/libc.so.7
obj:*
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
fun:_getdns_submit_netreq
fun:getdns_general_ns
}
{
<insert_a_suppression_name_here>
Memcheck:Cond
obj:/lib/libc.so.7
obj:*
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
fun:_getdns_submit_netreq
}
{
<insert_a_suppression_name_here>
Memcheck:Cond
obj:/lib/libc.so.7
obj:*
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
obj:/usr/local/lib/libunbound.so.8.1.5
}

View File

@ -4,24 +4,17 @@
# use .tpkg.var.test for in test variable passing # use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test [ -f .tpkg.var.test ] && source .tpkg.var.test
cat >queries <<EOT ## To add suppressions:
NS . ##
localhost #
localhost. # valgrind -v --log-file=valgrind.log --suppressions="${TPKG_NAME}.supp" --leak-check=full --error-exitcode=1 --track-origins=yes --gen-suppressions=all "${GETDNS_QUERY}" -F "${TPKG_NAME}.queries" -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain
A localhost. # ./${PKG_NAME}.parse_valgrind_suppressions.sh > new_supps
-A getdnsapi.net # cat ${PKG_NAME}.supp new_supps > tmp_supps
qwerlkjhasdfpuiqwyerm.1234kjhrqwersv.com # mv tmp_supps ${PKG_NAME}.supp
localhost. #
-G TXT bogus.nlnetlabs.nl
-H 8.8.8.8
-H 2a04:b900:0:100::37
-a -A -x www.microsoft.com
-s
-S
-X
EOT
( (
if ! "${BUILDDIR}/build/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "${GETDNS_QUERY}" -F queries -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain if ! valgrind -v --log-file=valgrind.log --suppressions="${TPKG_NAME}.supp" --leak-check=full --error-exitcode=1 --track-origins=yes "${GETDNS_QUERY}" -F "${TPKG_NAME}.queries" -f "${TPKG_NAME}.ds" +dnssec_return_validation_chain
then then
exit 1 exit 1
fi fi

View File

@ -5,4 +5,4 @@
[ -f .tpkg.var.test ] && source .tpkg.var.test [ -f .tpkg.var.test ] && source .tpkg.var.test
cd "${BUILDDIR}/build" cd "${BUILDDIR}/build"
make test CTEST_OUTPUT_ON_FAILURE=1 make test

View File

@ -9,7 +9,6 @@ CmdDepends:
Depends: Depends:
Help: Help:
Pre: 200-stub-only-compile-install.pre Pre: 200-stub-only-compile-install.pre
Post: 200-stub-only-compile-install.post
Test: 200-stub-only-compile-install.test Test: 200-stub-only-compile-install.test
AuxFiles: AuxFiles:
Passed: Passed:

View File

@ -1,20 +0,0 @@
# #-- 200-stub-only-compile.post --#
# source the master var file when it's there
if [ -f ../.tpkg.var.master ]
then
source ../.tpkg.var.master
else
(
cd ..
[ -f "${TPKG_SRCDIR}/setup-env.sh" ] \
&& sh "${TPKG_SRCDIR}/setup-env.sh"
) && source ../.tpkg.var.master
fi
# use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test
for f in `cat restore-srcdir-configure-settings`
do
mv "${SRCROOT}/${f}.build-stub-only" "${SRCROOT}/${f}"
done

View File

@ -13,16 +13,8 @@ fi
# use .tpkg.var.test for in test variable passing # use .tpkg.var.test for in test variable passing
[ -f .tpkg.var.test ] && source .tpkg.var.test [ -f .tpkg.var.test ] && source .tpkg.var.test
echo "" > restore-srcdir-configure-settings
for f in `grep 'CONFIG_[FH][IE][LA][ED][SE]' "${SRCROOT}/configure.ac" | sed -e 's/^.*(\[//g' -e 's/\])//g'`
do
if [ -f "${SRCROOT}/$f" ]
then
mv "${SRCROOT}/${f}" "${SRCROOT}/${f}.build-stub-only" && \
echo "$f" >> restore-srcdir-configure-settings
fi
done
rm -fr "${BUILDDIR}/build-stub-only" rm -fr "${BUILDDIR}/build-stub-only"
mkdir "${BUILDDIR}/build-stub-only" mkdir "${BUILDDIR}/build-stub-only"
cd "${BUILDDIR}/build-stub-only" cd "${BUILDDIR}/build-stub-only"
"${SRCROOT}/configure" $* --prefix "${BUILDDIR}/install-stub-only" --enable-stub-only --enable-debug-server --enable-debug-anchor rm -f CMakeCache.txt
cmake -E env CXXFLAGS="-g" cmake -DENABLE_STUB_ONLY=ON -DENABLE_DEBUG_SERVER=ON -DENABLE_DEBUG_ANCHOR=ON -DCMAKE_INSTALL_PREFIX=../install-stub-only $* ${SRCROOT}

View File

@ -6,5 +6,5 @@
cd "${BUILDDIR}/build-stub-only" cd "${BUILDDIR}/build-stub-only"
make XTRA_CFLAGS='-g -Werror' -j 4 install \ make XTRA_CFLAGS='-g -Werror' -j 4 install \
&& echo "export GETDNS_STUB_QUERY=\"${BUILDDIR}/build-stub-only/src/tools/getdns_query\"" \ && echo "export GETDNS_STUB_QUERY=\"${BUILDDIR}/build-stub-only/getdns_query\"" \
>> ../.tpkg.var.master >> ../.tpkg.var.master

View File

@ -0,0 +1,57 @@
#! /usr/local/bin/gawk -f
# A script to extract the actual suppression info from the output of (for example) valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all ./minimal
# The desired bits are between ^{ and ^} (including the braces themselves).
# The combined output should either be appended to /usr/lib/valgrind/default.supp, or placed in a .supp of its own
# If the latter, either tell valgrind about it each time with --suppressions=<filename>, or add that line to ~/.valgrindrc
# NB This script uses the |& operator, which I believe is gawk-specific. In case of failure, check that you're using gawk rather than some other awk
# The script looks for suppressions. When it finds one it stores it temporarily in an array,
# and also feeds it line by line to the external app 'md5sum' which generates a unique checksum for it.
# The checksum is used as an index in a different array. If an item with that index already exists the suppression must be a duplicate and is discarded.
BEGIN { suppression=0; md5sum = "md5" }
# If the line begins with '{', it's the start of a supression; so set the var and initialise things
/^{/ {
suppression=1; i=0; next
}
# If the line begins with '}' its the end of a suppression
/^}/ {
if (suppression)
{ suppression=0;
close(md5sum, "to") # We've finished sending data to md5sum, so close that part of the pipe
ProcessInput() # Do the slightly-complicated stuff in functions
delete supparray # We don't want subsequent suppressions to append to it!
}
}
# Otherwise, it's a normal line. If we're inside a supression, store it, and pipe it to md5sum. Otherwise it's cruft, so ignore it
{ if (suppression)
{
supparray[++i] = $0
print |& md5sum
}
}
function ProcessInput()
{
# Pipe the result from md5sum, then close it
md5sum |& getline result
close(md5sum)
# gawk can't cope with enormous ints like $result would be, so stringify it first by prefixing a definite string
resultstring = "prefix"result
if (! (resultstring in chksum_array) )
{ chksum_array[resultstring] = 0; # This checksum hasn't been seen before, so add it to the array
OutputSuppression() # and output the contents of the suppression
}
}
function OutputSuppression()
{
# A suppression is surrounded by '{' and '}'. Its data was stored line by line in the array
print "{"
for (n=1; n <= i; ++n)
{ print supparray[n] }
print "}"
}

View File

@ -0,0 +1,7 @@
NS .
-A getdnsapi.net
qwerlkjhasdfpuiqwyerm.1234kjhrqwersv.com
-G TXT bogus.nlnetlabs.nl
-H 8.8.8.8
-H 2a04:b900:0:100::37
-A _acme-challenge.getdnsapi.net

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