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