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