]> Cypherpunks.ru repositories - nncp.git/blob - doc/spool.texi
Various documentation updates
[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 @verbatim
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/BYRR...CG6Q/rx.lock
14 spool/BYRR...CG6Q/rx/
15 spool/BYRR...CG6Q/tx.lock
16 spool/BYRR...CG6Q/tx/AQUT...DGNT.seen
17 spool/BYRR...CG6Q/tx/NSYY...ZUU6
18 spool/BYRR...CG6Q/tx/VCSR...3VXX.seen
19 spool/BYRR...CG6Q/tx/ZI5U...5RRQ
20 @end verbatim
21
22 Except for @file{tmp}, all other directories are Base32-encoded node
23 identifiers (@file{2WHB...OABQ}, @file{BYRR...CG6Q} in our example).
24 Each node subdirectory has @file{rx} (received, partly received and
25 currently unprocessed packets) and @file{tx} (for outbound packets)
26 directories.
27
28 Each @file{rx}/@file{tx} directory contains one file per encrypted
29 packet. Its filename is Base32 encoded BLAKE2b hash of the contents. So
30 it can be integrity checked at any time. @file{5ZIB...UMKW.part} is
31 partly received file from @file{2WHB...OABQ} node. @file{tx} directory
32 can not contain partly written files -- they are moved atomically from
33 @file{tmp}.
34
35 When @ref{nncp-toss} utility is called with @option{-seen} option, it
36 will create empty @file{XXX.seen} files, telling that some kind of
37 packet was already tossed sometime.
38
39 Only one process can work with @file{rx}/@file{tx} directories at once,
40 so there are corresponding lock files.