mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +00:00
Clarifies that the packet count may be 0. Fixes #988
This commit is contained in:
@@ -1072,7 +1072,7 @@ int ArgParser::parseArguments(int argc, char *argv[]) {
|
|||||||
}else if( parse_u32(optarg, &aux32) == OP_SUCCESS ){
|
}else if( parse_u32(optarg, &aux32) == OP_SUCCESS ){
|
||||||
o.setPacketCount(aux32);
|
o.setPacketCount(aux32);
|
||||||
}else{
|
}else{
|
||||||
nping_fatal(QT_3,"Packet count must be an integer greater than 0.");
|
nping_fatal(QT_3,"Packet count must be an integer greater than or equal to 0.");
|
||||||
}
|
}
|
||||||
break; /* case 'c': */
|
break; /* case 'c': */
|
||||||
|
|
||||||
|
|||||||
@@ -654,10 +654,10 @@ bool NpingOps::issetShowSentPackets(){
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
/** Sets packet count (number of packets that should be sent to each target)
|
/** Sets packet count (number of packets that should be sent to each target)
|
||||||
* Supplied parameter must be a positive integer >0.
|
* Supplied parameter must be a non-negative integer.
|
||||||
* @return OP_SUCCESS on success and OP_FAILURE in case of error. */
|
* @return OP_SUCCESS on success and OP_FAILURE in case of error. */
|
||||||
int NpingOps::setPacketCount(u32 val){
|
int NpingOps::setPacketCount(u32 val){
|
||||||
/* If zero is supplied, set highest value */
|
/* If zero is supplied, use the highest possible value */
|
||||||
if( val==0 )
|
if( val==0 )
|
||||||
this->pcount=0xFFFFFFFF;
|
this->pcount=0xFFFFFFFF;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user