Rewrite to_bitfield_ipv6 using socket.inet_pton