F.1.8. rascal_getaddr

Resolves a symbolic host name to a list of numeric addresses (A and AAAA record lookup).

rrid_t rascal_getaddr(
	const char *host,
	callback,
	void *context OPTIONAL
);

Results are delivered to a callback function of the following prototype:

void __rascall callback(
	void *context,
	const char *host,
	unsigned int count,
	const addr_t *addrs
);

If the value of count is zero, the lookup has failed, otherwise addrs points to an array of numeric addresses associated with the requested host name.

Return value. 

If the request could not be scheduled, the corresponding error message can be retreived using the rascal_get_errmsg. Otherwise, the return value can be used to cancel the request by a call to rascal_cancel; in that case, the callback function will be called by the library, with count set to zero.