Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hes_resolve(3) [ultrix man page]

hes_resolve(3)						     Library Functions Manual						    hes_resolve(3)

       hesiod - C Language Hesiod name server Interface Library

       #include <hesiod.h>

       char **hes_resolve(name, HesiodNameType)
       char *name, *HesiodNameType;

       int hes_error( )

       The  library  is  the  primary  interface  to the Hesiod name server.  The library routine takes two arguments, a name to be resolved and a
       string, known as a It returns a NULL terminated vector of strings for each resource record containing Hesiod data, or NULL if there is  any

       In the event of an error, you can call the routine to determine the source of the error.


Check Out this Related Man Page

hesiod(3)						     Library Functions Manual							 hesiod(3)

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

       #include <hesiod.h>


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


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

       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.

       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) {

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

Man Page