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