/*
*/
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
#include <ctype.h>
#include <netdb.h>
#include <resolv.h>
#include <res_update.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "port_after.h"
#ifndef ORIGINAL_ISC_CODE
#endif
const char *_res_opcodes[] = {
"QUERY",
"IQUERY",
"CQUERYM",
"CQUERYU", /*%< experimental */
"NOTIFY", /*%< experimental */
"UPDATE",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"ZONEINIT",
"ZONEREF",
};
#ifdef BIND_UPDATE
const char *_res_sectioncodes[] = {
"ZONE",
"PREREQUISITES",
"UPDATE",
"ADDITIONAL",
};
#endif
#ifndef __BIND_NOSTATIC
# if defined(__BIND_RES_TEXT)
= { RES_TIMEOUT, } /*%< Motorola, et al. */
# endif
;
#ifdef ORIGINAL_ISC_CODE
#if defined(DO_PTHREADS) || defined(__linux)
#endif
#endif
/* Proto. */
int
res_init(void) {
extern int __res_vinit(res_state, int);
/*
* These three fields used to be statically initialized. This made
* it hard to use this code in a shared library. It is necessary,
* now that we're doing dynamic initialization here, that we preserve
* the old semantics: if an application modifies one of these three
* fields of _res before res_init() is called, res_init() will not
* alter them. Of course, if an application is setting them to
* _zero_ before calling res_init(), hoping to override what used
* to be the static default, we can't detect it and unexpected results
* will follow. Zero for any of these fields would make no sense,
* so one can safely assume that the applications were already getting
* unexpected results.
*
* _res.options is tricky since some apps were known to diddle the bits
* before res_init() was first called. We can't replicate that semantic
* with dynamic initialization (they may have turned bits off that are
* set in RES_DEFAULT). Our solution is to declare such applications
* "broken". They could fool us by setting RES_INIT but none do (yet).
*/
/*
* This one used to initialize implicitly to zero, so unless the app
* has set it to something in particular, we can randomize it now.
*/
}
void
}
void
}
void
return;
}
int
const char *dname, /*!< domain name */
int datalen, /*!< length of data */
int buflen) /*!< size of buffer */
{
return (-1);
}
}
int
return (-1);
}
}
int
int anslen) /*!< size of answer buffer */
{
return (-1);
}
}
void
}
void
}
int
}
int
/* errno should have been set by res_init() in this case. */
return (-1);
}
}
int
{
/* errno should have been set by res_init() in this case. */
return (-1);
}
}
void
res_close(void) {
res_nclose(&_res);
}
int
return (-1);
}
}
int
int anslen) /*!< size of answer */
{
return (-1);
}
}
int
const char *domain,
int anslen) /*!< size of answer */
{
return (-1);
}
}
res_randomid(void) {
return (-1);
}
return (res_nrandomid(&_res));
}
const char *
}
#ifdef ultrix
int
res_init();
if (len_host > len_domain &&
return (0);
}
#endif /*ultrix*/
#endif
/*! \file */