3 #define RES_SET_H_ERRNO(r,x) \
6 (r)->res_h_errno = x; \
11 #include <resolv/resolv.h>
15 # ifdef _LIBC_REENTRANT
20 # define _res __libc_res
22 extern __thread
struct __res_state _res attribute_tls_model_ie
;
25 # ifndef __BIND_NOSTATIC
27 extern struct __res_state _res
;
31 /* Now define the internal interfaces. */
32 extern int __res_vinit (res_state
, int);
33 extern void _sethtent (int);
34 extern void _endhtent (void);
35 extern struct hostent
*_gethtent (void);
36 extern struct hostent
*_gethtbyname (const char *__name
);
37 extern struct hostent
*_gethtbyname2 (const char *__name
, int __af
);
38 struct hostent
*_gethtbyaddr (const char *addr
, size_t __len
, int __af
);
39 extern u_int32_t
_getlong (const u_char
*__src
);
40 extern u_int16_t
_getshort (const u_char
*__src
);
41 extern void res_pquery (const res_state __statp
, const u_char
*__msg
,
42 int __len
, FILE *__file
);
43 extern void res_send_setqhook (res_send_qhook __hook
);
44 extern void res_send_setrhook (res_send_rhook __hook
);
45 extern int res_ourserver_p (const res_state __statp
,
46 const struct sockaddr_in6
*__inp
);
47 libc_hidden_proto (__res_ninit
)
48 libc_hidden_proto (__res_randomid
)
50 int __libc_res_nquery (res_state
, const char *, int, int, u_char
*, int,
52 int __libc_res_nsearch (res_state
, const char *, int, int, u_char
*, int,
54 int __libc_res_nsend (res_state
, const u_char
*, int, u_char
*, int,