nscd_proto.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* Copyright (C) 1998-2026 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, see
  13. <https://www.gnu.org/licenses/>. */
  14. #ifndef _NSCD_PROTO_H
  15. #define _NSCD_PROTO_H 1
  16. #include <grp.h>
  17. #include <netdb.h>
  18. #include <pwd.h>
  19. /* Interval in which we transfer retry to contact the NSCD. */
  20. #define NSS_NSCD_RETRY 100
  21. /* Type needed in the interfaces. */
  22. struct nscd_ai_result;
  23. /* Variables for communication between NSCD handler functions and NSS. */
  24. extern int __nss_not_use_nscd_passwd attribute_hidden;
  25. extern int __nss_not_use_nscd_group attribute_hidden;
  26. extern int __nss_not_use_nscd_hosts attribute_hidden;
  27. extern int __nss_not_use_nscd_services attribute_hidden;
  28. extern int __nss_not_use_nscd_netgroup attribute_hidden;
  29. extern int __nscd_getpwnam_r (const char *name, struct passwd *resultbuf,
  30. char *buffer, size_t buflen,
  31. struct passwd **result) attribute_hidden;
  32. extern int __nscd_getpwuid_r (uid_t uid, struct passwd *resultbuf,
  33. char *buffer, size_t buflen,
  34. struct passwd **result) attribute_hidden;
  35. extern int __nscd_getgrnam_r (const char *name, struct group *resultbuf,
  36. char *buffer, size_t buflen,
  37. struct group **result) attribute_hidden;
  38. extern int __nscd_getgrgid_r (gid_t gid, struct group *resultbuf,
  39. char *buffer, size_t buflen,
  40. struct group **result) attribute_hidden;
  41. extern int __nscd_gethostbyname_r (const char *name,
  42. struct hostent *resultbuf,
  43. char *buffer, size_t buflen,
  44. struct hostent **result, int *h_errnop)
  45. attribute_hidden;
  46. extern int __nscd_gethostbyname2_r (const char *name, int af,
  47. struct hostent *resultbuf,
  48. char *buffer, size_t buflen,
  49. struct hostent **result, int *h_errnop)
  50. attribute_hidden;
  51. extern int __nscd_gethostbyaddr_r (const void *addr, socklen_t len, int type,
  52. struct hostent *resultbuf,
  53. char *buffer, size_t buflen,
  54. struct hostent **result, int *h_errnop)
  55. attribute_hidden;
  56. extern int __nscd_getai (const char *key, struct nscd_ai_result **result,
  57. int *h_errnop) attribute_hidden;
  58. extern int __nscd_getgrouplist (const char *user, gid_t group, long int *size,
  59. gid_t **groupsp, long int limit)
  60. attribute_hidden;
  61. extern int __nscd_getservbyname_r (const char *name, const char *proto,
  62. struct servent *result_buf, char *buf,
  63. size_t buflen, struct servent **result)
  64. attribute_hidden;
  65. extern int __nscd_getservbyport_r (int port, const char *proto,
  66. struct servent *result_buf, char *buf,
  67. size_t buflen, struct servent **result)
  68. attribute_hidden;
  69. extern int __nscd_innetgr (const char *netgroup, const char *host,
  70. const char *user, const char *domain)
  71. attribute_hidden;
  72. extern int __nscd_setnetgrent (const char *group, struct __netgrent *datap)
  73. attribute_hidden;
  74. #endif /* _NSCD_PROTO_H */