mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Remove unused/unimplemented host_timeout feature
This commit is contained in:
@@ -254,7 +254,6 @@ int ArgParser::parseArguments(int argc, char *argv[]) {
|
||||
/* Timing and performance */
|
||||
{"delay", required_argument, 0, 0},
|
||||
{"rate", required_argument, 0, 0},
|
||||
{"host-timeout", required_argument, 0, 0},
|
||||
|
||||
/* Misc */
|
||||
{"help", no_argument, 0, 'h'},
|
||||
@@ -922,13 +921,6 @@ int ArgParser::parseArguments(int argc, char *argv[]) {
|
||||
}else{
|
||||
nping_fatal(QT_3,"Invalid rate supplied. Rate must be a valid, positive integer");
|
||||
}
|
||||
/* Host timeout */
|
||||
} else if (optcmp(long_options[option_index].name, "host-timeout") == 0 ){
|
||||
l = tval2msecs(optarg);
|
||||
if (l >= 10000 * 1000 && tval_unit(optarg) == NULL)
|
||||
nping_fatal(QT_3,"Since April 2010, the default unit for --host-timeout is seconds, so your time of \"%s\" is %.1f hours. Use \"%sms\" for %g milliseconds.", optarg, l / 1000.0 / 60 / 60, optarg, l / 1000.0);
|
||||
o.setHostTimeout(l);
|
||||
|
||||
|
||||
/* MISC OPTIONS **************************************************************/
|
||||
} else if (optcmp(long_options[option_index].name, "privileged") == 0 ){
|
||||
|
||||
@@ -137,9 +137,6 @@ NpingOps::NpingOps() {
|
||||
send_eth=0;
|
||||
send_eth_set=false;
|
||||
|
||||
host_timeout=0;
|
||||
host_timeout_set=false;
|
||||
|
||||
delay=0;
|
||||
delay_set=false;
|
||||
|
||||
@@ -728,35 +725,6 @@ bool NpingOps::issetSendEth(){
|
||||
} /* End of issetSendEth() */
|
||||
|
||||
|
||||
/** Sets host timeout. Supplied parameter must be a long integer greater than
|
||||
* zero.
|
||||
* @warning timeout is assumed to be in milliseconds. Use tval2msecs() from
|
||||
* nbase to obtain a proper value.
|
||||
* @return OP_SUCCESS on success and OP_FAILURE in case of error. */
|
||||
int NpingOps::setHostTimeout(long t){
|
||||
if( t < 0 ){
|
||||
nping_fatal(QT_3,"setHostTimeout(): Invalid time supplied\n");
|
||||
return OP_FAILURE;
|
||||
}else{
|
||||
this->host_timeout=t;
|
||||
}
|
||||
this->host_timeout_set=true;
|
||||
return OP_SUCCESS;
|
||||
} /* End of setHostTimeout() */
|
||||
|
||||
|
||||
/** Returns value of attribute host_timeout */
|
||||
long NpingOps::getHostTimeout(){
|
||||
return this->host_timeout;
|
||||
} /* End of getHostTimeout() */
|
||||
|
||||
|
||||
/* Returns true if option has been set */
|
||||
bool NpingOps::issetHostTimeout(){
|
||||
return this->host_timeout_set;
|
||||
} /* End of issetHostTimeout() */
|
||||
|
||||
|
||||
/** Sets inter-probe delay. Supplied parameter is assumed to be in milliseconds
|
||||
* and must be a long integer greater than zero.
|
||||
* @warning timeout is assumed to be in milliseconds. Use tval2msecs() from
|
||||
|
||||
@@ -531,9 +531,6 @@ class NpingOps {
|
||||
bool send_eth; /**< True: send at raw ethernet level */
|
||||
bool send_eth_set;
|
||||
|
||||
long host_timeout; /**< Timeout for host replies */
|
||||
bool host_timeout_set;
|
||||
|
||||
long delay; /**< Delay between each probe */
|
||||
bool delay_set;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user