api: add monetary.c .. regex.c
[libc-test.git] / src / api / netdb.c
blobc8b223cd64826114166bd13c6a79fb20d821c5e2
1 #include <netdb.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 #define C(n) switch(n){case n:;}
5 static void f()
7 T(uint32_t)
8 T(socklen_t)
9 C(IPPORT_RESERVED)
11 struct hostent x;
12 F(char*, h_name)
13 F(char**, h_aliases)
14 F(int, h_addrtype)
15 F(int, h_length)
16 F(char**, h_addr_list)
19 struct netent x;
20 F(char*, n_name)
21 F(char**, n_aliases)
22 F(int, n_addrtype)
23 F(uint32_t, n_net)
26 struct protoent x;
27 F(char*, p_name)
28 F(char**, p_aliases)
29 F(int, p_proto)
32 struct servent x;
33 F(char*, s_name)
34 F(char**, s_aliases)
35 F(int, s_port)
36 F(char*, s_proto)
39 struct addrinfo x;
40 F(int, ai_flags)
41 F(int, ai_family)
42 F(int, ai_socktype)
43 F(int, ai_protocol)
44 F(socklen_t, ai_addrlen)
45 F(struct sockaddr*, ai_addr)
46 F(char*, ai_canonname)
47 F(struct addrinfo*, ai_next)
49 C(AI_PASSIVE)
50 C(AI_CANONNAME)
51 C(AI_NUMERICHOST)
52 C(AI_NUMERICSERV)
53 C(AI_V4MAPPED)
54 C(AI_ALL)
55 C(AI_ADDRCONFIG)
56 C(NI_NOFQDN)
57 C(NI_NUMERICHOST)
58 C(NI_NAMEREQD)
59 C(NI_NUMERICSERV)
60 C(NI_NUMERICSCOPE)
61 C(NI_DGRAM)
62 C(EAI_AGAIN)
63 C(EAI_BADFLAGS)
64 C(EAI_FAIL)
65 C(EAI_FAMILY)
66 C(EAI_MEMORY)
67 C(EAI_NONAME)
68 C(EAI_SERVICE)
69 C(EAI_SOCKTYPE)
70 C(EAI_SYSTEM)
71 C(EAI_OVERFLOW)
72 void(*p_endhostent)(void) = endhostent;
73 void(*p_endnetent)(void) = endnetent;
74 void(*p_endprotoent)(void) = endprotoent;
75 void(*p_endservent)(void) = endservent;
76 const char*(*p_gai_strerror)(int) = gai_strerror;
77 struct hostent*(*p_gethostent)(void) = gethostent;
78 struct netent*(*p_getnetbyaddr)(uint32_t,int) = getnetbyaddr;
79 struct netent*(*p_getnetbyname)(const char*) = getnetbyname;
80 struct netent*(*p_getnetent)(void) = getnetent;
81 struct protoent*(*p_getprotobyname)(const char*) = getprotobyname;
82 struct protoent*(*p_getprotobynumber)(int) = getprotobynumber;
83 struct protoent*(*p_getprotoent)(void) = getprotoent;
84 struct servent*(*p_getservbyname)(const char*,const char*) = getservbyname;
85 struct servent*(*p_getservbyport)(int,const char*) = getservbyport;
86 struct servent*(*p_getservent)(void) = getservent;
87 void(*p_sethostent)(int) = sethostent;
88 void(*p_setnetent)(int) = setnetent;
89 void(*p_setprotoent)(int) = setprotoent;
90 void(*p_setservent)(int) = setservent;