resolv_mt.h revision 156952
1156952Sume#ifndef _RESOLV_MT_H 2156952Sume#define _RESOLV_MT_H 3156952Sume 4156952Sume#include <sys/types.h> 5156952Sume#include <netinet/in.h> 6156952Sume#include <arpa/nameser.h> 7156952Sume#include <resolv.h> 8156952Sume 9156952Sume/* Access functions for the libresolv private interface */ 10156952Sume 11156952Sumeint __res_enable_mt(void); 12156952Sumeint __res_disable_mt(void); 13156952Sume 14156952Sume/* Per-thread context */ 15156952Sume 16156952Sumetypedef struct { 17156952Sumeint no_hosts_fallback_private; 18156952Sumeint retry_save; 19156952Sumeint retry_private; 20156952Sumechar inet_nsap_ntoa_tmpbuf[255*3]; 21156952Sumechar sym_ntos_unname[20]; 22156952Sumechar sym_ntop_unname[20]; 23156952Sumechar p_option_nbuf[40]; 24156952Sumechar p_time_nbuf[40]; 25156952Sumechar precsize_ntoa_retbuf[sizeof "90000000.00"]; 26156952Sumechar loc_ntoa_tmpbuf[sizeof 27156952Sume"1000 60 60.000 N 1000 60 60.000 W -12345678.00m 90000000.00m 90000000.00m 90000000.00m"]; 28156952Sumechar p_secstodate_output[15]; 29156952Sume} mtctxres_t; 30156952Sume 31156952Sume/* Thread-specific data (TSD) */ 32156952Sume 33156952Sumemtctxres_t *___mtctxres(void); 34156952Sume#define mtctxres (___mtctxres()) 35156952Sume 36156952Sume/* Various static data that should be TSD */ 37156952Sume 38156952Sume#define sym_ntos_unname (mtctxres->sym_ntos_unname) 39156952Sume#define sym_ntop_unname (mtctxres->sym_ntop_unname) 40156952Sume#define inet_nsap_ntoa_tmpbuf (mtctxres->inet_nsap_ntoa_tmpbuf) 41156952Sume#define p_option_nbuf (mtctxres->p_option_nbuf) 42156952Sume#define p_time_nbuf (mtctxres->p_time_nbuf) 43156952Sume#define precsize_ntoa_retbuf (mtctxres->precsize_ntoa_retbuf) 44156952Sume#define loc_ntoa_tmpbuf (mtctxres->loc_ntoa_tmpbuf) 45156952Sume#define p_secstodate_output (mtctxres->p_secstodate_output) 46156952Sume 47156952Sume#endif /* _RESOLV_MT_H */ 48