Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include/bind9/isccc
File: ccmsg.h
/*
[0] Fix | Delete
* Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
[1] Fix | Delete
*
[2] Fix | Delete
* This Source Code Form is subject to the terms of the Mozilla Public
[3] Fix | Delete
* License, v. 2.0. If a copy of the MPL was not distributed with this
[4] Fix | Delete
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
[5] Fix | Delete
*
[6] Fix | Delete
* See the COPYRIGHT file distributed with this work for additional
[7] Fix | Delete
* information regarding copyright ownership.
[8] Fix | Delete
*
[9] Fix | Delete
* Portions Copyright (C) 2001 Nominum, Inc.
[10] Fix | Delete
*
[11] Fix | Delete
* Permission to use, copy, modify, and/or distribute this software for any
[12] Fix | Delete
* purpose with or without fee is hereby granted, provided that the above
[13] Fix | Delete
* copyright notice and this permission notice appear in all copies.
[14] Fix | Delete
*
[15] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NOMINUM DISCLAIMS ALL
[16] Fix | Delete
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
[17] Fix | Delete
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
[18] Fix | Delete
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
[19] Fix | Delete
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
[20] Fix | Delete
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
[21] Fix | Delete
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
[22] Fix | Delete
*/
[23] Fix | Delete
[24] Fix | Delete
[25] Fix | Delete
#ifndef ISCCC_CCMSG_H
[26] Fix | Delete
#define ISCCC_CCMSG_H 1
[27] Fix | Delete
[28] Fix | Delete
/*! \file isccc/ccmsg.h */
[29] Fix | Delete
[30] Fix | Delete
#include <inttypes.h>
[31] Fix | Delete
[32] Fix | Delete
#include <isc/buffer.h>
[33] Fix | Delete
#include <isc/lang.h>
[34] Fix | Delete
#include <isc/socket.h>
[35] Fix | Delete
[36] Fix | Delete
/*% ISCCC Message Structure */
[37] Fix | Delete
typedef struct isccc_ccmsg {
[38] Fix | Delete
/* private (don't touch!) */
[39] Fix | Delete
unsigned int magic;
[40] Fix | Delete
uint32_t size;
[41] Fix | Delete
isc_buffer_t buffer;
[42] Fix | Delete
unsigned int maxsize;
[43] Fix | Delete
isc_mem_t *mctx;
[44] Fix | Delete
isc_socket_t *sock;
[45] Fix | Delete
isc_task_t *task;
[46] Fix | Delete
isc_taskaction_t action;
[47] Fix | Delete
void *arg;
[48] Fix | Delete
isc_event_t event;
[49] Fix | Delete
/* public (read-only) */
[50] Fix | Delete
isc_result_t result;
[51] Fix | Delete
isc_sockaddr_t address;
[52] Fix | Delete
} isccc_ccmsg_t;
[53] Fix | Delete
[54] Fix | Delete
ISC_LANG_BEGINDECLS
[55] Fix | Delete
[56] Fix | Delete
void
[57] Fix | Delete
isccc_ccmsg_init(isc_mem_t *mctx, isc_socket_t *sock, isccc_ccmsg_t *ccmsg);
[58] Fix | Delete
/*%
[59] Fix | Delete
* Associate a cc message state with a given memory context and
[60] Fix | Delete
* TCP socket.
[61] Fix | Delete
*
[62] Fix | Delete
* Requires:
[63] Fix | Delete
*
[64] Fix | Delete
*\li "mctx" and "sock" be non-NULL and valid types.
[65] Fix | Delete
*
[66] Fix | Delete
*\li "sock" be a read/write TCP socket.
[67] Fix | Delete
*
[68] Fix | Delete
*\li "ccmsg" be non-NULL and an uninitialized or invalidated structure.
[69] Fix | Delete
*
[70] Fix | Delete
* Ensures:
[71] Fix | Delete
*
[72] Fix | Delete
*\li "ccmsg" is a valid structure.
[73] Fix | Delete
*/
[74] Fix | Delete
[75] Fix | Delete
void
[76] Fix | Delete
isccc_ccmsg_setmaxsize(isccc_ccmsg_t *ccmsg, unsigned int maxsize);
[77] Fix | Delete
/*%
[78] Fix | Delete
* Set the maximum packet size to "maxsize"
[79] Fix | Delete
*
[80] Fix | Delete
* Requires:
[81] Fix | Delete
*
[82] Fix | Delete
*\li "ccmsg" be valid.
[83] Fix | Delete
*
[84] Fix | Delete
*\li 512 <= "maxsize" <= 4294967296
[85] Fix | Delete
*/
[86] Fix | Delete
[87] Fix | Delete
isc_result_t
[88] Fix | Delete
isccc_ccmsg_readmessage(isccc_ccmsg_t *ccmsg,
[89] Fix | Delete
isc_task_t *task, isc_taskaction_t action, void *arg);
[90] Fix | Delete
/*%
[91] Fix | Delete
* Schedule an event to be delivered when a command channel message is
[92] Fix | Delete
* readable, or when an error occurs on the socket.
[93] Fix | Delete
*
[94] Fix | Delete
* Requires:
[95] Fix | Delete
*
[96] Fix | Delete
*\li "ccmsg" be valid.
[97] Fix | Delete
*
[98] Fix | Delete
*\li "task", "taskaction", and "arg" be valid.
[99] Fix | Delete
*
[100] Fix | Delete
* Returns:
[101] Fix | Delete
*
[102] Fix | Delete
*\li #ISC_R_SUCCESS -- no error
[103] Fix | Delete
*\li Anything that the isc_socket_recv() call can return. XXXMLG
[104] Fix | Delete
*
[105] Fix | Delete
* Notes:
[106] Fix | Delete
*
[107] Fix | Delete
*\li The event delivered is a fully generic event. It will contain no
[108] Fix | Delete
* actual data. The sender will be a pointer to the isccc_ccmsg_t.
[109] Fix | Delete
* The result code inside that structure should be checked to see
[110] Fix | Delete
* what the final result was.
[111] Fix | Delete
*/
[112] Fix | Delete
[113] Fix | Delete
void
[114] Fix | Delete
isccc_ccmsg_cancelread(isccc_ccmsg_t *ccmsg);
[115] Fix | Delete
/*%
[116] Fix | Delete
* Cancel a readmessage() call. The event will still be posted with a
[117] Fix | Delete
* CANCELED result code.
[118] Fix | Delete
*
[119] Fix | Delete
* Requires:
[120] Fix | Delete
*
[121] Fix | Delete
*\li "ccmsg" be valid.
[122] Fix | Delete
*/
[123] Fix | Delete
[124] Fix | Delete
void
[125] Fix | Delete
isccc_ccmsg_invalidate(isccc_ccmsg_t *ccmsg);
[126] Fix | Delete
/*%
[127] Fix | Delete
* Clean up all allocated state, and invalidate the structure.
[128] Fix | Delete
*
[129] Fix | Delete
* Requires:
[130] Fix | Delete
*
[131] Fix | Delete
*\li "ccmsg" be valid.
[132] Fix | Delete
*
[133] Fix | Delete
* Ensures:
[134] Fix | Delete
*
[135] Fix | Delete
*\li "ccmsg" is invalidated and disassociated with all memory contexts,
[136] Fix | Delete
* sockets, etc.
[137] Fix | Delete
*/
[138] Fix | Delete
[139] Fix | Delete
ISC_LANG_ENDDECLS
[140] Fix | Delete
[141] Fix | Delete
#endif /* ISCCC_CCMSG_H */
[142] Fix | Delete
[143] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function