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