2019-03-14 15:18:15 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
|
|
__BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
struct hostent {
|
|
|
|
|
char* h_name;
|
|
|
|
|
char** h_aliases;
|
|
|
|
|
int h_addrtype;
|
|
|
|
|
int h_length;
|
|
|
|
|
char** h_addr_list;
|
2019-05-19 19:55:49 +02:00
|
|
|
#define h_addr h_addr_list[0]
|
2019-03-14 15:18:15 +01:00
|
|
|
};
|
|
|
|
|
|
2019-05-28 11:53:16 +02:00
|
|
|
struct hostent* gethostbyname(const char*);
|
2019-06-06 05:35:03 +02:00
|
|
|
struct hostent* gethostbyaddr(const void* addr, socklen_t len, int type);
|
2019-03-14 15:18:15 +01:00
|
|
|
|
2019-05-21 21:36:08 +02:00
|
|
|
struct servent {
|
|
|
|
|
char* s_name;
|
|
|
|
|
char** s_aliases;
|
|
|
|
|
int s_port;
|
|
|
|
|
char* s_proto;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct servent* getservbyname(const char* name, const char* protocol);
|
|
|
|
|
|
2019-03-14 15:18:15 +01:00
|
|
|
__END_DECLS
|