func main() {
var (
- cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
- niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceFreq), "Outbound packet niceness")
+ cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
+ niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceFreq),
+ "Outbound packet niceness")
minSizeRaw = flag.Uint64("minsize", 0, "Minimal required resulting packet size, in KiB")
viaOverride = flag.String("via", "", "Override Via path to destination node (ignored with -all)")
spoolPath = flag.String("spool", "", "Override path to spool")
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
- onlineDeadlineSec = flag.Uint("onlinedeadline", 0, "Override onlinedeadline option")
- maxOnlineTimeSec = flag.Uint("maxonlinetime", 0, "Override maxonlinetime option")
-
- autoToss = flag.Bool("autotoss", false, "Toss after call is finished")
- autoTossDoSeen = flag.Bool("autotoss-seen", false, "Create seen/ files during tossing")
- autoTossNoFile = flag.Bool("autotoss-nofile", false, "Do not process \"file\" packets during tossing")
- autoTossNoFreq = flag.Bool("autotoss-nofreq", false, "Do not process \"freq\" packets during tossing")
- autoTossNoExec = flag.Bool("autotoss-noexec", false, "Do not process \"exec\" packets during tossing")
- autoTossNoTrns = flag.Bool("autotoss-notrns", false, "Do not process \"trns\" packets during tossing")
- autoTossNoArea = flag.Bool("autotoss-noarea", false, "Do not process \"area\" packets during tossing")
- autoTossNoACK = flag.Bool("autotoss-noack", false, "Do not process \"ack\" packets during tossing")
+ onlineDeadlineSec = flag.Uint("onlinedeadline", 0,
+ "Override onlinedeadline option")
+ maxOnlineTimeSec = flag.Uint("maxonlinetime", 0,
+ "Override maxonlinetime option")
+
+ autoToss = flag.Bool("autotoss", false,
+ "Toss after call is finished")
+ autoTossDoSeen = flag.Bool("autotoss-seen", false,
+ "Create seen/ files during tossing")
+ autoTossNoFile = flag.Bool("autotoss-nofile", false,
+ "Do not process \"file\" packets during tossing")
+ autoTossNoFreq = flag.Bool("autotoss-nofreq", false,
+ "Do not process \"freq\" packets during tossing")
+ autoTossNoExec = flag.Bool("autotoss-noexec", false,
+ "Do not process \"exec\" packets during tossing")
+ autoTossNoTrns = flag.Bool("autotoss-notrns", false,
+ "Do not process \"trns\" packets during tossing")
+ autoTossNoArea = flag.Bool("autotoss-noarea", false,
+ "Do not process \"area\" packets during tossing")
+ autoTossNoACK = flag.Bool("autotoss-noack", false,
+ "Do not process \"ack\" packets during tossing")
)
log.SetFlags(log.Lshortfile)
flag.Usage = usage
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
- autoToss = flag.Bool("autotoss", false, "Toss after call is finished")
- autoTossDoSeen = flag.Bool("autotoss-seen", false, "Create seen/ files during tossing")
- autoTossNoFile = flag.Bool("autotoss-nofile", false, "Do not process \"file\" packets during tossing")
- autoTossNoFreq = flag.Bool("autotoss-nofreq", false, "Do not process \"freq\" packets during tossing")
- autoTossNoExec = flag.Bool("autotoss-noexec", false, "Do not process \"exec\" packets during tossing")
- autoTossNoTrns = flag.Bool("autotoss-notrns", false, "Do not process \"trns\" packets during tossing")
- autoTossNoArea = flag.Bool("autotoss-noarea", false, "Do not process \"area\" packets during tossing")
- autoTossNoACK = flag.Bool("autotoss-noack", false, "Do not process \"ack\" packets during tossing")
+ autoToss = flag.Bool("autotoss", false,
+ "Toss after call is finished")
+ autoTossDoSeen = flag.Bool("autotoss-seen", false,
+ "Create seen/ files during tossing")
+ autoTossNoFile = flag.Bool("autotoss-nofile", false,
+ "Do not process \"file\" packets during tossing")
+ autoTossNoFreq = flag.Bool("autotoss-nofreq", false,
+ "Do not process \"freq\" packets during tossing")
+ autoTossNoExec = flag.Bool("autotoss-noexec", false,
+ "Do not process \"exec\" packets during tossing")
+ autoTossNoTrns = flag.Bool("autotoss-notrns", false,
+ "Do not process \"trns\" packets during tossing")
+ autoTossNoArea = flag.Bool("autotoss-noarea", false,
+ "Do not process \"area\" packets during tossing")
+ autoTossNoACK = flag.Bool("autotoss-noack", false,
+ "Do not process \"ack\" packets during tossing")
)
log.SetFlags(log.Lshortfile)
flag.Usage = usage
bind = flag.String("bind", "[::]:5400", "Address to bind to")
ucspi = flag.Bool("ucspi", false, "Is it started as UCSPI-TCP server")
inetd = flag.Bool("inetd", false, "Obsolete, use -ucspi")
- yggdrasil = flag.String("yggdrasil", "", "Start Yggdrasil listener: yggdrasils://PRV[:PORT]?[bind=BIND][&pub=PUB][&peer=PEER][&mcast=REGEX[:PORT]]")
+ yggdrasil = flag.String("yggdrasil", "",
+ "Start Yggdrasil listener: yggdrasils://PRV[:PORT]?[bind=BIND][&pub=PUB][&peer=PEER][&mcast=REGEX[:PORT]]")
maxConn = flag.Int("maxconn", 128, "Maximal number of simultaneous connections")
noCK = flag.Bool("nock", false, "Do no checksum checking")
mcdOnce = flag.Bool("mcd-once", false, "Send MCDs once and quit")
version = flag.Bool("version", false, "Print version information")
warranty = flag.Bool("warranty", false, "Print warranty information")
- autoToss = flag.Bool("autotoss", false, "Toss after call is finished")
- autoTossDoSeen = flag.Bool("autotoss-seen", false, "Create seen/ files during tossing")
- autoTossNoFile = flag.Bool("autotoss-nofile", false, "Do not process \"file\" packets during tossing")
- autoTossNoFreq = flag.Bool("autotoss-nofreq", false, "Do not process \"freq\" packets during tossing")
- autoTossNoExec = flag.Bool("autotoss-noexec", false, "Do not process \"exec\" packets during tossing")
- autoTossNoTrns = flag.Bool("autotoss-notrns", false, "Do not process \"trns\" packets during tossing")
- autoTossNoArea = flag.Bool("autotoss-noarea", false, "Do not process \"area\" packets during tossing")
- autoTossNoACK = flag.Bool("autotoss-noack", false, "Do not process \"ack\" packets during tossing")
+ autoToss = flag.Bool("autotoss", false,
+ "Toss after call is finished")
+ autoTossDoSeen = flag.Bool("autotoss-seen", false,
+ "Create seen/ files during tossing")
+ autoTossNoFile = flag.Bool("autotoss-nofile", false,
+ "Do not process \"file\" packets during tossing")
+ autoTossNoFreq = flag.Bool("autotoss-nofreq", false,
+ "Do not process \"freq\" packets during tossing")
+ autoTossNoExec = flag.Bool("autotoss-noexec", false,
+ "Do not process \"exec\" packets during tossing")
+ autoTossNoTrns = flag.Bool("autotoss-notrns", false,
+ "Do not process \"trns\" packets during tossing")
+ autoTossNoArea = flag.Bool("autotoss-noarea", false,
+ "Do not process \"area\" packets during tossing")
+ autoTossNoACK = flag.Bool("autotoss-noack", false,
+ "Do not process \"ack\" packets during tossing")
)
log.SetFlags(log.Lshortfile)
flag.Usage = usage
func main() {
var (
- noCompress = flag.Bool("nocompress", false, "Do not compress input data")
- cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
- niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceExec), "Outbound packet niceness")
- replyNiceRaw = flag.String("replynice", nncp.NicenessFmt(nncp.DefaultNiceFile), "Possible reply packet niceness")
- minSize = flag.Uint64("minsize", 0, "Minimal required resulting packet size, in KiB")
- argMaxSize = flag.Uint64("maxsize", 0, "Maximal allowable resulting packet size, in KiB")
- viaOverride = flag.String("via", "", "Override Via path to destination node")
- spoolPath = flag.String("spool", "", "Override path to spool")
- logPath = flag.String("log", "", "Override path to logfile")
- quiet = flag.Bool("quiet", false, "Print only errors")
- showPrgrs = flag.Bool("progress", false, "Force progress showing")
- omitPrgrs = flag.Bool("noprogress", false, "Omit progress showing")
- debug = flag.Bool("debug", false, "Print debug messages")
- version = flag.Bool("version", false, "Print version information")
- warranty = flag.Bool("warranty", false, "Print warranty information")
+ noCompress = flag.Bool("nocompress", false, "Do not compress input data")
+ cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
+ niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceExec),
+ "Outbound packet niceness")
+ replyNiceRaw = flag.String("replynice", nncp.NicenessFmt(nncp.DefaultNiceFile),
+ "Possible reply packet niceness")
+ minSize = flag.Uint64("minsize", 0, "Minimal required resulting packet size, in KiB")
+ argMaxSize = flag.Uint64("maxsize", 0, "Maximal allowable resulting packet size, in KiB")
+ viaOverride = flag.String("via", "", "Override Via path to destination node")
+ spoolPath = flag.String("spool", "", "Override path to spool")
+ logPath = flag.String("log", "", "Override path to logfile")
+ quiet = flag.Bool("quiet", false, "Print only errors")
+ showPrgrs = flag.Bool("progress", false, "Force progress showing")
+ omitPrgrs = flag.Bool("noprogress", false, "Omit progress showing")
+ debug = flag.Bool("debug", false, "Print debug messages")
+ version = flag.Bool("version", false, "Print version information")
+ warranty = flag.Bool("warranty", false, "Print warranty information")
)
log.SetFlags(log.Lshortfile)
flag.Usage = usage
func main() {
var (
- cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
- niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceFile), "Outbound packet niceness")
+ cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
+ niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceFile),
+ "Outbound packet niceness")
argMinSize = flag.Int64("minsize", -1, "Minimal required resulting packet size, in KiB")
argMaxSize = flag.Uint64("maxsize", 0, "Maximal allowable resulting packets size, in KiB")
argChunkSize = flag.Int64("chunked", -1, "Split file on specified size chunks, in KiB")
func main() {
var (
- cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
- niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceFreq), "Outbound packet niceness")
- replyNiceRaw = flag.String("replynice", nncp.NicenessFmt(nncp.DefaultNiceFile), "Reply file packet niceness")
- minSize = flag.Uint64("minsize", 0, "Minimal required resulting packet size, in KiB")
- viaOverride = flag.String("via", "", "Override Via path to destination node")
- spoolPath = flag.String("spool", "", "Override path to spool")
- logPath = flag.String("log", "", "Override path to logfile")
- quiet = flag.Bool("quiet", false, "Print only errors")
- showPrgrs = flag.Bool("progress", false, "Force progress showing")
- omitPrgrs = flag.Bool("noprogress", false, "Omit progress showing")
- debug = flag.Bool("debug", false, "Print debug messages")
- version = flag.Bool("version", false, "Print version information")
- warranty = flag.Bool("warranty", false, "Print warranty information")
+ cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
+ niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceFreq),
+ "Outbound packet niceness")
+ replyNiceRaw = flag.String("replynice", nncp.NicenessFmt(nncp.DefaultNiceFile),
+ "Reply file packet niceness")
+ minSize = flag.Uint64("minsize", 0, "Minimal required resulting packet size, in KiB")
+ viaOverride = flag.String("via", "", "Override Via path to destination node")
+ spoolPath = flag.String("spool", "", "Override path to spool")
+ logPath = flag.String("log", "", "Override path to logfile")
+ quiet = flag.Bool("quiet", false, "Print only errors")
+ showPrgrs = flag.Bool("progress", false, "Force progress showing")
+ omitPrgrs = flag.Bool("noprogress", false, "Omit progress showing")
+ debug = flag.Bool("debug", false, "Print debug messages")
+ version = flag.Bool("version", false, "Print version information")
+ warranty = flag.Bool("warranty", false, "Print warranty information")
)
log.SetFlags(log.Lshortfile)
flag.Usage = usage
return err
}
if now.Sub(info.ModTime()) < oldBoundary {
- ctx.LogD("rm-skip", nncp.LEs{{K: "File", V: pth}}, func(les nncp.LEs) string {
- return fmt.Sprintf("File %s: too fresh, skipping", pth)
- })
+ ctx.LogD("rm-skip", nncp.LEs{{K: "File", V: pth}},
+ func(les nncp.LEs) string {
+ return fmt.Sprintf("File %s: too fresh, skipping", pth)
+ },
+ )
continue
}
if (*doNoCK && strings.HasSuffix(entry.Name(), nncp.NoCKSuffix)) ||
}
}
removeSub := func(p string) error {
- return filepath.Walk(p, func(path string, info os.FileInfo, err error) error {
+ return filepath.Walk(p, func(
+ path string, info os.FileInfo, err error,
+ ) error {
if err != nil {
if errors.Is(err, fs.ErrNotExist) {
return nil
func main() {
var (
- cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
- niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceFile), "Outbound packet niceness")
+ cfgPath = flag.String("cfg", nncp.DefaultCfgPath, "Path to configuration file")
+ niceRaw = flag.String("nice", nncp.NicenessFmt(nncp.DefaultNiceFile),
+ "Outbound packet niceness")
viaOverride = flag.String("via", "", "Override Via path to destination node")
spoolPath = flag.String("spool", "", "Override path to spool")
logPath = flag.String("log", "", "Override path to logfile")