Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hesiod(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

13 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sendmail.... any help?

I am trying to configure sendmail (v 8.12.5-7 on Redhat Linux 8) on my server. I am unable to send or receive messages using mail command (or any command for that matter). My mailserver name: abc.com I have setup user1 to alias as user1@def.com so that all of his mails are relayed to... (5 Replies)
Discussion started by: skotapal
5 Replies

2. UNIX for Advanced & Expert Users

sendmail -q hangs

Hi, I have a system where sendmail deamon not running. (And I have lot of jobs under crontab). But I have whole lot of sendmail processes started-up by cron process, eating up its CPU resources. (for a sample - see below) $ ps -ef|grep 248 root 248 1 0 Aug 12 ? 0:56... (5 Replies)
Discussion started by: chaandana
5 Replies

3. UNIX for Dummies Questions & Answers

sendmail cleanup

What is the correct procedures to clean up /var/spool/mqueue? Any help appreciated. This directory gets really clogged up at times. :( :( (1 Reply)
Discussion started by: thomi39
1 Replies

4. UNIX for Advanced & Expert Users

Mail/DNS problem and questions

It seems that mail from our servers are going through a third party security mail scanner (offsite), due the the mx records specified on our internal and external DNS servers. However, our internal user to user email does not go through the third party security mail scanner. I discovered... (2 Replies)
Discussion started by: xnightcrawl
2 Replies

5. Shell Programming and Scripting

file exists

hello, I want to know if a file exists, but do not know contador = 0 while(file$contador exists) do bla bla bla contador=$(($contador+1)) done how can i do it? thanks (4 Replies)
Discussion started by: uri_crack
4 Replies

6. UNIX for Advanced & Expert Users

sendmails works, but opens 43 file handles per email -> problem

I'm using Sendmail 8.13.8 on a CentOS 5.5 vServer (Virtuozzo). I'm using a loop in PHP to send a lot of HTML-mails via sendmail. Each mail is a mail with individual statistics for our users, so its not mass mailing, bcc is not an option. It all works fine, but when I take a closer look there... (2 Replies)
Discussion started by: ZX81
2 Replies

7. UNIX for Advanced & Expert Users

LDAP client issue

Hello, I'm new to Centos and to openldap. I am by trade a Solaris Admin. I'm experimenting with openldap and thought Linux would be easier to install and setup openldap on, so far this is true. The problem I'm having is that I can't get the client server to authenticate to the openldap server. I... (1 Reply)
Discussion started by: bitlord
1 Replies

8. UNIX for Advanced & Expert Users

psswd&shadow 2 passwd together?!!

hi, all I just started on new box where I have to diff passwd working perfectly on the very same account/user. I see that shadow was added recently (I'm not a root in there), I see 'x' in passwd. Not sure how it should work, should I change old passwd for one defined in shadow? Or it's fine to... (20 Replies)
Discussion started by: trento17
20 Replies

9. UNIX for Advanced & Expert Users

Sendmail adding .org after some addresses

Hello, We run a mailing list and on our server sendmail is adding .org after some addresses, e.g. the first and third entries below in the process listingroot 1528 0.0 0.1 11764 6524 ? Ss Sep21 0:01 sendmail: ./p8NMgM0X031218 dimaventures.com.org.: user open root ... (1 Reply)
Discussion started by: prautt
1 Replies

10. UNIX for Advanced & Expert Users

got error when install glibc

hi all, i am play LFS recently. but i can not go on for a an error when install glibc. here is the error log: if test -r /usr/include/gnu/stubs-32.h && cmp -s /mnt/lfs/sources/glibc-build/stubs.h /usr/include/gnu/stubs-32.h; \ then echo 'stubs.h unchanged'; \ else /usr/bin/install -c... (1 Reply)
Discussion started by: arnold.king
1 Replies

11. Red Hat

Name resolution is only working from server side. Clients cannot resolve host names.

Hi Folks, Could anyone please point me to the right direction as I have spent so much time on this without luck. :wall: I have installed Bind on my CentOS 5 server for internal network. The name resolution is working from the server itself only but not from the clients. --------------... (7 Replies)
Discussion started by: dbadmin100
7 Replies

12. Ubuntu

Bind dns server zone file

I have a couple of zone conf files for the BIND server. There are some records that contains the "IN" statement and some do not. But anyway this works. So my question is what this "IN" is intended for? Here is the zone file example: ORIGIN . $ttl 60 example.com. IN SOA ... (4 Replies)
Discussion started by: andriesh
4 Replies

13. IP Networking

Network stand still

**this was posted in another forum I suspect wrong one moved here **:confused: Hello all. Let me qualify my question by saying that I am struggling with how to ask the question I am semi green but have no issue reading up if pointed in the right direction. Please be gentle! A RHEL server 6.2.... (4 Replies)
Discussion started by: rsheikh01
4 Replies