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 0ef264
{void(*p)(void) = endhostent;}
nsz 0ef264
{void(*p)(void) = endnetent;}
nsz 0ef264
{void(*p)(void) = endprotoent;}
nsz 0ef264
{void(*p)(void) = endservent;}
nsz 0ef264
{const char*(*p)(int) = gai_strerror;}
nsz 0ef264
{struct hostent*(*p)(void) = gethostent;}
nsz 0ef264
{struct netent*(*p)(uint32_t,int) = getnetbyaddr;}
nsz 0ef264
{struct netent*(*p)(const char*) = getnetbyname;}
nsz 0ef264
{struct netent*(*p)(void) = getnetent;}
nsz 0ef264
{struct protoent*(*p)(const char*) = getprotobyname;}
nsz 0ef264
{struct protoent*(*p)(int) = getprotobynumber;}
nsz 0ef264
{struct protoent*(*p)(void) = getprotoent;}
nsz 0ef264
{struct servent*(*p)(const char*,const char*) = getservbyname;}
nsz 0ef264
{struct servent*(*p)(int,const char*) = getservbyport;}
nsz 0ef264
{struct servent*(*p)(void) = getservent;}
nsz 0ef264
{void(*p)(int) = sethostent;}
nsz 0ef264
{void(*p)(int) = setnetent;}
nsz 0ef264
{void(*p)(int) = setprotoent;}
nsz 0ef264
{void(*p)(int) = setservent;}
nsz d7c151
}
nsz f81126
#include <sys/socket.h>
nsz f81126
static void g()
nsz f81126
{
nsz 0ef264
{void(*p)(struct addrinfo*) = freeaddrinfo;}
nsz 0ef264
{int(*p)(const char*restrict,const char*restrict,const struct addrinfo*restrict,struct addrinfo**restrict) = getaddrinfo;}
nsz 0ef264
{int(*p)(const struct sockaddr*restrict,socklen_t,char*restrict,socklen_t,char*restrict,socklen_t,int) = getnameinfo;}
nsz f81126
}