server.c revision 98d3b183735b48a5bf1697e312c88959567f6adf
/*
* Copyright (C) 1998, 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 <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/compress.h>
#include "parser.h"
#include "udpclient.h"
#include "tcpclient.h"
/*
* For debugging only... XXX
*/
static void
char b[255];
}
/*
* XXX This will be in a .h file soon...
*/
/*
* Process the wire format message given in r, and return a new packet to
* transmit.
*
* Return of DNS_R_SUCCESS means r->base is a newly allocated region of
* memory, and r->length is its length. The actual for-transmit packet
* begins at (r->length + reslen) to reserve (reslen) bytes at the front
* of the packet for transmission specific details.
*/
static dns_result_t
{
char t[5000];
/*
* Set up the temporary output buffer.
*/
/*
* Set up the input buffer from the contents of the region passed
* to us.
*/
if (result != DNS_R_SUCCESS)
return (result);
/*
* Copy the reply out, adjusting for reslen
*/
return (DNS_R_NOMEMORY);
if (want_stats)
return (DNS_R_SUCCESS);
}
int
{
unsigned int workers;
unsigned int addrlen;
int ch;
char basetext[1000];
#if 0
#endif
/*+ XXX */
switch (ch) {
case 'z':
break;
case 't':
break;
case 's':
break;
}
}
if (argc < 1) {
exit(1);
}
/*- XXX */
addrlen = sizeof(struct sockaddr_in);
workers = 2;
#if 0
#endif
/*+ XXX */
&db);
if (result != DNS_R_SUCCESS) {
printf("couldn't load master file: %s\n",
exit(1);
}
/*- XXX */
/*
* Open up a database.
*/
/*
* open up a UDP socket
*/
addrlen = sizeof(struct sockaddr_in);
(int)addrlen) == ISC_R_SUCCESS);
dispatch) == ISC_R_SUCCESS);
if (want_stats)
/*
* open up a TCP socket
*/
addrlen = sizeof(struct sockaddr_in);
(int)addrlen) == ISC_R_SUCCESS);
dispatch) == ISC_R_SUCCESS);
if (want_stats)
for (;;)
sleep(10);
printf("Destroying socket manager\n");
printf("Destroying task manager\n");
if (want_stats)
return (0);
}