| 71 | } |
| 72 | |
| 73 | int AuthAllowedSubnet::netmaskWeight() const { |
| 74 | if (addressMask.isV4()) { |
| 75 | boost::asio::ip::address_v4 addr(netmask().toV4()); |
| 76 | return netmaskWeightImpl(addr.to_bytes()); |
| 77 | } else { |
| 78 | return netmaskWeightImpl(netmask().toV6()); |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | AuthAllowedSubnet AuthAllowedSubnet::fromString(std::string_view addressString) { |
| 83 | auto pos = addressString.find('/'); |
no test coverage detected