1*11038SRao.Shoaib@Sun.COM #ifndef _RESOLV_MT_H 2*11038SRao.Shoaib@Sun.COM #define _RESOLV_MT_H 30Sstevel@tonic-gate 40Sstevel@tonic-gate #include <sys/types.h> 50Sstevel@tonic-gate #include <netinet/in.h> 60Sstevel@tonic-gate #include <arpa/nameser.h> 70Sstevel@tonic-gate #include <resolv.h> 80Sstevel@tonic-gate 90Sstevel@tonic-gate /* Access functions for the libresolv private interface */ 100Sstevel@tonic-gate 11*11038SRao.Shoaib@Sun.COM int __res_enable_mt(void); 12*11038SRao.Shoaib@Sun.COM int __res_disable_mt(void); 130Sstevel@tonic-gate 140Sstevel@tonic-gate /* Per-thread context */ 150Sstevel@tonic-gate 160Sstevel@tonic-gate typedef struct { 17*11038SRao.Shoaib@Sun.COM int no_hosts_fallback_private; 18*11038SRao.Shoaib@Sun.COM int retry_save; 19*11038SRao.Shoaib@Sun.COM int retry_private; 20*11038SRao.Shoaib@Sun.COM char inet_nsap_ntoa_tmpbuf[255*3]; 21*11038SRao.Shoaib@Sun.COM char sym_ntos_unname[20]; 22*11038SRao.Shoaib@Sun.COM char sym_ntop_unname[20]; 23*11038SRao.Shoaib@Sun.COM char p_option_nbuf[40]; 24*11038SRao.Shoaib@Sun.COM char p_time_nbuf[40]; 25*11038SRao.Shoaib@Sun.COM char precsize_ntoa_retbuf[sizeof "90000000.00"]; 26*11038SRao.Shoaib@Sun.COM char loc_ntoa_tmpbuf[sizeof 270Sstevel@tonic-gate "1000 60 60.000 N 1000 60 60.000 W -12345678.00m 90000000.00m 90000000.00m 90000000.00m"]; 28*11038SRao.Shoaib@Sun.COM char p_secstodate_output[15]; 290Sstevel@tonic-gate } mtctxres_t; 300Sstevel@tonic-gate 310Sstevel@tonic-gate /* Thread-specific data (TSD) */ 320Sstevel@tonic-gate 33*11038SRao.Shoaib@Sun.COM mtctxres_t *___mtctxres(void); 34*11038SRao.Shoaib@Sun.COM #define mtctxres (___mtctxres()) 350Sstevel@tonic-gate 360Sstevel@tonic-gate /* Various static data that should be TSD */ 370Sstevel@tonic-gate 38*11038SRao.Shoaib@Sun.COM #define sym_ntos_unname (mtctxres->sym_ntos_unname) 39*11038SRao.Shoaib@Sun.COM #define sym_ntop_unname (mtctxres->sym_ntop_unname) 40*11038SRao.Shoaib@Sun.COM #define inet_nsap_ntoa_tmpbuf (mtctxres->inet_nsap_ntoa_tmpbuf) 41*11038SRao.Shoaib@Sun.COM #define p_option_nbuf (mtctxres->p_option_nbuf) 42*11038SRao.Shoaib@Sun.COM #define p_time_nbuf (mtctxres->p_time_nbuf) 43*11038SRao.Shoaib@Sun.COM #define precsize_ntoa_retbuf (mtctxres->precsize_ntoa_retbuf) 44*11038SRao.Shoaib@Sun.COM #define loc_ntoa_tmpbuf (mtctxres->loc_ntoa_tmpbuf) 45*11038SRao.Shoaib@Sun.COM #define p_secstodate_output (mtctxres->p_secstodate_output) 460Sstevel@tonic-gate 470Sstevel@tonic-gate #endif /* _RESOLV_MT_H */ 48