186d7f5d3SJohn Marino.\" $NetBSD: hesiod.3,v 1.1 1999/01/25 03:43:04 lukem Exp $ 286d7f5d3SJohn Marino.\" 386d7f5d3SJohn Marino.\" from: #Id: hesiod.3,v 1.9.2.1 1997/01/03 21:02:23 ghudson Exp # 486d7f5d3SJohn Marino.\" 586d7f5d3SJohn Marino.\" Copyright 1988, 1996 by the Massachusetts Institute of Technology. 686d7f5d3SJohn Marino.\" 786d7f5d3SJohn Marino.\" Permission to use, copy, modify, and distribute this 886d7f5d3SJohn Marino.\" software and its documentation for any purpose and without 986d7f5d3SJohn Marino.\" fee is hereby granted, provided that the above copyright 1086d7f5d3SJohn Marino.\" notice appear in all copies and that both that copyright 1186d7f5d3SJohn Marino.\" notice and this permission notice appear in supporting 1286d7f5d3SJohn Marino.\" documentation, and that the name of M.I.T. not be used in 1386d7f5d3SJohn Marino.\" advertising or publicity pertaining to distribution of the 1486d7f5d3SJohn Marino.\" software without specific, written prior permission. 1586d7f5d3SJohn Marino.\" M.I.T. makes no representations about the suitability of 1686d7f5d3SJohn Marino.\" this software for any purpose. It is provided "as is" 1786d7f5d3SJohn Marino.\" without express or implied warranty. 1886d7f5d3SJohn Marino.\" 1986d7f5d3SJohn Marino.\" $FreeBSD: src/lib/libc/net/hesiod.3,v 1.5 2005/01/20 09:17:03 ru Exp $ 2086d7f5d3SJohn Marino.\" 2186d7f5d3SJohn Marino.Dd November 30, 1996 2286d7f5d3SJohn Marino.Dt HESIOD 3 2386d7f5d3SJohn Marino.Os 2486d7f5d3SJohn Marino.Sh NAME 2586d7f5d3SJohn Marino.Nm hesiod , 2686d7f5d3SJohn Marino.Nm hesiod_init , 2786d7f5d3SJohn Marino.Nm hesiod_resolve , 2886d7f5d3SJohn Marino.Nm hesiod_free_list , 2986d7f5d3SJohn Marino.Nm hesiod_to_bind , 3086d7f5d3SJohn Marino.Nm hesiod_end 3186d7f5d3SJohn Marino.Nd Hesiod name server interface library 3286d7f5d3SJohn Marino.Sh LIBRARY 3386d7f5d3SJohn Marino.Lb libc 3486d7f5d3SJohn Marino.Sh SYNOPSIS 3586d7f5d3SJohn Marino.In hesiod.h 3686d7f5d3SJohn Marino.Ft int 3786d7f5d3SJohn Marino.Fn hesiod_init "void **context" 3886d7f5d3SJohn Marino.Ft char ** 3986d7f5d3SJohn Marino.Fn hesiod_resolve "void *context" "const char *name" "const char *type" 4086d7f5d3SJohn Marino.Ft void 4186d7f5d3SJohn Marino.Fn hesiod_free_list "void *context" "char **list" 4286d7f5d3SJohn Marino.Ft char * 4386d7f5d3SJohn Marino.Fn hesiod_to_bind "void *context" "const char *name" "const char *type" 4486d7f5d3SJohn Marino.Ft void 4586d7f5d3SJohn Marino.Fn hesiod_end "void *context" 4686d7f5d3SJohn Marino.Sh DESCRIPTION 4786d7f5d3SJohn MarinoThis family of functions allows you to perform lookups of Hesiod 4886d7f5d3SJohn Marinoinformation, which is stored as text records in the Domain Name 4986d7f5d3SJohn MarinoService. 5086d7f5d3SJohn MarinoTo perform lookups, you must first initialize a 5186d7f5d3SJohn Marino.Fa context , 5286d7f5d3SJohn Marinoan opaque object which stores information used internally by the 5386d7f5d3SJohn Marinolibrary between calls. 5486d7f5d3SJohn MarinoThe 5586d7f5d3SJohn Marino.Fn hesiod_init 5686d7f5d3SJohn Marinofunction 5786d7f5d3SJohn Marinoinitializes a context, storing a pointer to the context in the 5886d7f5d3SJohn Marinolocation pointed to by the 5986d7f5d3SJohn Marino.Fa context 6086d7f5d3SJohn Marinoargument. 6186d7f5d3SJohn MarinoThe 6286d7f5d3SJohn Marino.Fn hesiod_end 6386d7f5d3SJohn Marinofunction 6486d7f5d3SJohn Marinofrees the resources used by a context. 6586d7f5d3SJohn Marino.Pp 6686d7f5d3SJohn MarinoThe 6786d7f5d3SJohn Marino.Fn hesiod_resolve 6886d7f5d3SJohn Marinofunction 6986d7f5d3SJohn Marinois the primary interface to the library. 7086d7f5d3SJohn MarinoIf successful, it returns a 7186d7f5d3SJohn Marinolist of one or more strings giving the records matching 7286d7f5d3SJohn Marino.Fa name 7386d7f5d3SJohn Marinoand 7486d7f5d3SJohn Marino.Fa type . 7586d7f5d3SJohn MarinoThe last element of the list is followed by a 7686d7f5d3SJohn Marino.Dv NULL 7786d7f5d3SJohn Marinopointer. 7886d7f5d3SJohn MarinoIt is the 7986d7f5d3SJohn Marinocaller's responsibility to call 8086d7f5d3SJohn Marino.Fn hesiod_free_list 8186d7f5d3SJohn Marinoto free the resources used by the returned list. 8286d7f5d3SJohn Marino.Pp 8386d7f5d3SJohn MarinoThe 8486d7f5d3SJohn Marino.Fn hesiod_to_bind 8586d7f5d3SJohn Marinofunction 8686d7f5d3SJohn Marinoconverts 8786d7f5d3SJohn Marino.Fa name 8886d7f5d3SJohn Marinoand 8986d7f5d3SJohn Marino.Fa type 9086d7f5d3SJohn Marinointo the DNS name used by 9186d7f5d3SJohn Marino.Fn hesiod_resolve . 9286d7f5d3SJohn MarinoIt is the caller's responsibility to free the returned string using 9386d7f5d3SJohn Marino.Fn free . 9486d7f5d3SJohn Marino.Sh RETURN VALUES 9586d7f5d3SJohn Marino.Rv -std hesiod_init 9686d7f5d3SJohn MarinoOn failure, 9786d7f5d3SJohn Marino.Fn hesiod_resolve 9886d7f5d3SJohn Marinoand 9986d7f5d3SJohn Marino.Fn hesiod_to_bind 10086d7f5d3SJohn Marinoreturn 10186d7f5d3SJohn Marino.Dv NULL 10286d7f5d3SJohn Marinoand set the global variable 10386d7f5d3SJohn Marino.Va errno 10486d7f5d3SJohn Marinoto indicate the error. 10586d7f5d3SJohn Marino.Sh ENVIRONMENT 10686d7f5d3SJohn Marino.Bl -tag -width HESIOD_CONFIG 10786d7f5d3SJohn Marino.It Ev HES_DOMAIN 10886d7f5d3SJohn MarinoIf the environment variable 10986d7f5d3SJohn Marino.Ev HES_DOMAIN 11086d7f5d3SJohn Marinois set, it will override the domain in the Hesiod configuration file. 11186d7f5d3SJohn Marino.It Ev HESIOD_CONFIG 11286d7f5d3SJohn MarinoIf the environment variable 11386d7f5d3SJohn Marino.Ev HESIOD_CONFIG 11486d7f5d3SJohn Marinois set, it specifies the location of the Hesiod configuration file. 11586d7f5d3SJohn Marino.El 11686d7f5d3SJohn Marino.Sh ERRORS 11786d7f5d3SJohn MarinoHesiod calls may fail because of: 11886d7f5d3SJohn Marino.Bl -tag -width Er 11986d7f5d3SJohn Marino.It Bq Er ENOMEM 12086d7f5d3SJohn MarinoInsufficient memory was available to carry out the requested 12186d7f5d3SJohn Marinooperation. 12286d7f5d3SJohn Marino.It Bq Er ENOEXEC 12386d7f5d3SJohn MarinoThe 12486d7f5d3SJohn Marino.Fn hesiod_init 12586d7f5d3SJohn Marinofunction 12686d7f5d3SJohn Marinofailed because the Hesiod configuration file was invalid. 12786d7f5d3SJohn Marino.It Bq Er ECONNREFUSED 12886d7f5d3SJohn MarinoThe 12986d7f5d3SJohn Marino.Fn hesiod_resolve 13086d7f5d3SJohn Marinofunction 13186d7f5d3SJohn Marinofailed because no name server could be contacted to answer the query. 13286d7f5d3SJohn Marino.It Bq Er EMSGSIZE 13386d7f5d3SJohn MarinoThe 13486d7f5d3SJohn Marino.Fn hesiod_resolve 13586d7f5d3SJohn Marinoor 13686d7f5d3SJohn Marino.Fn hesiod_to_bind 13786d7f5d3SJohn Marinofunction 13886d7f5d3SJohn Marinofailed because the query or response was too big to fit into the 13986d7f5d3SJohn Marinopacket buffers. 14086d7f5d3SJohn Marino.It Bq Er ENOENT 14186d7f5d3SJohn MarinoThe 14286d7f5d3SJohn Marino.Fn hesiod_resolve 14386d7f5d3SJohn Marinofunction 14486d7f5d3SJohn Marinofailed because the name server had no text records matching 14586d7f5d3SJohn Marino.Fa name 14686d7f5d3SJohn Marinoand 14786d7f5d3SJohn Marino.Fa type , 14886d7f5d3SJohn Marinoor 14986d7f5d3SJohn Marino.Fn hesiod_to_bind 15086d7f5d3SJohn Marinofailed because the 15186d7f5d3SJohn Marino.Fa name 15286d7f5d3SJohn Marinoargument had a domain extension which could not be resolved with type 15386d7f5d3SJohn Marino.Dq rhs\-extension 15486d7f5d3SJohn Marinoin the local Hesiod domain. 15586d7f5d3SJohn Marino.El 15686d7f5d3SJohn Marino.Sh SEE ALSO 15786d7f5d3SJohn Marino.Xr hesiod.conf 5 , 15886d7f5d3SJohn Marino.Xr named 8 15986d7f5d3SJohn Marino.Rs 16086d7f5d3SJohn Marino.%T "Hesiod - Project Athena Technical Plan -- Name Service" 16186d7f5d3SJohn Marino.Re 16286d7f5d3SJohn Marino.Sh AUTHORS 16386d7f5d3SJohn Marino.An Steve Dyer , 16486d7f5d3SJohn MarinoIBM/Project Athena 16586d7f5d3SJohn Marino.An Greg Hudson , 16686d7f5d3SJohn MarinoMIT Team Athena 16786d7f5d3SJohn Marino.Pp 16886d7f5d3SJohn MarinoCopyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Technology. 16986d7f5d3SJohn Marino.Sh BUGS 17086d7f5d3SJohn MarinoThe strings corresponding to the 17186d7f5d3SJohn Marino.Va errno 17286d7f5d3SJohn Marinovalues set by the Hesiod functions are not particularly indicative of 17386d7f5d3SJohn Marinowhat went wrong, especially for 17486d7f5d3SJohn Marino.Er ENOEXEC 17586d7f5d3SJohn Marinoand 17686d7f5d3SJohn Marino.Er ENOENT . 177