1 /* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.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 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. */
20 #ifndef __NIS_INTERN_H
22 #define __NIS_INTERN_H
29 CLIENT
*clnt
; /* RPC CLIENT handle */
30 nis_server
*server_val
; /* List of servers */
31 u_int server_len
; /* # of servers */
32 u_int server_used
; /* Which server we are bind in the moment ? */
33 u_int current_ep
; /* Which endpoint of the server are in use? */
34 u_int trys
; /* How many server have we tried ? */
35 u_int
class; /* From which class is server_val ? */
36 bool_t master_only
; /* Is only binded to the master */
37 bool_t use_auth
; /* Do we use AUTH ? */
38 bool_t use_udp
; /* Do we use UDP ? */
39 time_t create
; /* Binding creation time */
40 struct sockaddr_in addr
; /* Server's IP address */
41 int socket
; /* Server's local socket */
42 unsigned short port
; /* Local port */
44 typedef struct dir_binding dir_binding
;
52 typedef struct cache2_info cache2_info
;
61 int (*callback
) (const_nis_name
, const nis_object
*, const void *);
64 typedef struct nis_cb nis_cb
;
66 extern unsigned long inetstr2int
__P ((const char *str
));
67 extern long __nis_findfastest
__P ((dir_binding
*bind
));
68 extern nis_error __do_niscall2
__P ((const nis_server
*serv
, u_int serv_len
,
69 u_long prog
, xdrproc_t xargs
, caddr_t req
,
70 xdrproc_t xres
, caddr_t resp
,
71 u_long flags
, nis_cb
*cb
,
73 extern nis_error __do_niscall
__P ((const_nis_name name
, u_long prog
,
74 xdrproc_t xargs
, caddr_t req
,
75 xdrproc_t xres
, caddr_t resp
,
76 u_long flags
, nis_cb
*cb
));
77 extern AUTH
*authdes_pk_create
__P ((const char *, const netobj
*, u_int
,
78 struct sockaddr
*, des_block
*));
81 extern nis_error __nis_do_callback
__P ((struct dir_binding
*bptr
,
82 netobj
*cookie
, struct nis_cb
*cb
));
83 extern struct nis_cb
*__nis_create_callback
84 __P ((int (*callback
)(const_nis_name
, const nis_object
*, const void *),
85 const void *userdata
, u_long flags
));
86 extern nis_error __nis_destroy_callback
__P ((struct nis_cb
*cb
));
89 /* NIS+ Cache functions */
90 extern directory_obj
*__nis_cache_search
__P ((const_nis_name name
,