| 67 | } |
| 68 | |
| 69 | static bool RawEq(const struct wireaddr *addr, const void *cmp, size_t len) |
| 70 | { |
| 71 | size_t off = IPv4In6(addr); |
| 72 | |
| 73 | assert(off + len <= addr->addrlen); |
| 74 | return memcmp(addr->addr + off, cmp, len) == 0; |
| 75 | } |
| 76 | |
| 77 | /* The bitcoin code packs addresses backwards, so we map it here. */ |
| 78 | static unsigned int GetByte(const struct wireaddr *addr, int n) |