2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Add (presently undocumented) -p option to show the begin of each DNS packet,

useful for AXFR's and similar replies.  (requested by GDIB)
This commit is contained in:
Michael Sawyer
2000-10-02 16:43:25 +00:00
parent fb04db11ee
commit d2792acfaf
2 changed files with 10 additions and 4 deletions

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.c,v 1.108 2000/10/02 16:16:50 mws Exp $ */
/* $Id: dig.c,v 1.109 2000/10/02 16:43:24 mws Exp $ */
#include <config.h>
#include <stdlib.h>
@@ -78,7 +78,7 @@ dig_lookup_t *default_lookup = NULL;
extern isc_uint32_t name_limit;
extern isc_uint32_t rr_limit;
extern isc_boolean_t debugging;
extern isc_boolean_t debugging, show_packets;
char *batchname = NULL;
FILE *batchfp = NULL;
char *argv0;
@@ -883,6 +883,9 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
case 'n':
nibble = ISC_TRUE;
return (ISC_FALSE);
case 'p':
show_packets = ISC_TRUE;
return (ISC_FALSE);
}
if (value == NULL)
goto invalid_option;

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.139 2000/09/30 00:06:08 gson Exp $ */
/* $Id: dighost.c,v 1.140 2000/10/02 16:43:25 mws Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
@@ -75,7 +75,8 @@ isc_boolean_t
qr = ISC_FALSE,
is_dst_up = ISC_FALSE,
have_domain = ISC_FALSE,
is_blocking =ISC_FALSE;
is_blocking =ISC_FALSE,
show_packets = ISC_TRUE;
in_port_t port = 53;
unsigned int timeout = 0;
@@ -2093,6 +2094,8 @@ recv_done(isc_task_t *task, isc_event_t *event) {
UNUSED(task);
INSIST(!free_now);
if (show_packets)
puts(";; begin of DNS packet");
debug("recv_done()");
LOCK_LOOKUP;