/* Plants a socket address in @sap and returns the size of the socket address, if successful. Returns zero if an error occurred.  */
size_t rpc_pton(const char *buf, const size_t buflen, struct sockaddr *sap, const size_t salen)
/* Plants a socket address in @sap and returns the size of the socket address, if successful. Returns zero if an error occurred.  */
size_t rpc_pton(const char *buf, const size_t buflen, struct sockaddr *sap, const size_t salen)
{
	unsigned int i;
	for (i = 0; i < buflen; i++)
		if (buf[i] == ':')
			return rpc_pton6(buf, buflen, sap, salen);
	return rpc_pton4(buf, buflen, sap, salen);
}