1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00

Reduce sockaddr comparisons in raw scans

This commit is contained in:
dmiller
2022-11-02 02:12:38 +00:00
parent 4eee4f2e1f
commit 1375f44416
3 changed files with 47 additions and 88 deletions

View File

@@ -630,11 +630,14 @@ public:
u32 seqmask; /* This mask value is used to encode values in sequence
numbers. It is set randomly in UltraScanInfo::Init() */
u16 base_port;
const struct sockaddr_storage *SourceSockAddr() const { return &sourceSockAddr; }
private:
unsigned int numInitialTargets;
std::multiset<HostScanStats *, HssPredicate>::iterator nextI;
// All targets in an invocation will have the same source address.
struct sockaddr_storage sourceSockAddr;
/* We encode per-probe information like the tryno in the source
port, for protocols that use ports. (Except when o.magic_port_set is
true--then we honor the requested source port.) The tryno is