1HESIOD(3)                  Library Functions Manual                  HESIOD(3)
2
3
4

NAME

6       hesiod,  hesiod_init, hesiod_resolve, hesiod_free_list, hesiod_to_bind,
7       hesiod_end - Hesiod name server interface library
8

SYNOPSIS

10       #include <hesiod.h>
11
12       int hesiod_init(void **context)
13       char **hesiod_resolve(void *context, const char *name,
14            const char *type)
15       void hesiod_free_list(void *context, char **list);
16       char *hesiod_to_bind(void *context, const char *name,
17            const char *type)
18       void hesiod_end(void *context)
19

DESCRIPTION

21       This family of functions allows you to perform lookups of Hesiod infor‐
22       mation, which is stored as text records in the Domain Name Service.  To
23       perform lookups, you must first initialize a context, an opaque  object
24       which  stores information used internally by the library between calls.
25       hesiod_init initializes a context, storing a pointer to the context  in
26       the  location pointed to by the context argument.  hesiod_end frees the
27       resources used by a context.
28
29       hesiod_resolve is the primary interface to the library.  If successful,
30       it  returns  a  list of one or more strings giving the records matching
31       name and type.  The last element of the list  is  followed  by  a  NULL
32       pointer.  It is the caller's responsibility to call hesiod_free_list to
33       free the resources used by the returned list.
34
35       hesiod_to_bind converts name and type into the DNS name  used  by  hes‐
36       iod_resolve.   It  is  the caller's responsibility to free the returned
37       string using free.
38

RETURN VALUES

40       If successful, hesiod_init returns 0; otherwise it returns -1 and  sets
41       errno  to  indicate  the  error.   On  failure, hesiod_resolve and hes‐
42       iod_to_bind return NULL and set the global variable errno  to  indicate
43       the error.
44

ENVIRONMENT

46       If  the  environment  variable  HES_DOMAIN is set, it will override the
47       domain in the Hesiod configuration file.  If the  environment  variable
48       HESIOD_CONFIG  is set, it specifies the location of the Hesiod configu‐
49       ration file.
50

SEE ALSO

52       `Hesiod - Project Athena Technical Plan -- Name Service'
53

ERRORS

55       Hesiod calls may fail because of:
56
57       ENOMEM Insufficient memory was available to  carry  out  the  requested
58              operation.
59
60       ENOEXEC
61              hesiod_init  failed  because  the  Hesiod configuration file was
62              invalid.
63
64       ECONNREFUSED
65              hesiod_resolve failed because no name server could be  contacted
66              to answer the query.
67
68       EMSGSIZE
69              hesiod_resolve  failed because the query or response was too big
70              to fit into the packet buffers.
71
72       ENOENT hesiod_resolve failed  because  the  name  server  had  no  text
73              records matching name and type, or hesiod_to_bind failed because
74              the name argument had a domain  extension  which  could  not  be
75              resolved with type ``rhs-extension'' in the local Hesiod domain.
76

AUTHOR

78       Steve Dyer, IBM/Project Athena
79       Greg Hudson, MIT Team Athena
80       Copyright  1987,  1988,  1995,  1996  by the Massachusetts Institute of
81       Technology.
82

BUGS

84       The strings corresponding to the errno values set by the  Hesiod  func‐
85       tions  are  not  particularly indicative of what went wrong, especially
86       for ENOEXEC and ENOENT.
87
88
89
90                               30 November 1996                      HESIOD(3)
Impressum