1 /* Copyright (c) 1997,1998,1999,2000,2001,2006 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, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 #ifndef __NIS_INTERN_H
22 #define __NIS_INTERN_H
25 /* Configurable parameters for pinging NIS servers: */
27 /* Number of retries. */
28 #ifndef __NIS_PING_RETRY
29 # define __NIS_PING_RETRY 2
31 /* Initial timeout in seconds. */
32 #ifndef __NIS_PING_TIMEOUT_START
33 # define __NIS_PING_TIMEOUT_START 3
35 /* Timeout increment for retries in seconds. */
36 #ifndef __NIS_PING_TIMEOUT_INCREMENT
37 # define __NIS_PING_TIMEOUT_INCREMENT 3
50 int (*callback
) (const_nis_name
, const nis_object
*, const void *);
53 typedef struct nis_cb nis_cb
;
55 extern unsigned long int inetstr2int (const char *str
);
56 extern long int __nis_findfastest (dir_binding
*bind
);
57 extern nis_error
__do_niscall2 (const nis_server
*serv
, u_int serv_len
,
58 u_long prog
, xdrproc_t xargs
, caddr_t req
,
59 xdrproc_t xres
, caddr_t resp
,
60 unsigned int flags
, nis_cb
*cb
);
61 extern nis_error
__do_niscall (const_nis_name name
, u_long prog
,
62 xdrproc_t xargs
, caddr_t req
,
63 xdrproc_t xres
, caddr_t resp
,
64 unsigned int flags
, nis_cb
*cb
);
65 extern nis_error
__do_niscall3 (dir_binding
*dbp
, u_long prog
,
66 xdrproc_t xargs
, caddr_t req
,
67 xdrproc_t xres
, caddr_t resp
,
68 unsigned int flags
, nis_cb
*cb
);
69 libnsl_hidden_proto (__do_niscall3
)
71 extern u_short
__pmap_getnisport (struct sockaddr_in
*address
, u_long program
,
72 u_long version
, u_int protocol
);
75 extern nis_error
__nis_do_callback (struct dir_binding
*bptr
,
76 netobj
*cookie
, struct nis_cb
*cb
);
77 extern struct nis_cb
*__nis_create_callback
78 (int (*callback
)(const_nis_name
, const nis_object
*, const void *),
79 const void *userdata
, unsigned int flags
);
80 extern nis_error
__nis_destroy_callback (struct nis_cb
*cb
);