_res
if ((_res.options & RES_INIT) == 0 && res_init() == -1)
if (!_res.retrans)
_res.retrans = RES_TIMEOUT;
if (!_res.retry)
_res.retry = 4;
_res.retry = RES_DFLRETRY;
if (!(_res.options & RES_INIT))
_res.options = RES_DEFAULT;
if (!_res.id)
_res.id = res_randomid();
return (__res_vinit(&_res, 1));
if ((_res.options & RES_INIT) == 0U && res_init() == -1)
res_pquery(&_res, msg, len, file);
if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (res_nmkquery(&_res, op, dname, class, type,
if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (res_nmkupdate(&_res, rrecp_in, buf, buflen));
if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (res_nquery(&_res, name, class, type, answer, anslen));
_res.qhook = hook;
_res.rhook = hook;
return (res_ourserver_p(&_res, inp));
if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
return (res_nsend(&_res, buf, buflen, ans, anssiz));
if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
return (res_nsendsigned(&_res, buf, buflen, key, ans, anssiz));
res_nclose(&_res);
if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (res_nupdate(&_res, rrecp_in, NULL));
if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (res_nsearch(&_res, name, class, type, answer, anslen));
if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (res_nquerydomain(&_res, name, domain,
return (res_nopt(&_res, n0, buf, buflen, anslen));
return (res_hostalias(&_res, name, abuf, sizeof abuf));
if (!*_res.defdname)
len_domain = strlen(_res.defdname);
!strcasecmp(hostname + len_host - len_domain, _res.defdname) &&
struct __res_state _res
struct __res_state _res;
return (&_res);
return (&_res);
return (&_res);
return (&_res);
_res ^= toeplitz_cache[1][(_faddr >> 8) & 0xff];
_res ^= toeplitz_cache[1][(_faddr >> 24) & 0xff];
return _res;
uint32_t _res;
_res = toeplitz_cache[0][_fport & 0xff];
_res ^= toeplitz_cache[1][(_fport >> 8) & 0xff];
return _res;
uint32_t _res;
_res = toeplitz_cache[0][_faddr & 0xff];
_res ^= toeplitz_cache[0][(_faddr >> 16) & 0xff];
_res ^= toeplitz_cache[0][_laddr & 0xff];
_res ^= toeplitz_cache[0][(_laddr >> 16) & 0xff];
_res ^= toeplitz_cache[0][_fport & 0xff];
_res ^= toeplitz_cache[0][_lport & 0xff];
_res ^= toeplitz_cache[1][(_faddr >> 8) & 0xff];
_res ^= toeplitz_cache[1][(_faddr >> 24) & 0xff];
_res ^= toeplitz_cache[1][(_laddr >> 8) & 0xff];
_res ^= toeplitz_cache[1][(_laddr >> 24) & 0xff];
_res ^= toeplitz_cache[1][(_fport >> 8) & 0xff];
_res ^= toeplitz_cache[1][(_lport >> 8) & 0xff];
return _res;
uint32_t _res;
_res = toeplitz_cache[0][_faddr & 0xff];
_res ^= toeplitz_cache[0][(_faddr >> 16) & 0xff];
_res ^= toeplitz_cache[0][_laddr & 0xff];
_res ^= toeplitz_cache[0][(_laddr >> 16) & 0xff];
_res ^= toeplitz_cache[1][(_faddr >> 8) & 0xff];
_res ^= toeplitz_cache[1][(_faddr >> 24) & 0xff];
_res ^= toeplitz_cache[1][(_laddr >> 8) & 0xff];
_res ^= toeplitz_cache[1][(_laddr >> 24) & 0xff];
return _res;
uint32_t _res;
_res = toeplitz_cache[0][_faddr & 0xff];
_res ^= toeplitz_cache[0][(_faddr >> 16) & 0xff];
if (!(_res.options & RES_INIT))
_res.retrans = 2; /* resolver timeout to 2 seconds per try */
_res.retry = 1; /* only try once.. */
if (!(_res.options & RES_INIT) && res_init() == -1) {
for (ns = 0; ns < _res.nscount; ns++) {
(struct sockaddr *)&_res.nsaddr_list[ns],
q->domain = _res.dnsrch;