public inbox for nncp-devel@lists.cypherpunks.ru
Atom feed
* Questions on payload types & niceness
@ 2023-10-30 22:07 John Goerzen
2023-10-31 8:25 ` Sergey Matveev
0 siblings, 1 reply; 2+ messages in thread
From: John Goerzen @ 2023-10-30 22:07 UTC (permalink / raw)
To: nncp-devel
Hi Sergey,
I created a very simple test NNCP packet with:
echo payload | /usr/bin/nncp-exec -cfg nncp1.hjson nncp3 testcmd arg1 arg2
I've been working to decode NNCP packets in Rust. I've observed a few
oddities:
The niceness in the outer header (encrypted packet header) is 96, while
in the inner plain header it is 224.
Also, the payload type is 3 rather than 2. I wonder if the payload
types start at 1 instead of 0?
Another random question: why is the niceness in both the outer
(encrypted) and inner (plain) headers? When might it be different
between them? Which one do the NNCP tools respect?
Thanks!
- John
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Questions on payload types & niceness
2023-10-30 22:07 Questions on payload types & niceness John Goerzen
@ 2023-10-31 8:25 ` Sergey Matveev
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Matveev @ 2023-10-31 8:25 UTC (permalink / raw)
To: nncp-devel
[-- Attachment #1: Type: text/plain, Size: 802 bytes --]
Greetings!
*** John Goerzen [2023-10-30 17:07]:
>The niceness in the outer header (encrypted packet header) is 96, while
>in the inner plain header it is 224.
Those are independent niceness levels.
As http://www.nncpgo.org/Plain.html says, inner (plain packet's)
niceness is a value passed to $NNCP_NICE when invoking exec-script.
In freq-packets it is used as a nice to generated file-packets in reply.
Outer niceness is used only during transmission. Inner one depends on
packet's type and used during tossing, when dealing with plain packet.
>Also, the payload type is 3 rather than 2. I wonder if the payload
>types start at 1 instead of 0?
Yes, it starts with 1.
--
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: 12AD 3268 9C66 0D42 6967 FD75 CB82 0563 2107 AD8A
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-31 8:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-30 22:07 Questions on payload types & niceness John Goerzen
2023-10-31 8:25 ` Sergey Matveev