| 83 | } |
| 84 | |
| 85 | static bool IsRFC1918(const struct wireaddr *addr) |
| 86 | { |
| 87 | return IsIPv4(addr) && ( |
| 88 | GetByte(addr, 3) == 10 || |
| 89 | (GetByte(addr, 3) == 192 && GetByte(addr, 2) == 168) || |
| 90 | (GetByte(addr, 3) == 172 && (GetByte(addr, 2) >= 16 && GetByte(addr, 2) <= 31))); |
| 91 | } |
| 92 | |
| 93 | static bool IsRFC2544(const struct wireaddr *addr) |
| 94 | { |