Back to index

glibc  2.9
nscd_proto.h
Go to the documentation of this file.
00001 /* Copyright (C) 1998-2000, 2002, 2004, 2007 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1998.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _NSCD_PROTO_H
00021 #define _NSCD_PROTO_H 1
00022 
00023 #include <grp.h>
00024 #include <netdb.h>
00025 #include <pwd.h>
00026 
00027 /* Interval in which we transfer retry to contact the NSCD.  */
00028 #define NSS_NSCD_RETRY      100
00029 
00030 /* Type needed in the interfaces.  */
00031 struct nscd_ai_result;
00032 
00033 
00034 /* Variables for communication between NSCD handler functions and NSS.  */
00035 extern int __nss_not_use_nscd_passwd attribute_hidden;
00036 extern int __nss_not_use_nscd_group attribute_hidden;
00037 extern int __nss_not_use_nscd_hosts attribute_hidden;
00038 extern int __nss_not_use_nscd_services attribute_hidden;
00039 
00040 extern int __nscd_getpwnam_r (const char *name, struct passwd *resultbuf,
00041                            char *buffer, size_t buflen,
00042                            struct passwd **result);
00043 extern int __nscd_getpwuid_r (uid_t uid, struct passwd *resultbuf,
00044                            char *buffer,  size_t buflen,
00045                            struct passwd **result);
00046 extern int __nscd_getgrnam_r (const char *name, struct group *resultbuf,
00047                            char *buffer, size_t buflen,
00048                            struct group **result);
00049 extern int __nscd_getgrgid_r (gid_t gid, struct group *resultbuf,
00050                            char *buffer,  size_t buflen,
00051                            struct group **result);
00052 extern int __nscd_gethostbyname_r (const char *name,
00053                                struct hostent *resultbuf,
00054                                char *buffer, size_t buflen,
00055                                struct hostent **result, int *h_errnop);
00056 extern int __nscd_gethostbyname2_r (const char *name, int af,
00057                                 struct hostent *resultbuf,
00058                                 char *buffer, size_t buflen,
00059                                 struct hostent **result, int *h_errnop);
00060 extern int __nscd_gethostbyaddr_r (const void *addr, socklen_t len, int type,
00061                                struct hostent *resultbuf,
00062                                char *buffer, size_t buflen,
00063                                struct hostent **result, int *h_errnop);
00064 extern int __nscd_getai (const char *key, struct nscd_ai_result **result,
00065                       int *h_errnop);
00066 extern int __nscd_getgrouplist (const char *user, gid_t group, long int *size,
00067                             gid_t **groupsp, long int limit);
00068 extern int __nscd_getservbyname_r (const char *name, const char *proto,
00069                                struct servent *result_buf, char *buf,
00070                                size_t buflen, struct servent **result);
00071 extern int __nscd_getservbyport_r (int port, const char *proto,
00072                                struct servent *result_buf, char *buf,
00073                                size_t buflen, struct servent **result);
00074 
00075 #endif /* _NSCD_PROTO_H */