// public bool IPAddressV4::inSubnet(StringPiece cidrNetwork) const { auto subnetInfo = IPAddress::createNetwork(cidrNetwork); auto addr = subnetInfo.first; if (!addr.isV4()) { throw IPAddressFormatException("Address '", addr.toJson(), "' ", "is not a V4 address"); } return inSubnetWithMask(addr.asV4(), fetchMask(subnetInfo.second)); }
// public bool IPAddressV4::isLinkLocal() const { static IPAddressV4 linklocal_addr("169.254.0.0"); return inSubnetWithMask(linklocal_addr, fetchMask(16)); }
// public bool IPAddressV4::isLoopback() const { static IPAddressV4 loopback_addr("127.0.0.0"); return inSubnetWithMask(loopback_addr, fetchMask(8)); }