X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=doc%2Fcmds.texi;h=665b57629d394f9926f95d1b04f79deabf3c6cb8;hb=0fad171c0d79ad583c0faf5427e22d1d62a0a52d;hp=8ead3417a802ad2ba5d3797422f6ed02419d97b7;hpb=4c17993ce76c6f1883e6854d826eafd4c33c1594;p=nncp.git diff --git a/doc/cmds.texi b/doc/cmds.texi index 8ead341..665b576 100644 --- a/doc/cmds.texi +++ b/doc/cmds.texi @@ -102,6 +102,7 @@ $ nncp-call [options] [-rxrate INT] [-txrate INT] [-autotoss*] + [-nock] NODE[:ADDR] [FORCEADDR] @end example @@ -114,15 +115,17 @@ transfer. If @option{-rx} option is specified then only inbound packets transmission is performed. If @option{-tx} option is specified, then -only outbound transmission is performed. @option{-onlinedeadline} -overrides @ref{CfgOnlineDeadline, @emph{onlinedeadline}}. -@option{-maxonlinetime} overrides @ref{CfgMaxOnlineTime, -@emph{maxonlinetime}}. @option{-rxrate}/@option{-txrate} override -@ref{CfgXxRate, rxrate/txrate}. @option{-list} option allows you to list -packets of remote node, without any transmission. +only outbound transmission is performed. -You can specify what packets your want to download, by specifying -@option{-pkts} option with comma-separated list of packets identifiers. +@option{-onlinedeadline} overrides @ref{CfgOnlineDeadline, @emph{onlinedeadline}}. +@option{-maxonlinetime} overrides @ref{CfgMaxOnlineTime, @emph{maxonlinetime}}. +@option{-rxrate}/@option{-txrate} override @ref{CfgXxRate, rxrate/txrate}. +Read @ref{CfgNoCK, more} about @option{-nock} option. + +@option{-list} option allows you to list packets of remote node, without +any transmission. You can specify what packets your want to download, by +specifying @option{-pkts} option with comma-separated list of packets +identifiers. Each @option{NODE} can contain several uniquely identified @option{ADDR}esses in @ref{CfgAddrs, configuration} file. If you do @@ -139,8 +142,8 @@ file is renamed from @file{.part} one and when you rerun @command{nncp-call} again, remote node will receive completion notification. -@option{-autotoss} options runs tosser on node's spool after call -is finished. All @option{-autotoss-*} options is the same as in +@option{-autotoss} option runs tosser on node's spool every second +during the call. All @option{-autotoss-*} options is the same as in @ref{nncp-toss} command. @node nncp-caller @@ -230,19 +233,34 @@ operating system. @section nncp-check @example -$ nncp-check [options] +$ nncp-check [-nock] [options] @end example Perform @ref{Spool, spool} directory integrity check. Read all files that has Base32-encoded filenames and compare it with recalculated -BLAKE2b hash output of their contents. That supplementary command is -not used often in practice, if ever. +@ref{MTH} hash output of their contents. + +The most useful mode of operation is with @option{-nock} option, that +checks integrity of @file{.nock} files, renaming them to ordinary +(verified) encrypted packets. + +@node nncp-cronexpr +@section nncp-cronexpr + +@example +$ nncp-cronexpr -num 12 "*/1 * * * * SAT,SUN 2021" +@end example + +Check validity of specified @ref{CronExpr, cron expression} and print 12 +next time entities. @node nncp-daemon @section nncp-daemon @example -$ nncp-daemon [options] [-maxconn INT] [-bind ADDR] [-inetd] [-autotoss*] +$ nncp-daemon [options] + [-maxconn INT] [-bind ADDR] [-inetd] + [-autotoss*] [-nock] [-mcd-once] @end example Start listening TCP daemon, wait for incoming connections and run @@ -264,10 +282,15 @@ Example inetd-entry: uucp stream tcp6 nowait nncpuser /usr/local/bin/nncp-daemon nncp-daemon -quiet -inetd @end verbatim -@option{-autotoss} options runs tosser on node's spool after call -is finished. All @option{-autotoss-*} options is the same as in +@option{-autotoss} option runs tosser on node's spool every second +during the call. All @option{-autotoss-*} options is the same as in @ref{nncp-toss} command. +Read @ref{CfgNoCK, more} about @option{-nock} option. + +@option{-mcd-once} option sends @ref{MCD} announcements once and quits. +Could be useful with inetd-based setup, where daemons are not running. + @node nncp-exec @section nncp-exec @@ -276,11 +299,15 @@ $ nncp-exec [options] [-use-tmp] [-nocompress] NODE HANDLE [ARG0 ARG1 ...] @end example Send execution command to @option{NODE} for specified @option{HANDLE}. -Body is read from stdin (either into memory, or into encrypted temporary -file if @option{-use-tmp} is specified) and compressed (unless +Body is read from @code{stdin} into memory and compressed (unless @option{-nocompress} is specified). After receiving, remote side will execute specified @ref{CfgExec, handle} command with @option{ARG*} -appended and decompressed body fed to command's stdin. +appended and decompressed body fed to command's @code{stdin}. + +If @option{-use-tmp} option is specified, then @code{stdin} data is read +into temporary file first, requiring twice more disk space, but no +memory requirements. @ref{StdinTmpFile, Same temporary file} rules +applies as with @ref{nncp-file, nncp-file -} command. For example, if remote side has following configuration file for your node: @@ -326,16 +353,19 @@ This command queues file in @ref{Spool, spool} directory immediately (through the temporary file of course) -- so pay attention that sending 2 GiB file will create 2 GiB outbound encrypted packet. +@anchor{StdinTmpFile} If @file{SRC} equals to @file{-}, then create an encrypted temporary file and copy everything taken from @code{stdin} to it and use for outbound packet creation. Pay attention that if you want to send 1 GiB of data taken from @code{stdin}, then you have to have more than 2 GiB of disk space for that temporary file and resulting encrypted packet. You can control -where temporary file will be stored using @env{TMPDIR} environment +temporary file location directory with @env{TMPDIR} environment variable. Encryption is performed in AEAD mode with @url{https://cr.yp.to/chacha.html, ChaCha20}-@url{https://en.wikipedia.org/wiki/Poly1305, Poly1305} -algorithms. Data is splitted on 128 KiB blocks. Each block is encrypted -with increasing nonce counter. +algorithms. Data is divided on 128 KiB blocks. Each block is encrypted +with increasing nonce counter. File is deletes immediately after +creation, so even if program crashes -- disk space will be reclaimed, no +need in cleaning it up later. If @file{SRC} points to directory, then @url{https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_01, pax archive} @@ -374,6 +404,24 @@ If @ref{CfgNotify, notification} is enabled on the remote side for file request, then it will sent simple letter after successful file queuing. +@node nncp-hash +@section nncp-hash + +@example +$ nncp-log [-file ...] [-seek X] [-debug] [-progress] +@end example + +Calculate @ref{MTH} hash of either stdin, or @option{-file} if +specified. + +You can optionally force seeking the file first, reading only part of +the file, and then prepending unread portion of data, with the +@option{-seek} option. It is intended only for testing and debugging of +MTH hasher capabilities. + +@option{-debug} option shows all intermediate MTH hashes. +And @option{-progress} will show progress bar. + @node nncp-log @section nncp-log @@ -381,7 +429,8 @@ queuing. $ nncp-log [options] @end example -Parse @ref{Log, log} file and print out its records in human-readable form. +Parse @ref{Log, log} file and print out its records in short +human-readable form. @node nncp-pkt @section nncp-pkt @@ -491,6 +540,7 @@ $ nncp-rm [options] -tmp $ nncp-rm [options] -lock $ nncp-rm [options] -node NODE -part $ nncp-rm [options] -node NODE -seen +$ nncp-rm [options] -node NODE -nock $ nncp-rm [options] -node NODE [-rx] [-tx] $ nncp-rm [options] -node NODE -pkt PKT @end example @@ -511,10 +561,10 @@ Base32 name) will be deleted. This is useful when you see some packet failing to be processed. @item When either @option{-rx} or @option{-tx} options are specified -(maybe both of them), then delete all packets from that given queues. If -@option{-part} is given, then delete only @file{.part}ly downloaded -ones. If @option{-seen} option is specified, then delete only -@file{.seen} files. +(maybe both of them), then delete all packets from that given queues. +@option{-part} option deletes @file{.part}ly downloaded files. +@option{-seen} option deletes @file{.seen} files. @option{-nock} option +deletes non-checksummed (non-verified) @file{.nock} files. @item @option{-dryrun} option just prints what will be deleted.