site.c: Prepare for adding more MSG3 variants.
[secnet] / secnet.8
CommitLineData
c215a4bc
IJ
1.\" Man page for secnet.
2.\"
3.\" See the secnet.git README, or the Debian copyright file, for full
4.\" list of copyright holders.
5.\"
6.\" secnet is free software; you can redistribute it and/or modify it
7.\" under the terms of the GNU General Public License as published by
9c6a8729 8.\" the Free Software Foundation; either version 3 of the License, or
c215a4bc
IJ
9.\" (at your option) any later version.
10.\"
11.\" secnet is distributed in the hope that it will be useful, but
12.\" WITHOUT ANY WARRANTY; without even the implied warranty of
13.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14.\" General Public License for more details.
15.\"
16.\" You should have received a copy of the GNU General Public License
17.\" version 3 along with secnet; if not, see
18.\" https://www.gnu.org/licenses/gpl.html.
3ca86f6d
RK
19.TH secnet 8
20
21.SH NAME
22secnet \- VPN router daemon
23
24.SH SYNOPSIS
25\fBsecnet\fR [\fIOPTIONS\fR]
26
27.SH DESCRIPTION
28\fBsecnet\fR allows virtual private networks to be constructed
29spanning multiple separate sites.
30
31.SH OPTIONS
32.TP
33.B --verbose\fR, \fB-v
34Enable extra diagnostics.
35.TP
36.B --nowarnings\fR, \fB-w
37Suppress warnings.
38.TP
39.B --help
40Display usage message.
41.TP
42.B --version
43Display version string.
44.TP
45.B --nodetach\fR, \fB-n
46Don't go into background.
47The default behaviour is to become a daemon during startup.
48.TP
49.B --silent\fR, \fB--quiet\fR, \fB-f
50Suppress error messages.
51.TP
52.B --debug\fR, \fB-d
53Enable debug messages.
54.TP
55.B --config\fR, \fB-c \fIPATH
56Specify configuration file.
57The default is \fI/etc/secnet/secnet.conf\fR.
58.TP
59.B --just-check-config\fR, \fB-j
60Check configuration and exit.
61.TP
62.B --sites-key\fR, \fB-s \fIKEY
63Configuration file key defining active sites.
64The default is \fBsites\fR.
65
7bdfa17d
MW
66.SH "CAPABILITY NEGOTIATION"
67Sites negotiate with each other during key exchange
68in order to determine which cryptographic algorithms and other features
69\(en termed
70.I capabilities
71\(en
72they each support.
73Capabilities are assigned small integer numbers.
74In many cases,
75capability numbers can be assigned in the configuration file,
76as described below;
77but secnet's default assignments will often be satisfactory.
78.PP
79Capability numbers between 0 and 7 inclusive
80are reserved for local use:
81secnet will never make use of them without explicit configuration.
82This may be useful to migrate from one set of parameters
83for a particular cryptographic algorithm
84to different, incompatible, parameters for the same algorithm.
85Other capability numbers are assigned by default
86by various kinds of closures.
87See the descriptions below for details.
88.PP
89It is essential that a capability number mean the same thing
90to each of a pair of peers.
91It's possible to configure a site
92so that it uses different capability numbers for the same feature
93when it communicates with different peer sites,
94but this is likely to be more confusing than useful.
95
3ca86f6d
RK
96.SH "CONFIGURATION FILE"
97.SS Overview
98The default configuration file is \fI/etc/secnet/secnet.conf\fR.
99This can be overridden with the \fB--config\fR option.
100.PP
101The configuration file defines a dictionary (a mapping from keys to
102values) of configuration information for secnet.
103It is recursive in nature, i.e. values may themselves include dictionaries.
104Any node in the nested structure thus defined can be identified by a
105\fIpath\fR, which is the sequence of keys necessary to reach it from
106the root, separated by "/" characters.
107See \fBPaths\fR below for how this is used.
108.PP
109Furthermore, when a key is looked up in a dictionary, if it cannot be
110found, it is sought in the parent dictionary, and so on back to the
111root.
112For instance, each \fIsite\fR must contain the \fBresolver\fR key, but
113in a typical configuration there is no value in having different
114resolvers for each site.
115Therefore \fBresolver\fR is defined at the root and thus automatically
116incorporated into all sites.
117.SS Whitespace
118Whitespace, including newlines, is ignored except to the extent that
119it bounds other symbols.
120.PP
121Comment begin with "#" and continues to the end of the line.
122Comments are ignored.
123.SS Inclusion
124A file may be recursively included into the configuration file using a
125line of the form:
126.IP
127\fBinclude \fIPATH
128.PP
129This is handled at a higher level than the main parser and so
130precludes the possibility of using the string \fBinclude\fR for any
131other purpose.
132.\" check if this is true. it's probably a bug!
133.SS Assignments
134The configuration file contains one or more assigments.
135Each assignment is written:
136.IP
137\fIkey\fR [\fB=\fR] \fIlist\fR\fB;\fR
138.PP
139i.e. the equals sign is optional.
140The semicolon is mandatory in all contexts.
141.PP
142Keys start with a letter or "_" and continue with any numbers of
143letters, digits, "_" and "-".
144.PP
145Each \fIkey\fR is a list of one or more \fIvalues\fR, separated by commas.
146Possible values types are \fIboolean\fR, \fIstring\fR, \fInumber\fR,
147\fIdictionary\fR, \fIpath\fR and \fIclosure evaluation\fR.
148.\" This man page draws a distinction between a closure (the thing
149.\" evaluated) and a closure evaluation (the closure plus is
150.\" arguments).
151.SS "Strings"
152Strings are contained within "double quotes".
153There is (currently) no escape syntax and no way to include quotes
154inside strings.
155.PP
156Example:
157.nf
158 filename "/var/log/secnet";
159.fi
160.SS "Numbers"
161Numbers are encoded in decimal and do not include a sign.
162Numbers must lie in the range 0 to 4294967295.
163.PP
164Example:
165.nf
166 mtu 1400;
167.fi
168.SS "Dictionaries"
169.\" In conffile.y dictionaries can be preceded by a search path, but
170.\" this is not implemented elsewhere, so not documented here.
171Dictionaries consist of one or more assignments, in the same syntax as
172given above, enclosed in "{" and "}".
173.PP
174Example:
175.nf
176 system {
177 userid "secnet";
178 pidfile "/var/run/secnet.pid";
179 };
180.fi
181.SS "Paths"
182Paths allow a key already defined in the configuration to be aliased.
183.PP
184Paths consist of a sequence of keys separated by "/".
185If the path starts with a "/" then it is an \fIabsolute path\fR and
186the search starts at the root of the configuration.
187Otherwise it is a \fIrelative path\fR and starts in the containing
188dictionary or in any of its parents, down to and including the root.
189If there is more than one match, the one furthest from the root "wins".
190.PP
191The value of a path is the list assigned to the key it refers to.
192Lists are flattened; for example if a key is defined as a list of two
193paths, and each of those refers to a list of two integers, the
194original key is therefore defined to be a list of four integers, not
195a list consisting of two lists.
196.PP
197It is not possible to refer to a \fIlater\fR key using a path.
198.PP
199Example:
200.nf
201 vpn {
202 test {
203 kakajou vpn-data/test/kakajou/kakajou;
204 araminta vpn-data/test/araminta/araminta;
205 deodand vpn-data/test/deodand/deodand;
206 all-sites kakajou,araminta,deodand;
207 };
208 };
209 all-sites vpn/test/all-sites;
210.fi
211.PP
212Here, each of \fBvpn/test/kakajou\fR, \fBvpn/test/araminta\fR and
213\fBvpn/test/deodand\fR are defined as aliases to values defined
214elsewhere.
215\fBvpn/tests/all-sites\fR is defined as the list of all three of those
216values, and \fBall-sites\fR is then defined to be an alias for that.
217.SS "Booleans"
218The (single-element) paths \fBfalse\fR, \fBno\fR and \fBnowise\fR are
219predefined and refer to a boolean false value.
220Similarly \fBtrue\fR, \fByes\fR and \fBverily\fR point at a boolean
221true value.
222.PP
223In all six cases, variants with just the first letter capitalized, and
224with all letters capitalized, are also provided.
225.PP
226Example:
227.nf
228 random randomfile("/dev/urandom",no);
229.fi
230.SS "Closure Evaluation"
231Closure evaluation uses the following syntax:
232.IP
233\fICLOSURE \fB( \fIARGUMENTS \fB)
234.PP
235\fICLOSURE\fR may be a path referring to a closure, or may itself be a
236closure evaluation.
237.PP
238\fIARGUMENTS\fR is a list of zero or more values, separated by commas.
239As a shortcut, if the arguments consist of a single dictionary, the
240parentheses may be ommitted:
241.IP
242\fICLOSURE \fB{ \fR... \fB}
243.PP
244Example:
245.nf
246 sites map(site, vpn/test/all-sites);
247.fi
248.PP
249When a closure is evaluated it returns a value (a list, much as above)
250and may also have side effects (which may be immediate or may be
251deferred to some later phase of execution).
252A list of built-in closures is given below.
253.SS "Mandatory Keys"
254Two keys are mandatory.
255\fBsystem\fR must be a dictionary in which the following keys can be
256looked up:
257.TP
258.B log
259A \fIlog closure\fR; see the \fBlogfile\fR documentation below.
260The destination for log messages.
261Mandatory.
262.TP
263.B userid
264A string.
265The userid to run as after dropping privilege.
266Optional.
267.TP
268.B pidfile
269A string.
270The path to write a pidfile.
271Optional.
272.PP
273\fBsites\fR should be a list of \fIsite closures\fR; see the \fBsite\fR documentation below.
274This defines the collection of tunnel endpoints that \fBsecnet\fR will
275communicate with.
276.PP
277Recall the recursive lookup logic described in \fBOverview\fR above:
278if (for instance) \fBlog\fR is defined in the top level dictionary but
279not in \fBsystem\fR, it will nevertheless be found when looked up in
280the latter.
281
282.SH CLOSURES
283\fBsecnet\fR contains a collection of built-in closures
284with names (i.e. single-element paths) given below.
285.PP
286Most of them return anonymous closures of various types,
287which are described contextually.
288
289.SS adns
290\fBadns(\fIDICT\fB)\fR => \fIresolver closure\fR
291.TP
292.I DICT
293This either be empty or contain the single key \fBconfig\fR, with a
294string value giving configuration to supply to ADNS.
295This might be read from a file using \fBreadfile\fR.
296.PP
297A \fIresolver closure\fR is a means of converting hostnames into
298network addresses.
299
300.SS diffie-hellman
301.PP
302\fBdiffie-hellman(\fIMODULUS\fB, \fIGENERATOR\fR[\fB, \fICHECK\fR]\fB)\fR => \fIdh closure\fR
303.TP
304.I MODULUS
305String.
306The prime modulus \fIp\fR in hex.
307.TP
308.I GENERATOR
309String.
310The generator \fIg\fR in hex.
311.TP
312.I CHECK
313Boolean.
314If \fBtrue\fR (the default) then check if \fIp\fR is prime.
315.PP
316A \fIdh closure\fR defines a group to be used for key exchange.
3ca86f6d
RK
317
318.SS logfile
319\fBlogfile(\fIDICT\fB)\fR => \fIlog closure\fR
320.PP
321Valid keys in the \fIDICT\fR argument are:
322.TP
323.B filename
324The path to log to.
325.TP
326.B class
327A list of strings defining which classes of message to log.
328The possible message classes are \fBdebug-config\fR,
329\fBdebug-phase\fR, \fBdebug\fR, \fBinfo\fR, \fBnotice\fR,
330\fBwarning\fR, \fBerror\fR, \fBsecurity\fR and \fBfatal\fR.
331.IP
332\fBall-debug\fR is the union of all the \fBdebug\fR... classes.
333\fBdefault\fR is equivalent to \fBwarning, error, security, fatal\fR.
334\fBverbose\fR is equivalent to \fBinfo, notice, warning, error,
335security, fatal\fR.
336\fBquiet\fR is equivalent to \fBfatal\fR.
337.PP
338A \fIlog closure\fR is a means of saving log messages.
339See also \fBsyslog\fR below.
340
341.SS makelist
342\fBmakelist(\fIDICT\fB)\fR => \fILIST\fR
343.PP
344Returns the (flattened) list of values from the dictionary, discarding
345the keys.
346
347.SS map
348\fBmap(\fICLOSURE\fB, \fIINPUT\fR...\fB)\fR => \fILIST\fR
349.PP
350Applies \fICLOSURE\fR to all its additional input arguments and
351returns the resulting list.
352
353.SS md5
354\fBmd5\fR is a \fIhash closure\fR implementing the MD5 algorithm.
355
356.SS null-netlink
357\fBnull-netlink(\fIDICT\fB)\fR => \fInetlink closure\fR
358.br
359\fBnull-netlink(\fIDICT\fB)\fR => \fIpure closure\fR
360.\" TODO pure closure is what it's called internally but this is a
361.\" very opaque name to use in docs
362.PP
363Valid keys in the \fIDICT\fR argument are:
364.TP
365.B name
366String.
367The name for the netlink device.
368The default is \fBnull-netlink\fR.
369.TP
370.B networks
371List of strings.
372The networks on the host side of the netlink device.
373.TP
374.B remote-networks
375List of strings.
376Networks that may be claimed by remote sites using this netlink device.
377.TP
378.B secnet-address
379String.
380IP address of this netlink.
381Incompatible with \fBptp-address\fR.
382.TP
383.B ptp-address
384String.
385IP address of the other end of a point-to-point link.
386Incompatible with \fBsecnet-address\fR.
387.TP
388.B mtu
389Number.
390The MTU of the netlink device.
391The default is 1000.
392.PP
393If \fBptp-address\fR is used then the result is a \fInetlink closure\fR.
394This can be used directly with the \fBlink\fR key in the \fBsites\fR
395closure (see below).
396.PP
397If \fBsecnet-address\fR is used then the result is a \fIpure
398closure\fR.
399This must be evaluated to yield a \fInetlink closure\fR, using a
400dictionary argument with the following keys:
401.TP
402.B routes
403String list.
404networks reachable via this tunnel, in \fIaddress\fB/\fIbits\fR format.
405.TP
406.B options
407String list.
408A list of options:
409.RS
410.TP
411.B allow-route
412Allow packets received via this tunnel to be routed down other tunnels
413(without this option only packets from the host will be routed).
414.TP
415.B soft
416Remove these routes from the host routing table when the link quality
417is 0.
418.RE
419.TP
420.B mtu
421Number.
422Default MTU over this link.
423The default is inherited from the \fIpure closure\fR.
424.TP
425.B priority
426Number.
427The priority of this link.
428Higher values beat lower values.
429The default is 0.
430
431.\" TODO ptp-address turns up in sites.conf, but why? I think this
432.\" is a bug in make-secnet-sites; it is not used by
433 \" netlink_inst_create.
434
435.PP
436A \fInetlink closure\fR is a virtual IP link, and is supplied to the
437\fBlink\fR key of a \fIsite\fR closure.
438.PP
439The netlink created by \fBnull-netlink\fR has no connection to the
440host.
441See \fBtun\fR and \fBuserv-ipif\fR below for more useful alternatives.
442
443
444
445.SS randomfile
446\fBrandomfile(\fIFILENAME\fR[\fB, \fIBLOCKING\fR]\fB)\fR => \fIrandomsource closure\fR
447.TP
448.I FILENAME
449String.
450Path to random device, e.g. \fI/dev/urandom\fR.
451.TP
452.I BLOCKING
453Boolean.
454\fBTrue\fR if this is a blocking device and \fBfalse\fR otherwise (the default).
455Blocking device support is not implemented so this must always be
456\fBFalse\fR or absent.
457.PP
458A \fIrandomsource closure\fR is a source of random numbers.
459
460.SS readfile
461\fBreadfile(\fIPATH\fB)\fR => \fISTRING\fR
462.PP
463Read the contents of the file \fIPATH\fR (a string) and return it as a string.
464
b02b720a 465.SS eax-serpent
161f20c2 466\fBeax-serpent(\fIDICT\fB)\fR => \fItransform closure\fR
3ca86f6d
RK
467.PP
468Valid keys in the \fIDICT\fR argument are:
469.TP
470.B max-sequence-skew
471The maximum acceptable difference between the sequence number in a
472received, decrypted message and the previous one.
473The default is 10.
474It may be necessary to increase this is if connectivity is poor.
b02b720a
IJ
475.TP
476.B tag-length-bytes
477The length of the message authentication tag. The default is 16,
478for a 128-bit tag length. It must be no longer than the Serpent
479blocksize, 16. Must be have the same value at both ends.
480.TP
481.B padding-rounding
482Messages are padded to a multiple of this many bytes. This
483serves to obscure the exact length of messages. The default is 16,
5b5f297f
IJ
484.TP
485.B capab-num
3dc839ce 486The capability number to use when advertising this
7bdfa17d 487transform. The default for serpent-eax is 9.
3ca86f6d
RK
488.PP
489A \fItransform closure\fR is a reversible means of transforming
490messages for transmission over a (presumably) insecure network.
491It is responsible for both confidentiality and integrity.
b02b720a
IJ
492
493.SS serpent256-cbc
494\fBserpent256-cbc(\fIDICT\fB)\fR => \fItransform closure\fR
495.PP
5b5f297f
IJ
496This transform
497is deprecated as its security properties are poor; it should be
498specified only alongside a better transform such as eax-serpent.
499.PP
b02b720a
IJ
500Valid keys in the \fIDICT\fR argument are:
501.TP
5b5f297f
IJ
502.B capab-num
503As above. The default for serpent256-cbc is 8.
504.TP
b02b720a
IJ
505.B max-sequence-skew
506As above.
af43f0b7
IJ
507.PP
508Note that this uses a big-endian variant of the Serpent block cipher
509(which is not compatible with most other Serpent implementations).
3ca86f6d
RK
510.SS rsa-private
511\fBrsa-private(\fIPATH\fB\fR[, \fICHECK\fR]\fB)\fR => \fIrsaprivkey closure\fR
512.TP
513.I PATH
514String.
515The path to a file containing an RSA private key in SSH format
516(version 1).
517There must be no passphrase.
518.TP
519.I CHECK
520Boolean.
521If \fBtrue\fR (the default) then check that the key is valid.
522
523.SS rsa-public
524\fBrsa-public(\fIKEY\fB, \fIMODULUS\fB)\fR => \fIrsapubkey closure\fR
525.TP
526.I KEY
527String.
528The public key exponent (\fIe\fR), in decimal.
529.TP
530.I MODULUS
531String.
532The modulus (\fIn\fR), in decimal.
533
534.SS sha1
535\fBsha1\fR is a \fIhash closure\fR implementing the SHA-1 algorithm.
536
757aecff
MW
537.SS sha512
538\fBsha512\fR is a \fIhash closure\fR implementing the SHA-512 algorithm.
539
3ca86f6d
RK
540.SS site
541\fBsite(\fIDICT\fB)\fR => \fIsite closure\fR
542.PP
543Valid keys in the \fIDICT\fR argument are:
544.TP
545.B local-name
546String.
547The site's name for itself.
548.TP
549.B name
550String.
551The name of the site's peer.
552.TP
553.B link
554A \fInetlink closure\fR.
555.TP
556.B comm
557A \fIcomm closure\fR.
558.TP
559.B resolver
560A \fIresolver closure\fR.
561.TP
562.B random
563A \fIrandomsource closure\fR.
564.TP
565.B local-key
566An \fIrsaprivkey closure\fR.
567The key used to prove our identity to the peer.
568.TP
569.B address
570String.
571The DNS name of the peer.
572Optional, but if it is missing then it will not be possible to
573initiate new connections to the peer.
574.TP
575.B port
576Number.
577The port to contact the peer.
578.TP
579.B key
580An \fIrsapubkey closure\fR.
581The key used to verify the peer's identity.
582.TP
583.B transform
5b5f297f
IJ
584One or more \fItransform closures\fR.
585Used to protect packets exchanged with the peer. These should
586all have distinct \fBcapab-num\fR values, and the same \fBcapab-num\fR
3dc839ce 587value should have the same (or a compatible) meaning at both
5b5f297f
IJ
588ends. The list should be in order of preference, most preferred
589first. (The end which sends MSG1,MSG3 ends up choosing; the ordering
590at the other end is irrelevant.)
3ca86f6d
RK
591.TP
592.B dh
593A \fIdh closure\fR.
594The group to use in key exchange.
595.TP
596.B hash
597The hash function used during setup.
598.\" TODO clarify what we actually use it for!
599.TP
600.B key-lifetime
601Number.
602The maximum lifetime of a session key in milliseconds.
603The default is one hour.
604.TP
605.B setup-retries
606Number.
607The maximum number of times a key negotiation packet will be
608transmitted before giving up.
609The default is 5.
610.TP
611.B setup-timeout
612Number.
613The time between retransmissions of key negotiation packets, in milliseconds.
614The default is one second.
615.TP
616.B wait-time
617Number.
618The time to wait after a failed key setup before making another
619attempt, in milliseconds.
620The default is 20s.
621.TP
622.B renegotiate-time
623Number.
624The time after which a new session key will be negotiated, \fIif\fR
625there is traffic on the link, in milliseconds.
626It must not be greater than the \fBkey-lifetime\fR.
627The default 5 minutes less than the key lifetime, unless the lifetime
628is less than 10 minutes in which case the default is half the
629lifetime.
630.TP
631.B keepalive
632Boolean.
633If \fBtrue\fR then attempt to always maintain a live session key.
634Not implemented.
635.TP
636.B log-events
637String list.
638Types of event to log for this site.
639.RS
640.TP
641.B unexpected
642Unexpected key setup packets (including late retransmissions).
643.TP
644.B setup-init
645Start of attempt to setup a session key.
646.TP
647.B setup-timeout
648Failure of attempt to setup a session key, through timeout.
649.TP
650.B activate-key
651Activation of a new session key.
652.TP
653.B timeout-key
654Deletion of current session key through age.
655.TP
656.B security
657Anything potentially suspicious.
658.TP
659.B state-change
660Steps in the key setup protocol.
661.TP
662.B packet-drop
663Whenever we throw away an outgoing packet.
664.TP
665.B dump-packets
666Every key setup packet we see.
667.TP
668.B errors
669Failure of name resolution, internal errors.
670.TP
671.B all
672Everything (too much!)
673.RE
674.PP
675A \fIsite closure\fR defines one site to communicate with.
676\fBsecnet\fR expects the (root) key \fBsite\fR to be a list of site
677closures.
678
679.SS sysbuffer
680\fBsysbuffer(\fR[\fISIZE\fR[\fB, \fIOPTIONS\fR]]\fB)\fR => \fIbuffer closure\fR
681.TP
682.I SIZE
683Number.
684The size of the buffer in bytes.
685This must be between 64 and 131072.
686The default is 4096.
687.TP
688.I OPTIONS
689Dictionary.
690Optional and presently unused.
691.\" lockdown is accepted but ignored.
692.PP
693A \fIbuffer closure\fR is a means of buffering packets to send or that
694have been received.
695
696.SS syslog
697\fBsyslog(\fIDICT\fB)\fR => \fIlog closure\fR
698.PP
699Valid keys in the \fIDICT\fR argument are:
700.TP
701.B ident
702String.
703The ident string to pass to \fBopenlog\fR(3); this value will appear
704in each message.
705.TP
706.B facility
707String.
708The facility to log as.
709The possible values are \fBauthpriv\fR, \fBcron\fR, \fBdaemon\fR,
710\fBkern\fR, \fBlocal0\fR-\fB7\fR, \fBlpr\fR, \fBmail\fR, \fBnews\fR,
711\fBsyslog\fR, \fBuser\fR and \fBuucp\fR.
712.PP
713See also \fBlogfile\fR above.
714
715.SS tun
716\fBtun(\fIDICT\fB)\fR => \fInetlink closure\fR
717.br
718\fBtun(\fIDICT\fB)\fR => \fIpure closure\fR
719.PP
720Valid keys in the \fIDICT\fR argument are those documented for
721\fBnull-netlink\fR above, plus:
722.TP
723.B flavour
724String.
725The type of TUN interface to use.
726Possible values are \fBlinux\fR, \fBbsd\fR, \fBstreams\fR and \fBguess\fR.
727The default is \fBguess\fR.
728.TP
729.B device
730String.
731The path to the TUN/TAP device file.
732The default is \fI/dev/net/tun\fR for the \fBlinux\fR flavour and
733\fI/dev/tun\fR for the others.
734.TP
735.B interface
736String.
737The interface to use.
738The default is to pick one automatically.
739This cannot be used with the \fBstreams\fR flavour.
740.TP
741.B local-address
742String.
743IP address of the host's tunnel interface.
744.\" README says this belongs to netlink-null but actually it's
745 \" duplicated between slip & tun
746.TP
747.B ifconfig-path
748String.
749The name of the \fBifconfig\fR command.
750The default is simply "ifconfig".
751.TP
752.B route-path
753String.
754The name of the \fBroute\fR command.
755The default is simply "route".
756.TP
757.B ifconfig-type
758String.
759The syntax expected by the \fBifconfig\fR command.
760Possible values are \fBlinux\fR, \fBbsd\fR, \fBioctl\fR,
761\fBsolaris-2.5\fR and \fBguess\fR.
762The default is \fBguess\fR.
763.TP
764.B route-type
765String.
766The syntax expected by the \fBifconfig\fR command.
767Possible values are \fBlinux\fR, \fBbsd\fR, \fBioctl\fR,
768\fBsolaris-2.5\fR and \fBguess\fR.
769The default is \fBguess\fR.
770.TP
771.B buffer
772A \fIbuffer closure\fR to use for packets transferred from the host to secnet.
773The buffer size must be at least 60 greater than the MTU.
774.\" TODO rumour has is that buffers are sometimes shareable between
775.\" netlink devices - document that if the conditions are reasonable
776.\" ones.
777.PP
778The \fBifconfig-type\fR and \fBroute-type\fR values determine how
779those commands are executed.
780If they are set to \fBioctl\fR then low-level system calls are used
781directly instead of invoking the commands.
782.PP
783The netlink created by \fBtun\fR uses the \fBtun\fR device to
784communicate with the host kernel.
785
786.SS udp
787\fBudp(\fIDICT\fB)\fR => \fIcomm closure\fR
788.PP
789Valid keys in the \fIDICT\fR argument are:
790.TP
791.B address
792String.
793The IP address to bind on.
794The default is 0.0.0.0, i.e. "any".
795.TP
796.B port
797Number.
798The port number to bind to.
799The default is 0, i.e. the OS will choose one.
800It is suggested that any given VPN agree a common port number.
801.TP
802.B buffer
803A \fIbuffer closure\fR.
804See the \fBsysbuffer\fR closure above.
805.TP
806.B authbind
807String.
808The path to a helper program to bind the socket.
809Optional.
810.IP
811The program will be invoked with the address and port number as its
812arguments, and with the socket to bind as file descriptor 0.
813It should either bind the socket as requested, or exit with nonzero
814status.
815.PP
816A \fIcomm closure\fR is a means of sending and receiving messages via
817a network.
818It does not provide confidentiality, reliablity or availability.
819
820.SS userv-ipif
821\fBuserv-ipif(\fIDICT\fB)\fR => \fInetlink closure\fR
822.br
823\fBuserv-ipif(\fIDICT\fB)\fR => \fIpure closure\fR
824.PP
825Valid keys in the \fIDICT\fR argument are those documented for
826\fBnull-netlink\fR above, plus:
827.TP
828.B local-address
829String.
830IP address of the host's SLIP interface.
831.\" README says this belongs to netlink-null but actually it's
832 \" duplicated between SLIP & tun
833.TP
834.B userv-path
835String.
836Where to find \fBuserv\fR(1).
837The default is \fB"userv"\fR.
838.TP
839.B service-user
840String.
841The name of the user that owns the service.
842The default is \fB"root"\fR.
843.TP
844.B service-name
845String.
846The name of the service to request.
847The default is \fB"ipif"\fR.
848.TP
849.B buffer
850A \fIbuffer closure\fR to use for packets transferred from the host to secnet.
851.PP
852The netlink created by \fBuserv-ipif\fR invokes the specified \fBuserv\fR service with pipes connected to its standard input and output.
853It uses SLIP to communicate with the host kernel via these pipes.
854
855.SH FILES
856.TP
857.I /etc/secnet/secnet.conf
858Configuration file.
859
860.SH "SEE ALSO"
861\fBuserv\fR(1)