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