MAN page from RedHat 7.X bind-devel-8.2.3chroot-3ur.i386.rpm
Section: C Library Functions (3)
Updated: 30 November 1996Index
hesiod, hesiod_init, hesiod_resolve, hesiod_free_list, hesiod_to_bind, hesiod_end - Hesiod name server interface library
#include <hesiod.h>int hesiod_init(void **context)char **hesiod_resolve(void *context, const char *name,const char *type)void hesiod_free_list(void *context, char **list);char *hesiod_to_bind(void *context, const char *name,const char *type)void hesiod_end(void *context)
This family of functions allows you to perform lookups of Hesiodinformation, which is stored as text records in the Domain NameService. To perform lookups, you must first initialize acontext
,an opaque object which stores information used internally by thelibrary between calls.hesiod_init
initializes a context, storing a pointer to the context in thelocation pointed to by thecontext
frees the resources used by a context.
hesiod_resolveis the primary interface to the library. If successful, it returns alist of one or more strings giving the records matchingnameandtype.The last element of the list is followed by a NULL pointer. It is thecaller's responsibility to callhesiod_free_listto free the resources used by the returned list.
hesiod_to_bindconvertsnameandtypeinto the DNS name used byhesiod_resolve.It is the caller's responsibility to free the returned string usingfree.
returns 0; otherwise it returns -1 and setserrno
to indicate the error. On failure,hesiod_resolve
return NULL and set the global variableerrno
to indicate the error.
If the environment variableHES_DOMAIN
is set, it will override the domain in the Hesiod configuration file.If the environment variableHESIOD_CONFIG
is set, it specifies the location of the Hesiod configuration file.
`Hesiod - Project Athena Technical Plan -- Name Service', named
Hesiod calls may fail because of:
- Insufficient memory was available to carry out the requestedoperation.
- hesiod_initfailed because the Hesiod configuration file was invalid.
- hesiod_resolvefailed because no name server could be contacted to answer the query.
- hesiod_resolvefailed because the query or response was too big to fit into thepacket buffers.
- hesiod_resolvefailed because the name server had no text records matchingnameandtype,orhesiod_to_bindfailed because thenameargument had a domain extension which could not be resolved with type``rhs-extension'' in the local Hesiod domain.
Steve Dyer, IBM/Project Athena
Greg Hudson, MIT Team Athena
Copyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Technology.
The strings corresponding to theerrno
values set by the Hesiod functions are not particularly indicative ofwhat went wrong, especially forENOEXEC
- RETURN VALUES
- SEE ALSO
This document was created byman2html,using the manual pages.