This family of functions allows you to perform lookups of Hesiod information, which is stored as text records in the Domain Name Service. To perform lookups, you must first initialize a
context, an opaque object which stores information used internally by the library between calls.
hesiod_init() initializes a context, storing a pointer to the context in the location pointed to by the
context argument.
hesiod_end() frees the resources used by a context.
hesiod_resolve() is the primary interface to the library. If successful, it returns a list of one or more strings giving the records matching
name and
type. The last element of the list is followed by a
NULL pointer. It is the caller's responsibility to call
hesiod_free_list() to free the resources used by the returned list.
hesiod_to_bind() converts
name and
type into the DNS name used by
hesiod_resolve(). It is the caller's responsibility to free the returned string using
free(3).