43#ifdef ADNS_REGRESS_TEST
44# include "hredirect.h"
69 fputs(
"poll(2) not supported on this system\n",
stderr);
73#define adns_beforepoll(a,b,c,d,e) 0
74#define adns_afterpoll(a,b,c,d) 0
93 "usage: adnstest [-<initflagsnum>[,<owninitflags>]] [/<initstring>]\n"
94 " [ :<typenum>,... ]\n"
95 " [ [<queryflagsnum>[,<ownqueryflags>]/]<domain> ... ]\n"
96 "initflags: p use poll(2) instead of select(2)\n"
97 " s use adns_wait with specified query, instead of 0\n"
98 "queryflags: a print status abbrevs instead of strings\n"
99 "exit status: 0 ok (though some queries may have failed)\n"
100 " 1 used by test harness to indicate test failed\n"
101 " 2 unable to submit or init or some such\n"
102 " 3 unexpected failure\n"
104 " 5 operation not supported on this system\n",
133 ri ?
"?" : rrtn, ri ?
"?" : fmtn ? fmtn :
"-",
138 char *ownflags,
int ownflags_l) {
143 if (*ep ==
',' &&
strchr(ep,
'/')) {
150 if (*ep !=
'/') { *dom_r=
fdom; *qf_r= 0; }
151 else { *dom_r= ep+1; *qf_r= qf; }
161 struct myctx *mc, *mcw;
164 const char *initstring, *rrtn, *fmtn;
165 const char *
const *fdomlist, *
domain;
167 int len,
i, qc, qi,
tc, ti, ch, qflags, initflagsnum;
183 initstring=
argv[1]+1;
196 usageerr(
"bad <initflagsnum>[,<owninitflags>]");
204 for (
cp=
argv[1]+1, ti=0; ti<
tc; ti++) {
207 if (ch !=
',')
usageerr(
"unexpected char (not comma) in or between types");
220 fdomlist= (
const char *
const*)
argv+1;
222 for (qc=0; fdomlist[qc]; qc++);
241 for (qi=0; qi<qc; qi++) {
244 for (ti=0; ti<
tc; ti++) {
247 mc->
fdom= fdomlist[qi];
267 for (qi=0; qi<qc; qi++) {
268 for (ti=0; ti<
tc; ti++) {
282 for (qi=0; qi<qc; qi++) {
283 for (ti=0; ti<
tc; ti++) {
292 if (
strchr(owninitflags,
's')) {
301 if (
strchr(owninitflags,
'p')) {
322 fprintf(
stdout,
"%s%s: %s; nrrs=%d; cname=%s; owner=%s; ttl=%ld\n",
323 ownflags[0] ?
" ownflags=" :
"", ownflags,
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
ACPI_SIZE strlen(const char *String)
char * strchr(const char *String, int ch)
ADNS_API void adns_finish(adns_state ads)
ADNS_API const char * adns_strerror(adns_status st)
ADNS_API adns_status adns_rr_info(adns_rrtype type, const char **rrtname_r, const char **fmtname_r, int *len_r, const void *datap, char **data_r)
ADNS_API void adns_forallqueries_begin(adns_state ads)
ADNS_API int adns_init(adns_state *newstate_r, adns_initflags flags, FILE *diagfile)
ADNS_API int adns_wait(adns_state ads, adns_query *query_io, adns_answer **answer_r, void **context_r)
ADNS_API adns_query adns_forallqueries_next(adns_state ads, void **context_r)
ADNS_API const char * adns_errabbrev(adns_status st)
ADNS_API int adns_wait_poll(adns_state ads, adns_query *query_io, adns_answer **answer_r, void **context_r)
ADNS_API int adns_submit(adns_state ads, const char *owner, adns_rrtype type, adns_queryflags flags, void *context, adns_query *query_r)
ADNS_API int adns_init_strcfg(adns_state *newstate_r, adns_initflags flags, FILE *diagfile, const char *configtext)
#define gettimeofday(tv, tz)
static adns_initflags initflags
static const adns_rrtype defaulttypes[]
static int consistsof(const char *string, const char *accept)
static void usageerr(const char *why) NONRETURNING
static adns_rrtype * types_a
static struct myctx * mcs
static void dumptype(adns_status ri, const char *rrtn, const char *fmtn)
static void failure_status(const char *what, adns_status st) NONRETURNING
static void fdom_split(const char *fdom, const char **dom_r, int *qf_r, char *ownflags, int ownflags_l)
static void quitnow(int rc) NONRETURNING
static void failure_errno(const char *what, int errnoval) NONRETURNING
GLdouble GLdouble GLdouble r
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
_Check_return_opt_ _CRTIMP int __cdecl fputs(_In_z_ const char *_Str, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl putc(_In_ int _Ch, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl setvbuf(_Inout_ FILE *_File, _Inout_updates_opt_z_(_Size) char *_Buf, _In_ int _Mode, _In_ size_t _Size)
_Check_return_ _CRTIMP size_t __cdecl strspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
SOCKET WSAAPI accept(IN SOCKET s, OUT LPSOCKADDR addr, OUT INT FAR *addrlen)
union adns_answer::@4221 rrs