mirror of
https://github.com/nmap/nmap.git
synced 2026-10-21 19:32:18 +00:00
Initialize NetBlock members.
This commit is contained in:
parent
fd2130bae1
commit
b8e4f8832c
2 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue