]>
Commit | Line | Data |
---|---|---|
2b778ceb | 1 | /* Copyright (C) 1996-2021 Free Software Foundation, Inc. |
3e5f5557 | 2 | This file is part of the GNU C Library. |
d8cf93f4 | 3 | Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996. |
3e5f5557 UD |
4 | |
5 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
3e5f5557 UD |
9 | |
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 | |
41bdb6e2 | 13 | Lesser General Public License for more details. |
3e5f5557 | 14 | |
41bdb6e2 | 15 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 | 16 | License along with the GNU C Library; if not, see |
5a82c748 | 17 | <https://www.gnu.org/licenses/>. */ |
3e5f5557 | 18 | |
6259ec0d UD |
19 | |
20 | #ifndef __RPCSVC_YPCLNT_H__ | |
21 | #define __RPCSVC_YPCLNT_H__ | |
22 | ||
23 | #include <features.h> | |
24 | ||
d8cf93f4 UD |
25 | /* Some defines */ |
26 | #define YPERR_SUCCESS 0 /* There is no error */ | |
27 | #define YPERR_BADARGS 1 /* Args to function are bad */ | |
28 | #define YPERR_RPC 2 /* RPC failure */ | |
29 | #define YPERR_DOMAIN 3 /* Can't bind to a server with this domain */ | |
30 | #define YPERR_MAP 4 /* No such map in server's domain */ | |
31 | #define YPERR_KEY 5 /* No such key in map */ | |
32 | #define YPERR_YPERR 6 /* Internal yp server or client error */ | |
33 | #define YPERR_RESRC 7 /* Local resource allocation failure */ | |
34 | #define YPERR_NOMORE 8 /* No more records in map database */ | |
35 | #define YPERR_PMAP 9 /* Can't communicate with portmapper */ | |
36 | #define YPERR_YPBIND 10 /* Can't communicate with ypbind */ | |
37 | #define YPERR_YPSERV 11 /* Can't communicate with ypserv */ | |
38 | #define YPERR_NODOM 12 /* Local domain name not set */ | |
39 | #define YPERR_BADDB 13 /* yp data base is bad */ | |
40 | #define YPERR_VERS 14 /* YP version mismatch */ | |
41 | #define YPERR_ACCESS 15 /* Access violation */ | |
42 | #define YPERR_BUSY 16 /* Database is busy */ | |
6259ec0d UD |
43 | |
44 | /* Types of update operations */ | |
d8cf93f4 UD |
45 | #define YPOP_CHANGE 1 /* Change, do not add */ |
46 | #define YPOP_INSERT 2 /* Add, do not change */ | |
47 | #define YPOP_DELETE 3 /* Delete this entry */ | |
48 | #define YPOP_STORE 4 /* Add, or change */ | |
6259ec0d UD |
49 | |
50 | __BEGIN_DECLS | |
51 | ||
d8cf93f4 | 52 | /* struct ypall_callback * is the arg which must be passed to yp_all. */ |
3e5f5557 UD |
53 | struct ypall_callback |
54 | { | |
d8cf93f4 UD |
55 | int (*foreach) (int __status, char *__key, int __keylen, |
56 | char *__val, int __vallen, char *__data); | |
3e5f5557 UD |
57 | char *data; |
58 | }; | |
6259ec0d | 59 | |
d8cf93f4 | 60 | /* External NIS client function references. */ |
a784e502 UD |
61 | extern int yp_bind (const char *) __THROW; |
62 | extern void yp_unbind (const char *) __THROW; | |
d8cf93f4 | 63 | extern int yp_get_default_domain (char **) __THROW; |
a784e502 UD |
64 | extern int yp_match (const char *, const char *, const char *, |
65 | const int, char **, int *) __THROW; | |
66 | extern int yp_first (const char *, const char *, char **, | |
d8cf93f4 | 67 | int *, char **, int *) __THROW; |
a784e502 UD |
68 | extern int yp_next (const char *, const char *, const char *, |
69 | const int, char **, int *, char **, int *) __THROW; | |
70 | extern int yp_master (const char *, const char *, char **) __THROW; | |
71 | extern int yp_order (const char *, const char *, unsigned int *) __THROW; | |
72 | extern int yp_all (const char *, const char *, | |
73 | const struct ypall_callback *) __THROW; | |
74 | extern const char *yperr_string (const int) __THROW; | |
75 | extern const char *ypbinderr_string (const int) __THROW; | |
76 | extern int ypprot_err (const int) __THROW; | |
d8cf93f4 UD |
77 | extern int yp_update (char *, char *, unsigned int, char *, |
78 | int, char *, int) __THROW; | |
6259ec0d | 79 | |
d8cf93f4 UD |
80 | /* This functions exists only under BSD and Linux systems. */ |
81 | extern int __yp_check (char **) __THROW; | |
6259ec0d UD |
82 | |
83 | __END_DECLS | |
84 | ||
85 | #endif /* __RPCSVC_YPCLNT_H__ */ |