mirror of
https://github.com/mfontanini/libtins
synced 2026-01-27 12:14:26 +01:00
Allow masking IPv4/6 and HW addresses
This commit is contained in:
@@ -139,4 +139,8 @@ bool IPv4Address::is_broadcast() const {
|
||||
return* this == broadcast;
|
||||
}
|
||||
|
||||
IPv4Address IPv4Address::operator&(const IPv4Address& mask) const {
|
||||
return IPv4Address(Endian::be_to_host(ip_addr_ & mask.ip_addr_));
|
||||
}
|
||||
|
||||
} // Tins
|
||||
|
||||
Reference in New Issue
Block a user