2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Add undocumented '-T delay=value' to allow for simulation of remote servers

This commit is contained in:
Mark Andrews
2012-09-29 13:07:09 +10:00
parent 762369bbaa
commit cc0a2f0283
4 changed files with 79 additions and 2 deletions

View File

@@ -512,6 +512,8 @@ parse_command_line(int argc, char *argv[]) {
/*
* clienttest: make clients single shot with their
* own memory context.
* delay=xxxx: delay client responses by xxxx ms to
* simulate remote servers.
*/
if (!strcmp(isc_commandline_argument, "clienttest"))
ns_g_clienttest = ISC_TRUE;
@@ -523,6 +525,9 @@ parse_command_line(int argc, char *argv[]) {
maxudp = 512;
else if (!strcmp(isc_commandline_argument, "maxudp1460"))
maxudp = 1460;
else if (!strncmp(isc_commandline_argument,
"delay=", 6))
ns_g_delay = atoi(isc_commandline_argument + 6);
else
fprintf(stderr, "unknown -T flag '%s\n",
isc_commandline_argument);