| 1279 | } |
| 1280 | |
| 1281 | bool CSubNet::Match(const CNetAddr& addr) const |
| 1282 | { |
| 1283 | if (!valid || !addr.IsValid()) |
| 1284 | return false; |
| 1285 | for (int x = 0; x < 16; ++x) |
| 1286 | if ((addr.ip[x] & netmask[x]) != network.ip[x]) |
| 1287 | return false; |
| 1288 | return true; |
| 1289 | } |
| 1290 | |
| 1291 | std::string CSubNet::ToString() const |
| 1292 | { |
no test coverage detected