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