1/* Copyright (C) 1998-2022 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
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.
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
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <https://www.gnu.org/licenses/>. */
17
18#ifndef _NSCD_PROTO_H
19#define _NSCD_PROTO_H 1
20
21#include <grp.h>
22#include <netdb.h>
23#include <pwd.h>
24
25/* Interval in which we transfer retry to contact the NSCD. */
26#define NSS_NSCD_RETRY 100
27
28/* Type needed in the interfaces. */
29struct nscd_ai_result;
30
31
32/* Variables for communication between NSCD handler functions and NSS. */
33extern int __nss_not_use_nscd_passwd attribute_hidden;
34extern int __nss_not_use_nscd_group attribute_hidden;
35extern int __nss_not_use_nscd_hosts attribute_hidden;
36extern int __nss_not_use_nscd_services attribute_hidden;
37extern int __nss_not_use_nscd_netgroup attribute_hidden;
38
39extern int __nscd_getpwnam_r (const char *name, struct passwd *resultbuf,
40 char *buffer, size_t buflen,
41 struct passwd **result) attribute_hidden;
42extern int __nscd_getpwuid_r (uid_t uid, struct passwd *resultbuf,
43 char *buffer, size_t buflen,
44 struct passwd **result) attribute_hidden;
45extern int __nscd_getgrnam_r (const char *name, struct group *resultbuf,
46 char *buffer, size_t buflen,
47 struct group **result) attribute_hidden;
48extern int __nscd_getgrgid_r (gid_t gid, struct group *resultbuf,
49 char *buffer, size_t buflen,
50 struct group **result) attribute_hidden;
51extern int __nscd_gethostbyname_r (const char *name,
52 struct hostent *resultbuf,
53 char *buffer, size_t buflen,
54 struct hostent **result, int *h_errnop)
55 attribute_hidden;
56extern int __nscd_gethostbyname2_r (const char *name, int af,
57 struct hostent *resultbuf,
58 char *buffer, size_t buflen,
59 struct hostent **result, int *h_errnop)
60 attribute_hidden;
61extern int __nscd_gethostbyaddr_r (const void *addr, socklen_t len, int type,
62 struct hostent *resultbuf,
63 char *buffer, size_t buflen,
64 struct hostent **result, int *h_errnop)
65 attribute_hidden;
66extern int __nscd_getai (const char *key, struct nscd_ai_result **result,
67 int *h_errnop) attribute_hidden;
68extern int __nscd_getgrouplist (const char *user, gid_t group, long int *size,
69 gid_t **groupsp, long int limit)
70 attribute_hidden;
71extern int __nscd_getservbyname_r (const char *name, const char *proto,
72 struct servent *result_buf, char *buf,
73 size_t buflen, struct servent **result)
74 attribute_hidden;
75extern int __nscd_getservbyport_r (int port, const char *proto,
76 struct servent *result_buf, char *buf,
77 size_t buflen, struct servent **result)
78 attribute_hidden;
79extern int __nscd_innetgr (const char *netgroup, const char *host,
80 const char *user, const char *domain)
81 attribute_hidden;
82extern int __nscd_setnetgrent (const char *group, struct __netgrent *datap)
83 attribute_hidden;
84
85
86#endif /* _NSCD_PROTO_H */
87

source code of glibc/nscd/nscd_proto.h