Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

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)
Man Page

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A short history of UNIX by l.madden@ic.ac.uk

<h1>A short history of UNIX</h1> <p>In the late 1960's Ken Thompsom joined the computing-science research group at Bell Laboratories, which is the research arm of the giant American corporation ATT. He and many colleagues had been collaborating with MIT and GE on the development of an... (0 Replies)
Discussion started by: Neo
0 Replies

2. Answers to Frequently Asked Questions

Lost root password / Can't login as root

We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
Discussion started by: Perderabo
0 Replies

3. Programming

How do you detect keystrokes in canonical mode?

I'm writing a command shell, and I want to be able to detect when the user presses an arrow key (otherwise it just prints [[A, [[B, etc.). I know it's relatively easy (although somewhat more time-consuming) to detect keystrokes in noncanonical mode, but I've noticed that the bash shell detects... (4 Replies)
Discussion started by: Ultrix
4 Replies

4. UNIX for Dummies Questions & Answers

Linux (Ubuntu) = Unix (NOT IMPORTANT - NO RUSH)

I'm learning off Linux (Ubuntu) right now. I want to move up to Unix, but I don't want to rush like I did when it came to Windows --> to Linux. What is the best Unix OS that fits in pretty well with Ubuntu. In other words is there kind of an equal Linux with Unix? Also what do I need to... (10 Replies)
Discussion started by: Linux_Guy
10 Replies

5. IP Networking

Can I change my hostname without messing things up?

I noticed my hostname is <my-full-name>s-macbook.local. I'm not sure exactly what information leaves the local network, and whether the hostname is included, but if it is, this would mean people on the Internet can look at my hostname and see who I am. Before anyone says that's not possible,... (4 Replies)
Discussion started by: Ultrix
4 Replies