Inet_pton is the official NetBSD address conversion, from the ASCII representation of the dot.quad IPv4 address or the colon-separated version of the IPv6 address to a binary internal value. I suspect it loses the ability to grasp 127.1 as the localhost address, but I'm not entirely sure. It does work considerably more reliably than the equivalent code in inet_addr.c which it replaces. It provides inet_aton() which is a bit more fragile and seemingly deprecated. Essential to the implementation of the OpenLDAP client tools.