mirror of
https://github.com/nmap/nmap.git
synced 2025-12-12 10:49:02 +00:00
Use an unsigned int for --max-retries and related values.
This commit is contained in:
@@ -218,7 +218,7 @@ class NmapOps {
|
|||||||
void setMinRttTimeout(int rtt);
|
void setMinRttTimeout(int rtt);
|
||||||
void setInitialRttTimeout(int rtt);
|
void setInitialRttTimeout(int rtt);
|
||||||
void setMaxRetransmissions(int max_retransmit);
|
void setMaxRetransmissions(int max_retransmit);
|
||||||
int getMaxRetransmissions() { return max_retransmissions; }
|
unsigned int getMaxRetransmissions() { return max_retransmissions; }
|
||||||
|
|
||||||
/* Similar functions for Host group size */
|
/* Similar functions for Host group size */
|
||||||
int minHostGroupSz() { return min_host_group_sz; }
|
int minHostGroupSz() { return min_host_group_sz; }
|
||||||
@@ -373,7 +373,7 @@ class NmapOps {
|
|||||||
int max_rtt_timeout;
|
int max_rtt_timeout;
|
||||||
int min_rtt_timeout;
|
int min_rtt_timeout;
|
||||||
int initial_rtt_timeout;
|
int initial_rtt_timeout;
|
||||||
int max_retransmissions;
|
unsigned int max_retransmissions;
|
||||||
unsigned int max_tcp_scan_delay;
|
unsigned int max_tcp_scan_delay;
|
||||||
unsigned int max_udp_scan_delay;
|
unsigned int max_udp_scan_delay;
|
||||||
unsigned int max_sctp_scan_delay;
|
unsigned int max_sctp_scan_delay;
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ struct ultra_scan_performance_vars : public scan_performance_vars {
|
|||||||
/* Try to send a scanping if no response has been received from a target host
|
/* Try to send a scanping if no response has been received from a target host
|
||||||
in this many usecs */
|
in this many usecs */
|
||||||
int pingtime;
|
int pingtime;
|
||||||
int tryno_cap; /* The maximum trynumber (starts at zero) allowed */
|
unsigned int tryno_cap; /* The maximum trynumber (starts at zero) allowed */
|
||||||
|
|
||||||
void init() {
|
void init() {
|
||||||
scan_performance_vars::init();
|
scan_performance_vars::init();
|
||||||
@@ -1395,7 +1395,7 @@ unsigned int HostScanStats::allowedTryno(bool *capped, bool *mayincrease) {
|
|||||||
|
|
||||||
/* TODO: This should perhaps differ by scan type. */
|
/* TODO: This should perhaps differ by scan type. */
|
||||||
maxval = MAX(1, max_successful_tryno + 1);
|
maxval = MAX(1, max_successful_tryno + 1);
|
||||||
if (maxval > (unsigned int) USI->perf.tryno_cap) {
|
if (maxval > USI->perf.tryno_cap) {
|
||||||
if (capped)
|
if (capped)
|
||||||
*capped = true;
|
*capped = true;
|
||||||
maxval = USI->perf.tryno_cap;
|
maxval = USI->perf.tryno_cap;
|
||||||
@@ -2456,7 +2456,7 @@ static u16 sport_encode(UltraScanInfo *USI, u16 base_portno, unsigned int trynum
|
|||||||
otherwise. */
|
otherwise. */
|
||||||
static bool sport_decode(const UltraScanInfo *USI, u16 base_portno, u16 portno,
|
static bool sport_decode(const UltraScanInfo *USI, u16 base_portno, u16 portno,
|
||||||
unsigned int *trynum, unsigned int *pingseq) {
|
unsigned int *trynum, unsigned int *pingseq) {
|
||||||
int t;
|
unsigned int t;
|
||||||
|
|
||||||
t = portno - base_portno;
|
t = portno - base_portno;
|
||||||
if (t > USI->perf.tryno_cap + 256) {
|
if (t > USI->perf.tryno_cap + 256) {
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ private:
|
|||||||
/* This is incremented with each instantiated probe. */
|
/* This is incremented with each instantiated probe. */
|
||||||
static u16 token_counter;
|
static u16 token_counter;
|
||||||
|
|
||||||
int num_resends;
|
unsigned int num_resends;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
HostState *host;
|
HostState *host;
|
||||||
|
|||||||
Reference in New Issue
Block a user