]>
Commit | Line | Data |
---|---|---|
2b778ceb | 1 | /* Copyright (c) 1997-2021 Free Software Foundation, Inc. |
e61abf83 | 2 | This file is part of the GNU C Library. |
e61abf83 UD |
3 | |
4 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
5 | modify it under the terms of the GNU Lesser General Public |
6 | License as published by the Free Software Foundation; either | |
7 | version 2.1 of the License, or (at your option) any later version. | |
e61abf83 UD |
8 | |
9 | The GNU C Library is distributed in the hope that it will be useful, | |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 12 | Lesser General Public License for more details. |
e61abf83 | 13 | |
41bdb6e2 | 14 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 | 15 | License along with the GNU C Library; if not, see |
5a82c748 | 16 | <https://www.gnu.org/licenses/>. */ |
e61abf83 UD |
17 | |
18 | #ifndef __NIS_INTERN_H | |
19 | ||
20 | #define __NIS_INTERN_H | |
21 | #include <features.h> | |
22 | ||
495818ce UD |
23 | /* Configurable parameters for pinging NIS servers: */ |
24 | ||
25 | /* Number of retries. */ | |
26 | #ifndef __NIS_PING_RETRY | |
27 | # define __NIS_PING_RETRY 2 | |
28 | #endif | |
29 | /* Initial timeout in seconds. */ | |
30 | #ifndef __NIS_PING_TIMEOUT_START | |
31 | # define __NIS_PING_TIMEOUT_START 3 | |
32 | #endif | |
33 | /* Timeout increment for retries in seconds. */ | |
34 | #ifndef __NIS_PING_TIMEOUT_INCREMENT | |
35 | # define __NIS_PING_TIMEOUT_INCREMENT 3 | |
36 | #endif | |
37 | ||
38 | ||
e61abf83 UD |
39 | __BEGIN_DECLS |
40 | ||
650425ce UD |
41 | struct nis_cb |
42 | { | |
43 | nis_server *serv; | |
44 | SVCXPRT *xprt; | |
45 | int sock; | |
46 | int nomore; | |
47 | nis_error result; | |
48 | int (*callback) (const_nis_name, const nis_object *, const void *); | |
49 | const void *userdata; | |
50 | }; | |
51 | typedef struct nis_cb nis_cb; | |
52 | ||
d8cf93f4 UD |
53 | extern unsigned long int inetstr2int (const char *str); |
54 | extern long int __nis_findfastest (dir_binding *bind); | |
55 | extern nis_error __do_niscall2 (const nis_server *serv, u_int serv_len, | |
56 | u_long prog, xdrproc_t xargs, caddr_t req, | |
57 | xdrproc_t xres, caddr_t resp, | |
58 | unsigned int flags, nis_cb *cb); | |
59 | extern nis_error __do_niscall (const_nis_name name, u_long prog, | |
60 | xdrproc_t xargs, caddr_t req, | |
61 | xdrproc_t xres, caddr_t resp, | |
62 | unsigned int flags, nis_cb *cb); | |
23bab906 AJ |
63 | extern nis_error __do_niscall3 (dir_binding *dbp, u_long prog, |
64 | xdrproc_t xargs, caddr_t req, | |
65 | xdrproc_t xres, caddr_t resp, | |
66 | unsigned int flags, nis_cb *cb); | |
2d571cd1 | 67 | libnsl_hidden_proto (__do_niscall3) |
2d7da676 | 68 | |
ed073f0e AJ |
69 | extern u_short __pmap_getnisport (struct sockaddr_in *address, u_long program, |
70 | u_long version, u_int protocol); | |
71 | ||
650425ce | 72 | /* NIS+ callback */ |
d8cf93f4 UD |
73 | extern nis_error __nis_do_callback (struct dir_binding *bptr, |
74 | netobj *cookie, struct nis_cb *cb); | |
650425ce | 75 | extern struct nis_cb *__nis_create_callback |
d8cf93f4 UD |
76 | (int (*callback)(const_nis_name, const nis_object *, const void *), |
77 | const void *userdata, unsigned int flags); | |
78 | extern nis_error __nis_destroy_callback (struct nis_cb *cb); | |
650425ce | 79 | |
e61abf83 UD |
80 | __END_DECLS |
81 | ||
82 | #endif |