inet_pton(af, ip) -> packed IP address string

Convert an IP address from string format to a packed string suitable
for use with low-level network functions.