1 /* Copyright (C) 1998-2019 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
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 <https://www.gnu.org/licenses/>. */
20 #define _NSCD_PROTO_H 1
26 /* Interval in which we transfer retry to contact the NSCD. */
27 #define NSS_NSCD_RETRY 100
29 /* Type needed in the interfaces. */
30 struct nscd_ai_result
;
33 /* Variables for communication between NSCD handler functions and NSS. */
34 extern int __nss_not_use_nscd_passwd attribute_hidden
;
35 extern int __nss_not_use_nscd_group attribute_hidden
;
36 extern int __nss_not_use_nscd_hosts attribute_hidden
;
37 extern int __nss_not_use_nscd_services attribute_hidden
;
38 extern int __nss_not_use_nscd_netgroup attribute_hidden
;
40 extern int __nscd_getpwnam_r (const char *name
, struct passwd
*resultbuf
,
41 char *buffer
, size_t buflen
,
42 struct passwd
**result
) attribute_hidden
;
43 extern int __nscd_getpwuid_r (uid_t uid
, struct passwd
*resultbuf
,
44 char *buffer
, size_t buflen
,
45 struct passwd
**result
) attribute_hidden
;
46 extern int __nscd_getgrnam_r (const char *name
, struct group
*resultbuf
,
47 char *buffer
, size_t buflen
,
48 struct group
**result
) attribute_hidden
;
49 extern int __nscd_getgrgid_r (gid_t gid
, struct group
*resultbuf
,
50 char *buffer
, size_t buflen
,
51 struct group
**result
) attribute_hidden
;
52 extern int __nscd_gethostbyname_r (const char *name
,
53 struct hostent
*resultbuf
,
54 char *buffer
, size_t buflen
,
55 struct hostent
**result
, int *h_errnop
)
57 extern int __nscd_gethostbyname2_r (const char *name
, int af
,
58 struct hostent
*resultbuf
,
59 char *buffer
, size_t buflen
,
60 struct hostent
**result
, int *h_errnop
)
62 extern int __nscd_gethostbyaddr_r (const void *addr
, socklen_t len
, int type
,
63 struct hostent
*resultbuf
,
64 char *buffer
, size_t buflen
,
65 struct hostent
**result
, int *h_errnop
)
67 extern int __nscd_getai (const char *key
, struct nscd_ai_result
**result
,
68 int *h_errnop
) attribute_hidden
;
69 extern int __nscd_getgrouplist (const char *user
, gid_t group
, long int *size
,
70 gid_t
**groupsp
, long int limit
)
72 extern int __nscd_getservbyname_r (const char *name
, const char *proto
,
73 struct servent
*result_buf
, char *buf
,
74 size_t buflen
, struct servent
**result
)
76 extern int __nscd_getservbyport_r (int port
, const char *proto
,
77 struct servent
*result_buf
, char *buf
,
78 size_t buflen
, struct servent
**result
)
80 extern int __nscd_innetgr (const char *netgroup
, const char *host
,
81 const char *user
, const char *domain
)
83 extern int __nscd_setnetgrent (const char *group
, struct __netgrent
*datap
)
87 #endif /* _NSCD_PROTO_H */