#include <isc/lang.h>
#include <isc/magic.h>
#include <isc/ondestroy.h>
#include <isc/stdtime.h>
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rdata.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/types.h>
Go to the source code of this file.
Data Structures | |
struct | dns_rriterator |
A dns_rriterator_t is an iterator that iterates over an entire database, returning one RR at a time, in some arbitrary order. More... | |
Defines | |
#define | DNS_RRITERATOR_H 1 |
#define | RRITERATOR_MAGIC ISC_MAGIC('R', 'R', 'I', 't') |
#define | VALID_RRITERATOR(m) ISC_MAGIC_VALID(m, RRITERATOR_MAGIC) |
Typedefs | |
typedef ISC_LANG_BEGINDECLS struct dns_rriterator | dns_rriterator_t |
Functions | |
isc_result_t | dns_rriterator_init (dns_rriterator_t *it, dns_db_t *db, dns_dbversion_t *ver, isc_stdtime_t now) |
isc_result_t | dns_rriterator_first (dns_rriterator_t *it) |
Initialize an rriterator; sets the cursor to the origin node of the database. | |
isc_result_t | dns_rriterator_nextrrset (dns_rriterator_t *it) |
Move the rriterator cursor to the next rrset in the database, skipping over any remaining records that have the same rdatatype as the current one. | |
isc_result_t | dns_rriterator_next (dns_rriterator_t *it) |
Move the rriterator cursor to the next rrset in the database, skipping over any remaining records that have the same rdatatype as the current one. | |
void | dns_rriterator_current (dns_rriterator_t *it, dns_name_t **name, isc_uint32_t *ttl, dns_rdataset_t **rdataset, dns_rdata_t **rdata) |
Make '*name' refer to the current name. If 'rdataset' is not NULL, make '*rdataset' refer to the current * rdataset. If '*rdata' is not NULL, make '*rdata' refer to the current record. | |
void | dns_rriterator_pause (dns_rriterator_t *it) |
Pause rriterator. Frees any locks held by the database iterator. Callers should use this routine any time they are not going to execute another rriterator method in the immediate future. | |
void | dns_rriterator_destroy (dns_rriterator_t *it) |
Shut down and free resources in rriterator 'it'. |
Definition in file rriterator.h.
#define DNS_RRITERATOR_H 1 |
Definition at line 20 of file rriterator.h.
#define RRITERATOR_MAGIC ISC_MAGIC('R', 'R', 'I', 't') |
#define VALID_RRITERATOR | ( | m | ) | ISC_MAGIC_VALID(m, RRITERATOR_MAGIC) |
Definition at line 75 of file rriterator.h.
Referenced by dns_rriterator_current(), dns_rriterator_destroy(), dns_rriterator_first(), dns_rriterator_next(), dns_rriterator_nextrrset(), and dns_rriterator_pause().
typedef ISC_LANG_BEGINDECLS struct dns_rriterator dns_rriterator_t |
isc_result_t dns_rriterator_init | ( | dns_rriterator_t * | it, | |
dns_db_t * | db, | |||
dns_dbversion_t * | ver, | |||
isc_stdtime_t | now | |||
) |
Definition at line 43 of file rriterator.c.
References dns_db_createiterator(), dns_fixedname_init, dns_rdata_init(), dns_rdataset_init(), dns_rdataset_isassociated(), INSIST, ISC_R_SUCCESS, and RRITERATOR_MAGIC.
Referenced by axfr_rrstream_create(), mkey_dumpzone(), sync_keyzone(), and zone_refreshkeys().
isc_result_t dns_rriterator_first | ( | dns_rriterator_t * | it | ) |
Initialize an rriterator; sets the cursor to the origin node of the database.
Requires:
Definition at line 66 of file rriterator.c.
References dns_db_allrdatasets(), dns_db_detachnode(), dns_dbiterator_current(), dns_dbiterator_first(), dns_dbiterator_next(), dns_fixedname_name, dns_rdataset_disassociate(), dns_rdataset_first(), dns_rdataset_getownercase(), dns_rdataset_isassociated(), DNS_RDATASETATTR_LOADORDER, dns_rdatasetiter_current(), dns_rdatasetiter_destroy(), dns_rdatasetiter_first(), ISC_R_SUCCESS, REQUIRE, and VALID_RRITERATOR.
Referenced by axfr_rrstream_first(), mkey_dumpzone(), sync_keyzone(), and zone_refreshkeys().
isc_result_t dns_rriterator_nextrrset | ( | dns_rriterator_t * | it | ) |
Move the rriterator cursor to the next rrset in the database, skipping over any remaining records that have the same rdatatype as the current one.
Requires:
Definition at line 113 of file rriterator.c.
References dns_db_allrdatasets(), dns_db_detachnode(), dns_dbiterator_current(), dns_dbiterator_next(), dns_fixedname_name, dns_rdataset_disassociate(), dns_rdataset_first(), dns_rdataset_getownercase(), dns_rdataset_isassociated(), DNS_RDATASETATTR_LOADORDER, dns_rdatasetiter_current(), dns_rdatasetiter_destroy(), dns_rdatasetiter_first(), dns_rdatasetiter_next(), ISC_R_NOMORE, ISC_R_SUCCESS, REQUIRE, and VALID_RRITERATOR.
Referenced by dns_rriterator_next(), mkey_dumpzone(), sync_keyzone(), and zone_refreshkeys().
isc_result_t dns_rriterator_next | ( | dns_rriterator_t * | it | ) |
Move the rriterator cursor to the next rrset in the database, skipping over any remaining records that have the same rdatatype as the current one.
Requires:
Definition at line 153 of file rriterator.c.
References dns_rdataset_next(), dns_rriterator_nextrrset(), INSIST, ISC_R_NOMORE, ISC_R_SUCCESS, REQUIRE, and VALID_RRITERATOR.
Referenced by axfr_rrstream_first(), and axfr_rrstream_next().
void dns_rriterator_current | ( | dns_rriterator_t * | it, | |
dns_name_t ** | name, | |||
isc_uint32_t * | ttl, | |||
dns_rdataset_t ** | rdataset, | |||
dns_rdata_t ** | rdata | |||
) |
Make '*name' refer to the current name. If 'rdataset' is not NULL, make '*rdataset' refer to the current * rdataset. If '*rdata' is not NULL, make '*rdata' refer to the current record.
Requires:
Definition at line 187 of file rriterator.c.
References dns_fixedname_name, dns_rdata_reset(), dns_rdataset_current(), ISC_R_SUCCESS, REQUIRE, and VALID_RRITERATOR.
Referenced by axfr_rrstream_current(), axfr_rrstream_first(), axfr_rrstream_next(), mkey_dumpzone(), sync_keyzone(), and zone_refreshkeys().
void dns_rriterator_pause | ( | dns_rriterator_t * | it | ) |
Pause rriterator. Frees any locks held by the database iterator. Callers should use this routine any time they are not going to execute another rriterator method in the immediate future.
Requires:
Definition at line 169 of file rriterator.c.
References dns_dbiterator_pause(), ISC_R_SUCCESS, REQUIRE, RUNTIME_CHECK, and VALID_RRITERATOR.
Referenced by axfr_rrstream_pause().
void dns_rriterator_destroy | ( | dns_rriterator_t * | it | ) |
Shut down and free resources in rriterator 'it'.
Requires:
Definition at line 175 of file rriterator.c.
References dns_db_detachnode(), dns_dbiterator_destroy(), dns_rdataset_disassociate(), dns_rdataset_isassociated(), dns_rdatasetiter_destroy(), REQUIRE, and VALID_RRITERATOR.
Referenced by axfr_rrstream_destroy(), mkey_dumpzone(), sync_keyzone(), and zone_refreshkeys().