2 #include <resolv/netdb.h>
4 /* Document internal interfaces. */
5 extern int __gethostent_r (struct hostent *__restrict __result_buf,
6 char *__restrict __buf, size_t __buflen,
7 struct hostent **__restrict __result,
8 int *__restrict __h_errnop);
9 extern int __old_gethostent_r (struct hostent *__restrict __result_buf,
10 char *__restrict __buf, size_t __buflen,
11 struct hostent **__restrict __result,
12 int *__restrict __h_errnop);
14 extern int __gethostbyaddr_r (__const void *__restrict __addr,
15 socklen_t __len, int __type,
16 struct hostent *__restrict __result_buf,
17 char *__restrict __buf, size_t __buflen,
18 struct hostent **__restrict __result,
19 int *__restrict __h_errnop);
20 extern int __old_gethostbyaddr_r (__const void *__restrict __addr,
21 socklen_t __len, int __type,
22 struct hostent *__restrict __result_buf,
23 char *__restrict __buf, size_t __buflen,
24 struct hostent **__restrict __result,
25 int *__restrict __h_errnop);
27 extern int __gethostbyname_r (__const char *__restrict __name,
28 struct hostent *__restrict __result_buf,
29 char *__restrict __buf, size_t __buflen,
30 struct hostent **__restrict __result,
31 int *__restrict __h_errnop);
32 extern int __old_gethostbyname_r (__const char *__restrict __name,
33 struct hostent *__restrict __result_buf,
34 char *__restrict __buf, size_t __buflen,
35 struct hostent **__restrict __result,
36 int *__restrict __h_errnop);
38 extern int __gethostbyname2_r (__const char *__restrict __name, int __af,
39 struct hostent *__restrict __result_buf,
40 char *__restrict __buf, size_t __buflen,
41 struct hostent **__restrict __result,
42 int *__restrict __h_errnop);
43 extern int __old_gethostbyname2_r (__const char *__restrict __name, int __af,
44 struct hostent *__restrict __result_buf,
45 char *__restrict __buf, size_t __buflen,
46 struct hostent **__restrict __result,
47 int *__restrict __h_errnop);
49 extern int __getnetent_r (struct netent *__restrict __result_buf,
50 char *__restrict __buf, size_t __buflen,
51 struct netent **__restrict __result,
52 int *__restrict __h_errnop);
53 extern int __old_getnetent_r (struct netent *__restrict __result_buf,
54 char *__restrict __buf, size_t __buflen,
55 struct netent **__restrict __result,
56 int *__restrict __h_errnop);
58 extern int __getnetbyaddr_r (uint32_t __net, int __type,
59 struct netent *__restrict __result_buf,
60 char *__restrict __buf, size_t __buflen,
61 struct netent **__restrict __result,
62 int *__restrict __h_errnop);
63 extern int __old_getnetbyaddr_r (uint32_t __net, int __type,
64 struct netent *__restrict __result_buf,
65 char *__restrict __buf, size_t __buflen,
66 struct netent **__restrict __result,
67 int *__restrict __h_errnop);
69 extern int __getnetbyname_r (__const char *__restrict __name,
70 struct netent *__restrict __result_buf,
71 char *__restrict __buf, size_t __buflen,
72 struct netent **__restrict __result,
73 int *__restrict __h_errnop);
74 extern int __old_getnetbyname_r (__const char *__restrict __name,
75 struct netent *__restrict __result_buf,
76 char *__restrict __buf, size_t __buflen,
77 struct netent **__restrict __result,
78 int *__restrict __h_errnop);
80 extern int __getservent_r (struct servent *__restrict __result_buf,
81 char *__restrict __buf, size_t __buflen,
82 struct servent **__restrict __result);
83 extern int __old_getservent_r (struct servent *__restrict __result_buf,
84 char *__restrict __buf, size_t __buflen,
85 struct servent **__restrict __result);
87 extern int __getservbyname_r (__const char *__restrict __name,
88 __const char *__restrict __proto,
89 struct servent *__restrict __result_buf,
90 char *__restrict __buf, size_t __buflen,
91 struct servent **__restrict __result);
92 extern int __old_getservbyname_r (__const char *__restrict __name,
93 __const char *__restrict __proto,
94 struct servent *__restrict __result_buf,
95 char *__restrict __buf, size_t __buflen,
96 struct servent **__restrict __result);
98 extern int __getservbyport_r (int __port,
99 __const char *__restrict __proto,
100 struct servent *__restrict __result_buf,
101 char *__restrict __buf, size_t __buflen,
102 struct servent **__restrict __result);
103 extern int __old_getservbyport_r (int __port,
104 __const char *__restrict __proto,
105 struct servent *__restrict __result_buf,
106 char *__restrict __buf, size_t __buflen,
107 struct servent **__restrict __result);
109 extern int __getprotoent_r (struct protoent *__restrict __result_buf,
110 char *__restrict __buf, size_t __buflen,
111 struct protoent **__restrict __result);
112 extern int __old_getprotoent_r (struct protoent *__restrict __result_buf,
113 char *__restrict __buf, size_t __buflen,
114 struct protoent **__restrict __result);
116 extern int __getprotobyname_r (__const char *__restrict __name,
117 struct protoent *__restrict __result_buf,
118 char *__restrict __buf, size_t __buflen,
119 struct protoent **__restrict __result);
120 extern int __old_getprotobyname_r (__const char *__restrict __name,
121 struct protoent *__restrict __result_buf,
122 char *__restrict __buf, size_t __buflen,
123 struct protoent **__restrict __result);
125 extern int __getprotobynumber_r (int __proto,
126 struct protoent *__restrict __res_buf,
127 char *__restrict __buf, size_t __buflen,
128 struct protoent **__restrict __result);
129 extern int __old_getprotobynumber_r (int __proto,
130 struct protoent *__restrict __res_buf,
131 char *__restrict __buf, size_t __buflen,
132 struct protoent **__restrict __result);
134 extern int __getnetgrent_r (char **__restrict __hostp,
135 char **__restrict __userp,
136 char **__restrict __domainp,
137 char *__restrict __buffer, size_t __buflen);
139 extern int ruserpass (const char *host, const char **aname,
143 /* The following declarations and definitions have been removed from
144 the public header since we don't want people to use them. */
146 #define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */
147 #define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */
148 #define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
149 returned address type. */
150 #define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG)
152 #endif /* !_NETDB_H */