Blame src/api/netdb.c

nsz d7c151
#include <netdb.h>
nsz d7c151
#define T(t) (t*)0;
nsz d7c151
#define F(t,n) {t *y = &x.;;}
nsz d7c151
#define C(n) switch(n){case n:;}
nsz d7c151
static void f()
nsz d7c151
{
nsz d7c151
T(uint32_t)
nsz d7c151
T(socklen_t)
nsz d7c151
C(IPPORT_RESERVED)
nsz d7c151
{
nsz d7c151
struct hostent x;
nsz d7c151
F(char*, h_name)
nsz d7c151
F(char**, h_aliases)
nsz d7c151
F(int, h_addrtype)
nsz d7c151
F(int, h_length)
nsz d7c151
F(char**, h_addr_list)
nsz d7c151
}
nsz d7c151
{
nsz d7c151
struct netent x;
nsz d7c151
F(char*, n_name)
nsz d7c151
F(char**, n_aliases)
nsz d7c151
F(int, n_addrtype)
nsz d7c151
F(uint32_t, n_net)
nsz d7c151
}
nsz d7c151
{
nsz d7c151
struct protoent x;
nsz d7c151
F(char*, p_name)
nsz d7c151
F(char**, p_aliases)
nsz d7c151
F(int, p_proto)
nsz d7c151
}
nsz d7c151
{
nsz d7c151
struct servent x;
nsz d7c151
F(char*, s_name)
nsz d7c151
F(char**, s_aliases)
nsz d7c151
F(int, s_port)
nsz d7c151
F(char*, s_proto)
nsz d7c151
}
nsz d7c151
{
nsz d7c151
struct addrinfo x;
nsz d7c151
F(int, ai_flags)
nsz d7c151
F(int, ai_family)
nsz d7c151
F(int, ai_socktype)
nsz d7c151
F(int, ai_protocol)
nsz d7c151
F(socklen_t, ai_addrlen)
nsz d7c151
F(struct sockaddr*, ai_addr)
nsz d7c151
F(char*, ai_canonname)
nsz d7c151
F(struct addrinfo*, ai_next)
nsz d7c151
}
nsz d7c151
C(AI_PASSIVE)
nsz d7c151
C(AI_CANONNAME)
nsz d7c151
C(AI_NUMERICHOST)
nsz d7c151
C(AI_NUMERICSERV)
nsz d7c151
C(AI_V4MAPPED)
nsz d7c151
C(AI_ALL)
nsz d7c151
C(AI_ADDRCONFIG)
nsz d7c151
C(NI_NOFQDN)
nsz d7c151
C(NI_NUMERICHOST)
nsz d7c151
C(NI_NAMEREQD)
nsz d7c151
C(NI_NUMERICSERV)
nsz d7c151
C(NI_NUMERICSCOPE)
nsz d7c151
C(NI_DGRAM)
nsz d7c151
C(EAI_AGAIN)
nsz d7c151
C(EAI_BADFLAGS)
nsz d7c151
C(EAI_FAIL)
nsz d7c151
C(EAI_FAMILY)
nsz d7c151
C(EAI_MEMORY)
nsz d7c151
C(EAI_NONAME)
nsz d7c151
C(EAI_SERVICE)
nsz d7c151
C(EAI_SOCKTYPE)
nsz d7c151
C(EAI_SYSTEM)
nsz d7c151
C(EAI_OVERFLOW)
nsz d7c151
void(*p_endhostent)(void) = endhostent;
nsz d7c151
void(*p_endnetent)(void) = endnetent;
nsz d7c151
void(*p_endprotoent)(void) = endprotoent;
nsz d7c151
void(*p_endservent)(void) = endservent;
nsz d7c151
const char*(*p_gai_strerror)(int) = gai_strerror;
nsz d7c151
struct hostent*(*p_gethostent)(void) = gethostent;
nsz d7c151
struct netent*(*p_getnetbyaddr)(uint32_t,int) = getnetbyaddr;
nsz d7c151
struct netent*(*p_getnetbyname)(const char*) = getnetbyname;
nsz d7c151
struct netent*(*p_getnetent)(void) = getnetent;
nsz d7c151
struct protoent*(*p_getprotobyname)(const char*) = getprotobyname;
nsz d7c151
struct protoent*(*p_getprotobynumber)(int) = getprotobynumber;
nsz d7c151
struct protoent*(*p_getprotoent)(void) = getprotoent;
nsz d7c151
struct servent*(*p_getservbyname)(const char*,const char*) = getservbyname;
nsz d7c151
struct servent*(*p_getservbyport)(int,const char*) = getservbyport;
nsz d7c151
struct servent*(*p_getservent)(void) = getservent;
nsz d7c151
void(*p_sethostent)(int) = sethostent;
nsz d7c151
void(*p_setnetent)(int) = setnetent;
nsz d7c151
void(*p_setprotoent)(int) = setprotoent;
nsz d7c151
void(*p_setservent)(int) = setservent;
nsz d7c151
}