/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
*/
#ifndef res_private_h
#define res_private_h
struct __res_state_ext {
union res_sockaddr_union nsaddrs[MAXNS];
struct sort_list {
int af;
union {
struct in_addr ina;
struct in6_addr in6a;
} addr, mask;
} sort_list[MAXRESOLVSORT];
char nsuffix[64];
char nsuffix2[64];
#ifdef SUNW_SUBSECOND_TIME
struct timespec retrans;
#endif /* SUNW_SUBSECOND_TIME */
#ifdef SUNW_DEFER_ON_FAIL
struct timespec defer_on_fail;
struct timespec nsdefer[MAXNS];
#endif /* SUNW_DEFER_ON_FAIL */
};
#ifdef SUNW_SUBSECOND_TIME
/* minimum transmit time, in nanoseconds (10 million ns == 0.01 second) */
#define RES_MINRETRANS 10000000
/* maximum time interval, in seconds (one year) */
#define RES_MAXSECONDS 31536000
#endif /* SUNW_SUBSECOND_TIME */
extern int
res_ourserver_p(const res_state statp, const struct sockaddr *sa);
#ifdef SUNW_DEFER_ON_FAIL
typedef enum res_defer_state {
RES_DEFER_OFFLINE, /* ns is not responsive to queries */
RES_DEFER_ONLINE /* ns is responsive to queries */
} res_defer_state_t;
extern void res_set_defer_state(res_state statp, int ns,
res_defer_state_t defer_state);
extern void res_get_defer_state(res_state statp, int ns,
res_defer_state_t *defer_state);
#endif /* SUNW_DEFER_ON_FAIL */
#endif
/*! \file */