1*9525b14bSRao Shoaib #ifndef _RESOLV_MT_H
2*9525b14bSRao Shoaib #define _RESOLV_MT_H
37c478bd9Sstevel@tonic-gate 
47c478bd9Sstevel@tonic-gate #include <sys/types.h>
57c478bd9Sstevel@tonic-gate #include <netinet/in.h>
67c478bd9Sstevel@tonic-gate #include <arpa/nameser.h>
77c478bd9Sstevel@tonic-gate #include <resolv.h>
87c478bd9Sstevel@tonic-gate 
97c478bd9Sstevel@tonic-gate /* Access functions for the libresolv private interface */
107c478bd9Sstevel@tonic-gate 
11*9525b14bSRao Shoaib int	__res_enable_mt(void);
12*9525b14bSRao Shoaib int	__res_disable_mt(void);
137c478bd9Sstevel@tonic-gate 
147c478bd9Sstevel@tonic-gate /* Per-thread context */
157c478bd9Sstevel@tonic-gate 
167c478bd9Sstevel@tonic-gate typedef struct {
17*9525b14bSRao Shoaib int	no_hosts_fallback_private;
18*9525b14bSRao Shoaib int	retry_save;
19*9525b14bSRao Shoaib int	retry_private;
20*9525b14bSRao Shoaib char	inet_nsap_ntoa_tmpbuf[255*3];
21*9525b14bSRao Shoaib char	sym_ntos_unname[20];
22*9525b14bSRao Shoaib char	sym_ntop_unname[20];
23*9525b14bSRao Shoaib char	p_option_nbuf[40];
24*9525b14bSRao Shoaib char	p_time_nbuf[40];
25*9525b14bSRao Shoaib char	precsize_ntoa_retbuf[sizeof "90000000.00"];
26*9525b14bSRao Shoaib char	loc_ntoa_tmpbuf[sizeof
277c478bd9Sstevel@tonic-gate "1000 60 60.000 N 1000 60 60.000 W -12345678.00m 90000000.00m 90000000.00m 90000000.00m"];
28*9525b14bSRao Shoaib char	p_secstodate_output[15];
297c478bd9Sstevel@tonic-gate } mtctxres_t;
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate /* Thread-specific data (TSD) */
327c478bd9Sstevel@tonic-gate 
33*9525b14bSRao Shoaib mtctxres_t	*___mtctxres(void);
34*9525b14bSRao Shoaib #define mtctxres	(___mtctxres())
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate /* Various static data that should be TSD */
377c478bd9Sstevel@tonic-gate 
38*9525b14bSRao Shoaib #define sym_ntos_unname		(mtctxres->sym_ntos_unname)
39*9525b14bSRao Shoaib #define sym_ntop_unname		(mtctxres->sym_ntop_unname)
40*9525b14bSRao Shoaib #define inet_nsap_ntoa_tmpbuf	(mtctxres->inet_nsap_ntoa_tmpbuf)
41*9525b14bSRao Shoaib #define p_option_nbuf		(mtctxres->p_option_nbuf)
42*9525b14bSRao Shoaib #define p_time_nbuf		(mtctxres->p_time_nbuf)
43*9525b14bSRao Shoaib #define precsize_ntoa_retbuf	(mtctxres->precsize_ntoa_retbuf)
44*9525b14bSRao Shoaib #define loc_ntoa_tmpbuf		(mtctxres->loc_ntoa_tmpbuf)
45*9525b14bSRao Shoaib #define p_secstodate_output	(mtctxres->p_secstodate_output)
467c478bd9Sstevel@tonic-gate 
477c478bd9Sstevel@tonic-gate #endif /* _RESOLV_MT_H */
48