/
usr
/
include
/
bind9
/
dns
/
/usr/include/bind9/dns
mkdir
upload
Name
Size
Mode
Actions
acache.h
14232
0644
edit
dl
rm
acl.h
7242
0644
edit
dl
rm
adb.h
22595
0644
edit
dl
rm
badcache.h
3369
0644
edit
dl
rm
bit.h
807
0644
edit
dl
rm
byaddr.h
4002
0644
edit
dl
rm
cache.h
8643
0644
edit
dl
rm
callbacks.h
2271
0644
edit
dl
rm
catz.h
11833
0644
edit
dl
rm
cert.h
1466
0644
edit
dl
rm
client.h
22042
0644
edit
dl
rm
clientinfo.h
2006
0644
edit
dl
rm
compress.h
6646
0644
edit
dl
rm
db.h
47061
0644
edit
dl
rm
dbiterator.h
7422
0644
edit
dl
rm
dbtable.h
3165
0644
edit
dl
rm
diff.h
6980
0644
edit
dl
rm
dispatch.h
16427
0644
edit
dl
rm
dlz.h
10618
0644
edit
dl
rm
dlz_dlopen.h
4677
0644
edit
dl
rm
dns64.h
5635
0644
edit
dl
rm
dnssec.h
12371
0644
edit
dl
rm
dnstap.h
9364
0644
edit
dl
rm
ds.h
1225
0644
edit
dl
rm
dsdigest.h
1722
0644
edit
dl
rm
dyndb.h
4835
0644
edit
dl
rm
ecdb.h
809
0644
edit
dl
rm
edns.h
722
0644
edit
dl
rm
enumclass.h
1220
0644
edit
dl
rm
enumtype.h
8300
0644
edit
dl
rm
events.h
4059
0644
edit
dl
rm
fixedname.h
1663
0644
edit
dl
rm
forward.h
3452
0644
edit
dl
rm
geoip.h
2792
0644
edit
dl
rm
ipkeylist.h
2186
0644
edit
dl
rm
iptable.h
1621
0644
edit
dl
rm
journal.h
8227
0644
edit
dl
rm
keydata.h
1059
0644
edit
dl
rm
keyflags.h
1278
0644
edit
dl
rm
keytable.h
9462
0644
edit
dl
rm
keyvalues.h
4159
0644
edit
dl
rm
lib.h
1192
0644
edit
dl
rm
log.h
3964
0644
edit
dl
rm
lookup.h
2924
0644
edit
dl
rm
master.h
11289
0644
edit
dl
rm
masterdump.h
12647
0644
edit
dl
rm
message.h
39023
0644
edit
dl
rm
name.h
37115
0644
edit
dl
rm
ncache.h
4929
0644
edit
dl
rm
nsec.h
3397
0644
edit
dl
rm
nsec3.h
8032
0644
edit
dl
rm
nta.h
4548
0644
edit
dl
rm
opcode.h
1007
0644
edit
dl
rm
order.h
1999
0644
edit
dl
rm
peer.h
5966
0644
edit
dl
rm
portlist.h
2101
0644
edit
dl
rm
private.h
1935
0644
edit
dl
rm
rbt.h
40618
0644
edit
dl
rm
rcode.h
2481
0644
edit
dl
rm
rdata.h
21613
0644
edit
dl
rm
rdataclass.h
2257
0644
edit
dl
rm
rdatalist.h
2569
0644
edit
dl
rm
rdataset.h
21536
0644
edit
dl
rm
rdatasetiter.h
3926
0644
edit
dl
rm
rdataslab.h
4528
0644
edit
dl
rm
rdatastruct.h
61584
0644
edit
dl
rm
rdatatype.h
2298
0644
edit
dl
rm
request.h
11156
0644
edit
dl
rm
resolver.h
20227
0644
edit
dl
rm
result.h
9284
0644
edit
dl
rm
rootns.h
892
0644
edit
dl
rm
rpz.h
10335
0644
edit
dl
rm
rriterator.h
4230
0644
edit
dl
rm
rrl.h
6640
0644
edit
dl
rm
sdb.h
7224
0644
edit
dl
rm
sdlz.h
14214
0644
edit
dl
rm
secalg.h
1706
0644
edit
dl
rm
secproto.h
1557
0644
edit
dl
rm
soa.h
2186
0644
edit
dl
rm
ssu.h
8308
0644
edit
dl
rm
stats.h
13451
0644
edit
dl
rm
tcpmsg.h
3145
0644
edit
dl
rm
time.h
1695
0644
edit
dl
rm
timer.h
1051
0644
edit
dl
rm
tkey.h
7631
0644
edit
dl
rm
tsec.h
2949
0644
edit
dl
rm
tsig.h
8384
0644
edit
dl
rm
ttl.h
1945
0644
edit
dl
rm
types.h
14212
0644
edit
dl
rm
update.h
1653
0644
edit
dl
rm
validator.h
7161
0644
edit
dl
rm
version.h
868
0644
edit
dl
rm
view.h
35274
0644
edit
dl
rm
xfrin.h
2924
0644
edit
dl
rm
zone.h
60864
0644
edit
dl
rm
zonekey.h
777
0644
edit
dl
rm
zt.h
5562
0644
edit
dl
rm
Edit:
/usr/include/bind9/dns/journal.h
(8227B)
/* * Copyright (C) Internet Systems Consortium, Inc. ("ISC") * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, you can obtain one at https://mozilla.org/MPL/2.0/. * * See the COPYRIGHT file distributed with this work for additional * information regarding copyright ownership. */ #ifndef DNS_JOURNAL_H #define DNS_JOURNAL_H 1 /***** ***** Module Info *****/ /*! \file dns/journal.h * \brief * Database journaling. */ /*** *** Imports ***/ #include <inttypes.h> #include <stdbool.h> #include <isc/lang.h> #include <isc/magic.h> #include <dns/name.h> #include <dns/diff.h> #include <dns/rdata.h> #include <dns/types.h> /*** *** Defines. ***/ #define DNS_JOURNALOPT_RESIGN 0x00000001 #define DNS_JOURNAL_READ 0x00000000 /* false */ #define DNS_JOURNAL_CREATE 0x00000001 /* true */ #define DNS_JOURNAL_WRITE 0x00000002 /*** *** Types ***/ /*% * A dns_journal_t represents an open journal file. This is an opaque type. * * A particular dns_journal_t object may be opened for writing, in which case * it can be used for writing transactions to a journal file, or it can be * opened for reading, in which case it can be used for reading transactions * from (iterating over) a journal file. A single dns_journal_t object may * not be used for both purposes. */ typedef struct dns_journal dns_journal_t; /*** *** Functions ***/ ISC_LANG_BEGINDECLS /**************************************************************************/ isc_result_t dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx, dns_diffop_t op, dns_difftuple_t **tp); /*!< brief * Create a diff tuple for the current database SOA. * XXX this probably belongs somewhere else. */ /*@{*/ #define DNS_SERIAL_GT(a, b) ((int)(((a) - (b)) & 0xFFFFFFFF) > 0) #define DNS_SERIAL_GE(a, b) ((int)(((a) - (b)) & 0xFFFFFFFF) >= 0) /*!< brief * Compare SOA serial numbers. DNS_SERIAL_GT(a, b) returns true iff * a is "greater than" b where "greater than" is as defined in RFC1982. * DNS_SERIAL_GE(a, b) returns true iff a is "greater than or equal to" b. */ /*@}*/ /**************************************************************************/ /* * Journal object creation and destruction. */ isc_result_t dns_journal_open(isc_mem_t *mctx, const char *filename, unsigned int mode, dns_journal_t **journalp); /*%< * Open the journal file 'filename' and create a dns_journal_t object for it. * * DNS_JOURNAL_CREATE open the journal for reading and writing and create * the journal if it does not exist. * DNS_JOURNAL_WRITE open the journal for reading and writing. * DNS_JOURNAL_READ open the journal for reading only. */ void dns_journal_destroy(dns_journal_t **journalp); /*%< * Destroy a dns_journal_t, closing any open files and freeing its memory. */ /**************************************************************************/ /* * Writing transactions to journals. */ isc_result_t dns_journal_begin_transaction(dns_journal_t *j); /*%< * Prepare to write a new transaction to the open journal file 'j'. * * Requires: * \li 'j' is open for writing. */ isc_result_t dns_journal_writediff(dns_journal_t *j, dns_diff_t *diff); /*%< * Write 'diff' to the current transaction of journal file 'j'. * * Requires: * \li 'j' is open for writing and dns_journal_begin_transaction() * has been called. * *\li 'diff' is a full or partial, correctly ordered IXFR * difference sequence. */ isc_result_t dns_journal_commit(dns_journal_t *j); /*%< * Commit the current transaction of journal file 'j'. * * Requires: * \li 'j' is open for writing and dns_journal_begin_transaction() * has been called. * * \li dns_journal_writediff() has been called one or more times * to form a complete, correctly ordered IXFR difference * sequence. */ isc_result_t dns_journal_write_transaction(dns_journal_t *j, dns_diff_t *diff); /*% * Write a complete transaction at once to a journal file, * sorting it if necessary, and commit it. Equivalent to calling * dns_diff_sort(), dns_journal_begin_transaction(), * dns_journal_writediff(), and dns_journal_commit(). * * Requires: *\li 'j' is open for writing. * * \li 'diff' contains exactly one SOA deletion, one SOA addition * with a greater serial number, and possibly other changes, * in arbitrary order. */ /**************************************************************************/ /* * Reading transactions from journals. */ uint32_t dns_journal_first_serial(dns_journal_t *j); uint32_t dns_journal_last_serial(dns_journal_t *j); /*%< * Get the first and last addressable serial number in the journal. */ isc_result_t dns_journal_iter_init(dns_journal_t *j, uint32_t begin_serial, uint32_t end_serial); /*%< * Prepare to iterate over the transactions that will bring the database * from SOA serial number 'begin_serial' to 'end_serial'. * * Returns: *\li ISC_R_SUCCESS *\li ISC_R_RANGE begin_serial is outside the addressable range. *\li ISC_R_NOTFOUND begin_serial is within the range of addressable * serial numbers covered by the journal, but * this particular serial number does not exist. */ /*@{*/ isc_result_t dns_journal_first_rr(dns_journal_t *j); isc_result_t dns_journal_next_rr(dns_journal_t *j); /*%< * Position the iterator at the first/next RR in a journal * transaction sequence established using dns_journal_iter_init(). * * Requires: * \li dns_journal_iter_init() has been called. * */ /*@}*/ void dns_journal_current_rr(dns_journal_t *j, dns_name_t **name, uint32_t *ttl, dns_rdata_t **rdata); /*%< * Get the name, ttl, and rdata of the current journal RR. * * Requires: * \li The last call to dns_journal_first_rr() or dns_journal_next_rr() * returned ISC_R_SUCCESS. */ /**************************************************************************/ /* * Database roll-forward. */ isc_result_t dns_journal_rollforward(isc_mem_t *mctx, dns_db_t *db, unsigned int options, const char *filename); /*%< * Roll forward (play back) the journal file "filename" into the * database "db". This should be called when the server starts * after a shutdown or crash. * * Requires: *\li 'mctx' is a valid memory context. *\li 'db' is a valid database which does not have a version * open for writing. *\li 'filename' is the name of the journal file belonging to 'db'. * * Returns: *\li DNS_R_NOJOURNAL when journal does not exist. *\li ISC_R_NOTFOUND when current serial in not in journal. *\li ISC_R_RANGE when current serial in not in journals range. *\li ISC_R_SUCCESS journal has been applied successfully to database. * others */ isc_result_t dns_journal_print(isc_mem_t *mctx, const char *filename, FILE *file); /* For debugging not general use */ isc_result_t dns_db_diff(isc_mem_t *mctx, dns_db_t *dba, dns_dbversion_t *dbvera, dns_db_t *dbb, dns_dbversion_t *dbverb, const char *journal_filename); isc_result_t dns_db_diffx(dns_diff_t *diff, dns_db_t *dba, dns_dbversion_t *dbvera, dns_db_t *dbb, dns_dbversion_t *dbverb, const char *journal_filename); /*%< * Compare the databases 'dba' and 'dbb' and generate a diff/journal * entry containing the changes to make 'dba' from 'dbb' (note * the order). This journal entry will consist of a single, * possibly very large transaction. Append the journal * entry to the journal file specified by 'journal_filename' if * non-NULL. */ isc_result_t dns_journal_compact(isc_mem_t *mctx, char *filename, uint32_t serial, uint32_t target_size); /*%< * Attempt to compact the journal if it is greater that 'target_size'. * Changes from 'serial' onwards will be preserved. If the journal * exists and is non-empty 'serial' must exist in the journal. */ bool dns_journal_get_sourceserial(dns_journal_t *j, uint32_t *sourceserial); void dns_journal_set_sourceserial(dns_journal_t *j, uint32_t sourceserial); /*%< * Get and set source serial. * * Returns: * true if sourceserial has previously been set. */ ISC_LANG_ENDDECLS #endif /* DNS_JOURNAL_H */
Save
cmd:
run