err_pkt.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: err_pkt.c,v 1.5 2000/06/22 21:49:11 tale Exp $ */
#include <config.h>
#include "client.h"
/*
* Generate an error packet for the client, schedule a send, and put us in
* the SEND state.
*
* The client->pkt structure will be modified to form an error return.
* The receiver needs to verify that it is in fact an error, and do the
* right thing with it. The opcode will be unchanged. The result needs
* to be set before calling this function.
*
* The only change this code makes is to set the receive buffer size to the
* size we use, set the reply bit, and recompute any security information.
*/
void
int lwres;
isc_region_t r;
/*
* Since we are only sending the packet header, we can safely toss
* the receive buffer. This means we won't need to allocate space
* for sending an error reply. This is a Good Thing.
*/
if (lwres != LWRES_R_SUCCESS) {
return;
}
if (result != ISC_R_SUCCESS) {
return;
}
}