nss.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* Copyright (C) 1996-2020 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. /* Define interface to NSS. This is meant for the interface functions
  15. and for implementors of new services. */
  16. #ifndef _NSS_H
  17. #define _NSS_H 1
  18. #include <features.h>
  19. #include <stdint.h>
  20. __BEGIN_DECLS
  21. /* Possible results of lookup using a nss_* function. */
  22. enum nss_status
  23. {
  24. NSS_STATUS_TRYAGAIN = -2,
  25. NSS_STATUS_UNAVAIL,
  26. NSS_STATUS_NOTFOUND,
  27. NSS_STATUS_SUCCESS,
  28. NSS_STATUS_RETURN
  29. };
  30. /* Data structure used for the 'gethostbyname4_r' function. */
  31. struct gaih_addrtuple
  32. {
  33. struct gaih_addrtuple *next;
  34. char *name;
  35. int family;
  36. uint32_t addr[4];
  37. uint32_t scopeid;
  38. };
  39. /* Overwrite service selection for database DBNAME using specification
  40. in STRING.
  41. This function should only be used by system programs which have to
  42. work around non-existing services (e.e., while booting).
  43. Attention: Using this function repeatedly will slowly eat up the
  44. whole memory since previous selection data cannot be freed. */
  45. extern int __nss_configure_lookup (const char *__dbname,
  46. const char *__string) __THROW;
  47. __END_DECLS
  48. #endif /* nss.h */