Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Copyright 1988, 1996 by the Massachusetts Institute of Technology.
Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without
fee is hereby granted, provided that the above copyright
notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
M.I.T. makes no representations about the suitability of
this software for any purpose. It is provided "as is"
without express or implied warranty.
#include <hesiod.h>int hesiod_init(void **context) char **hesiod_resolve(void *context, const char *name, const char *type) void hesiod_free_list(void *context, char **list); char *hesiod_to_bind(void *context, const char *name, const char *type) void hesiod_end(void *context)
hesiod_resolve is the primary interface to the library. If successful, it returns a list of one or more strings giving the records matching name and type . The last element of the list is followed by a NULL pointer. It is the caller's responsibility to call hesiod_free_list to free the resources used by the returned list.
hesiod_to_bind converts name and type into the DNS name used by hesiod_resolve . It is the caller's responsibility to free the returned string using free .
Greg Hudson, MIT Team Athena
Copyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Technology.