Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hes_init(3) [ultrix 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


Check Out this Related Man Page

HESINFO(1)						    BSD General Commands Manual 						HESINFO(1)

hesinfo -- find out what is stored in the Hesiod database SYNOPSIS
hesinfo [-bl] HesiodName HesiodNameType DESCRIPTION
hesinfo takes two arguments, a name to be resolved and a string, known as a HesiodNameType. It then prints the information returned by the Hesiod nameserver. The value returned by hesinfo is of the type HesiodNameType. hesinfo understands the following options: -l Selects long format. -b Prints the fully-qualified string passed to the nameserver. VALID Hesiod_Names The following types of identifiers may be used in the HesiodName argument to hesinfo. These values will be resolved by accessing the hesiod(3) database. <username> the 8-character-or-less string used to identify users or classes (e.g. joeuser, root, 1.00, etc). Used with the Hesiod_Name_Types passwd, pobox, and filsys. <uid> the id number assigned to a user. <groupid> the id number assigned to a group. <groupname> a name identifying a unique group. <file-system-name> the name of an athena file system. <rvd server>:<pack> the name of an rvd's server and pack separated by a colon. <nfs server>:<partition> the name of an nfs server and its partition separated by a colon. <workstation-name> the machine name of an Athena workstation (e.g. E40-343-3). <service-name> name of an Athena service (e.g. Zephyr). <service-type> name of Unix service (valid entries are defined in /etc/services). <printer-name> name of a printer. <printer-cluster-name> name of an Athena print cluster. <foo> some hesinfo calls (e.g., prclusterlist) do not require a specific HesiodName argument. However, you must include a dummy string (e.g., ``foo'') for hesinfo to work properly. VALID Hesiod_Name_Types The following symbols are valid substitutions for the HesiodNameType argument to hesinfo. passwd returns string suitable for inclusion in /etc/passwd, searching with <username>. pobox returns information on the pobox assigned to the user specified by HesiodName, searching with <username>. uid returns string suitable for inclusion in /etc/passwd, searching with <uid>. gid returns string suitable for inclusion in /etc/group, searching with <groupid>. group returns string suitable for inclusion in /etc/group, searching with <groupname>. grplist returns subgroups included in superset defined by <groupname>. filsys returns file system type, export point, server, mount mode, and import point for the following valid HesiodNames (see above) - <file system name>, <username>, <rvd server>:<pack>, and <nfs server>:<partition>. cluster returns information about the local cluster the workstation, specified by <workstation name>. Included is information about the local file and print servers. This information is accesses by clusterinfo at boot time. sloc returns network name of service host for <service-name>. service returns Internet protocol type and protocol service port for <service-type>. pcap returns a valid entry for /etc/printcap for <printer-name>. prcluserlist returns a list of print clusters. prcluster returns a list of printers in a cluster specified by <printer-cluster-name>. FILES
/etc/hesiod.conf SEE ALSO
hesiod(3), named(8) Hesiod - Project Athena Technical Plan -- Name Service. AUTHORS
Steve Dyer, IBM/Project Athena Copyright 1987, 1988, 1996 by the Massachusetts Institute of Technology. BSD
October 27, 1996 BSD
Man Page