1 .\" $NetBSD: hesiod.3,v 1.7 2009/03/10 23:36:10 joerg Exp $
3 .\" from: #Id: hesiod.3,v 1.9.2.1 1997/01/03 21:02:23 ghudson Exp #
5 .\" Copyright 1988, 1996 by the Massachusetts Institute of Technology.
7 .\" Permission to use, copy, modify, and distribute this
8 .\" software and its documentation for any purpose and without
9 .\" fee is hereby granted, provided that the above copyright
10 .\" notice appear in all copies and that both that copyright
11 .\" notice and this permission notice appear in supporting
12 .\" documentation, and that the name of M.I.T. not be used in
13 .\" advertising or publicity pertaining to distribution of the
14 .\" software without specific, written prior permission.
15 .\" M.I.T. makes no representations about the suitability of
16 .\" this software for any purpose. It is provided "as is"
17 .\" without express or implied warranty.
19 .Dd September 16, 2001
26 .Nm hesiod_free_list ,
29 .Nd Hesiod name server interface library
35 .Fn hesiod_init "void **context"
37 .Fn **hesiod_resolve "void *context" "const char *name" "const char *type"
39 .Fn hesiod_free_list "void *context" "char **list"
41 .Fn *hesiod_to_bind "void *context" "const char *name" "const char *type"
43 .Fn hesiod_end "void *context"
45 This family of functions allows you to perform lookups of Hesiod
46 information, which is stored as text records in the Domain Name
47 Service. To perform lookups, you must first initialize a
49 an opaque object which stores information used internally by the
50 library between calls.
52 initializes a context, storing a pointer to the context in the
53 location pointed to by the
57 frees the resources used by a context.
60 is the primary interface to the library. If successful, it returns a
61 list of one or more strings giving the records matching
65 The last element of the list is followed by a
67 pointer. It is the caller's responsibility to call
69 to free the resources used by the returned list.
76 into the DNS name used by
78 It is the caller's responsibility to free the returned string using
83 returns 0; otherwise it returns \-1 and sets
85 to indicate the error. On failure,
91 and set the global variable
93 to indicate the error.
95 If the environment variable
97 is set, it will override the domain in the Hesiod configuration file.
98 If the environment variable
100 is set, it specifies the location of the Hesiod configuration file.
102 Hesiod calls may fail because of:
103 .Bl -tag -width ECONNREFUSED -compact
105 Insufficient memory was available to carry out the requested operation.
108 failed because the Hesiod configuration file was invalid.
111 failed because no name server could be contacted to answer the query.
116 failed because the query or response was too big to fit into the
120 failed because the name server had no text records matching
128 argument had a domain extension which could not be resolved with type
130 in the local Hesiod domain.
136 .%T Hesiod - Project Athena Technical Plan -- Name Service
139 .An Steve Dyer, IBM/Project Athena
140 .An Greg Hudson, MIT Team Athena
142 Copyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Technology.
144 The strings corresponding to the
146 values set by the Hesiod functions are not particularly indicative of
147 what went wrong, especially for