1 1.1.1.2.4.2 wrstuden /* $NetBSD: resolv_mt.h,v 1.1.1.2.4.2 2007/06/03 17:25:52 wrstuden Exp $ */ 2 1.1.1.2.4.2 wrstuden 3 1.1.1.2.4.2 wrstuden #ifndef _RESOLV_MT_H 4 1.1.1.2.4.2 wrstuden #define _RESOLV_MT_H 5 1.1.1.2.4.2 wrstuden 6 1.1.1.2.4.2 wrstuden #include <sys/types.h> 7 1.1.1.2.4.2 wrstuden #include <netinet/in.h> 8 1.1.1.2.4.2 wrstuden #include <arpa/nameser.h> 9 1.1.1.2.4.2 wrstuden #include <resolv.h> 10 1.1.1.2.4.2 wrstuden 11 1.1.1.2.4.2 wrstuden /* Access functions for the libresolv private interface */ 12 1.1.1.2.4.2 wrstuden 13 1.1.1.2.4.2 wrstuden int __res_enable_mt(void); 14 1.1.1.2.4.2 wrstuden int __res_disable_mt(void); 15 1.1.1.2.4.2 wrstuden 16 1.1.1.2.4.2 wrstuden /* Per-thread context */ 17 1.1.1.2.4.2 wrstuden 18 1.1.1.2.4.2 wrstuden typedef struct { 19 1.1.1.2.4.2 wrstuden int no_hosts_fallback_private; 20 1.1.1.2.4.2 wrstuden int retry_save; 21 1.1.1.2.4.2 wrstuden int retry_private; 22 1.1.1.2.4.2 wrstuden char inet_nsap_ntoa_tmpbuf[255*3]; 23 1.1.1.2.4.2 wrstuden char sym_ntos_unname[20]; 24 1.1.1.2.4.2 wrstuden char sym_ntop_unname[20]; 25 1.1.1.2.4.2 wrstuden char p_option_nbuf[40]; 26 1.1.1.2.4.2 wrstuden char p_time_nbuf[40]; 27 1.1.1.2.4.2 wrstuden char precsize_ntoa_retbuf[sizeof "90000000.00"]; 28 1.1.1.2.4.2 wrstuden char loc_ntoa_tmpbuf[sizeof 29 1.1.1.2.4.2 wrstuden "1000 60 60.000 N 1000 60 60.000 W -12345678.00m 90000000.00m 90000000.00m 90000000.00m"]; 30 1.1.1.2.4.2 wrstuden char p_secstodate_output[15]; 31 1.1.1.2.4.2 wrstuden } mtctxres_t; 32 1.1.1.2.4.2 wrstuden 33 1.1.1.2.4.2 wrstuden /* Thread-specific data (TSD) */ 34 1.1.1.2.4.2 wrstuden 35 1.1.1.2.4.2 wrstuden mtctxres_t *___mtctxres(void); 36 1.1.1.2.4.2 wrstuden #define mtctxres (___mtctxres()) 37 1.1.1.2.4.2 wrstuden 38 1.1.1.2.4.2 wrstuden /* Various static data that should be TSD */ 39 1.1.1.2.4.2 wrstuden 40 1.1.1.2.4.2 wrstuden #define sym_ntos_unname (mtctxres->sym_ntos_unname) 41 1.1.1.2.4.2 wrstuden #define sym_ntop_unname (mtctxres->sym_ntop_unname) 42 1.1.1.2.4.2 wrstuden #define inet_nsap_ntoa_tmpbuf (mtctxres->inet_nsap_ntoa_tmpbuf) 43 1.1.1.2.4.2 wrstuden #define p_option_nbuf (mtctxres->p_option_nbuf) 44 1.1.1.2.4.2 wrstuden #define p_time_nbuf (mtctxres->p_time_nbuf) 45 1.1.1.2.4.2 wrstuden #define precsize_ntoa_retbuf (mtctxres->precsize_ntoa_retbuf) 46 1.1.1.2.4.2 wrstuden #define loc_ntoa_tmpbuf (mtctxres->loc_ntoa_tmpbuf) 47 1.1.1.2.4.2 wrstuden #define p_secstodate_output (mtctxres->p_secstodate_output) 48 1.1.1.2.4.2 wrstuden 49 1.1.1.2.4.2 wrstuden #endif /* _RESOLV_MT_H */ 50