xref: /netbsd-src/external/bsd/nsd/dist/doc/NSD-DIFFFILE (revision d83a80ee7fb31190352cf1f781441e06ca6a86db)
1DIFF support file format.
2
3This file contains changes to the main NSD-DATABASE file.
4The file contents is in network format.
5
6The file is a transfer, with a header and a number of data segments.
7
8- File starts with 32bit value 'XFRF'
9- header with:
10  - 8bit: commit=1(IXFR is OK) or rollback=0(ignore that IXFR).
11  - 32 bit number of packets that are to be applied. 0 if file not completed.
12  - timestamp of endtime of download (64bitsec,32bitusec).
13  - 32 bit old serial number. (to check that db-serial is unchanged).
14    or 0 if no serial available yet.
15  - 32 bit new serial number.
16  - timestamp of starttime of download (64bitsec,32bitusec).
17  - zone name (string).
18  - pattern name: so that a newly created zone for which the zone transfer
19	is processed before the config-add task can be created. same string
20	format with 32bitcount with name of the pattern.
21
22- a number of parts that start with 'XXFR'
23- 32 bits length field.
24- length bytes of content.
25	contents is the IXFR or AXFR packet contents, max 64K.
26- 32 bits repeat of the length field.
27
28at end of file a log string space for a text string message
29(preceded by 32bitcount), i.e.  'at time <stamp> came from <addr>, tsig
30checked with key <key>'.  or rejected <reason for rejection>.
31
32The length fields and type fields check that the input is formatted,
33and complete otherwise an error occurred (like, disk failure).
34The commit flag is only set after the write of the entire file has
35completed (rewind, overwrite commit value with true).
36
37