1 /* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
21 #ifndef __RPCSVC_YPCLNT_H__
22 #define __RPCSVC_YPCLNT_H__
27 #define YPERR_SUCCESS 0 /* There is no error */
28 #define YPERR_BADARGS 1 /* Args to function are bad */
29 #define YPERR_RPC 2 /* RPC failure */
30 #define YPERR_DOMAIN 3 /* Can't bind to a server with this domain */
31 #define YPERR_MAP 4 /* No such map in server's domain */
32 #define YPERR_KEY 5 /* No such key in map */
33 #define YPERR_YPERR 6 /* Internal yp server or client error */
34 #define YPERR_RESRC 7 /* Local resource allocation failure */
35 #define YPERR_NOMORE 8 /* No more records in map database */
36 #define YPERR_PMAP 9 /* Can't communicate with portmapper */
37 #define YPERR_YPBIND 10 /* Can't communicate with ypbind */
38 #define YPERR_YPSERV 11 /* Can't communicate with ypserv */
39 #define YPERR_NODOM 12 /* Local domain name not set */
40 #define YPERR_BADDB 13 /* yp data base is bad */
41 #define YPERR_VERS 14 /* YP version mismatch */
42 #define YPERR_ACCESS 15 /* Access violation */
43 #define YPERR_BUSY 16 /* Database is busy */
45 /* Types of update operations */
46 #define YPOP_CHANGE 1 /* change, do not add */
47 #define YPOP_INSERT 2 /* add, do not change */
48 #define YPOP_DELETE 3 /* delete this entry */
49 #define YPOP_STORE 4 /* add, or change */
53 /* struct ypall_callback * is the arg which must be passed to yp_all */
56 int (*foreach
) __P ((int __status
, char *__key
, int __keylen
,
57 char *__val
, int __vallen
, char *__data
));
61 /* External NIS client function references. */
62 extern int yp_bind
__P ((__const
char *));
63 extern void yp_unbind
__P ((__const
char *));
64 extern int yp_get_default_domain
__P ((char **));
65 extern int yp_match
__P ((__const
char *, __const
char *, __const
char *,
66 __const
int, char **, int *));
67 extern int yp_first
__P ((__const
char *, __const
char *, char **,
68 int *, char **, int *));
69 extern int yp_next
__P ((__const
char *, __const
char *, __const
char *,
70 __const
int, char **, int *, char **, int *));
71 extern int yp_master
__P ((__const
char *, __const
char *, char **));
72 extern int yp_order
__P ((__const
char *, __const
char *, unsigned int *));
73 extern int yp_all
__P ((__const
char *, __const
char *,
74 __const
struct ypall_callback
*));
75 extern __const
char *yperr_string
__P ((__const
int));
76 extern __const
char *ypbinderr_string
__P ((__const
int));
77 extern int ypprot_err
__P ((__const
int));
78 extern int yp_update
__P ((char *, char *, unsigned, char *,
81 extern int yp_maplist
__P ((__const
char *, struct ypmaplist
**));
84 /* Exist only under BSD and Linux systems */
85 extern int __yp_check
__P ((char **));
89 #endif /* __RPCSVC_YPCLNT_H__ */