1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-11 18:29:03 +00:00

Use an unsigned int for --max-retries and related values.

This commit is contained in:
david
2012-08-28 14:29:11 +00:00
parent dac93e76b3
commit 725692b744
3 changed files with 6 additions and 6 deletions

View File

@@ -218,7 +218,7 @@ class NmapOps {
void setMinRttTimeout(int rtt);
void setInitialRttTimeout(int rtt);
void setMaxRetransmissions(int max_retransmit);
int getMaxRetransmissions() { return max_retransmissions; }
unsigned int getMaxRetransmissions() { return max_retransmissions; }
/* Similar functions for Host group size */
int minHostGroupSz() { return min_host_group_sz; }
@@ -373,7 +373,7 @@ class NmapOps {
int max_rtt_timeout;
int min_rtt_timeout;
int initial_rtt_timeout;
int max_retransmissions;
unsigned int max_retransmissions;
unsigned int max_tcp_scan_delay;
unsigned int max_udp_scan_delay;
unsigned int max_sctp_scan_delay;

View File

@@ -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
in this many usecs */
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() {
scan_performance_vars::init();
@@ -1395,7 +1395,7 @@ unsigned int HostScanStats::allowedTryno(bool *capped, bool *mayincrease) {
/* TODO: This should perhaps differ by scan type. */
maxval = MAX(1, max_successful_tryno + 1);
if (maxval > (unsigned int) USI->perf.tryno_cap) {
if (maxval > USI->perf.tryno_cap) {
if (capped)
*capped = true;
maxval = USI->perf.tryno_cap;
@@ -2456,7 +2456,7 @@ static u16 sport_encode(UltraScanInfo *USI, u16 base_portno, unsigned int trynum
otherwise. */
static bool sport_decode(const UltraScanInfo *USI, u16 base_portno, u16 portno,
unsigned int *trynum, unsigned int *pingseq) {
int t;
unsigned int t;
t = portno - base_portno;
if (t > USI->perf.tryno_cap + 256) {

View File

@@ -273,7 +273,7 @@ private:
/* This is incremented with each instantiated probe. */
static u16 token_counter;
int num_resends;
unsigned int num_resends;
public:
HostState *host;