hes_resolve(3) [ultrix man page]
hes_resolve(3) Library Functions Manual hes_resolve(3) Name hesiod - C Language Hesiod name server Interface Library Syntax #include <hesiod.h> char **hes_resolve(name, HesiodNameType) char *name, *HesiodNameType; int hes_error( ) Description 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 error. In the event of an error, you can call the routine to determine the source of the error. Files hes_resolve(3)
Check Out this Related Man Page
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)