2015-05-01 16:19:52 +08:00
|
|
|
/*
|
2021-03-08 18:19:04 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2015-05-01 16:19:52 +08:00
|
|
|
*
|
2018-10-15 01:23:33 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2015-05-01 16:19:52 +08:00
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2015-02-17 Bernard First version
|
2021-07-23 03:52:35 +08:00
|
|
|
* 2018-05-24 ChenYong Add socket abstraction layer
|
2015-05-01 16:19:52 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NETDB_H__
|
|
|
|
#define NETDB_H__
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2021-09-12 02:43:09 +08:00
|
|
|
#include <stddef.h>
|
2018-07-17 20:29:33 +08:00
|
|
|
#include <sal_netdb.h>
|
2015-05-01 16:19:52 +08:00
|
|
|
|
|
|
|
struct hostent *gethostbyname(const char *name);
|
|
|
|
|
|
|
|
int gethostbyname_r(const char *name, struct hostent *ret, char *buf,
|
|
|
|
size_t buflen, struct hostent **result, int *h_errnop);
|
|
|
|
void freeaddrinfo(struct addrinfo *ai);
|
|
|
|
int getaddrinfo(const char *nodename,
|
|
|
|
const char *servname,
|
|
|
|
const struct addrinfo *hints,
|
|
|
|
struct addrinfo **res);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|