Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/bind9/dns
File: dispatch.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
#ifndef DNS_DISPATCH_H
[11] Fix | Delete
#define DNS_DISPATCH_H 1
[12] Fix | Delete
[13] Fix | Delete
/*****
[14] Fix | Delete
***** Module Info
[15] Fix | Delete
*****/
[16] Fix | Delete
[17] Fix | Delete
/*! \file dns/dispatch.h
[18] Fix | Delete
* \brief
[19] Fix | Delete
* DNS Dispatch Management
[20] Fix | Delete
* Shared UDP and single-use TCP dispatches for queries and responses.
[21] Fix | Delete
*
[22] Fix | Delete
* MP:
[23] Fix | Delete
*
[24] Fix | Delete
*\li All locking is performed internally to each dispatch.
[25] Fix | Delete
* Restrictions apply to dns_dispatch_removeresponse().
[26] Fix | Delete
*
[27] Fix | Delete
* Reliability:
[28] Fix | Delete
*
[29] Fix | Delete
* Resources:
[30] Fix | Delete
*
[31] Fix | Delete
* Security:
[32] Fix | Delete
*
[33] Fix | Delete
*\li Depends on the isc_socket_t and dns_message_t for prevention of
[34] Fix | Delete
* buffer overruns.
[35] Fix | Delete
*
[36] Fix | Delete
* Standards:
[37] Fix | Delete
*
[38] Fix | Delete
*\li None.
[39] Fix | Delete
*/
[40] Fix | Delete
[41] Fix | Delete
/***
[42] Fix | Delete
*** Imports
[43] Fix | Delete
***/
[44] Fix | Delete
[45] Fix | Delete
#include <stdbool.h>
[46] Fix | Delete
[47] Fix | Delete
#include <isc/buffer.h>
[48] Fix | Delete
#include <isc/lang.h>
[49] Fix | Delete
#include <isc/mutex.h>
[50] Fix | Delete
#include <isc/socket.h>
[51] Fix | Delete
#include <isc/types.h>
[52] Fix | Delete
[53] Fix | Delete
#include <dns/types.h>
[54] Fix | Delete
[55] Fix | Delete
ISC_LANG_BEGINDECLS
[56] Fix | Delete
[57] Fix | Delete
/*%
[58] Fix | Delete
* This event is sent to a task when a response comes in.
[59] Fix | Delete
* No part of this structure should ever be modified by the caller,
[60] Fix | Delete
* other than parts of the buffer. The holy parts of the buffer are
[61] Fix | Delete
* the base and size of the buffer. All other parts of the buffer may
[62] Fix | Delete
* be used. On event delivery the used region contains the packet.
[63] Fix | Delete
*
[64] Fix | Delete
* "id" is the received message id,
[65] Fix | Delete
*
[66] Fix | Delete
* "addr" is the host that sent it to us,
[67] Fix | Delete
*
[68] Fix | Delete
* "buffer" holds state on the received data.
[69] Fix | Delete
*
[70] Fix | Delete
* The "free" routine for this event will clean up itself as well as
[71] Fix | Delete
* any buffer space allocated from common pools.
[72] Fix | Delete
*/
[73] Fix | Delete
[74] Fix | Delete
struct dns_dispatchevent {
[75] Fix | Delete
ISC_EVENT_COMMON(dns_dispatchevent_t); /*%< standard event common */
[76] Fix | Delete
isc_result_t result; /*%< result code */
[77] Fix | Delete
int32_t id; /*%< message id */
[78] Fix | Delete
isc_sockaddr_t addr; /*%< address recv'd from */
[79] Fix | Delete
struct in6_pktinfo pktinfo; /*%< reply info for v6 */
[80] Fix | Delete
isc_buffer_t buffer; /*%< data buffer */
[81] Fix | Delete
uint32_t attributes; /*%< mirrored from socket.h */
[82] Fix | Delete
};
[83] Fix | Delete
[84] Fix | Delete
/*%
[85] Fix | Delete
* This is a set of one or more dispatches which can be retrieved
[86] Fix | Delete
* round-robin fashion.
[87] Fix | Delete
*/
[88] Fix | Delete
struct dns_dispatchset {
[89] Fix | Delete
isc_mem_t *mctx;
[90] Fix | Delete
dns_dispatch_t **dispatches;
[91] Fix | Delete
int ndisp;
[92] Fix | Delete
int cur;
[93] Fix | Delete
isc_mutex_t lock;
[94] Fix | Delete
};
[95] Fix | Delete
[96] Fix | Delete
/*@{*/
[97] Fix | Delete
/*%
[98] Fix | Delete
* Attributes for added dispatchers.
[99] Fix | Delete
*
[100] Fix | Delete
* Values with the mask 0xffff0000 are application defined.
[101] Fix | Delete
* Values with the mask 0x0000ffff are library defined.
[102] Fix | Delete
*
[103] Fix | Delete
* Insane values (like setting both TCP and UDP) are not caught. Don't
[104] Fix | Delete
* do that.
[105] Fix | Delete
*
[106] Fix | Delete
* _PRIVATE
[107] Fix | Delete
* The dispatcher cannot be shared.
[108] Fix | Delete
*
[109] Fix | Delete
* _TCP, _UDP
[110] Fix | Delete
* The dispatcher is a TCP or UDP socket.
[111] Fix | Delete
*
[112] Fix | Delete
* _IPV4, _IPV6
[113] Fix | Delete
* The dispatcher uses an IPv4 or IPv6 socket.
[114] Fix | Delete
*
[115] Fix | Delete
* _NOLISTEN
[116] Fix | Delete
* The dispatcher should not listen on the socket.
[117] Fix | Delete
*
[118] Fix | Delete
* _MAKEQUERY
[119] Fix | Delete
* The dispatcher can be used to issue queries to other servers, and
[120] Fix | Delete
* accept replies from them.
[121] Fix | Delete
*
[122] Fix | Delete
* _RANDOMPORT
[123] Fix | Delete
* Previously used to indicate that the port of a dispatch UDP must be
[124] Fix | Delete
* chosen randomly. This behavior now always applies and the attribute
[125] Fix | Delete
* is obsoleted.
[126] Fix | Delete
*
[127] Fix | Delete
* _EXCLUSIVE
[128] Fix | Delete
* A separate socket will be used on-demand for each transaction.
[129] Fix | Delete
*/
[130] Fix | Delete
#define DNS_DISPATCHATTR_PRIVATE 0x00000001U
[131] Fix | Delete
#define DNS_DISPATCHATTR_TCP 0x00000002U
[132] Fix | Delete
#define DNS_DISPATCHATTR_UDP 0x00000004U
[133] Fix | Delete
#define DNS_DISPATCHATTR_IPV4 0x00000008U
[134] Fix | Delete
#define DNS_DISPATCHATTR_IPV6 0x00000010U
[135] Fix | Delete
#define DNS_DISPATCHATTR_NOLISTEN 0x00000020U
[136] Fix | Delete
#define DNS_DISPATCHATTR_MAKEQUERY 0x00000040U
[137] Fix | Delete
#define DNS_DISPATCHATTR_CONNECTED 0x00000080U
[138] Fix | Delete
#define DNS_DISPATCHATTR_FIXEDID 0x00000100U
[139] Fix | Delete
#define DNS_DISPATCHATTR_EXCLUSIVE 0x00000200U
[140] Fix | Delete
/*@}*/
[141] Fix | Delete
[142] Fix | Delete
/*
[143] Fix | Delete
*/
[144] Fix | Delete
#define DNS_DISPATCHOPT_FIXEDID 0x00000001U
[145] Fix | Delete
[146] Fix | Delete
isc_result_t
[147] Fix | Delete
dns_dispatchmgr_create(isc_mem_t *mctx, isc_entropy_t *entropy,
[148] Fix | Delete
dns_dispatchmgr_t **mgrp);
[149] Fix | Delete
/*%<
[150] Fix | Delete
* Creates a new dispatchmgr object.
[151] Fix | Delete
*
[152] Fix | Delete
* Requires:
[153] Fix | Delete
*\li "mctx" be a valid memory context.
[154] Fix | Delete
*
[155] Fix | Delete
*\li mgrp != NULL && *mgrp == NULL
[156] Fix | Delete
*
[157] Fix | Delete
*\li "entropy" may be NULL, in which case an insecure random generator
[158] Fix | Delete
* will be used. If it is non-NULL, it must be a valid entropy
[159] Fix | Delete
* source.
[160] Fix | Delete
*
[161] Fix | Delete
* Returns:
[162] Fix | Delete
*\li ISC_R_SUCCESS -- all ok
[163] Fix | Delete
*
[164] Fix | Delete
*\li anything else -- failure
[165] Fix | Delete
*/
[166] Fix | Delete
[167] Fix | Delete
[168] Fix | Delete
void
[169] Fix | Delete
dns_dispatchmgr_destroy(dns_dispatchmgr_t **mgrp);
[170] Fix | Delete
/*%<
[171] Fix | Delete
* Destroys the dispatchmgr when it becomes empty. This could be
[172] Fix | Delete
* immediately.
[173] Fix | Delete
*
[174] Fix | Delete
* Requires:
[175] Fix | Delete
*\li mgrp != NULL && *mgrp is a valid dispatchmgr.
[176] Fix | Delete
*/
[177] Fix | Delete
[178] Fix | Delete
[179] Fix | Delete
void
[180] Fix | Delete
dns_dispatchmgr_setblackhole(dns_dispatchmgr_t *mgr, dns_acl_t *blackhole);
[181] Fix | Delete
/*%<
[182] Fix | Delete
* Sets the dispatcher's "blackhole list," a list of addresses that will
[183] Fix | Delete
* be ignored by all dispatchers created by the dispatchmgr.
[184] Fix | Delete
*
[185] Fix | Delete
* Requires:
[186] Fix | Delete
* \li mgrp is a valid dispatchmgr
[187] Fix | Delete
* \li blackhole is a valid acl
[188] Fix | Delete
*/
[189] Fix | Delete
[190] Fix | Delete
[191] Fix | Delete
dns_acl_t *
[192] Fix | Delete
dns_dispatchmgr_getblackhole(dns_dispatchmgr_t *mgr);
[193] Fix | Delete
/*%<
[194] Fix | Delete
* Gets a pointer to the dispatcher's current blackhole list,
[195] Fix | Delete
* without incrementing its reference count.
[196] Fix | Delete
*
[197] Fix | Delete
* Requires:
[198] Fix | Delete
*\li mgr is a valid dispatchmgr
[199] Fix | Delete
* Returns:
[200] Fix | Delete
*\li A pointer to the current blackhole list, or NULL.
[201] Fix | Delete
*/
[202] Fix | Delete
[203] Fix | Delete
void
[204] Fix | Delete
dns_dispatchmgr_setblackportlist(dns_dispatchmgr_t *mgr,
[205] Fix | Delete
dns_portlist_t *portlist);
[206] Fix | Delete
/*%<
[207] Fix | Delete
* This function is deprecated. Use dns_dispatchmgr_setavailports() instead.
[208] Fix | Delete
*
[209] Fix | Delete
* Requires:
[210] Fix | Delete
*\li mgr is a valid dispatchmgr
[211] Fix | Delete
*/
[212] Fix | Delete
[213] Fix | Delete
dns_portlist_t *
[214] Fix | Delete
dns_dispatchmgr_getblackportlist(dns_dispatchmgr_t *mgr);
[215] Fix | Delete
/*%<
[216] Fix | Delete
* This function is deprecated and always returns NULL.
[217] Fix | Delete
*
[218] Fix | Delete
* Requires:
[219] Fix | Delete
*\li mgr is a valid dispatchmgr
[220] Fix | Delete
*/
[221] Fix | Delete
[222] Fix | Delete
isc_result_t
[223] Fix | Delete
dns_dispatchmgr_setavailports(dns_dispatchmgr_t *mgr, isc_portset_t *v4portset,
[224] Fix | Delete
isc_portset_t *v6portset);
[225] Fix | Delete
/*%<
[226] Fix | Delete
* Sets a list of UDP ports that can be used for outgoing UDP messages.
[227] Fix | Delete
*
[228] Fix | Delete
* Requires:
[229] Fix | Delete
*\li mgr is a valid dispatchmgr
[230] Fix | Delete
*\li v4portset is NULL or a valid port set
[231] Fix | Delete
*\li v6portset is NULL or a valid port set
[232] Fix | Delete
*/
[233] Fix | Delete
[234] Fix | Delete
void
[235] Fix | Delete
dns_dispatchmgr_setstats(dns_dispatchmgr_t *mgr, isc_stats_t *stats);
[236] Fix | Delete
/*%<
[237] Fix | Delete
* Sets statistics counter for the dispatchmgr. This function is expected to
[238] Fix | Delete
* be called only on zone creation (when necessary).
[239] Fix | Delete
* Once installed, it cannot be removed or replaced. Also, there is no
[240] Fix | Delete
* interface to get the installed stats from the zone; the caller must keep the
[241] Fix | Delete
* stats to reference (e.g. dump) it later.
[242] Fix | Delete
*
[243] Fix | Delete
* Requires:
[244] Fix | Delete
*\li mgr is a valid dispatchmgr with no managed dispatch.
[245] Fix | Delete
*\li stats is a valid statistics supporting resolver statistics counters
[246] Fix | Delete
* (see dns/stats.h).
[247] Fix | Delete
*/
[248] Fix | Delete
[249] Fix | Delete
isc_result_t
[250] Fix | Delete
dns_dispatch_getudp(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
[251] Fix | Delete
isc_taskmgr_t *taskmgr, isc_sockaddr_t *localaddr,
[252] Fix | Delete
unsigned int buffersize,
[253] Fix | Delete
unsigned int maxbuffers, unsigned int maxrequests,
[254] Fix | Delete
unsigned int buckets, unsigned int increment,
[255] Fix | Delete
unsigned int attributes, unsigned int mask,
[256] Fix | Delete
dns_dispatch_t **dispp);
[257] Fix | Delete
[258] Fix | Delete
isc_result_t
[259] Fix | Delete
dns_dispatch_getudp_dup(dns_dispatchmgr_t *mgr, isc_socketmgr_t *sockmgr,
[260] Fix | Delete
isc_taskmgr_t *taskmgr, isc_sockaddr_t *localaddr,
[261] Fix | Delete
unsigned int buffersize,
[262] Fix | Delete
unsigned int maxbuffers, unsigned int maxrequests,
[263] Fix | Delete
unsigned int buckets, unsigned int increment,
[264] Fix | Delete
unsigned int attributes, unsigned int mask,
[265] Fix | Delete
dns_dispatch_t **dispp, dns_dispatch_t *dup);
[266] Fix | Delete
/*%<
[267] Fix | Delete
* Attach to existing dns_dispatch_t if one is found with dns_dispatchmgr_find,
[268] Fix | Delete
* otherwise create a new UDP dispatch.
[269] Fix | Delete
*
[270] Fix | Delete
* Requires:
[271] Fix | Delete
*\li All pointer parameters be valid for their respective types.
[272] Fix | Delete
*
[273] Fix | Delete
*\li dispp != NULL && *disp == NULL
[274] Fix | Delete
*
[275] Fix | Delete
*\li 512 <= buffersize <= 64k
[276] Fix | Delete
*
[277] Fix | Delete
*\li maxbuffers > 0
[278] Fix | Delete
*
[279] Fix | Delete
*\li buckets < 2097169
[280] Fix | Delete
*
[281] Fix | Delete
*\li increment > buckets
[282] Fix | Delete
*
[283] Fix | Delete
*\li (attributes & DNS_DISPATCHATTR_TCP) == 0
[284] Fix | Delete
*
[285] Fix | Delete
* Returns:
[286] Fix | Delete
*\li ISC_R_SUCCESS -- success.
[287] Fix | Delete
*
[288] Fix | Delete
*\li Anything else -- failure.
[289] Fix | Delete
*/
[290] Fix | Delete
[291] Fix | Delete
isc_result_t
[292] Fix | Delete
dns_dispatch_createtcp(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
[293] Fix | Delete
isc_taskmgr_t *taskmgr, unsigned int buffersize,
[294] Fix | Delete
unsigned int maxbuffers, unsigned int maxrequests,
[295] Fix | Delete
unsigned int buckets, unsigned int increment,
[296] Fix | Delete
unsigned int attributes, dns_dispatch_t **dispp);
[297] Fix | Delete
isc_result_t
[298] Fix | Delete
dns_dispatch_createtcp2(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
[299] Fix | Delete
isc_taskmgr_t *taskmgr, isc_sockaddr_t *localaddr,
[300] Fix | Delete
isc_sockaddr_t *destaddr, unsigned int buffersize,
[301] Fix | Delete
unsigned int maxbuffers, unsigned int maxrequests,
[302] Fix | Delete
unsigned int buckets, unsigned int increment,
[303] Fix | Delete
unsigned int attributes, dns_dispatch_t **dispp);
[304] Fix | Delete
/*%<
[305] Fix | Delete
* Create a new dns_dispatch and attach it to the provided isc_socket_t.
[306] Fix | Delete
*
[307] Fix | Delete
* For all dispatches, "buffersize" is the maximum packet size we will
[308] Fix | Delete
* accept.
[309] Fix | Delete
*
[310] Fix | Delete
* "maxbuffers" and "maxrequests" control the number of buffers in the
[311] Fix | Delete
* overall system and the number of buffers which can be allocated to
[312] Fix | Delete
* requests.
[313] Fix | Delete
*
[314] Fix | Delete
* "buckets" is the number of buckets to use, and should be prime.
[315] Fix | Delete
*
[316] Fix | Delete
* "increment" is used in a collision avoidance function, and needs to be
[317] Fix | Delete
* a prime > buckets, and not 2.
[318] Fix | Delete
*
[319] Fix | Delete
* Requires:
[320] Fix | Delete
*
[321] Fix | Delete
*\li mgr is a valid dispatch manager.
[322] Fix | Delete
*
[323] Fix | Delete
*\li sock is a valid.
[324] Fix | Delete
*
[325] Fix | Delete
*\li task is a valid task that can be used internally to this dispatcher.
[326] Fix | Delete
*
[327] Fix | Delete
* \li 512 <= buffersize <= 64k
[328] Fix | Delete
*
[329] Fix | Delete
*\li maxbuffers > 0.
[330] Fix | Delete
*
[331] Fix | Delete
*\li maxrequests <= maxbuffers.
[332] Fix | Delete
*
[333] Fix | Delete
*\li buckets < 2097169 (the next prime after 65536 * 32)
[334] Fix | Delete
*
[335] Fix | Delete
*\li increment > buckets (and prime).
[336] Fix | Delete
*
[337] Fix | Delete
*\li attributes includes #DNS_DISPATCHATTR_TCP and does not include
[338] Fix | Delete
* #DNS_DISPATCHATTR_UDP.
[339] Fix | Delete
*
[340] Fix | Delete
* Returns:
[341] Fix | Delete
*\li ISC_R_SUCCESS -- success.
[342] Fix | Delete
*
[343] Fix | Delete
*\li Anything else -- failure.
[344] Fix | Delete
*/
[345] Fix | Delete
[346] Fix | Delete
void
[347] Fix | Delete
dns_dispatch_attach(dns_dispatch_t *disp, dns_dispatch_t **dispp);
[348] Fix | Delete
/*%<
[349] Fix | Delete
* Attach to a dispatch handle.
[350] Fix | Delete
*
[351] Fix | Delete
* Requires:
[352] Fix | Delete
*\li disp is valid.
[353] Fix | Delete
*
[354] Fix | Delete
*\li dispp != NULL && *dispp == NULL
[355] Fix | Delete
*/
[356] Fix | Delete
[357] Fix | Delete
void
[358] Fix | Delete
dns_dispatch_detach(dns_dispatch_t **dispp);
[359] Fix | Delete
/*%<
[360] Fix | Delete
* Detaches from the dispatch.
[361] Fix | Delete
*
[362] Fix | Delete
* Requires:
[363] Fix | Delete
*\li dispp != NULL and *dispp be a valid dispatch.
[364] Fix | Delete
*/
[365] Fix | Delete
[366] Fix | Delete
void
[367] Fix | Delete
dns_dispatch_starttcp(dns_dispatch_t *disp);
[368] Fix | Delete
/*%<
[369] Fix | Delete
* Start processing of a TCP dispatch once the socket connects.
[370] Fix | Delete
*
[371] Fix | Delete
* Requires:
[372] Fix | Delete
*\li 'disp' is valid.
[373] Fix | Delete
*/
[374] Fix | Delete
[375] Fix | Delete
isc_result_t
[376] Fix | Delete
dns_dispatch_gettcp(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
[377] Fix | Delete
isc_sockaddr_t *localaddr, dns_dispatch_t **dispp);
[378] Fix | Delete
isc_result_t
[379] Fix | Delete
dns_dispatch_gettcp2(dns_dispatchmgr_t *mgr, isc_sockaddr_t *destaddr,
[380] Fix | Delete
isc_sockaddr_t *localaddr, bool *connected,
[381] Fix | Delete
dns_dispatch_t **dispp);
[382] Fix | Delete
/*
[383] Fix | Delete
* Attempt to connect to a existing TCP connection (connection completed
[384] Fix | Delete
* for dns_dispatch_gettcp()).
[385] Fix | Delete
*/
[386] Fix | Delete
[387] Fix | Delete
[388] Fix | Delete
isc_result_t
[389] Fix | Delete
dns_dispatch_addresponse3(dns_dispatch_t *disp, unsigned int options,
[390] Fix | Delete
isc_sockaddr_t *dest, isc_task_t *task,
[391] Fix | Delete
isc_taskaction_t action, void *arg,
[392] Fix | Delete
uint16_t *idp, dns_dispentry_t **resp,
[393] Fix | Delete
isc_socketmgr_t *sockmgr);
[394] Fix | Delete
[395] Fix | Delete
isc_result_t
[396] Fix | Delete
dns_dispatch_addresponse2(dns_dispatch_t *disp, isc_sockaddr_t *dest,
[397] Fix | Delete
isc_task_t *task, isc_taskaction_t action, void *arg,
[398] Fix | Delete
uint16_t *idp, dns_dispentry_t **resp,
[399] Fix | Delete
isc_socketmgr_t *sockmgr);
[400] Fix | Delete
[401] Fix | Delete
isc_result_t
[402] Fix | Delete
dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
[403] Fix | Delete
isc_task_t *task, isc_taskaction_t action, void *arg,
[404] Fix | Delete
uint16_t *idp, dns_dispentry_t **resp);
[405] Fix | Delete
/*%<
[406] Fix | Delete
* Add a response entry for this dispatch.
[407] Fix | Delete
*
[408] Fix | Delete
* "*idp" is filled in with the assigned message ID, and *resp is filled in
[409] Fix | Delete
* to contain the magic token used to request event flow stop.
[410] Fix | Delete
*
[411] Fix | Delete
* Arranges for the given task to get a callback for response packets. When
[412] Fix | Delete
* the event is delivered, it must be returned using dns_dispatch_freeevent()
[413] Fix | Delete
* or through dns_dispatch_removeresponse() for another to be delivered.
[414] Fix | Delete
*
[415] Fix | Delete
* Requires:
[416] Fix | Delete
*\li "idp" be non-NULL.
[417] Fix | Delete
*
[418] Fix | Delete
*\li "task" "action" and "arg" be set as appropriate.
[419] Fix | Delete
*
[420] Fix | Delete
*\li "dest" be non-NULL and valid.
[421] Fix | Delete
*
[422] Fix | Delete
*\li "resp" be non-NULL and *resp be NULL
[423] Fix | Delete
*
[424] Fix | Delete
*\li "sockmgr" be NULL or a valid socket manager. If 'disp' has
[425] Fix | Delete
* the DNS_DISPATCHATTR_EXCLUSIVE attribute, this must not be NULL,
[426] Fix | Delete
* which also means dns_dispatch_addresponse() cannot be used.
[427] Fix | Delete
*
[428] Fix | Delete
* Ensures:
[429] Fix | Delete
*
[430] Fix | Delete
*\li &lt;id, dest> is a unique tuple. That means incoming messages
[431] Fix | Delete
* are identifiable.
[432] Fix | Delete
*
[433] Fix | Delete
* Returns:
[434] Fix | Delete
*
[435] Fix | Delete
*\li ISC_R_SUCCESS -- all is well.
[436] Fix | Delete
*\li ISC_R_NOMEMORY -- memory could not be allocated.
[437] Fix | Delete
*\li ISC_R_NOMORE -- no more message ids can be allocated
[438] Fix | Delete
* for this destination.
[439] Fix | Delete
*/
[440] Fix | Delete
[441] Fix | Delete
[442] Fix | Delete
void
[443] Fix | Delete
dns_dispatch_removeresponse(dns_dispentry_t **resp,
[444] Fix | Delete
dns_dispatchevent_t **sockevent);
[445] Fix | Delete
/*%<
[446] Fix | Delete
* Stops the flow of responses for the provided id and destination.
[447] Fix | Delete
* If "sockevent" is non-NULL, the dispatch event and associated buffer is
[448] Fix | Delete
* also returned to the system.
[449] Fix | Delete
*
[450] Fix | Delete
* Requires:
[451] Fix | Delete
*\li "resp" != NULL and "*resp" contain a value previously allocated
[452] Fix | Delete
* by dns_dispatch_addresponse();
[453] Fix | Delete
*
[454] Fix | Delete
*\li May only be called from within the task given as the 'task'
[455] Fix | Delete
* argument to dns_dispatch_addresponse() when allocating '*resp'.
[456] Fix | Delete
*/
[457] Fix | Delete
[458] Fix | Delete
isc_socket_t *
[459] Fix | Delete
dns_dispatch_getentrysocket(dns_dispentry_t *resp);
[460] Fix | Delete
[461] Fix | Delete
isc_socket_t *
[462] Fix | Delete
dns_dispatch_getsocket(dns_dispatch_t *disp);
[463] Fix | Delete
/*%<
[464] Fix | Delete
* Return the socket associated with this dispatcher.
[465] Fix | Delete
*
[466] Fix | Delete
* Requires:
[467] Fix | Delete
*\li disp is valid.
[468] Fix | Delete
*
[469] Fix | Delete
* Returns:
[470] Fix | Delete
*\li The socket the dispatcher is using.
[471] Fix | Delete
*/
[472] Fix | Delete
[473] Fix | Delete
isc_result_t
[474] Fix | Delete
dns_dispatch_getlocaladdress(dns_dispatch_t *disp, isc_sockaddr_t *addrp);
[475] Fix | Delete
/*%<
[476] Fix | Delete
* Return the local address for this dispatch.
[477] Fix | Delete
* This currently only works for dispatches using UDP sockets.
[478] Fix | Delete
*
[479] Fix | Delete
* Requires:
[480] Fix | Delete
*\li disp is valid.
[481] Fix | Delete
*\li addrp to be non null.
[482] Fix | Delete
*
[483] Fix | Delete
* Returns:
[484] Fix | Delete
*\li ISC_R_SUCCESS
[485] Fix | Delete
*\li ISC_R_NOTIMPLEMENTED
[486] Fix | Delete
*/
[487] Fix | Delete
[488] Fix | Delete
void
[489] Fix | Delete
dns_dispatch_cancel(dns_dispatch_t *disp);
[490] Fix | Delete
/*%<
[491] Fix | Delete
* cancel outstanding clients
[492] Fix | Delete
*
[493] Fix | Delete
* Requires:
[494] Fix | Delete
*\li disp is valid.
[495] Fix | Delete
*/
[496] Fix | Delete
[497] Fix | Delete
unsigned int
[498] Fix | Delete
dns_dispatch_getattributes(dns_dispatch_t *disp);
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function