man(7) -> mdoc(7).
This commit is contained in:
parent
c06746e823
commit
7d17799e90
@ -17,120 +17,143 @@
|
||||
.\" this software for any purpose. It is provided "as is"
|
||||
.\" without express or implied warranty.
|
||||
.\"
|
||||
.TH HESIOD 3 "30 November 1996"
|
||||
.SH NAME
|
||||
hesiod, hesiod_init, hesiod_resolve, hesiod_free_list, hesiod_to_bind, hesiod_end \- Hesiod name server interface library
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.B #include <hesiod.h>
|
||||
.PP
|
||||
.B int hesiod_init(void **\fIcontext\fP)
|
||||
.B char **hesiod_resolve(void *\fIcontext\fP, const char *\fIname\fP,
|
||||
.B const char *\fItype\fP)
|
||||
.B void hesiod_free_list(void *\fIcontext\fP, char **\fIlist\fP);
|
||||
.B char *hesiod_to_bind(void *\fIcontext\fP, const char *\fIname\fP,
|
||||
.B const char *\fItype\fP)
|
||||
.B void hesiod_end(void *\fIcontext\fP)
|
||||
.PP
|
||||
.B cc file.c -lhesiod
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.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
|
||||
.Fd "#include <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 DESCRIPTION
|
||||
This family of functions allows you to perform lookups of Hesiod
|
||||
information, which is stored as text records in the Domain Name
|
||||
Service. To perform lookups, you must first initialize a
|
||||
.IR context ,
|
||||
Service.
|
||||
To perform lookups, you must first initialize a
|
||||
.Fa context ,
|
||||
an opaque object which stores information used internally by the
|
||||
library between calls.
|
||||
.I hesiod_init
|
||||
.Fn hesiod_init
|
||||
initializes a context, storing a pointer to the context in the
|
||||
location pointed to by the
|
||||
.I context
|
||||
.Fa context
|
||||
argument.
|
||||
.I hesiod_end
|
||||
.Fn hesiod_end
|
||||
frees the resources used by a context.
|
||||
.PP
|
||||
.I hesiod_resolve
|
||||
is the primary interface to the library. If successful, it returns a
|
||||
.Pp
|
||||
.Fn hesiod_resolve
|
||||
is the primary interface to the library.
|
||||
If successful, it returns a
|
||||
list of one or more strings giving the records matching
|
||||
.I name
|
||||
.Fa name
|
||||
and
|
||||
.IR type .
|
||||
The last element of the list is followed by a NULL pointer. It is the
|
||||
.Fa type .
|
||||
The last element of the list is followed by a
|
||||
.Dv NULL
|
||||
pointer.
|
||||
It is the
|
||||
caller's responsibility to call
|
||||
.I hesiod_free_list
|
||||
.Fn hesiod_free_list
|
||||
to free the resources used by the returned list.
|
||||
.PP
|
||||
.I hesiod_to_bind
|
||||
.Pp
|
||||
.Fn hesiod_to_bind
|
||||
converts
|
||||
.I name
|
||||
.Fa name
|
||||
and
|
||||
.I type
|
||||
.Fa type
|
||||
into the DNS name used by
|
||||
.IR hesiod_resolve .
|
||||
.Fn hesiod_resolve .
|
||||
It is the caller's responsibility to free the returned string using
|
||||
.IR free .
|
||||
.SH RETURN VALUES
|
||||
If successful,
|
||||
.I hesiod_init
|
||||
returns 0; otherwise it returns \-1 and sets
|
||||
.I errno
|
||||
to indicate the error. On failure,
|
||||
.I hesiod_resolve
|
||||
.Fn free .
|
||||
.Sh RETURN VALUES
|
||||
.Rv -std hesiod_init
|
||||
On failure,
|
||||
.Fn hesiod_resolve
|
||||
and
|
||||
.I hesiod_to_bind
|
||||
return NULL and set the global variable
|
||||
.I errno
|
||||
.Fn hesiod_to_bind
|
||||
return
|
||||
.Dv NULL
|
||||
and set the global variable
|
||||
.Va errno
|
||||
to indicate the error.
|
||||
.SH ENVIRONMENT
|
||||
.Sh ENVIRONMENT
|
||||
.Bl -tag -width HESIOD_CONFIG
|
||||
.It Ev HES_DOMAIN
|
||||
If the environment variable
|
||||
.B HES_DOMAIN
|
||||
.Ev HES_DOMAIN
|
||||
is set, it will override the domain in the Hesiod configuration file.
|
||||
.It Ev HESIOD_CONFIG
|
||||
If the environment variable
|
||||
.B HESIOD_CONFIG
|
||||
.Ev HESIOD_CONFIG
|
||||
is set, it specifies the location of the Hesiod configuration file.
|
||||
.SH SEE ALSO
|
||||
`Hesiod - Project Athena Technical Plan -- Name Service', named(8),
|
||||
hesiod.conf(5)
|
||||
.SH ERRORS
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr hesiod.conf 5 ,
|
||||
.Xr named 8
|
||||
.Rs
|
||||
.%T "Hesiod - Project Athena Technical Plan -- Name Service"
|
||||
.Re
|
||||
.Sh ERRORS
|
||||
Hesiod calls may fail because of:
|
||||
.IP ENOMEM
|
||||
.Bl -tag -width Er
|
||||
.It Bq Er ENOMEM
|
||||
Insufficient memory was available to carry out the requested
|
||||
operation.
|
||||
.IP ENOEXEC
|
||||
.I hesiod_init
|
||||
.It Bq Er ENOEXEC
|
||||
.Fn hesiod_init
|
||||
failed because the Hesiod configuration file was invalid.
|
||||
.IP ECONNREFUSED
|
||||
.I hesiod_resolve
|
||||
.It Bq Er ECONNREFUSED
|
||||
.Fn hesiod_resolve
|
||||
failed because no name server could be contacted to answer the query.
|
||||
.IP EMSGSIZE
|
||||
.I hesiod_resolve
|
||||
.It Bq Er EMSGSIZE
|
||||
.Fn hesiod_resolve
|
||||
or
|
||||
.I hesiod_to_bind
|
||||
.Fn hesiod_to_bind
|
||||
failed because the query or response was too big to fit into the
|
||||
packet buffers.
|
||||
.IP ENOENT
|
||||
.I hesiod_resolve
|
||||
.It Bq Er ENOENT
|
||||
.Fn hesiod_resolve
|
||||
failed because the name server had no text records matching
|
||||
.I name
|
||||
.Fa name
|
||||
and
|
||||
.IR type ,
|
||||
.Fa type ,
|
||||
or
|
||||
.I hesiod_to_bind
|
||||
.Fn hesiod_to_bind
|
||||
failed because the
|
||||
.I name
|
||||
.Fa name
|
||||
argument had a domain extension which could not be resolved with type
|
||||
``rhs-extension'' in the local Hesiod domain.
|
||||
.SH AUTHOR
|
||||
Steve Dyer, IBM/Project Athena
|
||||
.br
|
||||
Greg Hudson, MIT Team Athena
|
||||
.br
|
||||
.Dq rhs\-extension
|
||||
in the local Hesiod domain.
|
||||
.El
|
||||
.Sh AUTHORS
|
||||
.An Steve Dyer ,
|
||||
IBM/Project Athena
|
||||
.An Greg Hudson ,
|
||||
MIT Team Athena
|
||||
.Pp
|
||||
Copyright 1987, 1988, 1995, 1996 by the Massachusetts Institute of Technology.
|
||||
.SH BUGS
|
||||
.Sh BUGS
|
||||
The strings corresponding to the
|
||||
.I errno
|
||||
.Va errno
|
||||
values set by the Hesiod functions are not particularly indicative of
|
||||
what went wrong, especially for
|
||||
.I ENOEXEC
|
||||
.Er ENOEXEC
|
||||
and
|
||||
.IR ENOENT .
|
||||
.Er ENOENT .
|
||||
|
Loading…
Reference in New Issue
Block a user