1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-04 12:36:34 +00:00

Add --test option.

This will be used to control the printing of test messages that say when
a connection is ready to use, to reduce delays in ncat-test.
This commit is contained in:
david
2013-08-16 08:02:50 +00:00
parent 70b7203d3f
commit 68dc04479d
3 changed files with 7 additions and 0 deletions

View File

@@ -191,6 +191,8 @@ void options_init(void)
o.nsock_engine = 0;
o.test = 0;
o.numsrcrtes = 0;
o.srcrteptr = 4;

View File

@@ -180,6 +180,8 @@ struct options {
struct addrset denyset;
int httpserver;
int nsock_engine;
/* Output messages useful for testing to stderr? */
int test;
/* Loose source-routing stuff */
struct in_addr srcrtes[8];

View File

@@ -309,6 +309,7 @@ int main(int argc, char *argv[])
{"proxy-type", required_argument, NULL, 0},
{"proxy-auth", required_argument, NULL, 0},
{"nsock-engine", required_argument, NULL, 0},
{"test", no_argument, NULL, 0},
#ifdef HAVE_OPENSSL
{"ssl", no_argument, &o.ssl, 1},
{"ssl-cert", required_argument, NULL, 0},
@@ -471,6 +472,8 @@ int main(int argc, char *argv[])
if (nsock_set_default_engine(optarg) < 0)
bye("Unknown or non-available engine: %s.", optarg);
o.nsock_engine = 1;
} else if (strcmp(long_options[option_index].name, "test") == 0) {
o.test = 1;
} else if (strcmp(long_options[option_index].name, "broker") == 0) {
o.broker = 1;
/* --broker implies --listen. */