Catalon message catalog for glibc.
[glibc.git] / include / netdb.h
blob929ab9e6a0aa1a20d5a496570d02a3983381a52b
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);
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,
140 const char **apass);
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 #include <inet/netgroup.h>
154 struct parser_data;
155 extern int _nss_files_parse_protoent (char *line, struct protoent *result,
156 struct parser_data *data,
157 size_t datalen, int *errnop);
158 extern int _nss_files_parse_servent (char *line, struct servent *result,
159 struct parser_data *data,
160 size_t datalen, int *errnop);
161 extern int _nss_files_parse_netent (char *line, struct netent *result,
162 struct parser_data *data,
163 size_t datalen, int *errnop);
164 extern enum nss_status _nss_netgroup_parseline (char **cursor,
165 struct __netgrent *result,
166 char *buffer, size_t buflen,
167 int *errnop);
170 #define DECLARE_NSS_PROTOTYPES(service) \
171 extern enum nss_status _nss_ ## service ## _setprotoent (int); \
172 extern enum nss_status _nss_ ## service ## _endprotoent (void); \
173 extern enum nss_status _nss_ ## service ## _getprotoent_r \
174 (struct protoent *proto, char *buffer, size_t buflen, \
175 int *errnop); \
176 extern enum nss_status _nss_ ## service ## _getprotobyname_r \
177 (const char *name, struct protoent *proto, \
178 char *buffer, size_t buflen, int *errnop); \
179 extern enum nss_status _nss_ ## service ## _getprotobynumber_r \
180 (int number, struct protoent *proto, \
181 char *buffer, size_t buflen, int *errnop); \
182 extern enum nss_status _nss_ ## service ## _sethostent (int); \
183 extern enum nss_status _nss_ ## service ## _endhostent (void); \
184 extern enum nss_status _nss_ ## service ## _gethostent_r \
185 (struct hostent *host, char *buffer, size_t buflen, \
186 int *errnop, int *h_errnop); \
187 extern enum nss_status _nss_ ## service ## _gethostbyname2_r \
188 (const char *name, int af, struct hostent *host, \
189 char *buffer, size_t buflen, int *errnop, \
190 int *h_errnop); \
191 extern enum nss_status _nss_ ## service ## _gethostbyname_r \
192 (const char *name, struct hostent *host, char *buffer, \
193 size_t buflen, int *errnop, int *h_errnop); \
194 extern enum nss_status _nss_ ## service ## _gethostbyaddr_r \
195 (const void *addr, socklen_t addrlen, int af, \
196 struct hostent *host, char *buffer, size_t buflen, \
197 int *errnop, int *h_errnop); \
198 extern enum nss_status _nss_ ## service ## _setservent (int); \
199 extern enum nss_status _nss_ ## service ## _endservent (void); \
200 extern enum nss_status _nss_ ## service ## _getservent_r \
201 (struct servent *serv, char *buffer, size_t buflen, \
202 int *errnop); \
203 extern enum nss_status _nss_ ## service ## _getservbyname_r \
204 (const char *name, const char *protocol, \
205 struct servent *serv, char *buffer, size_t buflen, \
206 int *errnop); \
207 extern enum nss_status _nss_ ## service ## _getservbyport_r \
208 (int port, const char *protocol, struct servent *serv, \
209 char *buffer, size_t buflen, int *errnop); \
210 extern enum nss_status _nss_ ## service ## _setnetgrent \
211 (const char *group, struct __netgrent *result); \
212 extern enum nss_status _nss_ ## service ## _endnetgrent \
213 (struct __netgrent *result); \
214 extern enum nss_status _nss_ ## service ## _getnetgrent_r \
215 (struct __netgrent *result, char *buffer, \
216 size_t buflen, int *errnop); \
217 extern enum nss_status _nss_ ## service ## _setnetent (int stayopen); \
218 extern enum nss_status _nss_ ## service ## _endnetent (void); \
219 extern enum nss_status _nss_ ## service ## _getnetent_r \
220 (struct netent *net, char *buffer, size_t buflen, \
221 int *errnop, int *herrnop); \
222 extern enum nss_status _nss_ ## service ## _getnetbyname_r \
223 (const char *name, struct netent *net, char *buffer, \
224 size_t buflen, int *errnop, int *herrnop); \
225 extern enum nss_status _nss_ ## service ## _getnetbyaddr_r \
226 (uint32_t addr, int type, struct netent *net, \
227 char *buffer, size_t buflen, int *errnop, \
228 int *herrnop);
230 DECLARE_NSS_PROTOTYPES (compat)
231 DECLARE_NSS_PROTOTYPES (dns)
232 DECLARE_NSS_PROTOTYPES (files)
233 DECLARE_NSS_PROTOTYPES (hesiod)
234 DECLARE_NSS_PROTOTYPES (nis)
235 DECLARE_NSS_PROTOTYPES (nisplus)
237 #undef DECLARE_NSS_PROTOTYPES
239 #endif /* !_NETDB_H */