* sysdeps/m68k/fpu/s_finite.c: Add internal alias.
[glibc.git] / include / netdb.h
blob0a97c01a3e7c1a490839425b015b3e51699e576f
1 #ifndef _NETDB_H
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) attribute_hidden;
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) attribute_hidden;
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 attribute_hidden;
84 extern int __old_getservent_r (struct servent *__restrict __result_buf,
85 char *__restrict __buf, size_t __buflen,
86 struct servent **__restrict __result);
88 extern int __getservbyname_r (__const char *__restrict __name,
89 __const char *__restrict __proto,
90 struct servent *__restrict __result_buf,
91 char *__restrict __buf, size_t __buflen,
92 struct servent **__restrict __result);
93 extern int __old_getservbyname_r (__const char *__restrict __name,
94 __const char *__restrict __proto,
95 struct servent *__restrict __result_buf,
96 char *__restrict __buf, size_t __buflen,
97 struct servent **__restrict __result);
99 extern int __getservbyport_r (int __port,
100 __const char *__restrict __proto,
101 struct servent *__restrict __result_buf,
102 char *__restrict __buf, size_t __buflen,
103 struct servent **__restrict __result);
104 extern int __old_getservbyport_r (int __port,
105 __const char *__restrict __proto,
106 struct servent *__restrict __result_buf,
107 char *__restrict __buf, size_t __buflen,
108 struct servent **__restrict __result);
110 extern int __getprotoent_r (struct protoent *__restrict __result_buf,
111 char *__restrict __buf, size_t __buflen,
112 struct protoent **__restrict __result)
113 attribute_hidden;
114 extern int __old_getprotoent_r (struct protoent *__restrict __result_buf,
115 char *__restrict __buf, size_t __buflen,
116 struct protoent **__restrict __result);
118 extern int __getprotobyname_r (__const char *__restrict __name,
119 struct protoent *__restrict __result_buf,
120 char *__restrict __buf, size_t __buflen,
121 struct protoent **__restrict __result);
122 extern int __old_getprotobyname_r (__const char *__restrict __name,
123 struct protoent *__restrict __result_buf,
124 char *__restrict __buf, size_t __buflen,
125 struct protoent **__restrict __result);
127 extern int __getprotobynumber_r (int __proto,
128 struct protoent *__restrict __res_buf,
129 char *__restrict __buf, size_t __buflen,
130 struct protoent **__restrict __result);
131 extern int __old_getprotobynumber_r (int __proto,
132 struct protoent *__restrict __res_buf,
133 char *__restrict __buf, size_t __buflen,
134 struct protoent **__restrict __result);
136 extern int __getnetgrent_r (char **__restrict __hostp,
137 char **__restrict __userp,
138 char **__restrict __domainp,
139 char *__restrict __buffer, size_t __buflen);
141 extern int ruserpass (const char *host, const char **aname,
142 const char **apass);
145 /* The following declarations and definitions have been removed from
146 the public header since we don't want people to use them. */
148 #define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */
149 #define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */
150 #define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
151 returned address type. */
152 #define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG)
154 #include <inet/netgroup.h>
156 struct parser_data;
157 extern int _nss_files_parse_protoent (char *line, struct protoent *result,
158 struct parser_data *data,
159 size_t datalen, int *errnop);
160 extern int _nss_files_parse_servent (char *line, struct servent *result,
161 struct parser_data *data,
162 size_t datalen, int *errnop);
163 extern int _nss_files_parse_netent (char *line, struct netent *result,
164 struct parser_data *data,
165 size_t datalen, int *errnop);
166 extern enum nss_status _nss_netgroup_parseline (char **cursor,
167 struct __netgrent *result,
168 char *buffer, size_t buflen,
169 int *errnop);
172 #define DECLARE_NSS_PROTOTYPES(service) \
173 extern enum nss_status _nss_ ## service ## _setprotoent (int); \
174 extern enum nss_status _nss_ ## service ## _endprotoent (void); \
175 extern enum nss_status _nss_ ## service ## _getprotoent_r \
176 (struct protoent *proto, char *buffer, size_t buflen, \
177 int *errnop); \
178 extern enum nss_status _nss_ ## service ## _getprotobyname_r \
179 (const char *name, struct protoent *proto, \
180 char *buffer, size_t buflen, int *errnop); \
181 extern enum nss_status _nss_ ## service ## _getprotobynumber_r \
182 (int number, struct protoent *proto, \
183 char *buffer, size_t buflen, int *errnop); \
184 extern enum nss_status _nss_ ## service ## _sethostent (int); \
185 extern enum nss_status _nss_ ## service ## _endhostent (void); \
186 extern enum nss_status _nss_ ## service ## _gethostent_r \
187 (struct hostent *host, char *buffer, size_t buflen, \
188 int *errnop, int *h_errnop); \
189 extern enum nss_status _nss_ ## service ## _gethostbyname2_r \
190 (const char *name, int af, struct hostent *host, \
191 char *buffer, size_t buflen, int *errnop, \
192 int *h_errnop); \
193 extern enum nss_status _nss_ ## service ## _gethostbyname_r \
194 (const char *name, struct hostent *host, char *buffer, \
195 size_t buflen, int *errnop, int *h_errnop); \
196 extern enum nss_status _nss_ ## service ## _gethostbyaddr_r \
197 (const void *addr, socklen_t addrlen, int af, \
198 struct hostent *host, char *buffer, size_t buflen, \
199 int *errnop, int *h_errnop); \
200 extern enum nss_status _nss_ ## service ## _setservent (int); \
201 extern enum nss_status _nss_ ## service ## _endservent (void); \
202 extern enum nss_status _nss_ ## service ## _getservent_r \
203 (struct servent *serv, char *buffer, size_t buflen, \
204 int *errnop); \
205 extern enum nss_status _nss_ ## service ## _getservbyname_r \
206 (const char *name, const char *protocol, \
207 struct servent *serv, char *buffer, size_t buflen, \
208 int *errnop); \
209 extern enum nss_status _nss_ ## service ## _getservbyport_r \
210 (int port, const char *protocol, struct servent *serv, \
211 char *buffer, size_t buflen, int *errnop); \
212 extern enum nss_status _nss_ ## service ## _setnetgrent \
213 (const char *group, struct __netgrent *result); \
214 extern enum nss_status _nss_ ## service ## _endnetgrent \
215 (struct __netgrent *result); \
216 extern enum nss_status _nss_ ## service ## _getnetgrent_r \
217 (struct __netgrent *result, char *buffer, \
218 size_t buflen, int *errnop); \
219 extern enum nss_status _nss_ ## service ## _setnetent (int stayopen); \
220 extern enum nss_status _nss_ ## service ## _endnetent (void); \
221 extern enum nss_status _nss_ ## service ## _getnetent_r \
222 (struct netent *net, char *buffer, size_t buflen, \
223 int *errnop, int *herrnop); \
224 extern enum nss_status _nss_ ## service ## _getnetbyname_r \
225 (const char *name, struct netent *net, char *buffer, \
226 size_t buflen, int *errnop, int *herrnop); \
227 extern enum nss_status _nss_ ## service ## _getnetbyaddr_r \
228 (uint32_t addr, int type, struct netent *net, \
229 char *buffer, size_t buflen, int *errnop, \
230 int *herrnop);
232 DECLARE_NSS_PROTOTYPES (compat)
233 DECLARE_NSS_PROTOTYPES (dns)
234 DECLARE_NSS_PROTOTYPES (files)
235 DECLARE_NSS_PROTOTYPES (hesiod)
236 DECLARE_NSS_PROTOTYPES (nis)
237 DECLARE_NSS_PROTOTYPES (nisplus)
239 #undef DECLARE_NSS_PROTOTYPES
241 #endif /* !_NETDB_H */