summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2008-12-22 19:09:30 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2008-12-22 19:09:30 +0000
commit9b39037a024c4ac28af78082240821c5646f157d (patch)
tree0c69cad1a7fec1dbb91292e75995f940d2dd7bf1 /lib
parent935b74c67da6cf60dd2c6d7ae0a2059eb5eb1fe4 (diff)
document yp_maplist(); from Ingo Schwarze
ok deraadt
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/yp/Makefile.inc9
-rw-r--r--lib/libc/yp/ypclnt.321
2 files changed, 23 insertions, 7 deletions
diff --git a/lib/libc/yp/Makefile.inc b/lib/libc/yp/Makefile.inc
index 80fdff63f21..4de7389f84f 100644
--- a/lib/libc/yp/Makefile.inc
+++ b/lib/libc/yp/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.4 1998/11/20 11:18:56 d Exp $
+# $OpenBSD: Makefile.inc,v 1.5 2008/12/22 19:09:29 jmc Exp $
# yp sources
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/yp ${LIBCSRCDIR}/yp
@@ -15,6 +15,7 @@ SRCS+= ypmatch_cache.c yp_bind.c yp_get_default_domain.c \
MAN+= ypclnt.3
MLINKS+=ypclnt.3 yp_all.3 ypclnt.3 yp_bind.3 ypclnt.3 yp_first.3 \
- ypclnt.3 yp_get_default_domain.3 ypclnt.3 yp_master.3 \
- ypclnt.3 yp_match.3 ypclnt.3 yp_next.3 ypclnt.3 yp_order.3 \
- ypclnt.3 yp_unbind.3 ypclnt.3 yperr_string.3 ypclnt.3 ypprot_err.3
+ ypclnt.3 yp_get_default_domain.3 ypclnt.3 yp_maplist.3 \
+ ypclnt.3 yp_master.3 ypclnt.3 yp_match.3 ypclnt.3 yp_next.3 \
+ ypclnt.3 yp_order.3 ypclnt.3 yp_unbind.3 \
+ ypclnt.3 yperr_string.3 ypclnt.3 ypprot_err.3
diff --git a/lib/libc/yp/ypclnt.3 b/lib/libc/yp/ypclnt.3
index 8a111d65afa..8606a44d400 100644
--- a/lib/libc/yp/ypclnt.3
+++ b/lib/libc/yp/ypclnt.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ypclnt.3,v 1.19 2008/06/26 05:42:05 ray Exp $
+.\" $OpenBSD: ypclnt.3,v 1.20 2008/12/22 19:09:29 jmc Exp $
.\"
.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -27,7 +27,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 26 2008 $
+.Dd $Mdocdate: December 22 2008 $
.Dt YPCLNT 3
.Os
.Sh NAME
@@ -35,6 +35,7 @@
.Nm yp_bind ,
.Nm yp_first ,
.Nm yp_get_default_domain ,
+.Nm yp_maplist ,
.Nm yp_master ,
.Nm yp_match ,
.Nm yp_next ,
@@ -57,6 +58,8 @@
.Ft int
.Fn yp_get_default_domain "char **domp"
.Ft int
+.Fn yp_maplist "char *indomain" "struct ypmaplist **outmaplist"
+.Ft int
.Fn yp_master "char *indomain" "char *inmap" "char **outname"
.Ft int
.Fn yp_match "char *indomain" "char *inmap" "const char *inkey" "int inkeylen" "char **outval" "int *outvallen"
@@ -236,7 +239,7 @@ key-value pairs, at which time
returns a value of 0, and is called with the following arguments:
.Bd -literal -offset indent
int foreach (
- int instatus,
+ unsigned long instatus,
char *inkey,
int inkeylen,
char *inval,
@@ -291,6 +294,18 @@ Returns the order number for a map.
.It Fn yp_master
Returns the hostname for the machine on which the master YP server process for
a map is running.
+.It Fn yp_maplist
+Returns a singly-linked list of the names of all the maps available in the
+named domain.
+The second argument to
+.Fn yp_maplist
+is:
+.Bd -literal -offset indent
+struct ypmaplist {
+ char *map;
+ struct ypmaplist *next;
+};
+.Ed
.It Fn yperr_string
Returns a pointer to a NUL-terminated error string that does not contain a
.Ql \&.