libctru/libctru/include/netdb.h
2015-08-18 17:15:21 -05:00

33 lines
554 B
C

#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
struct hostent {
char *h_name;
char **h_aliases;
int h_addrtype;
int h_length;
char **h_addr_list;
char *h_addr;
};
#ifdef __cplusplus
extern "C" {
#endif
extern int h_errno;
struct hostent* gethostbyname(const char *name);
struct hostent* gethostbyaddr(const void *addr, socklen_t len, int type);
void herror(const char *s);
const char* hstrerror(int err);
#ifdef __cplusplus
}
#endif