MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
HESIOD(3)                BSD Library Functions Manual                HESIOD(3)

NAME
     hesiod, hesiodinit, hesiodresolve, hesiodfreelist, hesiodtobind,
     hesiodend -- Hesiod name server interface library

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     ##include <>

     int
     hesiodinit(void **context);

     char **
     hesiodresolve(void *context, const char *name, const char *type);

     void
     hesiodfreelist(void *context, char **list);

     char *
     hesiodtobind(void *context, const char *name, const char *type);

     void
     hesiodend(void *context);

DESCRIPTION
     This family of functions allows you to perform lookups of Hesiod informa-
     tion, which is stored as text records in the Domain Name Service.  To
     perform lookups, you must first initialize a context, an opaque object
     which stores information used internally by the library between calls.
     hesiodinit() initializes a context, storing a pointer to the context in
     the location pointed to by the context argument.  hesiodend() frees the
     resources used by a context.

     hesiodresolve() 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 NUL pointer.
     It is the caller's responsibility to call hesiodfreelist() to free the
     resources used by the returned list.

     hesiodtobind() converts name and type into the DNS name used by
     hesiodresolve().  It is the caller's responsibility to free the returned
     string using free().

RETURN VALUES
     The hesiodinit() function returns the value 0 if successful; otherwise
     the value -1 is returned and the global variable errno is set to indicate
     the error.  On failure, hesiodresolve() and hesiodtobind() return NUL
     and set the global variable errno to indicate the error.

ENVIRONMENT
     HESDOMAIN     If the environment variable HESDOMAIN is set, it will
                    override the domain in the Hesiod configuration file.

     HESIODCONFIG  If the environment variable HESIODCONFIG is set, it spec-
                    ifies the location of the Hesiod configuration file.

SEE ALSO
     hesiod.conf(5), named(8)

     Hesiod - Project Athena Technical Plan -- Name Service.

ERORS
     Hesiod calls may fail because of:

     [ENOMEM]           Insufficient memory was available to carry out the
                        requested operation.

     [ENOEXEC]          hesiodinit() failed because the Hesiod configuration
                        file was invalid.

     [ECONREFUSED]     hesiodresolve() failed because no name server could
                        be contacted to answer the query.

     [EMSGSIZE]         hesiodresolve() or hesiodtobind() failed because
                        the query or response was too big to fit into the
                        packet buffers.

     [ENOENT]           hesiodresolve() failed because the name server had no
                        text records matching name and type, or
                        hesiodtobind() failed because the name argument had
                        a domain extension which could not be resolved with
                        type ``rhs-extension'' in the local Hesiod domain.

AUTHORS
     Steve Dyer, IBM/Project Athena
     Greg Hudson, MIT Team Athena

     Copyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Tech-
     nology.

BUGS
     The strings corresponding to the errno values set by the Hesiod functions
     are not particularly indicative of what went wrong, especially for
     ENOEXEC and ENOENT.

BSD                            November 30, 1996                           BSD
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™