inet-fortified-decl.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* Declarations of checking macros for inet functions.
  2. Copyright (C) 2025-2026 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  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. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <https://www.gnu.org/licenses/>. */
  15. #ifndef _BITS_INET_FORTIFIED_DEC_H
  16. #define _BITS_INET_FORTIFIED_DEC_H 1
  17. #ifndef _ARPA_INET_H
  18. # error "Never include <bits/inet-fortified-decl.h> directly; use <arpa/inet.h> instead."
  19. #endif
  20. extern const char *__inet_ntop_chk (int, const void *, char *, socklen_t, size_t);
  21. extern const char *__REDIRECT_FORTIFY_NTH (__inet_ntop_alias,
  22. (int, const void *, char *, socklen_t), inet_ntop);
  23. extern const char *__REDIRECT_NTH (__inet_ntop_chk_warn,
  24. (int, const void *, char *, socklen_t, size_t), __inet_ntop_chk)
  25. __warnattr ("inet_ntop called with bigger length than "
  26. "size of destination buffer");
  27. extern int __inet_pton_chk (int, const char *, void *, size_t);
  28. extern int __REDIRECT_FORTIFY_NTH (__inet_pton_alias,
  29. (int, const char *, void *), inet_pton);
  30. extern int __REDIRECT_NTH (__inet_pton_chk_warn,
  31. (int, const char *, void *, size_t), __inet_pton_chk)
  32. __warnattr ("inet_pton called with a destination buffer size too small");
  33. #endif /* bits/inet-fortified-decl.h. */