* resolv/Makefile (generated): New.
[glibc.git] / include / resolv.h
blob04377530350dda5275879a6ab619a6b4c23e4b02
1 #ifndef _RESOLV_H_
3 #define RES_SET_H_ERRNO(r,x) \
4 do \
5 { \
6 (r)->res_h_errno = x; \
7 __set_h_errno(x); \
8 } \
9 while (0)
11 #include <resolv/resolv.h>
13 #ifdef _RESOLV_H_
15 # ifdef _LIBC_REENTRANT
16 # include <tls.h>
17 # if USE___THREAD
18 # undef _res
19 # ifndef NOT_IN_libc
20 # define __resp __libc_resp
21 # endif
22 # define _res (*__resp)
23 extern __thread struct __res_state *__resp attribute_tls_model_ie;
24 # endif
25 # else
26 # ifndef __BIND_NOSTATIC
27 # undef _res
28 extern struct __res_state _res;
29 # endif
30 # endif
32 /* Now define the internal interfaces. */
33 extern int __res_vinit (res_state, int);
34 extern void _sethtent (int);
35 extern void _endhtent (void);
36 extern struct hostent *_gethtent (void);
37 extern struct hostent *_gethtbyname (const char *__name);
38 extern struct hostent *_gethtbyname2 (const char *__name, int __af);
39 struct hostent *_gethtbyaddr (const char *addr, size_t __len, int __af);
40 extern u_int32_t _getlong (const u_char *__src);
41 extern u_int16_t _getshort (const u_char *__src);
42 extern void res_pquery (const res_state __statp, const u_char *__msg,
43 int __len, FILE *__file);
44 extern void res_send_setqhook (res_send_qhook __hook);
45 extern void res_send_setrhook (res_send_rhook __hook);
46 extern int res_ourserver_p (const res_state __statp,
47 const struct sockaddr_in6 *__inp);
48 libc_hidden_proto (__res_ninit)
49 libc_hidden_proto (__res_nclose)
50 libc_hidden_proto (__res_randomid)
51 libc_hidden_proto (__res_state)
53 int __libc_res_nquery (res_state, const char *, int, int, u_char *, int,
54 u_char **);
55 int __libc_res_nsearch (res_state, const char *, int, int, u_char *, int,
56 u_char **);
57 int __libc_res_nsend (res_state, const u_char *, int, u_char *, int,
58 u_char **)
59 attribute_hidden;
61 #endif
63 #endif