netdb.h 791 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2015-02-17 Bernard First version
  9. * 2018-05-24 ChenYong Add socket abstraction layer
  10. */
  11. #ifndef NETDB_H__
  12. #define NETDB_H__
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #include <stddef.h>
  17. #include <sal_netdb.h>
  18. struct hostent *gethostbyname(const char *name);
  19. int gethostbyname_r(const char *name, struct hostent *ret, char *buf,
  20. size_t buflen, struct hostent **result, int *h_errnop);
  21. void freeaddrinfo(struct addrinfo *ai);
  22. int getaddrinfo(const char *nodename,
  23. const char *servname,
  24. const struct addrinfo *hints,
  25. struct addrinfo **res);
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif