Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/bind9/dns
File: tcpmsg.h
/*
[0] Fix | Delete
* 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
[10] Fix | Delete
[11] Fix | Delete
#ifndef DNS_TCPMSG_H
[12] Fix | Delete
#define DNS_TCPMSG_H 1
[13] Fix | Delete
[14] Fix | Delete
/*! \file dns/tcpmsg.h */
[15] Fix | Delete
[16] Fix | Delete
#include <inttypes.h>
[17] Fix | Delete
[18] Fix | Delete
#include <isc/buffer.h>
[19] Fix | Delete
#include <isc/lang.h>
[20] Fix | Delete
#include <isc/socket.h>
[21] Fix | Delete
[22] Fix | Delete
typedef struct dns_tcpmsg {
[23] Fix | Delete
/* private (don't touch!) */
[24] Fix | Delete
unsigned int magic;
[25] Fix | Delete
uint16_t size;
[26] Fix | Delete
isc_buffer_t buffer;
[27] Fix | Delete
unsigned int maxsize;
[28] Fix | Delete
isc_mem_t *mctx;
[29] Fix | Delete
isc_socket_t *sock;
[30] Fix | Delete
isc_task_t *task;
[31] Fix | Delete
isc_taskaction_t action;
[32] Fix | Delete
void *arg;
[33] Fix | Delete
isc_event_t event;
[34] Fix | Delete
/* public (read-only) */
[35] Fix | Delete
isc_result_t result;
[36] Fix | Delete
isc_sockaddr_t address;
[37] Fix | Delete
} dns_tcpmsg_t;
[38] Fix | Delete
[39] Fix | Delete
ISC_LANG_BEGINDECLS
[40] Fix | Delete
[41] Fix | Delete
void
[42] Fix | Delete
dns_tcpmsg_init(isc_mem_t *mctx, isc_socket_t *sock, dns_tcpmsg_t *tcpmsg);
[43] Fix | Delete
/*%<
[44] Fix | Delete
* Associate a tcp message state with a given memory context and
[45] Fix | Delete
* TCP socket.
[46] Fix | Delete
*
[47] Fix | Delete
* Requires:
[48] Fix | Delete
*
[49] Fix | Delete
*\li "mctx" and "sock" be non-NULL and valid types.
[50] Fix | Delete
*
[51] Fix | Delete
*\li "sock" be a read/write TCP socket.
[52] Fix | Delete
*
[53] Fix | Delete
*\li "tcpmsg" be non-NULL and an uninitialized or invalidated structure.
[54] Fix | Delete
*
[55] Fix | Delete
* Ensures:
[56] Fix | Delete
*
[57] Fix | Delete
*\li "tcpmsg" is a valid structure.
[58] Fix | Delete
*/
[59] Fix | Delete
[60] Fix | Delete
void
[61] Fix | Delete
dns_tcpmsg_setmaxsize(dns_tcpmsg_t *tcpmsg, unsigned int maxsize);
[62] Fix | Delete
/*%<
[63] Fix | Delete
* Set the maximum packet size to "maxsize"
[64] Fix | Delete
*
[65] Fix | Delete
* Requires:
[66] Fix | Delete
*
[67] Fix | Delete
*\li "tcpmsg" be valid.
[68] Fix | Delete
*
[69] Fix | Delete
*\li 512 <= "maxsize" <= 65536
[70] Fix | Delete
*/
[71] Fix | Delete
[72] Fix | Delete
isc_result_t
[73] Fix | Delete
dns_tcpmsg_readmessage(dns_tcpmsg_t *tcpmsg,
[74] Fix | Delete
isc_task_t *task, isc_taskaction_t action, void *arg);
[75] Fix | Delete
/*%<
[76] Fix | Delete
* Schedule an event to be delivered when a DNS message is readable, or
[77] Fix | Delete
* when an error occurs on the socket.
[78] Fix | Delete
*
[79] Fix | Delete
* Requires:
[80] Fix | Delete
*
[81] Fix | Delete
*\li "tcpmsg" be valid.
[82] Fix | Delete
*
[83] Fix | Delete
*\li "task", "taskaction", and "arg" be valid.
[84] Fix | Delete
*
[85] Fix | Delete
* Returns:
[86] Fix | Delete
*
[87] Fix | Delete
*\li ISC_R_SUCCESS -- no error
[88] Fix | Delete
*\li Anything that the isc_socket_recv() call can return. XXXMLG
[89] Fix | Delete
*
[90] Fix | Delete
* Notes:
[91] Fix | Delete
*
[92] Fix | Delete
*\li The event delivered is a fully generic event. It will contain no
[93] Fix | Delete
* actual data. The sender will be a pointer to the dns_tcpmsg_t.
[94] Fix | Delete
* The result code inside that structure should be checked to see
[95] Fix | Delete
* what the final result was.
[96] Fix | Delete
*/
[97] Fix | Delete
[98] Fix | Delete
void
[99] Fix | Delete
dns_tcpmsg_cancelread(dns_tcpmsg_t *tcpmsg);
[100] Fix | Delete
/*%<
[101] Fix | Delete
* Cancel a readmessage() call. The event will still be posted with a
[102] Fix | Delete
* CANCELED result code.
[103] Fix | Delete
*
[104] Fix | Delete
* Requires:
[105] Fix | Delete
*
[106] Fix | Delete
*\li "tcpmsg" be valid.
[107] Fix | Delete
*/
[108] Fix | Delete
[109] Fix | Delete
void
[110] Fix | Delete
dns_tcpmsg_keepbuffer(dns_tcpmsg_t *tcpmsg, isc_buffer_t *buffer);
[111] Fix | Delete
/*%<
[112] Fix | Delete
* If a dns buffer is to be kept between calls, this function marks the
[113] Fix | Delete
* internal state-machine buffer as invalid, and copies all the contents
[114] Fix | Delete
* of the state into "buffer".
[115] Fix | Delete
*
[116] Fix | Delete
* Requires:
[117] Fix | Delete
*
[118] Fix | Delete
*\li "tcpmsg" be valid.
[119] Fix | Delete
*
[120] Fix | Delete
*\li "buffer" be non-NULL.
[121] Fix | Delete
*/
[122] Fix | Delete
[123] Fix | Delete
void
[124] Fix | Delete
dns_tcpmsg_invalidate(dns_tcpmsg_t *tcpmsg);
[125] Fix | Delete
/*%<
[126] Fix | Delete
* Clean up all allocated state, and invalidate the structure.
[127] Fix | Delete
*
[128] Fix | Delete
* Requires:
[129] Fix | Delete
*
[130] Fix | Delete
*\li "tcpmsg" be valid.
[131] Fix | Delete
*
[132] Fix | Delete
* Ensures:
[133] Fix | Delete
*
[134] Fix | Delete
*\li "tcpmsg" is invalidated and disassociated with all memory contexts,
[135] Fix | Delete
* sockets, etc.
[136] Fix | Delete
*/
[137] Fix | Delete
[138] Fix | Delete
ISC_LANG_ENDDECLS
[139] Fix | Delete
[140] Fix | Delete
#endif /* DNS_TCPMSG_H */
[141] Fix | Delete
[142] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function