xref: /netbsd-src/external/bsd/libbind/dist/doc/hesiod.cat3 (revision b1c86f5f087524e68db12794ee9c3e3da1ab17a0)
1HESIOD(3)                                                            HESIOD(3)
2
3
4
5NNAAMMEE
6       hesiod,  hesiod_init, hesiod_resolve, hesiod_free_list, hesiod_to_bind,
7       hesiod_end - Hesiod name server interface library
8
9SSYYNNOOPPSSIISS
10       ##iinncclluuddee <<hheessiioodd..hh>>
11
12       iinntt hheessiioodd__iinniitt((vvooiidd ****_c_o_n_t_e_x_t))
13       cchhaarr ****hheessiioodd__rreessoollvvee((vvooiidd **_c_o_n_t_e_x_t,, ccoonnsstt cchhaarr **_n_a_m_e,,
14            ccoonnsstt cchhaarr **_t_y_p_e))
15       vvooiidd hheessiioodd__ffrreeee__lliisstt((vvooiidd **_c_o_n_t_e_x_t,, cchhaarr ****_l_i_s_t));;
16       cchhaarr **hheessiioodd__ttoo__bbiinndd((vvooiidd **_c_o_n_t_e_x_t,, ccoonnsstt cchhaarr **_n_a_m_e,,
17            ccoonnsstt cchhaarr **_t_y_p_e))
18       vvooiidd hheessiioodd__eenndd((vvooiidd **_c_o_n_t_e_x_t))
19
20DDEESSCCRRIIPPTTIIOONN
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 _c_o_n_t_e_x_t, an opaque  object
24       which  stores information used internally by the library between calls.
25       _h_e_s_i_o_d___i_n_i_t initializes a context, storing a pointer to the context  in
26       the  location pointed to by the _c_o_n_t_e_x_t argument.  _h_e_s_i_o_d___e_n_d frees the
27       resources used by a context.
28
29       _h_e_s_i_o_d___r_e_s_o_l_v_e is the primary interface to the library.  If successful,
30       it  returns  a  list of one or more strings giving the records matching
31       _n_a_m_e and _t_y_p_e.  The last element of the list  is  followed  by  a  NULL
32       pointer.  It is the caller’s responsibility to call _h_e_s_i_o_d___f_r_e_e___l_i_s_t to
33       free the resources used by the returned list.
34
35       _h_e_s_i_o_d___t_o___b_i_n_d converts _n_a_m_e and _t_y_p_e into the DNS name  used  by  _h_e_s_‐
36       _i_o_d___r_e_s_o_l_v_e.   It  is  the caller’s responsibility to free the returned
37       string using _f_r_e_e.
38
39RREETTUURRNN VVAALLUUEESS
40       If successful, _h_e_s_i_o_d___i_n_i_t returns 0; otherwise it returns -1 and  sets
41       _e_r_r_n_o  to  indicate  the  error.   On  failure, _h_e_s_i_o_d___r_e_s_o_l_v_e and _h_e_s_‐
42       _i_o_d___t_o___b_i_n_d return NULL and set the global variable _e_r_r_n_o  to  indicate
43       the error.
44
45EENNVVIIRROONNMMEENNTT
46       If  the  environment  variable  HHEESS__DDOOMMAAIINN is set, it will override the
47       domain in the Hesiod configuration file.  If the  environment  variable
48       HHEESSIIOODD__CCOONNFFIIGG  is set, it specifies the location of the Hesiod configu‐
49       ration file.
50
51SSEEEE AALLSSOO
52       ‘Hesiod - Project Athena Technical Plan -- Name Service’
53
54EERRRROORRSS
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              _h_e_s_i_o_d___i_n_i_t  failed  because  the  Hesiod configuration file was
62              invalid.
63
64       ECONNREFUSED
65              _h_e_s_i_o_d___r_e_s_o_l_v_e failed because no name server could be  contacted
66              to answer the query.
67
68       EMSGSIZE
69              _h_e_s_i_o_d___r_e_s_o_l_v_e  failed because the query or response was too big
70              to fit into the packet buffers.
71
72       ENOENT _h_e_s_i_o_d___r_e_s_o_l_v_e failed  because  the  name  server  had  no  text
73              records matching _n_a_m_e and _t_y_p_e, or _h_e_s_i_o_d___t_o___b_i_n_d failed because
74              the _n_a_m_e argument had a domain  extension  which  could  not  be
75              resolved with type ‘‘rhs-extension’’ in the local Hesiod domain.
76
77AAUUTTHHOORR
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
83BBUUGGSS
84       The  strings  corresponding to the _e_r_r_n_o values set by the Hesiod func‐
85       tions are not particularly indicative of what  went  wrong,  especially
86       for _E_N_O_E_X_E_C and _E_N_O_E_N_T.
87
88
89
90                               30 November 1996                      HESIOD(3)
91