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