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