1 /* 2 * Copyright (c) 2006-2018, 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 * 2108-05-24 ChenYong Add socket abstraction layer 10 */ 11 12 #ifndef NETDB_H__ 13 #define NETDB_H__ 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 #include <sal_netdb.h> 20 21 struct hostent *gethostbyname(const char *name); 22 23 int gethostbyname_r(const char *name, struct hostent *ret, char *buf, 24 size_t buflen, struct hostent **result, int *h_errnop); 25 void freeaddrinfo(struct addrinfo *ai); 26 int getaddrinfo(const char *nodename, 27 const char *servname, 28 const struct addrinfo *hints, 29 struct addrinfo **res); 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #endif 36