2014-11-20 22:36:50 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
|
|
|
#define HOST_NOT_FOUND 1
|
|
|
|
#define NO_DATA 2
|
|
|
|
#define NO_ADDRESS NO_DATA
|
|
|
|
#define NO_RECOVERY 3
|
|
|
|
#define TRY_AGAIN 4
|
2014-05-07 18:17:36 +02:00
|
|
|
|
|
|
|
struct hostent {
|
2014-11-20 22:36:50 +01:00
|
|
|
char *h_name;
|
|
|
|
char **h_aliases;
|
|
|
|
int h_addrtype;
|
|
|
|
int h_length;
|
|
|
|
char **h_addr_list;
|
2015-08-18 23:55:50 +02:00
|
|
|
char *h_addr;
|
2014-05-07 18:17:36 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-11-20 22:36:50 +01:00
|
|
|
extern int h_errno;
|
|
|
|
struct hostent* gethostbyname(const char *name);
|
2015-08-19 00:15:21 +02:00
|
|
|
struct hostent* gethostbyaddr(const void *addr, socklen_t len, int type);
|
2015-01-24 21:14:06 +01:00
|
|
|
void herror(const char *s);
|
|
|
|
const char* hstrerror(int err);
|
2014-05-07 18:17:36 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2014-11-20 22:36:50 +01:00
|
|
|
}
|
2014-05-07 18:17:36 +02:00
|
|
|
#endif
|