lwdclient.c revision 9c3531d72aeaad6c5f01efe6a1c82023e1379e4d
/*
* Copyright (C) 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: lwdclient.c,v 1.3 2000/06/22 21:49:24 tale Exp $ */
#include <config.h>
#include <named/lwdclient.h>
void
level = 1;
}
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;
}
return;
return;
case LWRES_OPCODE_NOOP:
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 */
isc_event_free(&ev);
}
/*
* 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;
}