Switch Ipv4 and Ipv6 (de)serialization to binary