adb_test.c revision 5bd937c666375d03ee6a366a13d0bdb31aa3f07f
/*
* Copyright (C) 1999 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.
*/
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <isc/assertions.h>
#include <isc/sockaddr.h>
struct client {
};
static void check_result(isc_result_t, char *, ...);
isc_result_t ns_rootns_init(void);
void create_managers(void);
void create_view(void);
client_t *new_client(void);
void free_client(client_t **);
static inline void CLOCK(void);
static inline void CUNLOCK(void);
void lookup(char *);
static void
{
if (result == ISC_R_SUCCESS)
return;
exit(1);
}
client_t *
new_client(void)
{
return (client);
}
void
free_client(client_t **c)
{
client = *c;
*c = NULL;
}
static inline void
CLOCK(void)
{
}
static inline void
CUNLOCK(void)
{
}
static void
{
printf("Task %p got event %p type %08x from %p, client %p\n",
isc_event_free(&ev);
CLOCK();
CUNLOCK();
}
void
create_managers(void)
{
}
void
create_view(void)
{
/*
* View.
*/
/*
* Cache.
*/
/*
* Resolver.
*
* XXXRTH hardwired number of tasks. Also, we'll need to
* see if we are dealing with a shared dispatcher in this view.
*/
}
void
{
unsigned char namedata[256];
isc_buffer_t t, namebuf;
&namebuf);
}
void
{
unsigned char namedata[256];
isc_buffer_t t, namebuf;
unsigned int options;
client = new_client();
&namebuf);
options = 0;
else {
}
}
int
{
(void)argc;
(void)argv;
result = isc_app_start();
/*
* EVERYTHING needs a memory context.
*/
== ISC_R_SUCCESS);
/*
* Create and install the default channel.
*/
/*
* Set the initial debug level.
*/
create_view();
/*
* Lock the entire client list here. This will cause all events
* for found names to block as well.
*/
CLOCK();
CUNLOCK();
sleep(5);
sleep (5);
CLOCK();
CUNLOCK();
isc_app_run();
return (0);
}