resolver.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2014  Internet Systems Consortium, Inc. ("ISC")
00003  * Copyright (C) 1999-2001, 2003  Internet Software Consortium.
00004  *
00005  * Permission to use, copy, modify, and/or distribute this software for any
00006  * purpose with or without fee is hereby granted, provided that the above
00007  * copyright notice and this permission notice appear in all copies.
00008  *
00009  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
00010  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
00011  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
00012  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
00013  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
00014  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
00015  * PERFORMANCE OF THIS SOFTWARE.
00016  */
00017 
00018 /* $Id: resolver.h,v 1.72 2011/12/05 17:10:51 each Exp $ */
00019 
00020 #ifndef DNS_RESOLVER_H
00021 #define DNS_RESOLVER_H 1
00022 
00023 /*****
00024  ***** Module Info
00025  *****/
00026 
00027 /*! \file dns/resolver.h
00028  *
00029  * \brief
00030  * This is the BIND 9 resolver, the module responsible for resolving DNS
00031  * requests by iteratively querying authoritative servers and following
00032  * referrals.  This is a "full resolver", not to be confused with
00033  * the stub resolvers most people associate with the word "resolver".
00034  * The full resolver is part of the caching name server or resolver
00035  * daemon the stub resolver talks to.
00036  *
00037  * MP:
00038  *\li   The module ensures appropriate synchronization of data structures it
00039  *      creates and manipulates.
00040  *
00041  * Reliability:
00042  *\li   No anticipated impact.
00043  *
00044  * Resources:
00045  *\li   TBS
00046  *
00047  * Security:
00048  *\li   No anticipated impact.
00049  *
00050  * Standards:
00051  *\li   RFCs:   1034, 1035, 2181, TBS
00052  *\li   Drafts: TBS
00053  */
00054 
00055 #include <isc/lang.h>
00056 #include <isc/socket.h>
00057 
00058 #include <dns/types.h>
00059 #include <dns/fixedname.h>
00060 
00061 ISC_LANG_BEGINDECLS
00062 
00063 /*%
00064  * A dns_fetchevent_t is sent when a 'fetch' completes.  Any of 'db',
00065  * 'node', 'rdataset', and 'sigrdataset' may be bound.  It is the
00066  * receiver's responsibility to detach before freeing the event.
00067  * \brief
00068  * 'rdataset', 'sigrdataset', 'client' and 'id' are the values that were
00069  * supplied when dns_resolver_createfetch() was called.  They are returned
00070  *  to the caller so that they may be freed.
00071  */
00072 typedef struct dns_fetchevent {
00073         ISC_EVENT_COMMON(struct dns_fetchevent);
00074         dns_fetch_t *                   fetch;
00075         isc_result_t                    result;
00076         dns_rdatatype_t                 qtype;
00077         dns_db_t *                      db;
00078         dns_dbnode_t *                  node;
00079         dns_rdataset_t *                rdataset;
00080         dns_rdataset_t *                sigrdataset;
00081         dns_fixedname_t                 foundname;
00082         isc_sockaddr_t *                client;
00083         dns_messageid_t                 id;
00084         isc_result_t                    vresult;
00085 } dns_fetchevent_t;
00086 
00087 /*
00088  * Options that modify how a 'fetch' is done.
00089  */
00090 #define DNS_FETCHOPT_TCP                0x001        /*%< Use TCP. */
00091 #define DNS_FETCHOPT_UNSHARED           0x002        /*%< See below. */
00092 #define DNS_FETCHOPT_RECURSIVE          0x004        /*%< Set RD? */
00093 #define DNS_FETCHOPT_NOEDNS0            0x008        /*%< Do not use EDNS. */
00094 #define DNS_FETCHOPT_FORWARDONLY        0x010        /*%< Only use forwarders. */
00095 #define DNS_FETCHOPT_NOVALIDATE         0x020        /*%< Disable validation. */
00096 #define DNS_FETCHOPT_EDNS512            0x040        /*%< Advertise a 512 byte
00097                                                           UDP buffer. */
00098 #define DNS_FETCHOPT_WANTNSID           0x080        /*%< Request NSID */
00099 #define DNS_FETCHOPT_PREFETCH           0x100        /*%< Do prefetch */
00100 #define DNS_FETCHOPT_NOCDFLAG           0x200        /*%< Don't set CD flag. */
00101 #define DNS_FETCHOPT_NONTA              0x400        /*%< Ignore NTA table. */
00102 
00103 /* Reserved in use by adb.c             0x00400000 */
00104 #define DNS_FETCHOPT_EDNSVERSIONSET     0x00800000
00105 #define DNS_FETCHOPT_EDNSVERSIONMASK    0xff000000
00106 #define DNS_FETCHOPT_EDNSVERSIONSHIFT   24
00107 
00108 /*
00109  * Upper bounds of class of query RTT (ms).  Corresponds to
00110  * dns_resstatscounter_queryrttX statistics counters.
00111  */
00112 #define DNS_RESOLVER_QRYRTTCLASS0       10
00113 #define DNS_RESOLVER_QRYRTTCLASS0STR    "10"
00114 #define DNS_RESOLVER_QRYRTTCLASS1       100
00115 #define DNS_RESOLVER_QRYRTTCLASS1STR    "100"
00116 #define DNS_RESOLVER_QRYRTTCLASS2       500
00117 #define DNS_RESOLVER_QRYRTTCLASS2STR    "500"
00118 #define DNS_RESOLVER_QRYRTTCLASS3       800
00119 #define DNS_RESOLVER_QRYRTTCLASS3STR    "800"
00120 #define DNS_RESOLVER_QRYRTTCLASS4       1600
00121 #define DNS_RESOLVER_QRYRTTCLASS4STR    "1600"
00122 
00123 /*
00124  * XXXRTH  Should this API be made semi-private?  (I.e.
00125  * _dns_resolver_create()).
00126  */
00127 
00128 #define DNS_RESOLVER_CHECKNAMES         0x01
00129 #define DNS_RESOLVER_CHECKNAMESFAIL     0x02
00130 
00131 isc_result_t
00132 dns_resolver_create(dns_view_t *view,
00133                     isc_taskmgr_t *taskmgr,
00134                     unsigned int ntasks, unsigned int ndisp,
00135                     isc_socketmgr_t *socketmgr,
00136                     isc_timermgr_t *timermgr,
00137                     unsigned int options,
00138                     dns_dispatchmgr_t *dispatchmgr,
00139                     dns_dispatch_t *dispatchv4,
00140                     dns_dispatch_t *dispatchv6,
00141                     dns_resolver_t **resp);
00142 
00143 /*%<
00144  * Create a resolver.
00145  *
00146  * Notes:
00147  *
00148  *\li   Generally, applications should not create a resolver directly, but
00149  *      should instead call dns_view_createresolver().
00150  *
00151  * Requires:
00152  *
00153  *\li   'view' is a valid view.
00154  *
00155  *\li   'taskmgr' is a valid task manager.
00156  *
00157  *\li   'ntasks' > 0.
00158  *
00159  *\li   'socketmgr' is a valid socket manager.
00160  *
00161  *\li   'timermgr' is a valid timer manager.
00162  *
00163  *\li   'dispatchv4' is a dispatch with an IPv4 UDP socket, or is NULL.
00164  *      If not NULL, 'ndisp' clones of it will be created by the resolver.
00165  *
00166  *\li   'dispatchv6' is a dispatch with an IPv6 UDP socket, or is NULL.
00167  *      If not NULL, 'ndisp' clones of it will be created by the resolver.
00168  *
00169  *\li   resp != NULL && *resp == NULL.
00170  *
00171  * Returns:
00172  *
00173  *\li   #ISC_R_SUCCESS                          On success.
00174  *
00175  *\li   Anything else                           Failure.
00176  */
00177 
00178 void
00179 dns_resolver_freeze(dns_resolver_t *res);
00180 /*%<
00181  * Freeze resolver.
00182  *
00183  * Notes:
00184  *
00185  *\li   Certain configuration changes cannot be made after the resolver
00186  *      is frozen.  Fetches cannot be created until the resolver is frozen.
00187  *
00188  * Requires:
00189  *
00190  *\li   'res' is a valid resolver.
00191  *
00192  * Ensures:
00193  *
00194  *\li   'res' is frozen.
00195  */
00196 
00197 void
00198 dns_resolver_prime(dns_resolver_t *res);
00199 /*%<
00200  * Prime resolver.
00201  *
00202  * Notes:
00203  *
00204  *\li   Resolvers which have a forwarding policy other than dns_fwdpolicy_only
00205  *      need to be primed with the root nameservers, otherwise the root
00206  *      nameserver hints data may be used indefinitely.  This function requests
00207  *      that the resolver start a priming fetch, if it isn't already priming.
00208  *
00209  * Requires:
00210  *
00211  *\li   'res' is a valid, frozen resolver.
00212  */
00213 
00214 
00215 void
00216 dns_resolver_whenshutdown(dns_resolver_t *res, isc_task_t *task,
00217                           isc_event_t **eventp);
00218 /*%<
00219  * Send '*eventp' to 'task' when 'res' has completed shutdown.
00220  *
00221  * Notes:
00222  *
00223  *\li   It is not safe to detach the last reference to 'res' until
00224  *      shutdown is complete.
00225  *
00226  * Requires:
00227  *
00228  *\li   'res' is a valid resolver.
00229  *
00230  *\li   'task' is a valid task.
00231  *
00232  *\li   *eventp is a valid event.
00233  *
00234  * Ensures:
00235  *
00236  *\li   *eventp == NULL.
00237  */
00238 
00239 void
00240 dns_resolver_shutdown(dns_resolver_t *res);
00241 /*%<
00242  * Start the shutdown process for 'res'.
00243  *
00244  * Notes:
00245  *
00246  *\li   This call has no effect if the resolver is already shutting down.
00247  *
00248  * Requires:
00249  *
00250  *\li   'res' is a valid resolver.
00251  */
00252 
00253 void
00254 dns_resolver_attach(dns_resolver_t *source, dns_resolver_t **targetp);
00255 
00256 void
00257 dns_resolver_detach(dns_resolver_t **resp);
00258 
00259 isc_result_t
00260 dns_resolver_createfetch(dns_resolver_t *res, dns_name_t *name,
00261                          dns_rdatatype_t type,
00262                          dns_name_t *domain, dns_rdataset_t *nameservers,
00263                          dns_forwarders_t *forwarders,
00264                          unsigned int options, isc_task_t *task,
00265                          isc_taskaction_t action, void *arg,
00266                          dns_rdataset_t *rdataset,
00267                          dns_rdataset_t *sigrdataset,
00268                          dns_fetch_t **fetchp);
00269 
00270 isc_result_t
00271 dns_resolver_createfetch2(dns_resolver_t *res, dns_name_t *name,
00272                           dns_rdatatype_t type,
00273                           dns_name_t *domain, dns_rdataset_t *nameservers,
00274                           dns_forwarders_t *forwarders,
00275                           isc_sockaddr_t *client, isc_uint16_t id,
00276                           unsigned int options, isc_task_t *task,
00277                           isc_taskaction_t action, void *arg,
00278                           dns_rdataset_t *rdataset,
00279                           dns_rdataset_t *sigrdataset,
00280                           dns_fetch_t **fetchp);
00281 isc_result_t
00282 dns_resolver_createfetch3(dns_resolver_t *res, dns_name_t *name,
00283                           dns_rdatatype_t type,
00284                           dns_name_t *domain, dns_rdataset_t *nameservers,
00285                           dns_forwarders_t *forwarders,
00286                           isc_sockaddr_t *client, isc_uint16_t id,
00287                           unsigned int options, unsigned int depth,
00288                           isc_counter_t *qc, isc_task_t *task,
00289                           isc_taskaction_t action, void *arg,
00290                           dns_rdataset_t *rdataset,
00291                           dns_rdataset_t *sigrdataset,
00292                           dns_fetch_t **fetchp);
00293 /*%<
00294  * Recurse to answer a question.
00295  *
00296  * Notes:
00297  *
00298  *\li   This call starts a query for 'name', type 'type'.
00299  *
00300  *\li   The 'domain' is a parent domain of 'name' for which
00301  *      a set of name servers 'nameservers' is known.  If no
00302  *      such name server information is available, set
00303  *      'domain' and 'nameservers' to NULL.
00304  *
00305  *\li   'forwarders' is unimplemented, and subject to change when
00306  *      we figure out how selective forwarding will work.
00307  *
00308  *\li   When the fetch completes (successfully or otherwise), a
00309  *      #DNS_EVENT_FETCHDONE event with action 'action' and arg 'arg' will be
00310  *      posted to 'task'.
00311  *
00312  *\li   The values of 'rdataset' and 'sigrdataset' will be returned in
00313  *      the FETCHDONE event.
00314  *
00315  *\li   'client' and 'id' are used for duplicate query detection.  '*client'
00316  *      must remain stable until after 'action' has been called or
00317  *      dns_resolver_cancelfetch() is called.
00318  *
00319  * Requires:
00320  *
00321  *\li   'res' is a valid resolver that has been frozen.
00322  *
00323  *\li   'name' is a valid name.
00324  *
00325  *\li   'type' is not a meta type other than ANY.
00326  *
00327  *\li   'domain' is a valid name or NULL.
00328  *
00329  *\li   'nameservers' is a valid NS rdataset (whose owner name is 'domain')
00330  *      iff. 'domain' is not NULL.
00331  *
00332  *\li   'forwarders' is NULL.
00333  *
00334  *\li   'client' is a valid sockaddr or NULL.
00335  *
00336  *\li   'options' contains valid options.
00337  *
00338  *\li   'rdataset' is a valid, disassociated rdataset.
00339  *
00340  *\li   'sigrdataset' is NULL, or is a valid, disassociated rdataset.
00341  *
00342  *\li   fetchp != NULL && *fetchp == NULL.
00343  *
00344  * Returns:
00345  *
00346  *\li   #ISC_R_SUCCESS                                  Success
00347  *\li   #DNS_R_DUPLICATE
00348  *\li   #DNS_R_DROP
00349  *
00350  *\li   Many other values are possible, all of which indicate failure.
00351  */
00352 
00353 void
00354 dns_resolver_cancelfetch(dns_fetch_t *fetch);
00355 /*%<
00356  * Cancel 'fetch'.
00357  *
00358  * Notes:
00359  *
00360  *\li   If 'fetch' has not completed, post its FETCHDONE event with a
00361  *      result code of #ISC_R_CANCELED.
00362  *
00363  * Requires:
00364  *
00365  *\li   'fetch' is a valid fetch.
00366  */
00367 
00368 void
00369 dns_resolver_destroyfetch(dns_fetch_t **fetchp);
00370 /*%<
00371  * Destroy 'fetch'.
00372  *
00373  * Requires:
00374  *
00375  *\li   '*fetchp' is a valid fetch.
00376  *
00377  *\li   The caller has received the FETCHDONE event (either because the
00378  *      fetch completed or because dns_resolver_cancelfetch() was called).
00379  *
00380  * Ensures:
00381  *
00382  *\li   *fetchp == NULL.
00383  */
00384 
00385 void
00386 dns_resolver_logfetch(dns_fetch_t *fetch, isc_log_t *lctx,
00387                       isc_logcategory_t *category, isc_logmodule_t *module,
00388                       int level, isc_boolean_t duplicateok);
00389 /*%<
00390  * Dump a log message on internal state at the completion of given 'fetch'.
00391  * 'lctx', 'category', 'module', and 'level' are used to write the log message.
00392  * By default, only one log message is written even if the corresponding fetch
00393  * context serves multiple clients; if 'duplicateok' is true the suppression
00394  * is disabled and the message can be written every time this function is
00395  * called.
00396  *
00397  * Requires:
00398  *
00399  *\li   'fetch' is a valid fetch, and has completed.
00400  */
00401 
00402 dns_dispatchmgr_t *
00403 dns_resolver_dispatchmgr(dns_resolver_t *resolver);
00404 
00405 dns_dispatch_t *
00406 dns_resolver_dispatchv4(dns_resolver_t *resolver);
00407 
00408 dns_dispatch_t *
00409 dns_resolver_dispatchv6(dns_resolver_t *resolver);
00410 
00411 isc_socketmgr_t *
00412 dns_resolver_socketmgr(dns_resolver_t *resolver);
00413 
00414 isc_taskmgr_t *
00415 dns_resolver_taskmgr(dns_resolver_t *resolver);
00416 
00417 isc_uint32_t
00418 dns_resolver_getlamettl(dns_resolver_t *resolver);
00419 /*%<
00420  * Get the resolver's lame-ttl.  zero => no lame processing.
00421  *
00422  * Requires:
00423  *\li   'resolver' to be valid.
00424  */
00425 
00426 void
00427 dns_resolver_setlamettl(dns_resolver_t *resolver, isc_uint32_t lame_ttl);
00428 /*%<
00429  * Set the resolver's lame-ttl.  zero => no lame processing.
00430  *
00431  * Requires:
00432  *\li   'resolver' to be valid.
00433  */
00434 
00435 unsigned int
00436 dns_resolver_nrunning(dns_resolver_t *resolver);
00437 /*%<
00438  * Return the number of currently running resolutions in this
00439  * resolver.  This is may be less than the number of outstanding
00440  * fetches due to multiple identical fetches, or more than the
00441  * number of of outstanding fetches due to the fact that resolution
00442  * can continue even though a fetch has been canceled.
00443  */
00444 
00445 isc_result_t
00446 dns_resolver_addalternate(dns_resolver_t *resolver, isc_sockaddr_t *alt,
00447                           dns_name_t *name, in_port_t port);
00448 /*%<
00449  * Add alternate addresses to be tried in the event that the nameservers
00450  * for a zone are not available in the address families supported by the
00451  * operating system.
00452  *
00453  * Require:
00454  * \li  only one of 'name' or 'alt' to be valid.
00455  */
00456 
00457 void
00458 dns_resolver_setudpsize(dns_resolver_t *resolver, isc_uint16_t udpsize);
00459 /*%<
00460  * Set the EDNS UDP buffer size advertised by the server.
00461  */
00462 
00463 isc_uint16_t
00464 dns_resolver_getudpsize(dns_resolver_t *resolver);
00465 /*%<
00466  * Get the current EDNS UDP buffer size.
00467  */
00468 
00469 void
00470 dns_resolver_reset_algorithms(dns_resolver_t *resolver);
00471 /*%<
00472  * Clear the disabled DNSSEC algorithms.
00473  */
00474 
00475 void
00476 dns_resolver_reset_ds_digests(dns_resolver_t *resolver);
00477 /*%<
00478  * Clear the disabled DS/DLV digest types.
00479  */
00480 
00481 isc_result_t
00482 dns_resolver_disable_algorithm(dns_resolver_t *resolver, dns_name_t *name,
00483                                unsigned int alg);
00484 /*%<
00485  * Mark the given DNSSEC algorithm as disabled and below 'name'.
00486  * Valid algorithms are less than 256.
00487  *
00488  * Returns:
00489  *\li   #ISC_R_SUCCESS
00490  *\li   #ISC_R_RANGE
00491  *\li   #ISC_R_NOMEMORY
00492  */
00493 
00494 isc_result_t
00495 dns_resolver_disable_ds_digest(dns_resolver_t *resolver, dns_name_t *name,
00496                                unsigned int digest_type);
00497 /*%<
00498  * Mark the given DS/DLV digest type as disabled and below 'name'.
00499  * Valid types are less than 256.
00500  *
00501  * Returns:
00502  *\li   #ISC_R_SUCCESS
00503  *\li   #ISC_R_RANGE
00504  *\li   #ISC_R_NOMEMORY
00505  */
00506 
00507 isc_boolean_t
00508 dns_resolver_algorithm_supported(dns_resolver_t *resolver, dns_name_t *name,
00509                                  unsigned int alg);
00510 /*%<
00511  * Check if the given algorithm is supported by this resolver.
00512  * This checks whether the algorithm has been disabled via
00513  * dns_resolver_disable_algorithm(), then checks the underlying
00514  * crypto libraries if it was not specifically disabled.
00515  */
00516 
00517 isc_boolean_t
00518 dns_resolver_ds_digest_supported(dns_resolver_t *resolver, dns_name_t *name,
00519                                  unsigned int digest_type);
00520 /*%<
00521  * Check if the given digest type is supported by this resolver.
00522  * This checks whether the digest type has been disabled via
00523  * dns_resolver_disable_ds_digest(), then checks the underlying
00524  * crypto libraries if it was not specifically disabled.
00525  */
00526 
00527 void
00528 dns_resolver_resetmustbesecure(dns_resolver_t *resolver);
00529 
00530 isc_result_t
00531 dns_resolver_setmustbesecure(dns_resolver_t *resolver, dns_name_t *name,
00532                              isc_boolean_t value);
00533 
00534 isc_boolean_t
00535 dns_resolver_getmustbesecure(dns_resolver_t *resolver, dns_name_t *name);
00536 
00537 
00538 void
00539 dns_resolver_settimeout(dns_resolver_t *resolver, unsigned int seconds);
00540 /*%<
00541  * Set the length of time the resolver will work on a query, in seconds.
00542  *
00543  * If timeout is 0, the default timeout will be applied.
00544  *
00545  * Requires:
00546  * \li  resolver to be valid.
00547  */
00548 
00549 unsigned int
00550 dns_resolver_gettimeout(dns_resolver_t *resolver);
00551 /*%<
00552  * Get the current length of time the resolver will work on a query, in seconds.
00553  *
00554  * Requires:
00555  * \li  resolver to be valid.
00556  */
00557 
00558 void
00559 dns_resolver_setclientsperquery(dns_resolver_t *resolver,
00560                                 isc_uint32_t min, isc_uint32_t max);
00561 
00562 void
00563 dns_resolver_getclientsperquery(dns_resolver_t *resolver, isc_uint32_t *cur,
00564                                 isc_uint32_t *min, isc_uint32_t *max);
00565 
00566 isc_boolean_t
00567 dns_resolver_getzeronosoattl(dns_resolver_t *resolver);
00568 
00569 void
00570 dns_resolver_setzeronosoattl(dns_resolver_t *resolver, isc_boolean_t state);
00571 
00572 unsigned int
00573 dns_resolver_getoptions(dns_resolver_t *resolver);
00574 
00575 void
00576 dns_resolver_addbadcache(dns_resolver_t *resolver, dns_name_t *name,
00577                          dns_rdatatype_t type, isc_time_t *expire);
00578 /*%<
00579  * Add a entry to the bad cache for <name,type> that will expire at 'expire'.
00580  *
00581  * Requires:
00582  * \li  resolver to be valid.
00583  * \li  name to be valid.
00584  */
00585 
00586 isc_boolean_t
00587 dns_resolver_getbadcache(dns_resolver_t *resolver, dns_name_t *name,
00588                          dns_rdatatype_t type, isc_time_t *now);
00589 /*%<
00590  * Check to see if there is a unexpired entry in the bad cache for
00591  * <name,type>.
00592  *
00593  * Requires:
00594  * \li  resolver to be valid.
00595  * \li  name to be valid.
00596  */
00597 
00598 void
00599 dns_resolver_flushbadcache(dns_resolver_t *resolver, dns_name_t *name);
00600 /*%<
00601  * Flush the bad cache of all entries at 'name' if 'name' is non NULL.
00602  * Flush the entire bad cache if 'name' is NULL.
00603  *
00604  * Requires:
00605  * \li  resolver to be valid.
00606  */
00607 
00608 void
00609 dns_resolver_flushbadnames(dns_resolver_t *resolver, dns_name_t *name);
00610 /*%<
00611  * Flush the bad cache of all entries at or below 'name'.
00612  *
00613  * Requires:
00614  * \li  resolver to be valid.
00615  * \li  name != NULL
00616  */
00617 
00618 void
00619 dns_resolver_printbadcache(dns_resolver_t *resolver, FILE *fp);
00620 /*%
00621  * Print out the contents of the bad cache to 'fp'.
00622  *
00623  * Requires:
00624  * \li  resolver to be valid.
00625  */
00626 
00627 void
00628 dns_resolver_setquerydscp4(dns_resolver_t *resolver, isc_dscp_t dscp);
00629 isc_dscp_t
00630 dns_resolver_getquerydscp4(dns_resolver_t *resolver);
00631 
00632 void
00633 dns_resolver_setquerydscp6(dns_resolver_t *resolver, isc_dscp_t dscp);
00634 isc_dscp_t
00635 dns_resolver_getquerydscp6(dns_resolver_t *resolver);
00636 /*%
00637  * Get and set the DSCP values for the resolver's IPv4 and IPV6 query
00638  * sources.
00639  *
00640  * Requires:
00641  * \li  resolver to be valid.
00642  */
00643 
00644 void
00645 dns_resolver_setmaxdepth(dns_resolver_t *resolver, unsigned int maxdepth);
00646 unsigned int
00647 dns_resolver_getmaxdepth(dns_resolver_t *resolver);
00648 /*%
00649  * Get and set how many NS indirections will be followed when looking for
00650  * nameserver addresses.
00651  *
00652  * Requires:
00653  * \li  resolver to be valid.
00654  */
00655 
00656 void
00657 dns_resolver_setmaxqueries(dns_resolver_t *resolver, unsigned int queries);
00658 unsigned int
00659 dns_resolver_getmaxqueries(dns_resolver_t *resolver);
00660 /*%
00661  * Get and set how many iterative queries will be allowed before
00662  * terminating a recursive query.
00663  *
00664  * Requires:
00665  * \li  resolver to be valid.
00666  */
00667 
00668 ISC_LANG_ENDDECLS
00669 
00670 #endif /* DNS_RESOLVER_H */

Generated on Tue Apr 28 17:40:57 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha