F.1.9. rascal_gethost

Resolves the numeric address to a list of symbolic host names (PTR record lookup).

rrid_t rascal_gethost(
	const sock_t *addr,
	callback,
	void *context OPTIONAL
);

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

void __rascall callback(
	void *context,
	const sock_t *addr,
	unsigned int count,
	const char **hosts
);

If the value of count is zero, then the lookup has failed, otherwise hosts points to an array of pointers to null-terminated host names associated with the requested address.

Return value. 

If the request could not be processed, 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, having the count parameter set to zero.