1#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
2optional-type in_port_t
3optional-type in_addr_t
4
5type {struct hostent}
6
7element {struct hostent} {char*} h_name
8element {struct hostent} {char**} h_aliases
9element {struct hostent} int h_addrtype
10element {struct hostent} int h_length
11element {struct hostent} {char**} h_addr_list
12
13type {struct netent}
14
15element {struct netent} {char*} n_name
16element {struct netent} {char**} n_aliases
17element {struct netent} int n_addrtype
18// Bug 21260: n_net has wrong type.
19xfail[alpha-linux]-element {struct netent} uint32_t n_net
20
21type uint32_t
22
23type {struct protoent}
24
25element {struct protoent} {char*} p_name
26element {struct protoent} {char**} p_aliases
27element {struct protoent} int p_proto
28
29type {struct servent}
30
31element {struct servent} {char*} s_name
32element {struct servent} {char**} s_aliases
33element {struct servent} int s_port
34element {struct servent} {char*} s_proto
35
36macro IPPORT_RESERVED
37
38#if !defined XOPEN2K8 && !defined POSIX2008
39// variable int h_errno
40allow h_errno
41
42macro HOST_NOT_FOUND
43macro NO_DATA
44macro NO_RECOVERY
45macro TRY_AGAIN
46#endif
47
48#if !defined XPG42 && !defined UNIX98
49type {struct addrinfo}
50element {struct addrinfo} int ai_flags
51element {struct addrinfo} int ai_family
52element {struct addrinfo} int ai_socktype
53element {struct addrinfo} int ai_protocol
54element {struct addrinfo} socklen_t ai_addrlen
55element {struct addrinfo} {struct sockaddr*} ai_addr
56element {struct addrinfo} {char*} ai_canonname
57element {struct addrinfo} {struct addrinfo*} ai_next
58
59macro AI_PASSIVE
60macro AI_CANONNAME
61macro AI_NUMERICHOST
62macro AI_V4MAPPED
63macro AI_ALL
64macro AI_ADDRCONFIG
65macro AI_NUMERICSERV
66
67macro NI_NOFQDN
68macro NI_NUMERICHOST
69macro NI_NAMEREQD
70macro NI_NUMERICSERV
71macro NI_DGRAM
72
73macro EAI_AGAIN
74macro EAI_BADFLAGS
75macro EAI_FAIL
76macro EAI_FAMILY
77macro EAI_MEMORY
78macro EAI_NONAME
79macro EAI_SERVICE
80macro EAI_SOCKTYPE
81macro EAI_SYSTEM
82macro EAI_OVERFLOW
83#endif
84
85function void endhostent (void)
86function void endnetent (void)
87function void endprotoent (void)
88function void endservent (void)
89#if !defined XPG42 && !defined UNIX98
90function void freeaddrinfo (struct addrinfo*)
91function {const char*} gai_strerror (int)
92function int getaddrinfo (const char*, const char*, const struct addrinfo*, struct addrinfo**)
93#endif
94function {struct hostent*} gethostbyaddr (const void*, socklen_t, int)
95function {struct hostent*} gethostbyname (const char*)
96function {struct hostent*} gethostent (void)
97#if !defined XPG42 && !defined UNIX98
98function int getnameinfo (const struct sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, int)
99#endif
100function {struct netent*} getnetbyaddr (uint32_t, int)
101function {struct netent*} getnetbyname (const char*)
102function {struct netent*} getnetent (void)
103function {struct protoent*} getprotobyname (const char *)
104function {struct protoent*} getprotobynumber (int)
105function {struct protoent*} getprotoent (void)
106function {struct servent*} getservbyname (const char*, const char*)
107function {struct servent*} getservbyport (int, const char*)
108function {struct servent*} getservent (void)
109function void sethostent (int)
110function void setnetent (int)
111function void setprotoent (int)
112function void setservent (int)
113
114type socklen_t
115
116allow-header netinet/in.h
117allow-header inttypes.h
118#endif
119