1#ifndef _RESOLV_H_
2
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)
10
11#include <stdbool.h>
12#include <resolv/resolv.h>
13
14#ifdef _RESOLV_H_
15
16# if IS_IN (libc)
17# define __resp __libc_resp
18# endif
19extern __thread struct __res_state *__resp attribute_tls_model_ie;
20# undef _res
21# define _res (*__resp)
22
23/* Now define the internal interfaces. */
24extern int __res_vinit (res_state, int);
25extern int __res_maybe_init (res_state, int);
26extern void _sethtent (int);
27extern void _endhtent (void);
28extern struct hostent *_gethtent (void);
29extern struct hostent *_gethtbyname (const char *__name);
30extern struct hostent *_gethtbyname2 (const char *__name, int __af);
31struct hostent *_gethtbyaddr (const char *addr, size_t __len, int __af);
32extern u_int32_t _getlong (const u_char *__src);
33extern u_int16_t _getshort (const u_char *__src);
34extern void res_pquery (const res_state __statp, const u_char *__msg,
35 int __len, FILE *__file);
36extern void res_send_setqhook (res_send_qhook __hook);
37extern void res_send_setrhook (res_send_rhook __hook);
38extern int res_ourserver_p (const res_state __statp,
39 const struct sockaddr_in6 *__inp);
40extern void __res_iclose (res_state statp, bool free_addr);
41extern int __res_nopt(res_state statp, int n0, u_char *buf, int buflen,
42 int anslen);
43libc_hidden_proto (__res_ninit)
44libc_hidden_proto (__res_maybe_init)
45libc_hidden_proto (__res_nclose)
46libc_hidden_proto (__res_iclose)
47libc_hidden_proto (__res_randomid)
48libc_hidden_proto (__res_state)
49
50int __libc_res_nquery (res_state, const char *, int, int, u_char *, int,
51 u_char **, u_char **, int *, int *, int *);
52int __libc_res_nsearch (res_state, const char *, int, int, u_char *, int,
53 u_char **, u_char **, int *, int *, int *);
54int __libc_res_nsend (res_state, const u_char *, int, const u_char *, int,
55 u_char *, int, u_char **, u_char **, int *, int *, int *)
56 attribute_hidden;
57
58libresolv_hidden_proto (_sethtent)
59libresolv_hidden_proto (_gethtent)
60libresolv_hidden_proto (_gethtbyaddr)
61libresolv_hidden_proto (_gethtbyname2)
62libresolv_hidden_proto (__dn_expand)
63libresolv_hidden_proto (__dn_comp)
64libresolv_hidden_proto (__dn_skipname)
65libresolv_hidden_proto (__res_hnok)
66libresolv_hidden_proto (__res_dnok)
67libresolv_hidden_proto (__putlong)
68libresolv_hidden_proto (__putshort)
69libresolv_hidden_proto (__p_cdnname)
70libresolv_hidden_proto (__p_fqnname)
71libresolv_hidden_proto (__p_option)
72libresolv_hidden_proto (__sym_ntos)
73libresolv_hidden_proto (__p_rcode)
74libresolv_hidden_proto (__p_class)
75libresolv_hidden_proto (__p_type)
76libresolv_hidden_proto (__loc_ntoa)
77libresolv_hidden_proto (__fp_nquery)
78libresolv_hidden_proto (__fp_query)
79libresolv_hidden_proto (__hostalias)
80libresolv_hidden_proto (__res_nmkquery)
81libresolv_hidden_proto (__libc_res_nquery)
82libresolv_hidden_proto (__res_nquery)
83libresolv_hidden_proto (__res_nquerydomain)
84libresolv_hidden_proto (__res_hostalias)
85libresolv_hidden_proto (__libc_res_nsearch)
86libresolv_hidden_proto (__res_nsearch)
87libresolv_hidden_proto (__res_nameinquery)
88libresolv_hidden_proto (__res_queriesmatch)
89libresolv_hidden_proto (__res_nsend)
90libresolv_hidden_proto (__b64_ntop)
91libresolv_hidden_proto (__res_nopt)
92libresolv_hidden_proto (__dn_count_labels)
93libresolv_hidden_proto (__p_secstodate)
94
95extern const char *_res_opcodes[];
96libresolv_hidden_proto (_res_opcodes)
97
98#endif
99
100#endif
101