hesiod_init man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

HESIOD(3)		 BSD Library Functions Manual		     HESIOD(3)

NAME
     hesiod, hesiod_init, hesiod_resolve, hesiod_free_list, hesiod_to_bind,
     hesiod_end — Hesiod name server interface library

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #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);

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.
     hesiod_init() initializes a context, storing a pointer to the context in
     the location pointed to by the context argument.  hesiod_end() frees the
     resources used by a 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(3).

RETURN VALUES
     If successful, hesiod_init() returns 0; otherwise it returns -1 and sets
     errno to indicate the error.  On failure, hesiod_resolve() and
     hesiod_to_bind() return NULL and set the global variable errno to indi‐
     cate the error.

ENVIRONMENT
     If the environment variable HES_DOMAIN is set, it will override the
     domain in the Hesiod configuration file.  If the environment variable
     HESIOD_CONFIG is set, it specifies the location of the Hesiod configura‐
     tion file.

ERRORS
     Hesiod calls may fail because of:
     ENOMEM	   Insufficient memory was available to carry out the
		   requested operation.
     ENOEXEC	   hesiod_init() failed because the Hesiod configuration file
		   was invalid.
     ECONNREFUSED  hesiod_resolve() failed because no name server could be
		   contacted to answer the query.
     EMSGSIZE	   hesiod_resolve() or hesiod_to_bind() failed because the
		   query or response was too big to fit into the packet buf‐
		   fers.
     ENOENT	   hesiod_resolve() failed because the name server had no text
		   records matching name and type, or hesiod_to_bind() failed
		   because the name argument had a domain extension which
		   could not be resolved with type “rhs-extension” in the
		   local Hesiod domain.

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

     Hesiod - Project Athena Technical Plan -- Name Service.

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			      September 16, 2001			   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net