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