3 .\" Id: hesiod.3,v 1.2 2009/01/21 00:12:34 each Exp
5 .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
7 .\" Permission to use, copy, modify, and distribute this software for any
8 .\" purpose with or without fee is hereby granted, provided that the above
9 .\" copyright notice and this permission notice appear in all copies.
11 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
12 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
14 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17 .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 .\" Copyright 1988, 1996 by the Massachusetts Institute of Technology.
21 .\" Permission to use, copy, modify, and distribute this
22 .\" software and its documentation for any purpose and without
23 .\" fee is hereby granted, provided that the above copyright
24 .\" notice appear in all copies and that both that copyright
25 .\" notice and this permission notice appear in supporting
26 .\" documentation, and that the name of M.I.T. not be used in
27 .\" advertising or publicity pertaining to distribution of the
28 .\" software without specific, written prior permission.
29 .\" M.I.T. makes no representations about the suitability of
30 .\" this software for any purpose. It is provided "as is"
31 .\" without express or implied warranty.
33 .TH HESIOD 3 "30 November 1996"
35 hesiod, hesiod_init, hesiod_resolve, hesiod_free_list, hesiod_to_bind, hesiod_end \- Hesiod name server interface library
38 .B #include <hesiod.h>
40 .B int hesiod_init(void **\fIcontext\fP)
41 .B char **hesiod_resolve(void *\fIcontext\fP, const char *\fIname\fP,
42 .B const char *\fItype\fP)
43 .B void hesiod_free_list(void *\fIcontext\fP, char **\fIlist\fP);
44 .B char *hesiod_to_bind(void *\fIcontext\fP, const char *\fIname\fP,
45 .B const char *\fItype\fP)
46 .B void hesiod_end(void *\fIcontext\fP)
49 This family of functions allows you to perform lookups of Hesiod
50 information, which is stored as text records in the Domain Name
51 Service. To perform lookups, you must first initialize a
53 an opaque object which stores information used internally by the
54 library between calls.
56 initializes a context, storing a pointer to the context in the
57 location pointed to by the
61 frees the resources used by a context.
64 is the primary interface to the library. If successful, it returns a
65 list of one or more strings giving the records matching
69 The last element of the list is followed by a NULL pointer. It is the
70 caller's responsibility to call
72 to free the resources used by the returned list.
79 into the DNS name used by
81 It is the caller's responsibility to free the returned string using
86 returns 0; otherwise it returns \-1 and sets
88 to indicate the error. On failure,
92 return NULL and set the global variable
94 to indicate the error.
96 If the environment variable
98 is set, it will override the domain in the Hesiod configuration file.
99 If the environment variable
101 is set, it specifies the location of the Hesiod configuration file.
103 `Hesiod - Project Athena Technical Plan -- Name Service'
105 Hesiod calls may fail because of:
107 Insufficient memory was available to carry out the requested
111 failed because the Hesiod configuration file was invalid.
114 failed because no name server could be contacted to answer the query.
117 failed because the query or response was too big to fit into the
121 failed because the name server had no text records matching
129 argument had a domain extension which could not be resolved with type
130 ``rhs-extension'' in the local Hesiod domain.
132 Steve Dyer, IBM/Project Athena
134 Greg Hudson, MIT Team Athena
136 Copyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Technology.
138 The strings corresponding to the
140 values set by the Hesiod functions are not particularly indicative of
141 what went wrong, especially for