chiark / gitweb /
svc/conntrack: Make the kickpeers coroutine more robust.
[tripe] / server / tripe-admin.5.in
... / ...
CommitLineData
1.\" -*-nroff-*-
2.\".
3.\" Manual for the administration protocol
4.\"
5.\" (c) 2008 Straylight/Edgeware
6.\"
7.
8.\"----- Licensing notice ---------------------------------------------------
9.\"
10.\" This file is part of Trivial IP Encryption (TrIPE).
11.\"
12.\" TrIPE is free software; you can redistribute it and/or modify
13.\" it under the terms of the GNU General Public License as published by
14.\" the Free Software Foundation; either version 2 of the License, or
15.\" (at your option) any later version.
16.\"
17.\" TrIPE is distributed in the hope that it will be useful,
18.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20.\" GNU General Public License for more details.
21.\"
22.\" You should have received a copy of the GNU General Public License
23.\" along with TrIPE; if not, write to the Free Software Foundation,
24.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25.
26.\"--------------------------------------------------------------------------
27.so ../common/defs.man \" @@@PRE@@@
28.
29.\"--------------------------------------------------------------------------
30.TH tripe-admin 5 "18 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
31.
32.\"--------------------------------------------------------------------------
33.SH "NAME"
34.
35tripe-admin \- administrator commands for TrIPE
36.
37.\"--------------------------------------------------------------------------
38.SH "DESCRIPTION"
39.
40This manual page describes the administration interface provided by the
41.BR tripe (8)
42daemon.
43.PP
44The
45.BR tripectl (8)
46program can be used either interactively or in scripts to communicate
47with the server using this interface. Alternatively, simple custom
48clients can be written in scripting languages such as Perl, Python or
49Tcl, or more advanced clients such as GUI monitors can be written in C
50with little difficulty.
51.PP
52Administration commands use a textual protocol. Each client command or
53server response consists of a line of ASCII text terminated by a single
54linefeed character. No command may be longer than 255 characters.
55.SS "General structure"
56Each command or response line consists of a sequence of
57whitespace-separated tokens. The number and nature of whitespace
58characters separating two tokens in a client command is not significant;
59the server always uses a single space character. The first token in a
60line is a
61.I keyword
62identifying the type of command or response contained. Keywords in
63client commands are not case-sensitive; the server always uses uppercase
64for its keywords.
65.PP
66In order to allow tokens to contain internal whitespace, a quoting
67mechanism is provided. Whitespace within matched pairs of quotes \(en
68either single
69.RB ` ' '
70or double
71.RB ` """" '
72\(en is considered to be internal. Any character (other than newline)
73may be escaped by preceding it with a backslash
74.RB ` \e ':
75in particular, this can be used to include quote characters. It is
76impossible for a token to contain a newline character.
77.PP
78On output, the server will use double quotes when necessary.
79.SS "Simple commands"
80For simple client command, the server responds with zero or more
81.B INFO
82lines, followed by either an
83.B OK
84line or a
85.B FAIL
86line. Each
87.B INFO
88provides information requested in the command. An
89.B OK
90response contains no further data. A
91.B FAIL
92code is followed by a machine-readable explanation of why the command
93failed.
94.PP
95Simple command processing is strictly synchronous: the server reads a
96command, processes it, and responds, before reading the next command.
97All commands can be run as simple commands. Long-running commands
98(e.g.,
99.B ADD
100and
101.BR PING )
102block the client until they finish, but the rest of the server continues
103running. See
104.B "Background commands"
105to find out how to issue long-running commands without blocking.
106.SS "Asynchronous broadcasts"
107There are three types of asynchronous broadcast messages which aren't
108associated with any particular command. Clients can select which
109broadcast messages they're interested in using the
110.B WATCH
111command.
112.PP
113The
114.B WARN
115message contains a machine-readable message warning of an error
116encountered while processing a command, unexpected or unusual behaviour
117by a peer, or a possible attack by an adversary. Under normal
118conditions, the server shouldn't emit any warnings.
119.PP
120The
121.B TRACE
122message contains a human-readable tracing message containing diagnostic
123information. Trace messages are controlled using the
124.B \-T
125command-line option to the server, or the
126.B TRACE
127administration command (see below). Support for tracing can be disabled
128when the package is being configured, and may not be available in your
129version.
130.PP
131Finally, the
132.B NOTE
133message is a machine-readable notification about some routine but
134interesting event such as creation or destruction of peers.
135.SS "Background commands"
136Some commands (e.g.,
137.B ADD
138and
139.BR PING )
140take a long time to complete. To prevent these long-running commands
141from tying up a server connection, they can be run in the background.
142Not all commands can be run like this: the ones that can provide a
143.B \-background
144option, which must be supplied with a
145.IR tag .
146.PP
147A command may fail before it starts running in the background. In this
148case, the server emits a
149.B FAIL
150response, as usual. To indicate that a command has started running in
151the background, the server emits a response of the form
152.BI "BGDETACH " tag \fR,
153where
154.I tag
155is the value passed to the
156.B \-background
157option. From this point on, the server is ready to process more
158commands and reply to them.
159.PP
160Responses to background commands are indicated by a line beginning with
161one of the tokens
162.BR BGOK ,
163.BR BGFAIL ,
164or
165.BR BGINFO ,
166followed by the command tag. These correspond to the
167.BR OK ,
168.BR FAIL ,
169and
170.B INFO
171responses for simple commands:
172.B BGINFO
173indicates information from a background command which has not completed
174yet; and
175.B BGOK
176and
177.B BGFAIL
178indicates that a background command succeeded or failed, respectively.
179.PP
180A background command will never issue an
181.B OK
182or
183.B INFO
184response: it will always detach and then issue any
185.B BGINFO
186lines followed by
187.B BGOK
188response.
189.SS "Client-provided services"
190.\"* 25 Service-related messages
191An administration client can provide services to other clients.
192Services are given names and versions. A client can attempt to
193.I claim
194a particular service by issuing the
195.B SVCCLAIM
196command. This may fail, for example, if some other client already
197provides the same or later version of the service.
198.PP
199Other clients can issue
200.I "service commands"
201using the
202.B "SVCSUBMIT"
203command; the service provider is expected to handle these commands and
204reply to them.
205.PP
206There are three important asynchronous messages which will be sent to
207service providers.
208.SP
209.BI "SVCCANCEL " jobid
210The named job has been cancelled, either because the issuing client has
211disconnected or explicitly cancelled the job using the
212.B BGCANCEL
213command.
214.SP
215.BI "SVCCLAIM " service " " version
216Another client has claimed a later version of the named
217.IR service .
218The recipient is no longer the provider of this service.
219.SP
220.BI "SVCJOB " jobid " " service " " command " " args \fR...
221Announces the arrival of a new job. The
222.I jobid
223is a simple token consisting of alphanumeric characters which
224.B tripe
225uses to identify this job.
226.PP
227The service provider can reply to the job using the commands
228.BR SVCINFO ,
229.B SVCOK
230and
231.BR SVCFAIL .
232The first of these sends an
233.B INFO
234response and leaves the job active; the other two send an
235.B OK
236or
237.B FAIL
238response respectively, and mark the job as being complete.
239.PP
240(Since
241.B SVCSUBMIT
242is a potentially long-running command, it can be run in the background.
243This detail is hidden from service providers:
244.B tripe
245will issue the corresponding
246.BR BG ...
247responses when appropriate.)
248.SS "Network addresses"
249A network address is a sequence of tokens. The first is a token
250identifying the network address family. The length of an address and
251the meanings of the subsequent tokens depend on the address family.
252Address family tokens are not case-sensitive on input; on output, they
253are always in upper-case.
254.PP
255At present, only one address family is understood.
256.TP
257.BI "INET " address " \fR[" port \fR]
258An Internet socket, naming an IPv4 address and UDP port. On output, the
259address is always in numeric dotted-quad form, and the port is given as
260a plain number. On input, DNS hostnames and symbolic port names are
261permitted; if omitted, the default port 4070 is used. Name resolution
262does not block the main server, but will block the requesting client,
263unless the command is run in the background.
264.PP
265If, on input, no recognized address family token is found, the following
266tokens are assumed to represent an
267.B INET
268address. Addresses output by the server always have an address family
269token.
270.SS "Key-value output"
271Some commands (e.g.,
272.B STATS
273and
274.BR SERVINFO )
275produce output in the form of
276.IB key = value
277pairs, one per token. Neither the
278.I key
279nor the
280.I value
281contain spaces.
282.SS "Trace lists"
283Commands which enable or disable kinds of output (e.g.,
284.B TRACE
285and
286.BR WATCH )
287work in similar ways. They take a single optional argument, which
288consists of a string of letters selecting message types, optionally
289interspersed with
290.RB ` + '
291to enable, or
292.RB ` \- '
293to disable, the subsequently listed types.
294.PP
295If the argument is omitted, the available message types are displayed,
296one to an
297.B INFO
298line, in a fixed-column format. Column zero contains the key letter for
299selecting that message type; column one contains either a space or a
300.RB ` + '
301sign, if the message type is disabled or enabled respectively; and a
302textual description of the message type begins at column 3 and continues
303to the end of the line.
304.PP
305Lowercase key letters control individual message types. Uppercase key
306letters control collections of message types.
307.
308.\"--------------------------------------------------------------------------
309.SH "COMMAND REFERENCE"
310.
311.\"* 10 Commands
312The commands provided are:
313.SP
314.BI "ADD \fR[" options "\fR] " peer " " address "\fR..."
315Adds a new peer. The peer is given the name
316.IR peer ;
317the peer's public key is assumed to be in the file
318.B keyring.pub
319(or whatever alternative file was specified in the
320.B \-K
321option on the command line). The
322.I address
323is the network address (see above for the format) at which the peer can
324be contacted. The following options are recognized.
325.RS
326.\"+opts
327.TP
328.BI "\-background " tag
329Run the command in the background, using the given
330.IR tag .
331.TP
332.B "\-cork"
333Don't send an immediate challenge to the peer; instead, wait until it
334sends us something before responding.
335.TP
336.BI "\-keepalive " time
337Send a no-op packet if we've not sent a packet to the peer in the last
338.I time
339interval. This is useful for persuading port-translating firewalls to
340believe that the `connection' is still active. The
341.I time
342is expressed as a nonnegative integer followed optionally by
343.BR d ,
344.BR h ,
345.BR m ,
346or
347.BR s
348for days, hours, minutes, or seconds respectively; if no suffix is
349given, seconds are assumed.
350.TP
351.BI "\-tunnel " tunnel
352Use the named tunnel driver, rather than the default.
353.\"-opts
354.RE
355.SP
356.BI "ADDR " peer
357Emits an
358.B INFO
359line reporting the IP address and port number stored for
360.IR peer .
361.SP
362.B "ALGS"
363Emits information about the cryptographic algorithms in use, in
364key-value form. The keys are as follows.
365.RS
366.TP
367.B kx-group
368Type of key-exchange group in use, currently either
369.B ec
370or
371.BR prime .
372.TP
373.B kx-group-order-bits
374Length of the group order, in bits. This gives an approximate measure
375of the group strength.
376.TP
377.B kx-group-elt-bits
378Length of a group element, in bits. This may be useful when analyzing
379protocol traces.
380.TP
381.B hash
382The hash function in use, e.g.,
383.BR sha256 .
384.TP
385.B mgf
386The mask-generating function in use, e.g.,
387.BR whirlpool-mgf .
388.TP
389.B hashsz
390The size of the hash function's output, in octets.
391.TP
392.B cipher
393The name of the bulk data cipher in use, e.g.,
394.BR blowfish-cbc .
395.TP
396.B cipher-keysz
397The length of key used by the bulk data cipher, in octets.
398.TP
399.B cipher-blksz
400The block size of the bulk data cipher, or zero if it's not based on a
401block cipher.
402.TP
403.B cipher-data-limit
404The maximum amount of data to be encrypted using a single key. (A new
405key exchange is instigated well before the limit is reached, in order to
406allow for a seamless changeover of keys.)
407.TP
408.B mac
409The message authentication algorithm in use, e.g.,
410.BR ripemd160-hmac ..
411.TP
412.B mac-keysz
413The length of the key used by the message authentication algorithm, in
414octets.
415.TP
416.B mac-tagsz
417The length of the message authentication tag, in octets.
418.PP
419The various sizes are useful, for example, when computing the MTU for a
420tunnel interface. If
421.I MTU
422is the MTU of the path to the peer, then the tunnel MTU should be
423.IP
424.I MTU
425\- 33 \-
426.I cipher-blksz
427\-
428.I mac-tagsz
429.PP
430allowing 20 bytes of IP header, 8 bytes of UDP header, a packet type
431octet, a four-octet sequence number, an IV, and a MAC tag.
432.RE
433.SP
434.BI "BGCANCEL " tag
435Cancels the background job with the named
436.IR tag .
437.SP
438.BI "CHECKCHAL " challenge
439Verifies a challenge as being one earlier issued by
440.B GETCHAL
441and not previously either passed to
442.B CHECKCHAL
443or in a greeting message.
444.SP
445.B "DAEMON"
446Causes the server to disassociate itself from its terminal and become a
447background task. This only works once. A warning is issued.
448.SP
449.BI "EPING \fR[" options "\fR] " peer
450Sends an encrypted ping to the peer, and expects an encrypted response.
451This checks that the peer is running (and not being impersonated), and
452that it can encrypt and decrypt packets correctly. Options and
453responses are the same as for the
454.B PING
455command.
456.SP
457.BI "FORCEKX " peer
458Requests the server to begin a new key exchange with
459.I peer
460immediately.
461.SP
462.B "GETCHAL"
463Requests a challenge. The challenge is returned in an
464.B INFO
465line, as a base64-encoded string. See
466.BR CHECKCHAL .
467.SP
468.BI "GREET " peer " " challenge
469Sends a greeting packet containing the
470.I challenge
471(base-64 encoded) to the named
472.IR peer .
473The expectation is that this will cause the peer to recognize us and
474begin a key-exchange.
475.SP
476.B "HELP"
477Causes the server to emit an
478.B INFO
479line for each command it supports. Each line lists the command name,
480followed by the names of the arguments. This may be helpful as a memory
481aid for interactive use, or for program clients probing for features.
482.SP
483.BI "IFNAME " peer
484Emits an
485.B INFO
486line containing the name of the network interface used to collect IP
487packets which are to be encrypted and sent to
488.IR peer .
489Used by configuration scripts so that they can set up routing tables
490appropriately after adding new peers.
491.SP
492.B "JOBS"
493Emits an
494.B INFO
495line giving the tag for each outstanding background job.
496.SP
497.BI "KILL " peer
498Causes the server to forget all about
499.IR peer .
500All keys are destroyed, and no more packets are sent. No notification
501is sent to the peer: if it's important that the peer be notified, you
502must think of a way to do that yourself.
503.SP
504.B "LIST"
505For each currently-known peer, an
506.B INFO
507line is written containing the peer's name, as given to
508.BR ADD .
509.SP
510.BI "NOTIFY " tokens\fR...
511Issues a
512.B USER
513notification to all interested administration clients.
514.SP
515.BI "PEERINFO " peer
516Returns information about a peer, in key-value form. The following keys
517are returned.
518.RS
519.TP
520.B tunnel
521The tunnel driver used for this peer.
522.TP
523.B keepalive
524The keepalive interval, in seconds, or zero if no keepalives are to be
525sent.
526.RE
527.SP
528.BI "PING \fR[" options "\fR] " peer
529Send a transport-level ping to the peer. The ping and its response are
530not encrypted or authenticated. This command, possibly in conjunction
531with tracing, is useful for ensuring that UDP packets are actually
532flowing in both directions. See also the
533.B EPING
534command.
535.IP
536An
537.B INFO
538line is printed describing the outcome:
539.RS
540.TP
541.BI "ping-ok " millis
542A response was received
543.I millis
544after the ping was sent.
545.TP
546.BI "ping-timeout"
547No response was received within the time allowed.
548.TP
549.BI "ping-peer-died"
550The peer was killed (probably by another admin connection) before a
551response was received.
552.RE
553.IP
554Options recognized for this command are:
555.RS
556.\"+opts
557.TP
558.BI "\-background " tag
559Run the command in the background, using the given
560.IR tag .
561.TP
562.BI "\-timeout " time
563Wait for
564.I time
565seconds before giving up on a response. The default is 5 seconds. The
566.I time
567is expressed as a nonnegative integer followed optionally by
568.BR d ,
569.BR h ,
570.BR m ,
571or
572.BR s
573for days, hours, minutes, or seconds respectively; if no suffix is
574given, seconds are assumed.
575.\"-opts
576.RE
577.SP
578.B "PORT"
579Emits an
580.B INFO
581line containing just the number of the UDP port used by the
582.B tripe
583server. If you've allowed your server to allocate a port dynamically,
584this is how to find out which one it chose.
585.SP
586.B "RELOAD"
587Instructs the server to recheck its keyring files. The server checks
588these periodically anyway but it may be necessary to force a recheck,
589for example after adding a new peer key.
590.SP
591.B "QUIT"
592Instructs the server to exit immediately. A warning is sent.
593.SP
594.B "SERVINFO"
595Returns information about the server, in the form of key-value pairs.
596The following keys are used.
597.RS
598.TP
599.B implementation
600A keyword naming the implementation of the
601.BR tripe (8)
602server. The current implementation is called
603.BR edgeware-tripe .
604.TP
605.B version
606The server's version number, as reported by
607.BR VERSION .
608.TP
609.B daemon
610Either
611.B t
612or
613.BR nil ,
614if the server has or hasn't (respectively) become a daemon.
615.RE
616.SP
617.BI "SETIFNAME " peer " " new-name
618Informs the server that the
619.IR peer 's
620tunnel-interface name has been changed to
621.IR new-name .
622This is useful if firewalling decisions are made based on interface
623names: a setup script for a particular peer can change the name, and
624then update the server's records so that they're accurate.
625.SP
626.BI "SVCCLAIM " service " " version
627Attempts to claim the named
628.IR service ,
629offering the given
630.IR version .
631The claim is successful if the service is currently unclaimed, or if
632a version earlier than
633.I version
634is provided; otherwise the command fails with the error
635.BR "service-exists" .
636.SP
637.BI "SVCENSURE " service " \fR[" version \fR]
638Ensure that
639.I service
640is provided, and (if specified) to at least the given
641.IR version .
642An error is reported if these conditions are not met; otherwise the
643command succeeds silently.
644.SP
645.BI "SVCFAIL " jobid " " tokens \fR...
646Send a
647.B FAIL
648(or
649.BR BGFAIL )
650response to the service job with the given
651.IR jobid ,
652passing the
653.I tokens
654as the reason for failure. The job is closed.
655.SP
656.BI "SVCINFO " jobid " " tokens \fR...
657Send an
658.B INFO
659(or
660.BR BGINFO )
661response to the service job with the given
662.IR jobid ,
663passing the
664.I tokens
665as the info message. The job remains open.
666.SP
667.B "SVCLIST"
668Output a line of the form
669.RS
670.IP
671.B INFO
672.I service
673.I version
674.PP
675for each service currently provided.
676.RE
677.SP
678.BI "SVCOK " jobid
679Send an
680.B OK
681(or
682.BR BGINFO )
683response to the service job with the given
684.IR jobid .
685The job is closed.
686.SP
687.BI "SVCQUERY " service
688Emits a number of
689.B info
690lines in key-value format, describing the named
691.IR service.
692The following keys are used.
693.RS
694.TP
695.B name
696The service's name.
697.TP
698.B version
699The service's version string.
700.RE
701.SP
702.BI "SVCRELEASE " service
703Announce that the client no longer wishes to provide the named
704.IR service .
705.SP
706.BI "SVCSUBMIT \fR[" options "\fR] " service " " command " " arguments \fR...
707Submit a job to the provider of the given
708.IR service ,
709passing it the named
710.I command
711and the given
712.IR arguments .
713The following options are accepted.
714.RS
715.\"+opts
716.TP
717.BI "\-background " tag
718Run the command in the background, using the given
719.IR tag .
720.TP
721.BI "\-version " version
722Ensure that at least the given
723.I version
724of the service is available before submitting the job.
725.RE
726.\"-opts
727.SP
728.BI "STATS " peer
729Emits a number of
730.B INFO
731lines, each containing one or more statistics in the form
732.IB name = value \fR.
733The statistics-gathering is experimental and subject to change.
734.SP
735.BR "TRACE " [\fIoptions\fP]
736Selects trace outputs: see
737.B "Trace lists"
738above. Message types provided are:
739.RS
740.PP
741Currently, the following tracing options are supported:
742.TP
743.B t
744Tunnel events: reception of packets to be encrypted, and injection of
745successfully-decrypted packets.
746.TP
747.B r
748Peer management events: creation and destruction of peer attachments,
749and arrival of messages.
750.TP
751.B a
752Administration interface: acceptance of new connections, and handling of
753the backgroud name-resolution required by the
754.B ADD
755command.
756.TP
757.B s
758Handling of symmetric keysets: creation and expiry of keysets, and
759encryption and decryption of messages.
760.TP
761.B x
762Key exchange: reception, parsing and emission of key exchange messages.
763.TP
764.B m
765Key management: loading keys and checking for file modifications.
766.TP
767.B l
768Display information about challenge issuing and verification.
769.TP
770.B p
771Display contents of packets sent and received by the tunnel and/or peer
772modules.
773.TP
774.B c
775Display inputs, outputs and intermediate results of cryptographic
776operations. This includes plaintext and key material. Use with
777caution.
778.TP
779.B A
780All of the above.
781.PP
782Note that the
783.B p
784(packet contents)
785and
786.B c
787(crypto details)
788outputs provide extra detail for other outputs. Specifying
789.B p
790without
791.BR r
792or
793.B t
794isn't useful; neither is specifying
795.B c
796without one of
797.BR s ,
798.BR l ,
799.B x
800or
801.BR m .
802.RE
803.SP
804.B "TUNNELS"
805For each available tunnel driver, an
806.B INFO
807line is printed giving its name.
808.SP
809.B "VERSION"
810Causes the server to emit an
811.B INFO
812line stating its software version, as two tokens: the server name, and
813its version string. The server name
814.B tripe
815is reserved to the Straylight/Edgeware implementation.
816.SP
817.BR "WATCH " [\fIoptions\fP]
818Enables or disables asynchronous broadcasts
819.IR "for the current connection only" .
820See
821.B "Trace lists"
822above. The default watch state for the connection the server opens
823automatically on stdin/stdout is to show warnings and trace messages;
824other connections show no asynchronous broadcast messages. (This is
825done in order to guarantee that a program reading the server's stdout
826does not miss any warnings.)
827.RS
828.PP
829Message types provided are:
830.TP
831.B t
832.B TRACE
833messages.
834.TP
835.B n
836.B NOTE
837messages.
838.TP
839.B w
840.B WARN
841messages.
842.TP
843.B A
844All of the above.
845.RE
846.SP
847.BI "WARN " tokens\fR...
848Issues a
849.B USER
850warning to all interested administration clients.
851.
852.\"--------------------------------------------------------------------------
853.SH "ERROR MESSAGES"
854.
855.\"* 20 Error messages (FAIL codes)
856The following
857.B FAIL
858(or
859.BR BGFAIL )
860messages are sent to clients as a result of errors during command
861processing.
862.SP
863.BI "already-daemon"
864(For
865.BR DAEMON .)
866The
867.B tripe
868server is already running as a daemon.
869.SP
870.BI "bad-addr-syntax " message
871(For commands accepting socket addresses.) The address couldn't be
872understood.
873.SP
874.BI "bad-syntax " cmd " " message
875(For any command.) The command couldn't be understood: e.g., the number
876of arguments was wrong.
877.SP
878.BI "bad-time-spec " token
879The
880.I token
881is not a valid time interval specification. Acceptable time
882specifications are nonnegative integers followed optionally by
883.BR d ,
884.BR h ,
885.BR m ,
886or
887.BR s ,
888for days, hours, minutes, or seconds, respectively.
889.SP
890.BI "bad-trace-option " char
891(For
892.BR TRACE .)
893An unknown trace option was requested.
894.SP
895.BI "bad-watch-option " char
896(For
897.BR WATCH .)
898An unknown watch option was requested.
899.SP
900.BI "daemon-error " ecode " " message
901(For
902.BR DAEMON .)
903An error occurred during the attempt to become a daemon, as reported by
904.IR message .
905.SP
906.BI "invalid-port " number
907(For
908.BR ADD .)
909The given port number is out of range.
910.SP
911.BI "not-service-provider " service
912(For
913.BR SVCRELEASE .)
914The invoking client is not the current provider of the named
915.IR service ,
916and is therefore not allowed to release it.
917.SP
918.BI "peer-create-fail " peer
919(For
920.BR ADD .)
921Adding
922.I peer
923failed for some reason. A warning should have been emitted explaining
924why.
925.SP
926.BI "peer-addr-exists " address\fR...
927(For
928.BR ADD .)
929There is already a peer with the given
930.IR address .
931.SP
932.BI "peer-exists " peer
933(For
934.BR ADD .)
935There is already a peer named
936.IR peer .
937.SP
938.B "ping-send-failed"
939The attempt to send a ping packet failed, probably due to lack of
940encryption keys.
941.SP
942.BI "resolve-error " hostname
943(For
944.BR ADD .)
945The DNS name
946.I hostname
947could not be resolved.
948.SP
949.BI "resolver-timeout " hostname
950(For
951.BR ADD .)
952The DNS name
953.I hostname
954took too long to resolve.
955.SP
956.BI "service-exists " service " " version
957(For
958.BR SVCCLAIM .)
959Another client is already providing the stated
960.I version
961of the
962.IR service .
963.SP
964.BI "service-too-old " service " " version
965(For
966.B SVCENSURE
967and
968.BR SVCSUBMIT .)
969Only the given
970.I version
971of the requested
972.I service
973is available, which does not meet the stated requirements.
974.SP
975.BI "tag-exists " tag
976(For long-running commands.) The named
977.I tag
978is already the tag of an outstanding job.
979.SP
980.BI "unknown-command " token
981The command
982.I token
983was not recognized.
984.SP
985.BI "unknown-jobid " jobid
986(For
987.BR SVCOK ,
988.BR SVCFAIL ,
989and
990.BR SVCINFO .)
991The token
992.I jobid
993is not recognized as identifying an outstanding job. It may have just
994been cancelled.
995.SP
996.BI "unknown-peer " name
997(For
998.BR ADDR ,
999.BR IFNAME ,
1000.BR KILL ,
1001.BR SETIFNAME ,
1002and
1003.BR STATS .)
1004There is no peer called
1005.IR name .
1006.SP
1007.BI "unknown-port " port
1008(For
1009.BR ADD .)
1010The port name
1011.I port
1012couldn't be found in
1013.BR /etc/services .
1014.TP
1015.BI "unknown-service " service
1016(For
1017.BR SVCENSURE ,
1018.BR SVCQUERY ,
1019.BR SVCRELEASE ,
1020and
1021.BR SVCSUBMIT .)
1022The token
1023.I service
1024is not recognized as the name of a client-provided service.
1025.TP
1026.BI "unknown-tag " tag
1027(For
1028.BR BGCANCEL .)
1029The given
1030.I tag
1031is not the tag for any outstanding background job. It may have just
1032finished.
1033.
1034.\"--------------------------------------------------------------------------
1035.SH "NOTIFICATIONS"
1036.
1037.\"* 30 Notification broadcasts (NOTE codes)
1038The following notifications are sent to clients who request them.
1039.SP
1040.BI "ADD " peer " " ifname " " address \fR...
1041A new peer has been added. The peer's name is
1042.IR peer ,
1043its tunnel is network interface
1044.IR ifname ,
1045and its network address is
1046.IR address .
1047.SP
1048.BI "DAEMON"
1049The server has forked off into the sunset and become a daemon.
1050.SP
1051.BI "GREET " challenge " " address \fR...
1052A valid greeting was received, with the given challenge (exactly as it
1053was returned by
1054.B GETCHAL
1055earlier).
1056.SP
1057.BI "KILL " peer
1058The peer
1059.I peer
1060has been killed.
1061.SP
1062.BI "KXDONE " peer
1063Key exchange with
1064.I peer
1065finished successfully.
1066.SP
1067.BI "KXSTART " peer
1068Key exchange with
1069.I peer
1070has begun or restarted. If key exchange keeps failing, this message
1071will be repeated periodically.
1072.SP
1073.BI "NEWIFNAME " peer " " old-name " " new-name
1074The given
1075.IR peer 's
1076tunnel interface name has been changed from
1077.I old-name
1078to
1079.IR new-name ,
1080as a result of a
1081.B SETIFNAME
1082command.
1083.SP
1084.BI "SVCCLAIM " service " " version
1085The named
1086.I service
1087is now available, at the stated
1088.IR version .
1089.SP
1090.BI "SVCRELEASE " service
1091The named
1092.I service
1093is no longer available.
1094.SP
1095.BI "USER " tokens\fR...
1096An administration client issued a notification using the
1097.B NOTIFY
1098command.
1099.
1100.\"--------------------------------------------------------------------------
1101.SH "WARNINGS"
1102.
1103.\"* 40 Warning broadcasts (WARN codes)
1104.\"+sep
1105There are many possible warnings. They are categorized according to
1106their first tokens.
1107.PP
1108Many of these warnings report system errors. These are reported as a
1109pair of tokens, described below as
1110.I ecode
1111and
1112.IR message .
1113The
1114.I ecode
1115is a string of the form
1116.BI E number
1117giving the
1118.BR errno (3)
1119value of the error; the
1120.I message
1121is the `human-readable' form of the message, as reported by
1122.BR strerror (3).
1123.SS "ABORT warnings"
1124These all indicate that the
1125.B tripe
1126server has become unable to continue. If enabled, the server will dump
1127core in its configuration directory.
1128.SP
1129.BI "ABORT repeated-select-errors"
1130The main event loop is repeatedly failing. If the server doesn't quit,
1131it will probably waste all available CPU doing nothing.
1132.SS "ADMIN warnings"
1133These indicate a problem with the administration socket interface.
1134.SP
1135.BI "ADMIN accept-error " ecode " " message
1136There was an error while attempting to accept a connection from a new
1137client.
1138.SP
1139.BI "ADMIN client-write-error " ecode " " message
1140There was an error sending data to a client. The connection to the
1141client has been closed.
1142.SS "CHAL warnings"
1143These indicate errors in challenges, either in the
1144.B CHECKCHAL
1145command or in greeting packets.
1146.SP
1147.B "CHAL impossible-challenge"
1148The server hasn't issued any challenges yet. Quite how anyone else
1149thought he could make one up is hard to imagine.
1150.SP
1151.B "CHAL incorrect-tag"
1152Challenge received contained the wrong authentication data. It might be
1153very stale, or a forgery.
1154.SP
1155.B "CHAL invalid-challenge"
1156Challenge received was the wrong length. We might have changed MAC
1157algorithms since the challenge was issued, or it might just be rubbish.
1158.SP
1159.B "CHAL replay duplicated-sequence"
1160Challenge received was a definite replay of an old challenge. Someone's
1161up to something!
1162.SP
1163.B "CHAL replay old-sequence"
1164Challenge received was old, but maybe not actually a replay. Try again.
1165.SS "KEYMGMT warnings"
1166These indicate a problem with the keyring files, or the keys stored in
1167them.
1168.SP
1169.BI "KEYMGMT bad-private-key " message
1170The private key could not be read, or failed a consistency check. If
1171there was a problem with the file, usually there will have been
1172.B key-file-error
1173warnings before this.
1174.SP
1175.BI "KEYMGMT bad-public-keyring " message
1176The public keyring couldn't be read. Usually, there will have been
1177.B key-file-error
1178warnings before this.
1179.SP
1180.BI "KEYMGMT key-file-error " file ":" line " " message
1181Reports a specific error with the named keyring file. This probably
1182indicates a bug in
1183.BR key (1).
1184.SP
1185.BI "KEYMGMT public-key " tag " " tokens\fR...
1186These messages all indicate a problem with the public key named
1187.IR tag .
1188.SP
1189.BI "KEYMGMT public-key " tag " algorithm-mismatch"
1190The algorithms specified on the public key don't match the ones for our
1191private key. All the peers in a network have to use the same
1192algorithms.
1193.SP
1194.BI "KEYMGMT public-key " tag " bad " message
1195The public key couldn't be read, or is invalid.
1196.SP
1197.BI "KEYMGMT public-key " tag " bad-public-group-element"
1198The public key is invalid. This may indicate a malicious attempt to
1199introduce a bogus key.
1200.SP
1201.BI "KEYMGMT public-key " tag " bad-algorithm-selection"
1202The algorithms listed on the public key couldn't be understood. The
1203algorithm selection attributes are probably malformed and need fixing.
1204.SP
1205.BI "KEYMGMT public-key " tag " incorrect-group"
1206The public key doesn't use the same group as our private key. All the
1207peers in a network have to use the same group.
1208.SP
1209.BI "KEYMGMT public-key " tag " not-found"
1210The public key for peer
1211.I tag
1212wasn't in the public keyring.
1213.SP
1214.BI "KEYMGMT public-key " tag " unknown-type"
1215The type of the public key isn't understood. Maybe you need to upgrade
1216your copy of
1217.BR tripe .
1218(Even if you do, you'll have to regenerate your keys.)
1219.SS "KX warnings"
1220These indicate problems during key-exchange. Many indicate either a bug
1221in the server (either yours or the remote one), or some kind of attack
1222in progress. All name a
1223.I peer
1224as the second token: this is the peer the packet is apparently from,
1225though it may have been sent by an attacker instead.
1226.PP
1227In the descriptions below,
1228.I msgtoken
1229is one of the tokens
1230.BR pre-challenge ,
1231.BR cookie ,
1232.BR challenge ,
1233.BR reply ,
1234.BR switch-rq ,
1235or
1236.BR switch-ok .
1237.SP
1238.BI "KX " peer " bad-expected-reply-log"
1239The challenges
1240.B tripe
1241uses in its protocol contain a check value which proves that the
1242challenge is honest. This message indicates that the check value
1243supplied is wrong: someone is attempting to use bogus challenges to
1244persuade your
1245.B tripe
1246server to leak private key information. No chance!
1247.SP
1248.BI "KX " peer " decrypt-failed reply\fR|\fBswitch-ok"
1249A symmetrically-encrypted portion of a key-exchange message failed to
1250decrypt.
1251.SP
1252.BI "KX " peer " invalid " msgtoken
1253A key-exchange message was malformed. This almost certainly indicates a
1254bug somewhere.
1255.SP
1256.BI "KX " peer " incorrect cookie\fR|\fBswitch-rq\fR|\fBswitch-ok"
1257A message didn't contain the right magic data. This may be a replay of
1258some old exchange, or random packets being sent in an attempt to waste
1259CPU.
1260.SP
1261.BI "KX " peer " public-key-expired"
1262The peer's public key has expired. It's maintainer should have given
1263you a replacement before now.
1264.SP
1265.BI "KX " peer " sending-cookie"
1266We've received too many bogus pre-challenge messages. Someone is trying
1267to flood us with key-exchange messages and make us waste CPU on doing
1268hard asymmetric crypto sums.
1269.SP
1270.BI "KX " peer " unexpected " msgtoken
1271The message received wasn't appropriate for this stage of the key
1272exchange process. This may mean that one of our previous packets got
1273lost. For
1274.BR pre-challenge ,
1275it may simply mean that the peer has recently restarted.
1276.SP
1277.BI "KX " peer " unknown-challenge"
1278The peer is asking for an answer to a challenge which we don't know
1279about. This may mean that we've been inundated with challenges from
1280some malicious source
1281.I who can read our messages
1282and discarded the valid one.
1283.SP
1284.BI "KX " peer " unknown-message 0x" nn
1285An unknown key-exchange message arrived.
1286.SS "PEER warnings"
1287These are largely concerned with management of peers and the low-level
1288details of the network protocol. The second token is usually the name of
1289a peer, or
1290.RB ` \- '
1291if none is relevant.
1292.SP
1293.BI "PEER " peer " bad-packet no-type"
1294An empty packet arrived. This is very strange.
1295.SP
1296.BI "PEER " peer " bad-packet unknown-category 0x" nn
1297The message category
1298.I nn
1299(in hex) isn't understood. Probably a strange random packet from
1300somewhere; could be an unlikely bug.
1301.SP
1302.BI "PEER " peer " bad-packet unknown-type 0x" nn
1303The message type
1304.I nn
1305(in hex) isn't understood. Probably a strange random packet from
1306somewhere; could be an unlikely bug.
1307.SP
1308.BI "PEER " peer " corrupt-encrypted-ping"
1309The peer sent a ping response which matches an outstanding ping, but its
1310payload is wrong. There's definitely a bug somewhere.
1311.SP
1312.BI "PEER " peer " corrupt-transport-ping"
1313The peer (apparently) sent a ping response which matches an outstanding
1314ping, but its payload is wrong. Either there's a bug, or the bad guys
1315are playing tricks on you.
1316.SP
1317.BI "PEER " peer " decrypt-failed"
1318An encrypted IP packet failed to decrypt. It may have been mangled in
1319transit, or may be a very old packet from an expired previous session
1320key. There is usually a considerable overlap in the validity periods of
1321successive session keys, so this shouldn't occur unless the key exchange
1322takes ages or fails.
1323.SP
1324.BI "PEER " peer " malformed-encrypted-ping"
1325The peer sent a ping response which is hopelessly invalid. There's
1326definitely a bug somewhere.
1327.SP
1328.BI "PEER " peer " malformed-transport-ping"
1329The peer (apparently) sent a ping response which is hopelessly invalid.
1330Either there's a bug, or the bad guys are playing tricks on you.
1331.SP
1332.BI "PEER " peer " packet-build-failed"
1333There wasn't enough space in our buffer to put the packet we wanted to
1334send. Shouldn't happen.
1335.SP
1336.BI "PEER \- socket-read-error " ecode " " message
1337An error occurred trying to read an incoming packet.
1338.SP
1339.BI "PEER " peer " socket-write-error " ecode " " message
1340An error occurred attempting to send a network packet. We lost that
1341one.
1342.SP
1343.BI "PEER " peer " unexpected-encrypted-ping 0x" id
1344The peer sent an encrypted ping response whose id doesn't match any
1345outstanding ping. Maybe it was delayed for longer than the server was
1346willing to wait, or maybe the peer has gone mad.
1347.SP
1348.BI "PEER \- unexpected-source " address\fR...
1349A packet arrived from
1350.I address
1351(a network address \(en see above), but no peer is known at that
1352address. This may indicate a misconfiguration, or simply be a result of
1353one end of a connection being set up before the other.
1354.SP
1355.BI "PEER " peer " unexpected-transport-ping 0x" id
1356The peer (apparently) sent a transport ping response whose id doesn't
1357match any outstanding ping. Maybe it was delayed for longer than the
1358server was willing to wait, or maybe the peer has gone mad; or maybe
1359there are bad people trying to confuse you.
1360.SS "SERVER warnings"
1361These indicate problems concerning the server process as a whole.
1362.SP
1363.BI "SERVER ignore signal " name
1364A signal arrived, but the server ignored it. Currently this happens for
1365.B SIGHUP
1366because that's a popular way of telling daemons to re-read their
1367configuration files. Since
1368.B tripe
1369re-reads its keyrings automatically and has no other configuration
1370files, it's not relevant, but it seemed better to ignore the signal than
1371let the server die.
1372.SP
1373.BI "SERVER quit signal " \fR[\fInn\fR|\fIname\fR]
1374A signal arrived and
1375.B tripe
1376is going to quit.
1377.SP
1378.BI "SERVER quit admin-request"
1379A client of the administration interface issued a
1380.B QUIT
1381command.
1382.SP
1383.BI "SERVER quit foreground-eof"
1384The server is running in foreground mode (the
1385.B \-F
1386option), and encountered end-of-file on standard input.
1387.SP
1388.BI "SERVER select-error " ecode " " message
1389An error occurred in the server's main event loop. This is bad: if it
1390happens too many times, the server will abort.
1391.SS "SYMM warnings"
1392These are concerned with the symmetric encryption and decryption
1393process.
1394.SP
1395.BI "SYMM replay old-sequence"
1396A packet was received with an old sequence number. It may just have
1397been delayed or duplicated, or it may have been an attempt at a replay
1398attack.
1399.SP
1400.BI "SYMM replay duplicated-sequence"
1401A packet was received with a sequence number we've definitely seen
1402before. It may be an accidental duplication because the 'net is like
1403that, or a deliberate attempt at a replay.
1404.SS "TUN warnings"
1405These concern the workings of the system-specific tunnel driver. The
1406second token is the name of the tunnel interface in question, or
1407.RB ` \- '
1408if none.
1409.SP
1410.BI "TUN \- bsd no-tunnel-devices"
1411The driver couldn't find an available tunnel device. Maybe if you
1412create some more
1413.BI /dev/tun nn
1414files, it will work.
1415.SP
1416.BI "TUN \- " tun-name " open-error " device " " ecode " " message
1417An attempt to open the tunnel device file
1418.I device
1419failed.
1420.SP
1421.BI "TUN \- linux config-error " ecode " " message
1422Configuring the Linux TUN/TAP interface failed.
1423.SP
1424.BI "TUN " ifname " " tun-name " read-error " ecode " " message
1425Reading from the tunnel device failed.
1426.SP
1427.BI "TUN " ifname " slip bad-escape"
1428The SLIP driver encountered a escaped byte it wasn't expecting to see.
1429The erroneous packet will be ignored.
1430.SP
1431.BI "TUN " ifname " slip eof"
1432The SLIP driver encountered end-of-file on its input descriptor.
1433Pending data is discarded, and no attempt is made to read any more data
1434from that interface ever.
1435.SP
1436.BI "TUN " ifname " slip escape-end"
1437The SLIP driver encountered an escaped `end' marker. This probably
1438means that someone's been sending it junk. The erroneous packet is
1439discarded, and we hope that we've rediscovered synchronization.
1440.SP
1441.BI "TUN \- slip fork-error " ecode " " message
1442The SLIP driver encountered an error forking a child process while
1443allocating a new dynamic interface.
1444.SP
1445.BI "TUN \- slip no-slip-interfaces"
1446The driver ran out of static SLIP interfaces. Either preallocate more,
1447or use dynamic SLIP interface allocation.
1448.SP
1449.BI "TUN " ifname " slip overflow"
1450The SLIP driver gave up reading a packet because it got too large.
1451.SP
1452.BI "TUN \- slip pipe-error " ecode " " message
1453The SLIP driver encountered an error creating pipes while allocating a
1454new dynamic interface.
1455.SP
1456.BI "TUN \- slip read-ifname-failed " ecode " " message
1457The SLIP driver encountered an error reading the name of a dynamically
1458allocated interface. Maybe the allocation script is broken.
1459.SP
1460.BI "TUN \- unet config-error " ecode " " message
1461Configuring the Linux Unet interface failed. Unet is obsolete and
1462shouldn't be used any more.
1463.SP
1464.BI "TUN \- unet getinfo-error " ecode " " message
1465Reading information about the Unet interface failed. Unet is obsolete
1466and shouldn't be used any more.
1467.SS "USER warnings"
1468These are issued by administration clients using the
1469.B WARN
1470command.
1471.SP
1472.BI "USER " tokens\fR...
1473An administration client issued a warning.
1474.\"-sep
1475.
1476.\"--------------------------------------------------------------------------
1477.SH "SUMMARY"
1478.
1479.SS "Command responses"
1480.nf
1481.BI "BGDETACH " tag
1482.BI "BGFAIL " tag " " tokens \fR...
1483.BI "BGINFO " tag " " tokens \fR...
1484.BI "BGOK " tag
1485.BI "FAIL " tokens \fR...
1486.BI "INFO " tokens \fR...
1487.B OK
1488.fi
1489.\"= summary
1490.
1491.\"--------------------------------------------------------------------------
1492.SH "SEE ALSO"
1493.
1494.BR tripectl (1),
1495.BR tripe (8).
1496.PP
1497.IR "The Trivial IP Encryption Protocol" .
1498.
1499.\"--------------------------------------------------------------------------
1500.SH "AUTHOR"
1501.
1502Mark Wooding, <mdw@distorted.org.uk>
1503.
1504.\"----- That's all, folks --------------------------------------------------