(byte1, byte2)
| 885 | Return common prefix length of IPv6 addresses a and b. |
| 886 | """ |
| 887 | def matching_bits(byte1, byte2): |
| 888 | # type: (int, int) -> int |
| 889 | for i in range(8): |
| 890 | cur_mask = 0x80 >> i |
| 891 | if (byte1 & cur_mask) != (byte2 & cur_mask): |
| 892 | return i |
| 893 | return 8 |
| 894 | |
| 895 | tmpA = inet_pton(socket.AF_INET6, a) |
| 896 | tmpB = inet_pton(socket.AF_INET6, b) |
no outgoing calls
no test coverage detected