inet_pton etc to generic code