| 509 | |
| 510 | |
| 511 | bool IPAddress::tryParse(const std::string& addr, IPAddress& result) |
| 512 | { |
| 513 | IPv4AddressImpl impl4(IPv4AddressImpl::parse(addr)); |
| 514 | if (impl4 != IPv4AddressImpl() || trim(addr) == "0.0.0.0") |
| 515 | { |
| 516 | result.newIPv4(impl4.addr()); |
| 517 | return true; |
| 518 | } |
| 519 | #if defined(POCO_HAVE_IPv6) |
| 520 | IPv6AddressImpl impl6(IPv6AddressImpl::parse(addr)); |
| 521 | if (impl6 != IPv6AddressImpl()) |
| 522 | { |
| 523 | result.newIPv6(impl6.addr(), impl6.scope()); |
| 524 | return true; |
| 525 | } |
| 526 | #endif |
| 527 | return false; |
| 528 | } |
| 529 | |
| 530 | |
| 531 | void IPAddress::mask(const IPAddress& mask) |
nothing calls this directly
no test coverage detected