]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
move wire-test to bin/tools/named-wireformat 12442/head
authorEvan Hunt <each@isc.org>
Thu, 23 Jul 2026 05:04:50 +0000 (22:04 -0700)
committerEvan Hunt <each@isc.org>
Mon, 3 Aug 2026 20:27:44 +0000 (20:27 +0000)
The wire-test has been renamed to named-wireformat and moved from
bin/tests/system to bin/tools.

bin/tests/system/dnstap/tests.sh
bin/tests/system/isctest/vars/basic.py
bin/tools/meson.build
bin/tools/named-wireformat.c [moved from bin/tools/wire-test.c with 100% similarity]
bin/tools/named-wireformat.rst [new file with mode: 0644]
meson.build

index 3d34c6b87f195f607abba0ab90be0877be89e81f..8ad7dbaa2a6d7b05c39b2235af011c1fba62b99b 100644 (file)
@@ -489,7 +489,7 @@ fi
 echo_i "checking dnstap-read hex output"
 ret=0
 hex=$($DNSTAPREAD -x ns3/dnstap.out | tail -1)
-echo $hex | $WIRETEST >dnstap.hex
+echo $hex | $WIREFORMAT >dnstap.hex
 grep 'status: NOERROR' dnstap.hex >/dev/null 2>&1 || ret=1
 grep 'ANSWER: 3, AUTHORITY: 0' dnstap.hex >/dev/null 2>&1 || ret=1
 if [ $ret != 0 ]; then echo_i "failed"; fi
index 9d8783c37b3587c1c0f7c09cb10cee50676ab01d..a5b625fe1aa73901551f28187d2e2187a8a1e81b 100644 (file)
@@ -44,7 +44,7 @@ BASIC_VARS = {
     "SIGNER": f"{BUILD_VARS['TOP_BUILDDIR']}/dnssec-signzone",
     "TSIGKEYGEN": f"{BUILD_VARS['TOP_BUILDDIR']}/tsig-keygen",
     "VERIFY": f"{BUILD_VARS['TOP_BUILDDIR']}/dnssec-verify",
-    "WIRETEST": f"{BUILD_VARS['TOP_BUILDDIR']}/wire-test",
+    "WIREFORMAT": f"{BUILD_VARS['TOP_BUILDDIR']}/named-wireformat",
     "BIGKEY": f"{BUILD_VARS['TOP_BUILDDIR']}/bigkey",
     "PIPEQUERIES": f"{BUILD_VARS['TOP_BUILDDIR']}/pipequeries",
     "TMPDIR": os.getenv("TMPDIR", "/tmp"),
index 9557de1d988b3553a19c371022b3346ef4656da1..7dfe9d5f55745faea1afad70fe357545d7f5d82b 100644 (file)
@@ -17,7 +17,7 @@ named_journalprint_src += files('named-journalprint.c')
 named_nzd2nzf_src += files('named-nzd2nzf.c')
 named_rrchecker_src += files('named-rrchecker.c')
 nsec3hash_src += files('nsec3hash.c')
-wiretest_src += files('wire-test.c')
+wireformat_src += files('named-wireformat.c')
 
 manrst_srcset.add(when: 'HAVE_DNSTAP', if_true: files('dnstap-read.rst'))
 manrst_srcset.add(
diff --git a/bin/tools/named-wireformat.rst b/bin/tools/named-wireformat.rst
new file mode 100644 (file)
index 0000000..736c5b6
--- /dev/null
@@ -0,0 +1,86 @@
+.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+..
+.. SPDX-License-Identifier: MPL-2.0
+..
+.. This Source Code Form is subject to the terms of the Mozilla Public
+.. License, v. 2.0.  If a copy of the MPL was not distributed with this
+.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
+..
+.. See the COPYRIGHT file distributed with this work for additional
+.. information regarding copyright ownership.
+
+.. highlight: console
+
+.. iscman:: named-wireformat
+.. program:: named-wireformat
+.. _man_named-wireformat:
+
+named-wireformat - parse DNS wire format messages
+-------------------------------------------------
+
+Synopsis
+~~~~~~~~
+
+:program:`named-wireformat` [**-b**] [**-d**] [**-h**] [**-m** flag] [**-p**] [**-r**] [**-s**] [**-t**] [{filename}]
+
+Description
+~~~~~~~~~~~
+
+:program:`named-wireformat` reads a DNS message in wire format, either
+in hexidecimal form or as raw data, from a file or from standard input,
+and translates it to text format to check whether it is formatted correctly.
+
+Options
+~~~~~~~
+
+.. option:: -b
+
+   Use best-effort parsing. Errors in message content will be
+   ignored, so long as the message itself can still be parsed as valid
+   DNS wire data.
+
+.. option:: -d
+
+   Read input as raw binary data instead of hexidecimal text.
+
+.. option:: -h
+
+   Print out the help menu.
+
+.. option:: -m flag
+
+   Turn on memory debugging flags. Possible flags are ``usage``,
+   ``trace`` and ``record``.
+
+.. option:: -p
+
+   Preserve the order of records in the message, instead of sorting
+   by name and type.
+
+.. option:: -r
+
+   After parsing and displaying the input message, render it back to wire
+   format, parse that, and display it again. This is used to confirm
+   that parsing and rendering are idempotent.
+
+.. option:: -s
+
+   Print memory statistics on shutdown.
+
+.. option:: -t
+
+   Parse the input as a TCP DNS message, with a two-byte length header.
+
+Arguments
+~~~~~~~~~
+
+.. option:: filename
+
+   If specified, the message to be parsed is read from this file.
+   Otherwise, it is read from the standard input.
+
+See Also
+~~~~~~~~
+
+:iscman:`named-rrchecker(8) <named-rrchecker>`,
+BIND 9 Administrator Reference Manual.
index 4bf9e386c8eb663f75a36e2126058fa897cd6424..88e554e559725548286467c1480af4f7c67a1e92 100644 (file)
@@ -1253,7 +1253,7 @@ nsupdate_src = []
 rndc_confgen_src = []
 rndc_src = []
 tsig_keygen_src = []
-wiretest_src = []
+wireformat_src = []
 
 filter_a_src = []
 filter_aaaa_src = []
@@ -1884,8 +1884,8 @@ executable(
 )
 
 executable(
-    'wire-test',
-    wiretest_src,
+    'named-wireformat',
+    wireformat_src,
     export_dynamic: true,
     implicit_include_directories: false,
     install: true,