ultrix man page for hes_init

Query: hes_init

OS: ultrix

Section: 3

Links: ultrix man pages   all man pages

Forums: unix linux community   forum categories

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

hesiod(3)						     Library Functions Manual							 hesiod(3)

Name
       hes_init, hes_to_bind, hes_error, hes_resolve - routines for using Hesiod

Syntax
       #include <hesiod.h>

       hes_init()

       char *hes_to_bind(HesiodName, HesiodNameType)
       char *HesiodName, *HesiodNameType;

       hes_error()

       har **hes_resolve(HesiodName, HesiodNameType)
       char *HesiodName, *HesiodNameType;

Description
       The routine opens and reads the Hesiod configuration file, to extract the left hand side and right hand side of the Hesiod name.

       The routine takes as arguments a and and returns a fully qualified name to be handed to BIND.

       The  two  most useful routines to the applications programmer are and The routine has no arguments and returns an integer which corresponds
       to a set of errors which can be found in file.
       #define HES_ER_UNINIT	       -1

       #define HES_ER_OK		0

       #define HES_ER_NOTFOUND		1

       #define HES_ER_CONFIG		2

       #define HES_ER_NET		3

       The routine resolves given names via the Hesiod name server.  It takes as arguments a name to be resolved, the and a type corresponding	to
       the  name,  the and returns a pointer to an array of strings which contains all data that matched the query, one match per array slot.  The
       array is null terminated.

       If applications require the data to be maintained throughout multiple calls to the data should be copied since another call to  will  over-
       write any previously-returned data.  A null is returned if the data cannot be found.

Examples
       The following example shows the use of the Hesiod routines to obtain a Hesiod name from a Hesiod database:
       #include <hesiod.h>

       char *HesiodName, *HesiodNameType;
       char **hp;

       hp = hes_resolve(HesiodName, HesiodNameType);
       if (hp == NULL) {
	    error = hes_error();
	    switch(error) {
		      .
		      .
		      .
		 }
	    }
	    else
		 process(hp);

Files
See Also
       hesiod.conf(5), bindsetup(8)
       Guide to the BIND/Hesiod Service

																	 hesiod(3)
Related Man Pages
hesinfo(1) - debian
hesiod_getmailhost(3) - redhat
hesiod_free_servent(3) - centos
hesiod_getservbyname(3) - centos
hesiod(3) - ultrix
Similar Topics in the Unix Linux Community
A short history of UNIX by l.madden@ic.ac.uk
Linux (Ubuntu) = Unix (NOT IMPORTANT - NO RUSH)
Can I change my hostname without messing things up?
PHP Write Man Pages to MySQL DB