tkey_test.c revision 529ff4b4959fb157194f985394951108ff5286e4
/*
* Copyright (C) 1999, 2000 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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.
*/
/* $Id: tkey_test.c,v 1.31 2000/08/17 19:17:55 bwelling Exp $ */
/*
* Principal Author: Brian Wellington (core copied from res_test.c)
*/
#include <config.h>
#include <stdlib.h>
#include <isc/commandline.h>
#include <isc/sockaddr.h>
#include <dns/fixedname.h>
#include <dns/keyvalues.h>
if ((x) != ISC_R_SUCCESS) { \
exit(-1); \
} \
}
#ifndef INADDR_LOOPBACK
#define INADDR_LOOPBACK (unsigned long)0x7F000001UL
#endif
static void buildquery(void);
static void buildquery2(void);
isc_socket_t *s;
static void
printf("senddone\n");
}
static void
printf("recvdone\n");
printf("failed\n");
exit(-1);
}
(char *)isc_buffer_base(&outbuf));
printf("response ok\n");
buildquery2();
}
static void
printf("senddone2\n");
}
static void
printf("recvdone2\n");
printf("failed\n");
exit(-1);
}
(char *)isc_buffer_base(&outbuf));
printf("response ok\n");
}
static void
buildquery(void) {
isc_region_t r, inr;
unsigned char keydata[3];
isc_buffer_usedregion(&keybuf, &r);
initialkey = NULL;
(char *)isc_buffer_base(&outbuf));
isc_buffer_usedregion(&qbuffer, &r);
NULL);
}
static void
buildquery2(void) {
isc_region_t r, inr;
(char *)isc_buffer_base(&outbuf));
isc_buffer_usedregion(&qbuffer, &r);
NULL);
}
int
unsigned int workers = 2;
int ch;
isc_buffer_t b;
#ifdef PATH_RANDOMDEV
#else
#endif
if (result != ISC_R_SUCCESS) {
"%s only runs when a random device is available.\n",
argv[0]);
exit(-1);
}
switch (ch) {
case 'v':
break;
case 'w':
break;
case 'p':
break;
}
}
if (verbose) {
}
== ISC_R_SUCCESS);
if (argc != 0)
printf("ignoring trailing arguments\n");
s = NULL;
isc_sockettype_udp, &s) ==
buildquery();
(void)isc_app_run();
/*
* XXXRTH if we get a control-C before we get to isc_app_run(),
* we're in trouble (because we might try to destroy things before
* they've been created.
*/
isc_socket_detach(&s);
if (verbose)
return (0);
}