Lines Matching refs:serial
48 * serial number. Unused index entries have an "offset"
64 * whose serial number is current-(2^31-1) to current
75 * SOA serial number does not change (BIND 8 sends such
182 unsigned char serial[4]; /*%< SOA serial before update. */
214 /*% Source serial number. */
228 unsigned char serial0[4]; /*%< SOA serial before update. */
229 unsigned char serial1[4]; /*%< SOA serial after update. */
244 isc_uint32_t serial;
249 #define POS_INVALIDATE(pos) ((pos).offset = 0, (pos).serial = 0)
325 isc_uint32_t current_serial; /*%< Current SOA serial */
343 cooked->serial = decode_uint32(raw->serial);
349 encode_uint32(cooked->serial, raw->serial);
644 j->index[i].serial = decode_uint32(p);
804 if (pos->serial == j->header.end.serial)
815 * Check serial number consistency.
817 if (xhdr.serial0 != pos->serial) {
820 "expected serial %u, got %u",
821 j->filename, pos->serial, xhdr.serial0);
836 pos->serial = xhdr.serial1;
844 * "Better" means having a serial number closer to 'serial'
845 * but not greater than 'serial'.
848 index_find(dns_journal_t *j, isc_uint32_t serial, journal_pos_t *best_guess) {
854 DNS_SERIAL_GE(serial, j->index[i].serial) &&
855 DNS_SERIAL_GT(j->index[i].serial, best_guess->serial))
865 * of recent serial numbers than of old ones. This is deliberate -
906 * ambiguous when a new transaction with number 'serial' is added.
909 index_invalidate(dns_journal_t *j, isc_uint32_t serial) {
914 if (! DNS_SERIAL_GT(serial, j->index[i].serial))
920 * Try to find a transaction with initial serial number 'serial'
925 * If 'serial' is current (= the ending serial number of the
930 * If 'serial' is within the range of addressable serial numbers
931 * covered by the journal but that particular serial number is missing
934 * If 'serial' is outside the range of addressable serial numbers
939 journal_find(dns_journal_t *j, isc_uint32_t serial, journal_pos_t *pos) {
944 if (DNS_SERIAL_GT(j->header.begin.serial, serial))
946 if (DNS_SERIAL_GT(serial, j->header.end.serial))
948 if (serial == j->header.end.serial) {
954 index_find(j, serial, ¤t_pos);
956 while (current_pos.serial != serial) {
957 if (DNS_SERIAL_GT(current_pos.serial, serial))
1025 * keep track of SOA serial numbers.
1033 j->x.pos[j->x.n_soa].serial =
1123 if (! (DNS_SERIAL_GT(j->x.pos[1].serial, j->x.pos[0].serial) ||
1125 j->x.pos[1].serial == j->x.pos[0].serial)))
1128 "%s: malformed transaction: serial number "
1133 if (j->x.pos[0].serial != j->header.end.serial) {
1136 "%s last serial %u != "
1137 "transaction first serial %u",
1139 j->header.end.serial,
1140 j->x.pos[0].serial);
1147 * when we increment the current serial number. Purge them
1152 while (! DNS_SERIAL_GT(j->x.pos[1].serial,
1153 j->header.begin.serial)) {
1156 index_invalidate(j, j->x.pos[1].serial);
1159 if (DNS_SERIAL_GT(last_dumped_serial, j->x.pos[1].serial)) {
1177 CHECK(journal_write_xhdr(j, offset, j->x.pos[0].serial,
1178 j->x.pos[1].serial));
1268 isc_uint32_t db_serial; /* Database SOA serial */
1269 isc_uint32_t end_serial; /* Last journal SOA serial */
1297 * Get the current database SOA serial number.
1302 * Locate a journal entry for the current database serial.
1432 isc_uint32_t start_serial; /* Database SOA serial */
1433 isc_uint32_t end_serial; /* Last journal SOA serial */
1456 fprintf(file, "Source serial = %u\n", j->header.sourceserial);
1541 return (j->header.begin.serial);
1546 return (j->header.end.serial);
1577 * at the serial number in the IXFR request and ending at the serial
1579 * serial number is not necessarily at the end of the journal:
1581 * when we reach the serial number that was current when the IXFR started.
1617 INSIST(j->it.bpos.serial == begin_serial);
1620 INSIST(j->it.epos.serial == end_serial);
1638 j->it.current_serial = j->it.bpos.serial;
1678 "expected serial %u, got %u",
2083 dns_journal_compact(isc_mem_t *mctx, char *filename, isc_uint32_t serial,
2131 if (DNS_SERIAL_GT(j1->header.begin.serial, serial) ||
2132 DNS_SERIAL_GT(serial, j1->header.end.serial)) {
2167 DNS_SERIAL_GE(serial, j1->index[i].serial) &&
2175 while (current_pos.serial != serial) {
2177 if (current_pos.serial == j1->header.end.serial)
2180 if (DNS_SERIAL_GE(serial, current_pos.serial) &&
2189 INSIST(best_guess.serial != j1->header.end.serial);
2190 if (best_guess.serial != serial)
2195 * we did not reach 'serial'. If not we will just copy
2227 j2->header.begin.serial = best_guess.serial;
2229 j2->header.end.serial = j1->header.end.serial;
2246 while (current_pos.serial != j2->header.end.serial) {
2323 encode_uint32(j->index[i].serial, p);