IPv6 prefix comparison

Check whether two IPv6 addresses share the requested number of leading bits.