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
hesiod_getservbyname, hesiod_free_servent - Hesiod functions for retrieving service information SYNOPSIS
#include <hesiod.h> struct servent *hesiod_getservbyname(void *context, const char *name, const char *proto) void hesiod_free_servent(void *context, struct servent *serv) cc file.c -lhesiod DESCRIPTION
This family of functions allows you to retrieve service to port mappings using Hesiod. To perform lookups, you need an initialized Hesiod context; see hesiod(3) for details. Information is returned in the same format as by getservbyname. It is the caller's responsibility to call hesiod_free_servent with the returned service entry to free the resources used by the service entry. Hesiod queries for service information are made using the ``service'' Hesiod type, using the service name as the Hesiod name. The corre- sponding records should be space-separated lists of strings giving the service name, protocol, port number (in decimal), and zero or more aliases for the service. There may be multiple records per service name; hesiod_getservbyname will pick the first one whose protocol matches proto. RETURN VALUES
On failure, hesiod_getservbyname returns NULL and sets the global variable errno to indicate the error. ERRORS
hesiod_getservbyname may fail for any of the reasons the routine hesiod_resolve may fail. SEE ALSO
hesiod(3) 30 November 1996 HESIOD(3)