dispatch_tcp_test.c revision 8dec0e1a3e0de78f2b20b328128eb603f807a299
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * Copyright (C) 1998, 1999 Internet Software Consortium.
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * Permission to use, copy, modify, and distribute this software for any
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * purpose with or without fee is hereby granted, provided that the above
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * copyright notice and this permission notice appear in all copies.
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halleystatic inline void CHECKRESULT(dns_result_t, char *);
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley unsigned int len;
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley printf("Buffer %p (%p, %d): used region base %p, length %d",
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halleystatic inline void
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley printf("%s: %s\n", msg, isc_result_totext(result));
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley isc_socket_newconnev_t *ev = (isc_socket_newconnev_t *)ev_in;
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley * Create a dispatch context
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley RUNTIME_CHECK(dns_dispatch_create(mctx, ev->newsocket, task,
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley RUNTIME_CHECK(dns_dispatch_addrequest(disp, task, got_request, NULL,
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley isc_socketevent_t *ev = (isc_socketevent_t *)ev_in;
c50fd34a4e0e6978f8ca5f6f3ad8545549c3cfeeBob Halley dns_dispentry_t *resp = (dns_dispentry_t *)ev_in->arg;
start_response(void)
&target);
#ifdef ISC_NET_HAVESALEN
(void)task;
static int cnt = 0;
cnt++;
switch (cnt) {
== DNS_R_SUCCESS);
(void)argc;
(void)argv;
== ISC_R_SUCCESS);
isc_app_run();