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