packets: Add more utility functions for IPv4 and IPv6 addresses.