Add support for gethostbyaddr()

This commit is contained in:
Gregory Nutt
2015-07-08 14:33:23 -06:00
parent 72701d753b
commit 299782e8ec
11 changed files with 453 additions and 44 deletions
+6 -2
View File
@@ -276,10 +276,11 @@ int getaddrinfo(FAR const char *restrict,
FAR const char *restrict,
FAR const struct addrinfo *restrict,
FAR struct addrinfo **restrict);
FAR struct hostent *gethostbyaddr(FAR const void *, socklen_t, int);
#endif
FAR struct hostent *gethostbyname(FAR const char *);
FAR struct hostent *gethostbyaddr(FAR const void *addr, socklen_t len,
int type);
FAR struct hostent *gethostbyname(FAR const char *name);
#if 0 /* None of these are yet supported */
FAR struct hostent *gethostent(void);
@@ -304,6 +305,9 @@ void setservent(int);
/* Non-standard interfaces similar to Glibc 2 interfaces */
int gethostbyaddr_r(FAR const void *addr, socklen_t len, int type,
FAR struct hostent *host, FAR char *buf,
size_t buflen, int *h_errnop);
int gethostbyname_r(FAR const char *name, FAR struct hostent *host,
FAR char *buf, size_t buflen, int *h_errnop);