]> Cypherpunks.ru repositories - nncp.git/blob - doc/cmd/nncp-bundle.texi
9db031f3420acbfd1f580282e5bc08906ce2a008
[nncp.git] / doc / cmd / nncp-bundle.texi
1 @node nncp-bundle
2 @section nncp-bundle
3
4 @example
5 $ nncp-bundle [options] -tx [-delete] NODE [NODE @dots{}] > ...
6 $ nncp-bundle [options] -rx -delete [-dryrun] [NODE @dots{}] < ...
7 $ nncp-bundle [options] -rx [-check] [-dryrun] [NODE @dots{}] < ...
8 @end example
9
10 With @option{-tx} option, this command creates @ref{Bundles, bundle} of
11 @ref{Encrypted, encrypted packets} from the spool directory and writes
12 it to @code{stdout}.
13
14 With @option{-rx} option, this command takes bundle from @code{stdin}
15 and copies all found packets for our node to the spool directory. Pay
16 attention that @strong{no} integrity checking is done by default. Modern
17 tape drives could easily provide too much throughput your CPU won't be
18 able to verify on the fly. So if you won't @ref{nncp-toss, toss}
19 received packets at the place, it is advisable either to run
20 @ref{nncp-check} utility for packets integrity verification, or to use
21 @option{-check} option to enable on the fly integrity check.
22
23 You can specify multiple @option{NODE} arguments, telling for what nodes
24 you want to create the stream, or take it from. If no nodes are
25 specified for @option{-rx} mode, then all packets aimed at us will be
26 processed.
27
28 When packets are sent through the stream, they are still kept in the
29 spool directory, because there is no assurance that they are transferred
30 to the media (media (CD-ROM, tape drive, raw hard drive) can end). If
31 you want to forcefully delete them (after they are successfully flushed
32 to @code{stdout}) anyway, use @option{-delete} option.
33
34 But you can verify produced stream after, by digesting it by yourself
35 with @option{-rx} and @option{-delete} options -- in that mode, stream
36 packets integrity will be checked and they will be deleted from the
37 spool if everything is good. So it is advisable to recheck your streams:
38
39 @example
40 $ nncp-bundle -tx ALICE BOB WHATEVER | cdrecord -tao -
41 $ dd if=/dev/cd0 bs=2048 | nncp-bundle -rx -delete
42 @end example
43
44 @option{-dryrun} option prevents any writes to the spool. This is
45 useful when you need to see what packets will pass by and possibly check
46 their integrity.