finder_inc.cc 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. namespace {
  2. const char* const ZoneFinder_doc = "\
  3. The base class to search a zone for RRsets.\n\
  4. \n\
  5. The ZoneFinder class is a wrapper for the c++ base class for representing an\n\
  6. object that performs DNS lookups in a specific zone accessible via a\n\
  7. data source. In general, different types of data sources (in-memory,\n\
  8. database-based, etc) define their own derived c++ classes of ZoneFinder,\n\
  9. implementing ways to retrieve the required data through the common\n\
  10. interfaces declared in the base class. Each concrete ZoneFinder object\n\
  11. is therefore (conceptually) associated with a specific zone of one\n\
  12. specific data source instance.\n\
  13. \n\
  14. The origin name and the RR class of the associated zone are available\n\
  15. via the get_origin() and get_class() methods, respectively.\n\
  16. \n\
  17. The most important method of this class is find(), which performs the\n\
  18. lookup for a given domain and type. See the description of the method\n\
  19. for details.\n\
  20. \n\
  21. It's not clear whether we should request that a zone finder form a\n\
  22. \"transaction\", that is, whether to ensure the finder is not\n\
  23. susceptible to changes made by someone else than the creator of the\n\
  24. finder. If we don't request that, for example, two different lookup\n\
  25. results for the same name and type can be different if other threads\n\
  26. or programs make updates to the zone between the lookups. We should\n\
  27. revisit this point as we gain more experiences.\n\
  28. \n\
  29. ";
  30. const char* const ZoneFinder_getOrigin_doc = "\
  31. get_origin() -> isc.dns.Name\n\
  32. \n\
  33. Return the origin name of the zone.\n\
  34. \n\
  35. ";
  36. const char* const ZoneFinder_getClass_doc = "\
  37. get_class() -> isc.dns.RRClass\n\
  38. \n\
  39. Return the RR class of the zone.\n\
  40. \n\
  41. ";
  42. const char* const ZoneFinder_find_doc = "\
  43. find(name, type, target=NULL, options=FIND_DEFAULT) -> (code, FindResult)\n\
  44. \n\
  45. Search the zone for a given pair of domain name and RR type.\n\
  46. \n\
  47. - If the search name belongs under a zone cut, it returns the code of\n\
  48. DELEGATION and the NS RRset at the zone cut.\n\
  49. - If there is no matching name, it returns the code of NXDOMAIN, and,\n\
  50. if DNSSEC is requested, the NSEC RRset that proves the non-\n\
  51. existence.\n\
  52. - If there is a matching name but no RRset of the search type, it\n\
  53. returns the code of NXRRSET, and, if DNSSEC is required, the NSEC\n\
  54. RRset for that name.\n\
  55. - If there is a CNAME RR of the searched name but there is no RR of\n\
  56. the searched type of the name (so this type is different from\n\
  57. CNAME), it returns the code of CNAME and that CNAME RR. Note that if\n\
  58. the searched RR type is CNAME, it is considered a successful match,\n\
  59. and the code of SUCCESS will be returned.\n\
  60. - If the search name matches a delegation point of DNAME, it returns\n\
  61. the code of DNAME and that DNAME RR.\n\
  62. - If the result was synthesized by a wildcard match, it returns the\n\
  63. code WILDCARD and the synthesized RRset\n\
  64. - If the query matched a wildcard name, but not its type, it returns the\n\
  65. code WILDCARD_NXRRSET, and None\n\
  66. - If the target is a list, all RRsets under the domain are inserted\n\
  67. there and SUCCESS (or NXDOMAIN, in case of empty domain) is returned\n\
  68. instead of normall processing. This is intended to handle ANY query.\n\
  69. : this behavior is controversial as we discussed in\n\
  70. https://lists.isc.org/pipermail/bind10-dev/2011-January/001918.html\n\
  71. We should revisit the interface before we heavily rely on it. The\n\
  72. options parameter specifies customized behavior of the search. Their\n\
  73. semantics is as follows:\n\
  74. (This feature is disable at this time)\n\
  75. - GLUE_OK Allow search under a zone cut. By default the search will\n\
  76. stop once it encounters a zone cut. If this option is specified it\n\
  77. remembers information about the highest zone cut and continues the\n\
  78. search until it finds an exact match for the given name or it\n\
  79. detects there is no exact match. If an exact match is found, RRsets\n\
  80. for that name are searched just like the normal case; otherwise, if\n\
  81. the search has encountered a zone cut, DELEGATION with the\n\
  82. information of the highest zone cut will be returned.\n\
  83. \n\
  84. This method raises an isc.datasrc.Error exception if there is an internal\n\
  85. error in the datasource.\n\
  86. \n\
  87. Parameters:\n\
  88. name The domain name to be searched for.\n\
  89. type The RR type to be searched for.\n\
  90. target If target is not NULL, insert all RRs under the domain\n\
  91. into it.\n\
  92. options The search options.\n\
  93. \n\
  94. Return Value(s): A tuple of a result code an a FindResult object enclosing\n\
  95. the search result (see above).\n\
  96. ";
  97. const char* const ZoneFinder_find_previous_name_doc = "\
  98. find_previous_name(isc.dns.Name) -> isc.dns.Name\n\
  99. \n\
  100. Gets the previous name in the DNSSEC order. This can be used\n\
  101. to find the correct NSEC records for proving nonexistence\n\
  102. of domains.\n\
  103. \n\
  104. This method does not include under-zone-cut data (glue data).\n\
  105. \n\
  106. Raises isc.datasrc.NotImplemented in case the data source backend\n\
  107. doesn't support DNSSEC or there is no previous in the zone (NSEC\n\
  108. records might be missing in the DB, the queried name is less or\n\
  109. equal to the apex).\n\
  110. \n\
  111. Raises isc.datasrc.Error for low-level or internal datasource errors\n\
  112. (like broken connection to database, wrong data living there).\n\
  113. ";
  114. } // unnamed namespace