Update copyright notices with scripts/update-copyrights
[glibc.git] / nis / nis_intern.h
blob7210a687c93f0f4a712841f43c8db594c0605ca3
1 /* Copyright (c) 1997-2014 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
5 The GNU C Library is free software; you can redistribute it and/or
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.
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 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef __NIS_INTERN_H
21 #define __NIS_INTERN_H
22 #include <features.h>
24 /* Configurable parameters for pinging NIS servers: */
26 /* Number of retries. */
27 #ifndef __NIS_PING_RETRY
28 # define __NIS_PING_RETRY 2
29 #endif
30 /* Initial timeout in seconds. */
31 #ifndef __NIS_PING_TIMEOUT_START
32 # define __NIS_PING_TIMEOUT_START 3
33 #endif
34 /* Timeout increment for retries in seconds. */
35 #ifndef __NIS_PING_TIMEOUT_INCREMENT
36 # define __NIS_PING_TIMEOUT_INCREMENT 3
37 #endif
40 __BEGIN_DECLS
42 struct nis_cb
44 nis_server *serv;
45 SVCXPRT *xprt;
46 int sock;
47 int nomore;
48 nis_error result;
49 int (*callback) (const_nis_name, const nis_object *, const void *);
50 const void *userdata;
52 typedef struct nis_cb nis_cb;
54 extern unsigned long int inetstr2int (const char *str);
55 extern long int __nis_findfastest (dir_binding *bind);
56 extern nis_error __do_niscall2 (const nis_server *serv, u_int serv_len,
57 u_long prog, xdrproc_t xargs, caddr_t req,
58 xdrproc_t xres, caddr_t resp,
59 unsigned int flags, nis_cb *cb);
60 extern nis_error __do_niscall (const_nis_name name, u_long prog,
61 xdrproc_t xargs, caddr_t req,
62 xdrproc_t xres, caddr_t resp,
63 unsigned int flags, nis_cb *cb);
64 extern nis_error __do_niscall3 (dir_binding *dbp, u_long prog,
65 xdrproc_t xargs, caddr_t req,
66 xdrproc_t xres, caddr_t resp,
67 unsigned int flags, nis_cb *cb);
68 libnsl_hidden_proto (__do_niscall3)
70 extern u_short __pmap_getnisport (struct sockaddr_in *address, u_long program,
71 u_long version, u_int protocol);
73 /* NIS+ callback */
74 extern nis_error __nis_do_callback (struct dir_binding *bptr,
75 netobj *cookie, struct nis_cb *cb);
76 extern struct nis_cb *__nis_create_callback
77 (int (*callback)(const_nis_name, const nis_object *, const void *),
78 const void *userdata, unsigned int flags);
79 extern nis_error __nis_destroy_callback (struct nis_cb *cb);
81 __END_DECLS
83 #endif