1 #ifndef _RESOLV_STATIC_H
2 #define _RESOLV_STATIC_H
6 /* this structure contains all the variables that were declared
7 * 'static' in the original NetBSD resolver code.
9 * this caused vast amounts of crashes and memory corruptions
10 * when the resolver was being used by multiple threads.
12 * (note: the OpenBSD/FreeBSD resolver has similar 'issues')
18 typedef struct res_static
{
19 char* h_addr_ptrs
[MAXADDRS
+ 1];
20 char* host_aliases
[MAXALIASES
];
22 u_int32_t host_addr
[16 / sizeof(u_int32_t
)]; /* IPv4 or IPv6 */
25 const char* servent_ptr
;
26 struct servent servent
;
30 extern res_static
__res_get_static(void);
32 #endif /* _RESOLV_STATIC_H */