Home | History | Annotate | Download | only in dns

Lines Matching defs:xhdr

471 journal_read_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr) {
483 xhdr->size = decode_uint32(raw.size);
484 xhdr->count = 0;
485 xhdr->serial0 = decode_uint32(raw.serial0);
486 xhdr->serial1 = decode_uint32(raw.serial1);
487 j->curxhdr = *xhdr;
497 xhdr->size = decode_uint32(raw.size);
498 xhdr->count = decode_uint32(raw.count);
499 xhdr->serial0 = decode_uint32(raw.serial0);
500 xhdr->serial1 = decode_uint32(raw.serial1);
501 j->curxhdr = *xhdr;
658 * still might have the new xhdr format because we
660 * the new xhdr. When we first try to read it, we assume
661 * it uses the new xhdr format. If that fails, we'll be
843 maybe_fixup_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr, uint32_t serial,
851 if (xhdr->serial0 != serial ||
852 isc_serial_le(xhdr->serial1, xhdr->serial0))
854 if (j->xhdr_version == XHDR_VERSION1 && xhdr->serial1 == serial)
862 CHECK(journal_read_xhdr(j, xhdr));
865 xhdr->count == serial)
873 CHECK(journal_read_xhdr(j, xhdr));
894 } else if (j->xhdr_version == XHDR_VERSION2 && xhdr->count == serial &&
895 xhdr->serial1 == 0U &&
896 isc_serial_gt(xhdr->serial0, xhdr->count))
901 xhdr->serial1 = xhdr->serial0;
902 xhdr->serial0 = xhdr->count;
903 xhdr->count = 0;
930 journal_xhdr_t xhdr;
948 result = journal_read_xhdr(j, &xhdr);
954 CHECK(maybe_fixup_xhdr(j, &xhdr, pos->serial, pos->offset));
960 if (xhdr.serial0 != pos->serial ||
961 isc_serial_le(xhdr.serial1, xhdr.serial0))
966 j->filename, pos->serial, xhdr.serial0);
977 if ((off_t)(pos->offset + hdrsize + xhdr.size) < pos->offset) {
983 pos->offset += hdrsize + xhdr.size;
984 pos->serial = xhdr.serial1;
1858 journal_xhdr_t xhdr;
1870 CHECK(journal_read_xhdr(j, &xhdr));
1873 CHECK(maybe_fixup_xhdr(j, &xhdr, pos.serial,
1878 * Check that xhdr is consistent.
1880 if (xhdr.serial0 != pos.serial ||
1881 isc_serial_le(xhdr.serial1, xhdr.serial0))
1886 size += xhdr.size;
1887 count += xhdr.count;
1939 journal_xhdr_t xhdr;
1957 CHECK(journal_read_xhdr(j, &xhdr));
1958 if (xhdr.size == 0) {
1966 CHECK(maybe_fixup_xhdr(j, &xhdr, j->it.current_serial,
1970 if (xhdr.serial0 != j->it.current_serial ||
1971 isc_serial_le(xhdr.serial1, xhdr.serial0))
1977 xhdr.serial0);
1981 j->it.xsize = xhdr.size;
2609 journal_xhdr_t xhdr;
2613 result = journal_read_xhdr(j1, &xhdr);
2619 size = xhdr.size;
2633 * xhdr format may be wrong.
2642 CHECK(journal_read_xhdr(j1, &xhdr));
2647 CHECK(journal_read_xhdr(j1, &xhdr));
2652 size = xhdr.size;
2679 xhdr.count == serial && xhdr.serial1 == 0U &&
2680 isc_serial_gt(xhdr.serial0, xhdr.count))
2682 xhdr.serial1 = xhdr.serial0;
2683 xhdr.serial0 = xhdr.count;
2684 xhdr.count = 0;
2688 * Check that xhdr is consistent.
2690 if (xhdr.serial0 != serial ||
2691 isc_serial_le(xhdr.serial1, xhdr.serial0))
2703 CHECK(journal_write_xhdr(j2, xhdr.size, count,
2704 xhdr.serial0, xhdr.serial1));
2709 serial = xhdr.serial1;