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