]> Cypherpunks.ru repositories - nncp.git/blob - doc/cmd/nncp-ack.texi
Generate list of created ACKs
[nncp.git] / doc / cmd / nncp-ack.texi
1 @node nncp-ack
2 @cindex packet acknowledgement
3 @pindex nncp-ack
4 @section nncp-ack
5
6 @example
7 $ nncp-ack [options] -all
8 $ nncp-ack [options] -node NODE[,@dots{}]
9 $ nncp-ack [options] -node NODE -pkt PKT
10
11 $ nncp-ack [@dots{}] 4>&1 >&2 | nncp-rm [@dots{}] -pkt
12 @end example
13
14 Send acknowledgement of successful @option{PKT} (Base32-encoded hash)
15 packet receipt from @option{NODE} node. If no @option{-pkt} is
16 specified, then acknowledge all packet in node's @code{rx} outbound
17 spool. If @option{-all} is specified, then do that for all nodes.
18
19 That commands outputs list of created encrypted ACK packets
20 (@code{NODE/PKT}) to @strong{4}th file descriptor. That output can be
21 passed for example to @command{@ref{nncp-rm}} to remove them after
22 transmission to not wait for acknowledgement and retransmission.
23
24 General workflow with acknowledgement is following, assuming that
25 Alice has some outbound packets for Bob:
26
27 @itemize
28
29 @item Transfer encrypted packets, without deleting them locally:
30
31 @example
32 alice$ nncp-xfer -keep -tx -node bob /mnt/shared
33 @end example
34
35 @item On Bob's side retrieve those packets:
36
37 @example
38 bob$ nncp-xfer -rx /mnt/shared
39 @end example
40
41 That will also check if copied packets checksum is not mismatched.
42
43 @item Create ACK packets of received ones, saving the list of encrypted
44     ACK packets:
45
46 @example
47 bob$ nncp-ack -node alice 4>acks
48 @end example
49
50 @item Send those newly created packets back to Alice:
51
52 @example
53 bob$ nncp-xfer [-keep] -tx /mnt/shared
54 @end example
55
56 @item Remove them from outbound spool, because we expect no
57     acknowledgement for them:
58
59 @example
60 bob$ nncp-rm -node alice -pkt <acks
61 @end example
62
63 @item Get those acknowledgement packets and @ref{nncp-toss, toss} them:
64
65 @example
66 alice$ nncp-xfer -rx /mnt/shared
67 alice$ nncp-toss
68 @end example
69
70 Each ACK packet will remove kept corresponding outbound packets, because
71 Bob explicitly confirmed their receipt.
72
73 @end itemize
74
75 Similarly you can use it with @command{@ref{nncp-bundle}}, but do not
76 forget that by default it does not do checksumming of the packets, so
77 you should either use its @option{-check} option, or run
78 @command{@ref{nncp-check}} after.