📄 hesiod.3
字号:
.\" $NetBSD: hesiod.3,v 1.1 1999/01/25 03:43:04 lukem Exp $.\" $FreeBSD: src/lib/libc/net/hesiod.3,v 1.3 2001/10/01 16:08:55 ru Exp $.\".\" from: #Id: hesiod.3,v 1.9.2.1 1997/01/03 21:02:23 ghudson Exp #.\".\" Copyright 1988, 1996 by the Massachusetts Institute of Technology..\".\" Permission to use, copy, modify, and distribute this.\" software and its documentation for any purpose and without.\" fee is hereby granted, provided that the above copyright.\" notice appear in all copies and that both that copyright.\" notice and this permission notice appear in supporting.\" documentation, and that the name of M.I.T. not be used in.\" advertising or publicity pertaining to distribution of the.\" software without specific, written prior permission..\" M.I.T. makes no representations about the suitability of.\" this software for any purpose. It is provided "as is".\" without express or implied warranty..\".Dd November 30, 1996.Dt HESIOD 3.Os.Sh NAME.Nm hesiod ,.Nm hesiod_init ,.Nm hesiod_resolve ,.Nm hesiod_free_list ,.Nm hesiod_to_bind ,.Nm hesiod_end.Nd Hesiod name server interface library.Sh LIBRARY.Lb libc.Sh SYNOPSIS.In hesiod.h.Ft int.Fn hesiod_init "void **context".Ft char **.Fn hesiod_resolve "void *context" "const char *name" "const char *type".Ft void.Fn hesiod_free_list "void *context" "char **list".Ft char *.Fn hesiod_to_bind "void *context" "const char *name" "const char *type".Ft void.Fn hesiod_end "void *context".Sh DESCRIPTIONThis family of functions allows you to perform lookups of Hesiodinformation, which is stored as text records in the Domain NameService.To perform lookups, you must first initialize a.Fa context ,an opaque object which stores information used internally by thelibrary between calls..Fn hesiod_initinitializes a context, storing a pointer to the context in thelocation pointed to by the.Fa contextargument..Fn hesiod_endfrees the resources used by a context..Pp.Fn hesiod_resolveis the primary interface to the library.If successful, it returns alist of one or more strings giving the records matching.Fa nameand.Fa type .The last element of the list is followed by a.Dv NULLpointer.It is thecaller's responsibility to call.Fn hesiod_free_listto free the resources used by the returned list..Pp.Fn hesiod_to_bindconverts.Fa nameand.Fa typeinto the DNS name used by.Fn hesiod_resolve .It is the caller's responsibility to free the returned string using.Fn free ..Sh RETURN VALUES.Rv -std hesiod_initOn failure,.Fn hesiod_resolveand.Fn hesiod_to_bindreturn.Dv NULLand set the global variable.Va errnoto indicate the error..Sh ENVIRONMENT.Bl -tag -width HESIOD_CONFIG.It Ev HES_DOMAINIf the environment variable.Ev HES_DOMAINis set, it will override the domain in the Hesiod configuration file..It Ev HESIOD_CONFIGIf the environment variable.Ev HESIOD_CONFIGis set, it specifies the location of the Hesiod configuration file..El.Sh SEE ALSO.Xr hesiod.conf 5 ,.Xr named 8.Rs.%T "Hesiod - Project Athena Technical Plan -- Name Service".Re.Sh ERRORSHesiod calls may fail because of:.Bl -tag -width Er.It Bq Er ENOMEMInsufficient memory was available to carry out the requestedoperation..It Bq Er ENOEXEC.Fn hesiod_initfailed because the Hesiod configuration file was invalid..It Bq Er ECONNREFUSED.Fn hesiod_resolvefailed because no name server could be contacted to answer the query..It Bq Er EMSGSIZE.Fn hesiod_resolveor.Fn hesiod_to_bindfailed because the query or response was too big to fit into thepacket buffers..It Bq Er ENOENT.Fn hesiod_resolvefailed because the name server had no text records matching.Fa nameand.Fa type ,or.Fn hesiod_to_bindfailed because the.Fa nameargument had a domain extension which could not be resolved with type.Dq rhs\-extensionin the local Hesiod domain..El.Sh AUTHORS.An Steve Dyer ,IBM/Project Athena.An Greg Hudson ,MIT Team Athena.PpCopyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Technology..Sh BUGSThe strings corresponding to the.Va errnovalues set by the Hesiod functions are not particularly indicative ofwhat went wrong, especially for.Er ENOEXECand.Er ENOENT .
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -