rriterator.c File Reference

#include <config.h>
#include <isc/string.h>
#include <isc/util.h>
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/rdata.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/result.h>
#include <dns/rriterator.h>

Go to the source code of this file.

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_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'.
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.


Detailed Description

Definition in file rriterator.c.


Function Documentation

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:

Returns:

Requires: Returns:

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:

Returns:

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:

Returns:

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_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:

Ensures:

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:

Ensures:

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().

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:

Ensures:

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().


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