chiark / gitweb /
Don't build ethereal plugin if no ethereal headers found.
[tripe] / doc / tripe.8
index 8ccdc575f749f85042ec6d72759bbce2fd1eaa27..40a5b6577bc6302a21850f4730096e864c3b3295 100644 (file)
@@ -41,6 +41,8 @@ tripe \- a simple VPN daemon
 .IR addr ]
 .RB [ \-p
 .IR port ]
 .IR addr ]
 .RB [ \-p
 .IR port ]
+.RB [ \-n
+.IR tunnel ]
 .br
        
 .RB [ \-U
 .br
        
 .RB [ \-U
@@ -148,9 +150,9 @@ version number to standard output and exits with status 0.
 .B "\-u, \-\-usage"
 Writes a brief usage summary to standard output and exits with status 0.
 .TP
 .B "\-u, \-\-usage"
 Writes a brief usage summary to standard output and exits with status 0.
 .TP
-.B "\-\-tunnel"
-Writes a string to standard output describing the configured tunnelling
-method and exits with status 0.  This is intended for the use of the
+.B "\-\-tunnels"
+Writes to standard output a list of the configured tunnel drivers, one
+per line, and exits with status 0.  This is intended for the use of the
 start-up script, so that it can check that it will actually work.
 .TP
 .B "\-D, \-\-daemon"
 start-up script, so that it can check that it will actually work.
 .TP
 .B "\-D, \-\-daemon"
@@ -185,6 +187,9 @@ to tunnel through the VPN.
 Use the specified UDP port for all communications with peers, rather
 than an arbitarary kernel-assigned port.
 .TP
 Use the specified UDP port for all communications with peers, rather
 than an arbitarary kernel-assigned port.
 .TP
+.BI "\-n, \-\-tunnel=" tunnel
+Use the specified tunnel driver for new peers by default.
+.TP
 .BI "\-U, \-\-setuid=" user
 Set uid to that of
 .I user
 .BI "\-U, \-\-setuid=" user
 Set uid to that of
 .I user
@@ -482,25 +487,54 @@ Though not for the faint of heart, it is possible to get
 .B tripe
 to read and write network packets to a pair of file descriptors using
 SLIP encapsulation.  No fancy header compression of any kind is
 .B tripe
 to read and write network packets to a pair of file descriptors using
 SLIP encapsulation.  No fancy header compression of any kind is
-supported.  The intended use is that you allocate a pty pair, set the
-slave's line discipline to SLIP, and hand the
+supported.
+.PP
+Two usage modes are supported: a preallocation system, whereby SLIP
+interfaces are created and passed to the
 .B tripe
 .B tripe
-server the master end, though in fact any old file descriptors will do.
+server at startup; and a dynamic system, where the server runs a script
+to allocate a new SLIP interface when it needs one.  It is possible to
+use a mixture of these two modes, starting
+.B tripe
+with a few preallocated interfaces and having it allocate more
+dynamically as it needs them.
 .PP
 .PP
-The SLIP descriptors must be set up and running before the daemon is
-started, and you must inform it about the SLIP descriptors it's meant to
-use in an environment variable
-.BR TRIPE_SLIPIF ,
-whose value must be a colon-separated list of items of the form
+The behaviour of
+.BR tripe 's
+SLIP driver is controlled by the
+.B TRIPE_SLIPIF
+environment variable.  The server will fail to start if this variable is
+not defined.  The variable's value is a colon-delimited list of
+preallocated interfaces, followed optionally by the filename of a script
+to run to dynamically allocate more interfaces.
+.PP
+A static allocation entry has the form
 .IR infd [ \c
 .BI , outfd \c
 .RB ] \c
 .BI = \c
 .IR infd [ \c
 .BI , outfd \c
 .RB ] \c
 .BI = \c
-.IR ifname .
+.IR ifname ,
 If the
 .I outfd
 is omitted, the same file descriptor is used for input and output.
 .PP
 If the
 .I outfd
 is omitted, the same file descriptor is used for input and output.
 .PP
+The dynamic allocation script must be named by an absolute or relative
+pathname, beginning with 
+.RB ` / '
+or
+.RB ` . '.
+The server will pass the script an argument, which is the name of the
+peer for which the interface is being created.  The script should
+allocate a new SLIP interface (presumably by creating a pty pair),
+configure it appropriately, and write the interface's name to its
+standard output, followed by a newline.  It should then read and write
+SLIP packets on its stdin and stdout.  The script's stdin will be closed
+when the interface is no longer needed, and the server will attempt to
+send it a
+.B SIGTERM
+signal (though this may fail if the script runs with higher privileges
+than the server).
+.PP
 The output file descriptor should not block unless it really needs to:
 the
 .B tripe
 The output file descriptor should not block unless it really needs to:
 the
 .B tripe