netdb.h 771 B

1234567891011121314151617181920212223242526272829303132333435
  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 <sal_netdb.h>
  17. struct hostent *gethostbyname(const char *name);
  18. int gethostbyname_r(const char *name, struct hostent *ret, char *buf,
  19. size_t buflen, struct hostent **result, int *h_errnop);
  20. void freeaddrinfo(struct addrinfo *ai);
  21. int getaddrinfo(const char *nodename,
  22. const char *servname,
  23. const struct addrinfo *hints,
  24. struct addrinfo **res);
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif