mirror of
https://github.com/nmap/nmap.git
synced 2025-12-25 17:09:02 +00:00
Initialize NetBlock members.
This commit is contained in:
@@ -269,6 +269,15 @@ bool NetBlock::is_resolved_address(const struct sockaddr_storage *ss) const {
|
||||
return sockaddr_storage_equal(&*this->resolvedaddrs.begin(), ss);
|
||||
}
|
||||
|
||||
NetBlockIPv4Ranges::NetBlockIPv4Ranges() {
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
memset(this->octets, 0, sizeof(this->octets));
|
||||
this->counter[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool NetBlockIPv4Ranges::next(struct sockaddr_storage *ss) {
|
||||
struct sockaddr_in *sin;
|
||||
unsigned int i;
|
||||
|
||||
@@ -135,6 +135,8 @@ class NetBlockIPv4Ranges : public NetBlock {
|
||||
public:
|
||||
octet_bitvector octets[4];
|
||||
|
||||
NetBlockIPv4Ranges();
|
||||
|
||||
bool next(struct sockaddr_storage *ss);
|
||||
void apply_netmask(int bits);
|
||||
std::string str() const;
|
||||
|
||||
Reference in New Issue
Block a user