MAN page from Trustix bind-devel-8.2.6-3tr.i586.rpm
HESIOD
Section: C Library Functions (3)
Updated: 30 November 1996
Index NAME
hesiod, hesiod_init, hesiod_resolve, hesiod_free_list, hesiod_to_bind, hesiod_end - Hesiod name server interface library
SYNOPSIS
#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)
DESCRIPTION
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 a
context,an opaque object which stores information used internally by thelibrary between calls.
hesiod_initinitializes a context, storing a pointer to the context in thelocation pointed to by the
contextargument.
hesiod_endfrees 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.
RETURN VALUES
If successful,
hesiod_initreturns 0; otherwise it returns -1 and sets
errnoto indicate the error. On failure,
hesiod_resolveand
hesiod_to_bindreturn NULL and set the global variable
errnoto indicate the error.
ENVIRONMENT
If the environment variable
HES_DOMAINis set, it will override the domain in the Hesiod configuration file.If the environment variable
HESIOD_CONFIGis set, it specifies the location of the Hesiod configuration file.
SEE ALSO
`Hesiod - Project Athena Technical Plan -- Name Service',
named(8),
hesiod.conf(5)
ERRORS
Hesiod calls may fail because of:
- ENOMEM
- Insufficient memory was available to carry out the requestedoperation.
- ENOEXEC
- hesiod_initfailed because the Hesiod configuration file was invalid.
- ECONNREFUSED
- hesiod_resolvefailed because no name server could be contacted to answer the query.
- EMSGSIZE
- hesiod_resolvefailed because the query or response was too big to fit into thepacket buffers.
- ENOENT
- 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.
AUTHOR
Steve Dyer, IBM/Project Athena
Greg Hudson, MIT Team Athena
Copyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Technology.
BUGS
The strings corresponding to the
errnovalues set by the Hesiod functions are not particularly indicative ofwhat went wrong, especially for
ENOEXECand
ENOENT.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- RETURN VALUES
- ENVIRONMENT
- SEE ALSO
- ERRORS
- AUTHOR
- BUGS
This document was created byman2html,using the manual pages.