| 459 | } |
| 460 | |
| 461 | bool IPAddress::mask(Exception& ex, const IPAddress& mask, const IPAddress& set) { |
| 462 | ASSERT_RETURN(family() == IPAddress::IPv4 && mask.family() == IPAddress::IPv4 && set.family() == IPAddress::IPv4,false); |
| 463 | _pIPAddress.reset(new IPv4Address(*(const in_addr*)_pIPAddress->addr(),*(const in_addr*)mask.addr(),*(const in_addr*)set.addr())); |
| 464 | return true; |
| 465 | } |
| 466 | |
| 467 | IPAddress::Family IPAddress::family() const { |
| 468 | return _pIPAddress->family(); |