]> Cypherpunks.ru repositories - nncp.git/blob - doc/spool.texi
Merge branch 'develop'
[nncp.git] / doc / spool.texi
1 @node Spool
2 @unnumbered Spool directory
3
4 Spool directory holds @ref{Encrypted, encrypted packets} received from
5 remote nodes and queued for sending to them. It has the following
6 example structure:
7
8 @example
9 spool/tmp/
10 spool/2WHB...OABQ/rx.lock
11 spool/2WHB...OABQ/rx/5ZIB...UMKW.part
12 spool/2WHB...OABQ/tx.lock
13 spool/2WHB...OABQ/toss.lock
14 spool/BYRR...CG6Q/rx.lock
15 spool/BYRR...CG6Q/rx/
16 spool/BYRR...CG6Q/tx.lock
17 spool/BYRR...CG6Q/tx/AQUT...DGNT.seen
18 spool/BYRR...CG6Q/tx/NSYY...ZUU6
19 spool/BYRR...CG6Q/tx/VCSR...3VXX.seen
20 spool/BYRR...CG6Q/tx/ZI5U...5RRQ
21 @end example
22
23 Except for @file{tmp}, all other directories are Base32-encoded node
24 identifiers (@file{2WHB...OABQ}, @file{BYRR...CG6Q} in our example).
25 Each node subdirectory has @file{rx} (received, partially received and
26 currently unprocessed packets) and @file{tx} (for outbound packets)
27 directories.
28
29 Each @file{rx}/@file{tx} directory contains one file per encrypted
30 packet. Its filename is Base32 encoded BLAKE2b hash of the contents. So
31 it can be integrity checked at any time. @file{5ZIB...UMKW.part} is
32 partially received file from @file{2WHB...OABQ} node. @file{tx}
33 directory can not contain partially written files -- they are moved
34 atomically from @file{tmp}.
35
36 When @ref{nncp-toss} utility is called with @option{-seen} option, it
37 will create empty @file{XXX.seen} files, telling that some kind of
38 packet was already tossed sometime.
39
40 Only one process can work with @file{rx}/@file{tx} directories at once,
41 so there are corresponding lock files.