77 changes: 53 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,74 @@
# dnsperf

## Overview

[https://github.com/DNS-OARC/dnsperf](https://github.com/DNS-OARC/dnsperf)

This is a collection of DNS server performance testing tools, including dnsperf
and resperf. For more information, see the dnsperf(1) and resperf(1) man pages.
`dnsperf` and `resperf` are free tools developed by Nominum/Akamai (2006-2018)
and DNS-OARC (since 2019) that make it simple to gather accurate latency and
throughput metrics for Domain Name Service (DNS). These tools are easy-to-use
and simulate typical Internet, so network operators can benchmark their naming
and addressing infrastructure and plan for upgrades. The latest version of
the `dnsperf` and `resperf` can be used with test files that include IPv6
queries.

`dnsperf` "self-paces" the DNS query load to simulate network conditions.
New features in `dnsperf` improve the precision of latency measurements and
allow for per packet per-query latency reporting is possible. `dnsperf` is
now multithreaded, multiple `dnsperf` clients can be supported in multicore
systems (each client requires two cores). The output of `dnsperf` has also
been improved so it is more concise and useful. Latency data can be used to
make detailed graphs, so it is simple for network operators to take advantage
of the data.

`resperf` systematically increases the query rate and monitors the response
rate to simulate caching DNS services.

For more information, see the `dnsperf(1)` and `resperf(1)` man pages.

## Usage

dnsperf and resperf read input files describing DNS queries, and send those
queries to DNS servers to measure performance.
`dnsperf` and `resperf` read input files describing DNS queries, and send
those queries to DNS servers to measure performance.

## Installation
## Dependencies

To configure, compile, and install these programs, follow these steps.
`dnsperf` requires a couple of libraries beside a normal C compiling
environment with autoconf, automake, libtool.

1. Make sure that BIND 9 (9.4.0 or greater) is installed, including libraries
and header files, and that the isc-config.sh program distributed with BIND
is in your path.
`dnsperf` has a non-optional dependency on the BIND library and development
files along with all dependencies it requires.

Note: many versions of bind do not correctly install the <isc/hmacsha.h>
header file, so if the compilation fails, obtain this file from the BIND
source distribution, and install it in the appropriate place.
To install the dependencies under Debian/Ubuntu:
```
apt-get install -y libbind-dev libkrb5-dev libssl-dev libcap-dev libxml2-dev libjson-c-dev libgeoip-dev
```

On Ubuntu / Debian:
```
sudo apt-get install -y bind9utils libbind-dev libkrb5-dev libssl-dev libcap-dev libxml2-dev libjson-c-dev libgeoip-dev
```
## Building from source tarball

2. Run "sh configure" to configure the software. Most standard configure
options are supported.
The source tarball from DNS-OARC comes prepared with `configure`:

3. Run "make" to build dnsperf and resperf
```
tar zxvf dnsperf-version.tar.gz
cd dnsperf-version
./configure [options]
make
make install
```

## Building from Git repository

4. Run "make install" to install dnsperf and resperf.
```
git clone https://github.com/DNS-OARC/dnsperf.git
cd dnsperf
./autogen.sh
./configure [options]
make
make install
```

## Additional Software

The contrib directory contains additional software related to dnsperf and
resperf.
The contrib directory contains additional software related to `dnsperf` and
`resperf`.

## License

Expand Down
183 changes: 0 additions & 183 deletions RELEASE_NOTES

This file was deleted.

2 changes: 0 additions & 2 deletions aclocal.m4

This file was deleted.

242 changes: 0 additions & 242 deletions acx_pthread.m4

This file was deleted.

19 changes: 19 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh -e
# Copyright 2019 OARC, Inc.
# Copyright 2017-2018 Akamai Technologies
# Copyright 2006-2016 Nominum, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

autoreconf --force --install --include=m4
1,456 changes: 0 additions & 1,456 deletions config.guess

This file was deleted.

1,823 changes: 0 additions & 1,823 deletions config.sub

This file was deleted.

4,671 changes: 0 additions & 4,671 deletions configure

This file was deleted.

81 changes: 81 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Copyright 2019 OARC, Inc.
# Copyright 2017-2018 Akamai Technologies
# Copyright 2006-2016 Nominum, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

AC_PREREQ(2.64)
AC_INIT([dnsperf], [2.2.0], [admin@dns-oarc.net], [dnsperf], [https://github.com/DNS-OARC/dnsperf/issues])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
AC_CONFIG_SRCDIR([src/dnsperf.c])
AC_CONFIG_HEADER([src/config.h])
AC_CONFIG_MACRO_DIR([m4])

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_CANONICAL_HOST
AC_C_INLINE
LT_INIT([disable-static])

# Check --enable-warn-all
AC_ARG_ENABLE([warn-all], [AS_HELP_STRING([--enable-warn-all], [Enable all compiler warnings])], [AX_CFLAGS_WARN_ALL()])

# Check --with-extra-cflags
AC_ARG_WITH([extra-cflags], [AS_HELP_STRING([--with-extra-cflags=CFLAGS], [Add extra CFLAGS])], [
AC_MSG_NOTICE([appending extra CFLAGS... $withval])
AS_VAR_APPEND(CFLAGS, [" $withval"])
])

# Check --with-extra-ldflags
AC_ARG_WITH([extra-ldflags], [AS_HELP_STRING([--with-extra-ldflags=CFLAGS], [Add extra LDFLAGS])], [
AC_MSG_NOTICE([appending extra LDFLAGS... $withval])
AS_VAR_APPEND(LDFLAGS, [" $withval"])
])

# Checks for support.
AX_PTHREAD
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_ntoa)

# Check for bind
AC_ARG_WITH(bind,
[ --with-bind=[[PATH]] Specify ISC BIND 9 prefix path],
use_bind="$withval", use_bind="yes")

AC_MSG_CHECKING(for BIND 9 libraries)
if test $use_bind = no; then
AC_MSG_ERROR(BIND 9 libraries must be installed)
elif test $use_bind = yes; then
bindpath="$PATH"
else
bindpath="$withval/bin"
fi
AC_PATH_PROG(ac_cv_isc_config, [isc-config.sh], "no", [$bindpath])
if test "$ac_cv_isc_config" = "no"; then
AC_MSG_ERROR(BIND 9 libraries must be installed)
fi
AC_SUBST(DNSLIBS, "`$ac_cv_isc_config --libs dns bind9`")
AC_SUBST(DNSCFLAGS, "`$ac_cv_isc_config --cflags dns bind9`")

# Checks for sizes
AX_TYPE_SOCKLEN_T
AX_SA_LEN

# Output Makefiles
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT
250 changes: 0 additions & 250 deletions install-sh

This file was deleted.

50 changes: 50 additions & 0 deletions m4/ax_append_flag.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
#
# DESCRIPTION
#
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
# added in between.
#
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
# FLAG.
#
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
#
# 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 8

AC_DEFUN([AX_APPEND_FLAG],
[dnl
AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
AS_VAR_SET_IF(FLAGS,[
AS_CASE([" AS_VAR_GET(FLAGS) "],
[*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
[
AS_VAR_APPEND(FLAGS,[" $1"])
AC_RUN_LOG([: FLAGS="$FLAGS"])
])
],
[
AS_VAR_SET(FLAGS,[$1])
AC_RUN_LOG([: FLAGS="$FLAGS"])
])
AS_VAR_POPDEF([FLAGS])dnl
])dnl AX_APPEND_FLAG
122 changes: 122 additions & 0 deletions m4/ax_cflags_warn_all.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cflags_warn_all.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
# AX_CXXFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
# AX_FCFLAGS_WARN_ALL [(shellvar [,default, [A/NA]])]
#
# DESCRIPTION
#
# Try to find a compiler option that enables most reasonable warnings.
#
# For the GNU compiler it will be -Wall (and -ansi -pedantic) The result
# is added to the shellvar being CFLAGS, CXXFLAGS, or FCFLAGS by default.
#
# Currently this macro knows about the GCC, Solaris, Digital Unix, AIX,
# HP-UX, IRIX, NEC SX-5 (Super-UX 10), Cray J90 (Unicos 10.0.0.8), and
# Intel compilers. For a given compiler, the Fortran flags are much more
# experimental than their C equivalents.
#
# - $1 shell-variable-to-add-to : CFLAGS, CXXFLAGS, or FCFLAGS
# - $2 add-value-if-not-found : nothing
# - $3 action-if-found : add value to shellvariable
# - $4 action-if-not-found : nothing
#
# NOTE: These macros depend on AX_APPEND_FLAG.
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2010 Rhys Ulerich <rhys.ulerich@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 <https://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 16

AC_DEFUN([AX_FLAGS_WARN_ALL],[dnl
AS_VAR_PUSHDEF([FLAGS],[_AC_LANG_PREFIX[]FLAGS])dnl
AS_VAR_PUSHDEF([VAR],[ac_cv_[]_AC_LANG_ABBREV[]flags_warn_all])dnl
AC_CACHE_CHECK([m4_ifval($1,$1,FLAGS) for maximum warnings],
VAR,[VAR="no, unknown"
ac_save_[]FLAGS="$[]FLAGS"
for ac_arg dnl
in "-warn all % -warn all" dnl Intel
"-pedantic % -Wall" dnl GCC
"-xstrconst % -v" dnl Solaris C
"-std1 % -verbose -w0 -warnprotos" dnl Digital Unix
"-qlanglvl=ansi % -qsrcmsg -qinfo=all:noppt:noppc:noobs:nocnd" dnl AIX
"-ansi -ansiE % -fullwarn" dnl IRIX
"+ESlit % +w1" dnl HP-UX C
"-Xc % -pvctl[,]fullmsg" dnl NEC SX-5 (Super-UX 10)
"-h conform % -h msglevel 2" dnl Cray C (Unicos)
#
do FLAGS="$ac_save_[]FLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
[VAR=`echo $ac_arg | sed -e 's,.*% *,,'` ; break])
done
FLAGS="$ac_save_[]FLAGS"
])
AS_VAR_POPDEF([FLAGS])dnl
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
case ".$VAR" in
.ok|.ok,*) m4_ifvaln($3,$3) ;;
.|.no|.no,*) m4_default($4,[m4_ifval($2,[AX_APPEND_FLAG([$2], [$1])])]) ;;
*) m4_default($3,[AX_APPEND_FLAG([$VAR], [$1])]) ;;
esac
AS_VAR_POPDEF([VAR])dnl
])dnl AX_FLAGS_WARN_ALL
dnl implementation tactics:
dnl the for-argument contains a list of options. The first part of
dnl these does only exist to detect the compiler - usually it is
dnl a global option to enable -ansi or -extrawarnings. All other
dnl compilers will fail about it. That was needed since a lot of
dnl compilers will give false positives for some option-syntax
dnl like -Woption or -Xoption as they think of it is a pass-through
dnl to later compile stages or something. The "%" is used as a
dnl delimiter. A non-option comment can be given after "%%" marks
dnl which will be shown but not added to the respective C/CXXFLAGS.

AC_DEFUN([AX_CFLAGS_WARN_ALL],[dnl
AC_LANG_PUSH([C])
AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
AC_LANG_POP([C])
])

AC_DEFUN([AX_CXXFLAGS_WARN_ALL],[dnl
AC_LANG_PUSH([C++])
AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
AC_LANG_POP([C++])
])

AC_DEFUN([AX_FCFLAGS_WARN_ALL],[dnl
AC_LANG_PUSH([Fortran])
AX_FLAGS_WARN_ALL([$1], [$2], [$3], [$4])
AC_LANG_POP([Fortran])
])
485 changes: 485 additions & 0 deletions m4/ax_pthread.m4

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions m4/ax_require_defined.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_REQUIRE_DEFINED(MACRO)
#
# DESCRIPTION
#
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
# been defined and thus are available for use. This avoids random issues
# where a macro isn't expanded. Instead the configure script emits a
# non-fatal:
#
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
#
# It's like AC_REQUIRE except it doesn't expand the required macro.
#
# Here's an example:
#
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
#
# LICENSE
#
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
#
# 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 2

AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
])dnl AX_REQUIRE_DEFINED
8 changes: 8 additions & 0 deletions m4/dl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh -e

m4_files="ax_pthread.m4 ax_append_flag.m4 ax_cflags_warn_all.m4 ax_require_defined.m4"

for ax in $m4_files; do
rm -f "$ax"
wget -O "$ax" "http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/$ax"
done
47 changes: 4 additions & 43 deletions configure.in → m4/dnsperf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

AC_INIT(dnsperf.c)

AC_PREREQ(2.13)

AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB

AC_C_INLINE

AC_DEFUN(AC_TYPE_SOCKLEN_T,
AC_DEFUN([AX_TYPE_SOCKLEN_T],
[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
[
AC_TRY_COMPILE(
Expand All @@ -36,11 +26,11 @@ AC_DEFUN(AC_TYPE_SOCKLEN_T,
ac_cv_type_socklen_t=no)
])
if test $ac_cv_type_socklen_t != yes; then
AC_DEFINE(socklen_t, int)
AC_DEFINE([socklen_t], [int], [The type of socklen_t.])
fi
])

AC_DEFUN(AC_SA_LEN,
AC_DEFUN([AX_SA_LEN],
[AC_CACHE_CHECK([for sa_len], ac_cv_sa_len,
[
AC_TRY_COMPILE(
Expand All @@ -51,35 +41,6 @@ AC_DEFUN(AC_SA_LEN,
ac_cv_sa_len=no)
])
if test $ac_cv_sa_len = yes; then
AC_DEFINE(HAVE_SA_LEN)
AC_DEFINE([HAVE_SA_LEN], [1], [Set if struct sockaddr sa_len exists.])
fi
])

AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_ntoa)

AC_ARG_WITH(bind,
[ --with-bind=[[PATH]] Specify ISC BIND 9 prefix path],
use_bind="$withval", use_bind="yes")

AC_MSG_CHECKING(for BIND 9 libraries)
if test $use_bind = no; then
AC_MSG_ERROR(BIND 9 libraries must be installed)
elif test $use_bind = yes; then
bindpath="$PATH"
else
bindpath="$withval/bin"
fi
AC_PATH_PROG(ac_cv_isc_config, [isc-config.sh], "no", [$bindpath])
if test "$ac_cv_isc_config" = "no"; then
AC_MSG_ERROR(BIND 9 libraries must be installed)
fi
AC_SUBST(DNSLIBS, "`$ac_cv_isc_config --libs dns bind9`")
AC_SUBST(DNSCFLAGS, "`$ac_cv_isc_config --cflags dns bind9`")

AC_TYPE_SOCKLEN_T
AC_SA_LEN

ACX_PTHREAD

AC_OUTPUT(Makefile)
56 changes: 56 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 2019 OARC, Inc.
# Copyright 2017-2018 Akamai Technologies
# Copyright 2006-2016 Nominum, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

MAINTAINERCLEANFILES = $(srcdir)/Makefile.in $(srcdir)/config.h.in
CLEANFILES = dnsperf.1 resperf.1

SUBDIRS =

AM_CFLAGS = -I$(srcdir) \
-I$(top_srcdir) \
$(PTHREAD_CFLAGS) \
$(DNSCFLAGS)

EXTRA_DIST = dnsperf.1.in resperf-report resperf.1.in

bin_PROGRAMS = dnsperf resperf
dist_bin_SCRIPTS = resperf-report

_libperf_sources = datafile.c dns.c log.c net.c opt.c os.c
_libperf_headers = datafile.h dns.h log.h net.h opt.h os.h util.h version.h

dnsperf_SOURCES = $(_libperf_sources) dnsperf.c
dist_dnsperf_SOURCES = $(_libperf_headers)
dnsperf_LDADD = $(PTHREAD_LIBS) $(DNSLIBS)

resperf_SOURCES = $(_libperf_sources) resperf.c
dist_resperf_SOURCES = $(_libperf_headers)
resperf_LDADD = $(PTHREAD_LIBS) $(DNSLIBS)

man1_MANS = dnsperf.1 resperf.1

dnsperf.1: dnsperf.1.in Makefile
sed -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
-e 's,[@]PACKAGE_URL[@],$(PACKAGE_URL),g' \
-e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
< $(srcdir)/dnsperf.1.in > dnsperf.1

resperf.1: resperf.1.in Makefile
sed -e 's,[@]PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
-e 's,[@]PACKAGE_URL[@],$(PACKAGE_URL),g' \
-e 's,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g' \
< $(srcdir)/resperf.1.in > resperf.1
File renamed without changes.
File renamed without changes.
18 changes: 16 additions & 2 deletions dns.c → src/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ name_fromstring(dns_name_t *name, dns_name_t *origin,
isc_buffer_t buffer;
isc_result_t result;

isc_buffer_init(&buffer, str, len);
isc_buffer_constinit(&buffer, str, len);
isc_buffer_add(&buffer, len);
result = dns_name_fromtext(name, &buffer, origin, 0, target);
if (result != ISC_R_SUCCESS)
Expand Down Expand Up @@ -252,7 +252,12 @@ perf_dns_parsetsigkey(const char *arg, isc_mem_t *mctx)

/* Name */

#ifdef dns_fixedname_init
dns_fixedname_init(&tsigkey->fname);
tsigkey->name = dns_fixedname_name(&tsigkey->fname);
#else
tsigkey->name = dns_fixedname_initname(&tsigkey->fname);
#endif
result = name_fromstring(tsigkey->name, dns_rootname, name, namelen,
NULL, "TSIG key");
if (result != ISC_R_SUCCESS) {
Expand Down Expand Up @@ -734,11 +739,20 @@ build_update(perf_dnsctx_t *ctx, const isc_textregion_t *record,
msgbase = isc_buffer_base(msg);

/* Initialize */

#ifdef dns_fixedname_init
dns_fixedname_init(&foname);
oname = dns_fixedname_name(&foname);
#else
oname = dns_fixedname_initname(&foname);
#endif

/* Parse zone name */
#ifdef dns_fixedname_init
dns_fixedname_init(&fzname);
zname = dns_fixedname_name(&fzname);
#else
zname = dns_fixedname_initname(&fzname);
#endif
result = name_fromstring(zname, dns_rootname,
input.base, strlen(input.base),
NULL, "zone");
Expand Down
File renamed without changes.
28 changes: 24 additions & 4 deletions dnsperf.1 → src/dnsperf.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
.\" See the License for the specific language governing permissions and
.\" limitations under the License.
.TH DNSPERF 1 "Dec 9, 2015" Nominum Nominum
.TH dnsperf 1 "@PACKAGE_VERSION@" "dnsperf"
.SH NAME
\%dnsperf - test the performance of a DNS server
dnsperf \- test the performance of a DNS server
.SH SYNOPSIS
.hy 0
.ad l
Expand Down Expand Up @@ -329,7 +329,27 @@ Add a TSIG record [RFC2845] to all packets sent, using the specified TSIG
key algorithm, name and secret, where the algorithm defaults to hmac-md5 and
the secret is expressed as a base-64 encoded string.
.RE
.SH AUTHOR
Nominum, Inc.
.SH "SEE ALSO"
\fBresperf\fR(1)
.SH AUTHOR
Nominum, Inc.
.LP
Maintained by DNS-OARC
.LP
.RS
.I https://www.dns-oarc.net/
.RE
.LP
.SH BUGS
For issues and feature requests please use:
.LP
.RS
\fI@PACKAGE_URL@\fP
.RE
.LP
For question and help please use:
.LP
.RS
\fI@PACKAGE_BUGREPORT@\fP
.RE
.LP
6 changes: 3 additions & 3 deletions dnsperf.c → src/dnsperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ static void
handle_sigint(int sig)
{
(void)sig;
write(intrpipe[1], "", 1);
if (write(intrpipe[1], "", 1)) {}
}

static void
Expand Down Expand Up @@ -674,7 +674,7 @@ do_send(void *arg)
}
tinfo->done_send_time = get_time();
tinfo->done_sending = true;
write(mainpipe[1], "", 1);
if (write(mainpipe[1], "", 1)) {}
return NULL;
}

Expand Down Expand Up @@ -1133,7 +1133,7 @@ main(int argc, char **argv)

times.end_time = get_time();

write(threadpipe[1], "", 1);
if (write(threadpipe[1], "", 1)) {}
for (i = 0; i < config.threads; i++)
threadinfo_stop(&threads[i]);
if (config.stats_interval > 0)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 24 additions & 4 deletions resperf.1 → src/resperf.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
.\" See the License for the specific language governing permissions and
.\" limitations under the License.
.TH RESPERF 1 "Dec 9, 2015" Nominum Nominum
.TH resperf 1 "@PACKAGE_VERSION@" "resperf"
.SH NAME
\%resperf - test the resolution performance of a caching DNS server
resperf \- test the resolution performance of a caching DNS server
.SH SYNOPSIS
.hy 0
.ad l
Expand Down Expand Up @@ -605,7 +605,27 @@ length of the interval
The average time between sending the query and receiving a response, for
queries sent in this time interval
.RE
.SH AUTHOR
Nominum, Inc.
.SH "SEE ALSO"
\fBdnsperf\fR(1)
.SH AUTHOR
Nominum, Inc.
.LP
Maintained by DNS-OARC
.LP
.RS
.I https://www.dns-oarc.net/
.RE
.LP
.SH BUGS
For issues and feature requests please use:
.LP
.RS
\fI@PACKAGE_URL@\fP
.RE
.LP
For question and help please use:
.LP
.RS
\fI@PACKAGE_BUGREPORT@\fP
.RE
.LP
File renamed without changes.
File renamed without changes.
File renamed without changes.