client.c revision 499b34cea04a46823d003d4c0520c8b03e8513cb
/*
* Copyright (C) 2000, 2001 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: client.c,v 1.31 2001/01/09 21:39:30 bwelling Exp $ */
#include <config.h>
#include "client.h"
void
}
void
unsigned char *p;
unsigned int cnt;
char buffer[180];
char *n;
p = base;
cnt = 0;
n = buffer;
*n = 0;
if (cnt % 16 == 0) {
n = buffer;
} else if (cnt % 8 == 0) {
*n++ = ' ';
*n++ = '|';
*n = 0;
}
n += sprintf(n, " %02x", *p++);
cnt++;
if (cnt % 16 == 0) {
n = buffer;
*n = 0;
}
}
if (n != buffer) {
n = buffer;
*n = 0;
}
}
static void
return;
return;
}
static void
if (result != ISC_R_SUCCESS) {
goto restart;
}
process_gabn(client, &b);
return;
process_gnba(client, &b);
return;
case LWRES_OPCODE_NOOP:
process_noop(client, &b);
return;
default:
goto restart;
}
/*
* Drop the packet.
*/
}
void
isc_event_free(&ev);
/*
* Go idle.
*/
return;
}
/*
* XXXMLG If we wanted to run on ipv6 as well, we'd need the pktinfo
* bits. Right now we don't, so don't remember them.
*/
isc_event_free(&ev);
}
/*
* This function will start a new recv() on a socket for this client manager.
*/
isc_region_t r;
return (ISC_R_SUCCESS);
/*
* If a recv is already running, don't bother.
*/
return (ISC_R_SUCCESS);
/*
* If we have no idle slots, just return success.
*/
return (ISC_R_SUCCESS);
/*
* Issue the recv. If it fails, return that it did.
*/
r.length = LWRES_RECVLENGTH;
client);
if (result != ISC_R_SUCCESS)
return (result);
/*
* Set the flag to say we've issued a recv() call.
*/
/*
* Remove the client from the idle list, and put it on the running
* list.
*/
return (ISC_R_SUCCESS);
}
void
/*
* Cancel any pending I/O.
*/
/*
* Run through the running client list and kill off any finds
* in progress.
*/
/* XXXMLG */
}
/*
* Do all the crap needed to move a client from the run queue to the idle
* queue.
*/
void
}
void
client->sendlength);
client->sendlength = 0;
isc_event_free(&ev);
}
void
client->recvlength = 0;
client->sendlength = 0;
client->find_wanted = 0;
}
void
int i;
for (i = 0 ; i < LWRES_MAX_ALIASES ; i++) {
}
for (i = 0 ; i < LWRES_MAX_ADDRS ; i++) {
}
}
void
/*
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
/*
* Set up the internal buffer to point to the receive region.
*/
}
void
/*
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
}