]> Cypherpunks.ru repositories - nncp.git/blob - doc/cmd/nncp-pkt.texi
b3391b4d7de0828090d6459f1fa9af172c4977ad
[nncp.git] / doc / cmd / nncp-pkt.texi
1 @node nncp-pkt
2 @section nncp-pkt
3
4 @example
5 $ nncp-pkt [options] < pkt
6 $ nncp-pkt [options] [-decompress] -dump < pkt > payload
7 $ nncp-pkt -overheads
8 @end example
9
10 Low level packet parser. Can be useful for debugging. There are two
11 types of packets: @ref{Plain, plain} and @ref{Encrypted, encrypted}. By
12 default it will print packet's header, for example:
13
14 @example
15 Packet type: encrypted
16 Niceness: B (224)
17 Sender: 2WHBV3TPZHDOZGUJEH563ZEK7M33J4UESRFO4PDKWD5KZNPROABQ (self)
18 @end example
19
20 @option{-dump} option outputs plain packet's payload (if it is file
21 transmission, then it will be the file itself as an example). If it is
22 an encrypted packet, then it will be decrypted first, outputing the
23 included plain packet, that can be fed to @command{nncp-pkt} again:
24
25 @example
26 Packet type: plain
27 Payload type: transitional
28 Niceness: B (224)
29 Path: VHMTRWDOXPLK7BR55ICZ5N32ZJUMRKZEMFNGGCEAXV66GG43PEBQ (name-of-node)
30
31 Packet type: plain
32 Payload type: exec compressed
33 Niceness: P (96)
34 Path: stargrave@@stargrave.org
35 @end example
36
37 @option{-decompress} option tries to zstd-decompress data from plain
38 packet (useful with @verb{|exec compressed|} types of packets).
39
40 @option{-overheads} options print encrypted, plain and size header overheads.
41
42 This command automatically determines if an encrypted packet belongs to
43 @ref{Multicast, multicast} area and will try to decrypt it with its
44 corresponding key.