20c7d47fee75ff85f23c5a630e9c59e26246d7a4
[silc.git] / doc / draft-riikonen-silc-commands-03.nroff
1 .pl 10.0i
2 .po 0
3 .ll 7.2i
4 .lt 7.2i
5 .nr LL 7.2i
6 .nr LT 7.2i
7 .ds LF Riikonen
8 .ds RF FORMFEED[Page %]
9 .ds CF
10 .ds LH Internet Draft
11 .ds RH XXX
12 .ds CH
13 .na
14 .hy 0
15 .in 0
16 .nf
17 Network Working Group                                        P. Riikonen
18 Internet-Draft
19 draft-riikonen-silc-commands-03.txt                     XXX
20 Expires: XXX
21
22 .in 3
23
24 .ce 2
25 SILC Commands
26 <draft-riikonen-silc-commands-03.txt>
27
28 .ti 0
29 Status of this Memo
30
31 This document is an Internet-Draft and is in full conformance with   
32 all provisions of Section 10 of RFC 2026.  Internet-Drafts are   
33 working documents of the Internet Engineering Task Force (IETF), its   
34 areas, and its working groups.  Note that other groups may also   
35 distribute working documents as Internet-Drafts.   
36
37 Internet-Drafts are draft documents valid for a maximum of six months   
38 and may be updated, replaced, or obsoleted by other documents at any   
39 time.  It is inappropriate to use Internet-Drafts as reference   
40 material or to cite them other than as "work in progress."   
41
42 The list of current Internet-Drafts can be accessed at   
43 http://www.ietf.org/ietf/1id-abstracts.txt   
44
45 The list of Internet-Draft Shadow Directories can be accessed at   
46 http://www.ietf.org/shadow.html   
47
48 The distribution of this memo is unlimited.  
49
50
51 .ti 0
52 Abstract
53
54 This memo describes the commands used in the Secure Internet Live
55 Conferencing (SILC) protocol, specified in the Secure Internet Live
56 Conferencing, Protocol Specification Internet Draft [SILC1].  The
57 SILC Commands are very important part of the SILC protocol.  Usually
58 the commands are used by SILC clients to manage the SILC session, but
59 also SILC servers may use the commands.  This memo specifies detailed
60 command messages and command reply messages.
61
62
63
64
65
66
67
68
69 .ti 0
70 Table of Contents
71
72 .nf
73 1 Introduction ..................................................  2
74   1.1 Requirements Terminology ..................................  2
75 2 SILC Commands .................................................  2
76   2.1 SILC Commands Syntax ......................................  2
77   2.2 SILC Commands List ........................................  4
78   2.3 SILC Command Status Types ................................. 33
79       2.3.1 SILC Command Status Payload ......................... 33
80       2.3.2 SILC Command Status List ............................ 33
81 3 Security Considerations ....................................... 38
82 4 References .................................................... 38
83 5 Author's Address .............................................. 40
84
85
86 .ti 0
87 1. Introduction
88
89 This document describes the commands used in the Secure Internet Live
90 Conferencing (SILC) protocol, specified in the Secure Internet Live
91 Conferencing, Protocol Specification Internet Draft [SILC1].  This
92 document specifies detailed command messages and command reply messages.
93
94 Commands are very important part on SILC network especially for client
95 which uses commands to operate on the SILC network.  Commands are used
96 to set nickname, join to channel, change modes and many other things.
97
98 See the [SILC1] for the requirements and the restrictions for the usage
99 of the SILC commands.  The [SILC2] defines the command packet type and
100 the Command Payload which is actually used to deliver the commands and
101 command reply messages.
102
103
104 .ti 0
105 1.1 Requirements Terminology
106
107 The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED, 
108 MAY, and OPTIONAL, when they appear in this document, are to be
109 interpreted as described in [RFC2119].
110
111
112 .ti 0
113 2 SILC Commands
114
115 .ti 0
116 2.1 SILC Commands Syntax
117
118 This section briefly describes the syntax of the command notions
119 in this document.  Every field in command is separated from each
120 other by whitespaces (` ') indicating that each field is independent
121 argument and each argument MUST have own Command Argument Payload.
122 The number of maximum arguments are defined with each command
123 separately.  The Command Argument Payload is described in [SILC2].
124
125 Every command defines specific number for each argument.  Currently,
126 they are defined in ascending order; first argument has number one 
127 (1), second has number two (2) and so on.  This number is set into the
128 Argument Type field in the Command Argument Payload.  This makes it
129 possible to send the arguments in free order as the number MUST be
130 used to identify the type of the argument.  This makes is it also
131 possible to have multiple optional arguments in commands and in
132 command replies.  The number of argument is marked in parentheses
133 before the actual argument.
134
135
136
137 .in 6
138 Example:  Arguments:  (1) <nickname> (2) <username@host>
139 .in 3
140    
141
142 Every command replies with Status Payload.  This payload tells the
143 sender of the command whether the command was completed successfully or
144 whether there was an error.  If error occurred the payload includes the
145 error type.  In the next section the Status Payload is not described 
146 as it is common to all commands and has been described here.  Commands 
147 MAY reply with other arguments as well.  These arguments are command 
148 specific and are described in the next section.
149
150 Example command:
151 .in 6
152
153 EXAMPLE_COMMAND
154
155 .in 8
156 Max Arguments:  3
157     Arguments:  (1) <nickname>[@<server>]  (2) <message>
158                 (3) [<count>]
159
160 The command has maximum of 3 arguments.  However, only first
161 and second arguments are mandatory.
162
163 First argument <nickname> is mandatory but may have optional
164 <nickname@server> format as well.  Second argument is mandatory
165 <message> argument.  Third argument is optional <count> argument.
166
167 The numbers in parentheses are the argument specific numbers
168 that specify the type of the argument in Command Argument Payload.
169 The receiver always knows that, say, argument number two (2) is
170 <message> argument, regardless of the ordering of the arguments in
171 the Command Payload.
172
173 Reply messages to the command:
174
175 Max Arguments:  4
176     Arguments:  (1) <Status Payload>  (2) [<channel list>]
177                 (3) <idle time>       (4) [<away message>]
178
179 This command may reply with maximum of 4 arguments.  However,
180 only the first and third arguments are mandatory.  The numbers
181 in the parentheses have the same meaning as in the upper
182 command sending specification.
183
184 Every command reply with <Status Payload>, it is mandatory 
185 argument for all command replies and for this reason it is not
186 described in the command reply descriptions.
187
188
189
190 Status messages:
191
192     SILC_STATUS_OK
193     SILC_STATUS_ERR_TOO_MANY_TARGETS
194     SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
195     SILC_STATUS_ERR_NO_SUCH_NICK
196
197 Every command reply also defines set of status message that it
198 may return inside the <Status Payload>.  All status messages
199 are defined in the section 2.3 SILC Command Status Types.
200
201 .in 3
202 Every command that has some kind of ID as argument (for example
203 <Client ID>) are actually ID Payloads, defined in [SILC2] that includes
204 the type of the ID, length of the ID and the actual ID data.  This
205 way variable length ID's can be sent as arguments.
206
207
208 .ti 0
209 2.2 SILC Commands List
210
211 This section lists all SILC commands, however, it is expected that a
212 implementation and especially client implementation has many more
213 commands that has only local affect.  These commands are official
214 SILC commands that has both client and server sides and cannot be
215 characterized as local commands.
216
217 List of all defined commands in SILC follows.
218
219 .in 0
220    0    SILC_COMMAND_NONE
221
222         None.  This is reserved command and MUST NOT be sent.
223
224
225    1    SILC_COMMAND_WHOIS
226
227         Max Arguments:  3328
228             Arguments:  (1) [<nickname>[@<server>]]  (2) [<count>]
229                         (3) [<Client ID>]            (n) [...]
230
231         Whois command is used to query various information about specific
232         user.  The user may be requested by their nickname and server name.
233         The query may find multiple matching users as there are no unique
234         nicknames in the SILC.  The <count> option may be given to narrow
235         down the number of accepted results.  If this is not defined there
236         are no limit of accepted results.  The query may also be narrowed
237         down by defining the server name of the nickname.  The <count> is
238         int string format.
239
240         It is also possible to search the user by Client ID.  If the 
241         <Client ID> is provided server MUST use it as the search value
242         instead of the <nickname>.  One of the arguments MUST be given.
243         It is also possible to define multiple Client ID's to search
244         multiple users sending only one WHOIS command.  In this case the
245         Client ID's are appended as normal arguments.
246
247         To prevent miss-use of this command wildcards in the nickname
248         or in the server name are not permitted.  It is not allowed
249         to request all users on some server.  The WHOIS requests MUST 
250         be based on specific nickname request.
251
252         The WHOIS request MUST be always sent to the router by server
253         so that all users are searched.  However, the server still MUST
254         search its locally connected clients.  The router MUST send
255         this command to the server which owns the requested client.  That
256         server MUST reply to the command.  Server MUST NOT send whois
257         replies to the client until it has received the reply from its
258         router.
259
260         Reply messages to the command:
261
262         Max Arguments:  9
263             Arguments:  (1) <Status Payload>       (2) <Client ID> 
264                         (3) <nickname>[@<server>]  (4) <username@host> 
265                         (5) <real name>            (6) [<Channel Payload 
266                                                          list>] 
267                         (7) [<user mode>]          (8) [<idle time>]
268                         (9) [<fingerprint>]
269
270
271         This command may reply with several command reply messages to
272         form a list of results.  In this case the status payload will
273         include STATUS_LIST_START status in the first reply and
274         STATUS_LIST_END in the last reply to indicate the end of the
275         list.  If there are only one reply the status is set to normal
276         STATUS_OK.
277
278         The command replies include the Client ID of the nickname,
279         nickname and server name, user name and host name and user's real
280         name.  Client SHOULD process these replies only after the last
281         reply has been received with the STATUS_LIST_END status.  If the
282         <count> option were defined in the query there will be only
283         <count> many replies from the server.
284
285         The server may return the list of channel the client has joined.
286         In this case the list is list of Channel Payloads.  The Mode Mask
287         in the Channel Payload (see [SILC2] and section 2.3.2.3 for the
288         Channel Payload) is the client's mode on the channel.  The list
289         is encoded by adding the Channel Payloads one after the other.
290
291         The server may also send client's user mode, idle time, and the
292         fingerprint of the client's public key.  The <fingerprint> is the
293         binary hash digest of the public key.  The fingerprint MUST NOT
294         be sent if the server has not verified the proof of posession of
295         the corresponding private key.  Server can do this during the
296         SILC Key Exchange protocol.  The <fingerprint> is SHA1 digest.
297
298         Status messages:
299
300             SILC_STATUS_OK
301             SILC_STATUS_LIST_START
302             SILC_STATUS_LIST_END
303             SILC_STATUS_ERR_NO_SUCH_NICK
304             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
305             SILC_STATUS_ERR_WILDCARDS
306             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
307             SILC_STATUS_ERR_TOO_MANY_PARAMS
308
309
310    2    SILC_COMMAND_WHOWAS
311
312         Max Arguments:  2
313             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
314
315         Whowas.  This command is used to query history information about
316         specific user.  The user may be requested by their nickname and 
317         server name.  The query may find multiple matching users as there
318         are no unique nicknames in the SILC.  The <count> option may be
319         given to narrow down the number of accepted results.  If this
320         is not defined there are no limit of accepted results.  The query
321         may also be narrowed down by defining the server name of the 
322         nickname.  The <count> is in string format.
323
324         To prevent miss-use of this command wildcards in the nickname
325         or in the server name are not permitted.  The WHOWAS requests MUST 
326         be based on specific nickname request.
327
328         The WHOWAS request MUST be always sent to the router by server
329         so that all users are searched.  However, the server still must
330         search its locally connected clients.
331
332         Reply messages to the command:
333
334         Max Arguments:  5
335             Arguments:  (1) <Status Payload>        (2) <Client ID>
336                         (3) <nickname>[@<server>]   (4) <username@host>
337                         (5) [<real name>]
338
339         This command may reply with several command reply messages to form
340         a list of results.  In this case the status payload will include
341         STATUS_LIST_START status in the first reply and STATUS_LIST_END in 
342         the last reply to indicate the end of the list.  If there are only 
343         one reply the status is set to normal STATUS_OK.
344
345         The command replies with nickname and user name and host name.
346         Every server MUST keep history for some period of time of its
347         locally connected clients.
348
349         Status messages:
350
351             SILC_STATUS_OK
352             SILC_STATUS_LIST_START
353             SILC_STATUS_LIST_END
354             SILC_STATUS_ERR_NO_SUCH_NICK
355             SILC_STATUS_ERR_WILDCARDS
356             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
357             SILC_STATUS_ERR_TOO_MANY_PARAMS
358
359
360    3    SILC_COMMAND_IDENTIFY
361
362         Max Arguments:  3328
363             Arguments:  (1) [<nickname>[@<server>]]  (2) [<server name>]
364                         (3) [<channel name>]         (4) [<count>]
365                         (5) [<ID Payload>]           (n) [...]
366
367         Identify command is used to query information about an entity by
368         the entity's name or ID.  This command can be used to query
369         information about clients, server and channels.
370
371         The query may find multiple matching entities.  The <count> option
372         may be given to narrow down the number of accepted results.  If
373         this is not defined there are no limit of accepted results.  The
374         <count> is in string format.
375
376         It is also possible to search the entity by its ID.  If the
377         <ID Payload> is provided server must use it as the search value
378         instead of the entity's name.  One of the arguments must be given.
379         It is also possible to define multiple ID Payloads to search
380         multiple entities sending only one IDENTIFY command.  In this case
381         the ID Payloads are appended as normal arguments.  The type of the
382         entity is defined by the type of the ID Payload.
383
384         To prevent miss-use of this command wildcards in the names are
385         not permitted.  It is not allowed to request for example all users
386         on server.
387
388         Implementations may not want to give interface access to this
389         command as it is hardly a command that would be used by an end
390         user.  However, it must be implemented as it is used with private
391         message sending.
392
393         The IDENTIFY command MUST be always sent to the router by server
394         so that all users are searched.  However, server MUST still search
395         its locally connected clients.
396
397         Reply messages to the command:
398
399         Max Arguments:  4
400             Arguments:  (1) <Status Payload>   (2) <ID Payload>
401                         (3) [<entity's name>]  (4) [<info>]
402
403         This command may reply with several command reply messages to form
404         a list of results.  In this case the status payload will include
405         STATUS_LIST_START status in the first reply and STATUS_LIST_END in 
406         the last reply to indicate the end of the list.  If there are only 
407         one reply the status is set to normal STATUS_OK.
408
409         When querying clients the <entity's name> must include the client's
410         nickname in the following format: nickname[@server].  The
411         <info> must include the client's username and host in the following
412         format: username@host.
413
414         When querying servers the <entity's name> must include the server's
415         full name.  The <info> may be omitted.
416
417         When querying channels the <entity's name> must include the
418         channel's name.  The <info> may be omitted.
419
420         If the <count> option were defined in the query there will be only
421         <count> many replies from the server.
422
423         Status messages:
424
425             SILC_STATUS_OK
426             SILC_STATUS_LIST_START
427             SILC_STATUS_LIST_END
428             SILC_STATUS_ERR_NO_SUCH_NICK
429             SILC_STATUS_ERR_NO_SUCH_SERVER
430             SILC_STATUS_ERR_NO_SUCH_CHANNEL
431             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
432             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
433             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
434             SILC_STATUS_ERR_WILDCARDS
435             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
436             SILC_STATUS_ERR_TOO_MANY_PARAMS
437
438
439    4    SILC_COMMAND_NICK
440
441         Max Arguments:  1
442             Arguments:  (1) <nickname>
443
444         Set/change nickname.  This command is used to set nickname for
445         user.  Nickname MUST NOT include any spaces (` '), non-printable
446         characters, commas (`,') and any wildcard characters.  Note that
447         nicknames in SILC are case-sensitive which must be taken into
448         account when searching clients by nickname.
449
450         When nickname is changed new Client ID is generated.  Server MUST
451         distribute SILC_NOTIFY_TYPE_NICK_CHANGE to local clients on the
452         channels (if any) the client is joined on.  Then it MUST send
453         SILC_PACKET_REPLACE_ID to its primary route to replace the old
454         Client ID with the new one.
455
456         Reply messages to the command:
457
458         Max Arguments:  2
459             Arguments:  (1) <Status Payload>  (2) <New ID Payload>
460
461         This command is replied always with New ID Payload that is
462         generated by the server every time user changes their nickname.
463         Client receiving this payload MUST start using the received
464         Client ID as its current valid Client ID.  The New ID Payload
465         is described in [SILC2].
466
467         Status messages:
468
469             SILC_STATUS_OK
470             SILC_STATUS_ERR_WILDCARDS
471             SILC_STATUS_ERR_NICKNAME_IN_USE
472             SILC_STATUS_ERR_BAD_NICKNAME
473             SILC_STATUS_ERR_NOT_REGISTERED
474             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
475             SILC_STATUS_ERR_TOO_MANY_PARAMS
476
477
478    5    SILC_COMMAND_LIST
479
480         Max Arguments:  1
481             Arguments:  (1) [<Channel ID>]
482
483         The list command is used to list channels and their topics on the
484         current server.  If the <Channel ID> parameter is used, only the
485         status of that channel is displayed.  Secret channels are not
486         listed at all.  Private channels are listed with status indicating
487         that the channel is private.  Router MAY reply with all channels
488         it knows about.
489
490         Reply messages to the command:
491
492         Max Arguments:  5
493             Arguments:  (1) <Status Payload>  (2) <Channel ID>
494                         (3) <channel>         (4) [<topic>]
495                         (5) [<user count>]
496
497         This command may reply with several command reply messages to form
498         a list of results.  In this case the status payload will include
499         STATUS_LIST_START status in the first reply and STATUS_LIST_END in 
500         the last reply to indicate the end of the list.  If there are only 
501         one reply the status is set to normal STATUS_OK.
502
503         This command replies with Channel ID, name and the topic of the
504         channel.  If the channel is private channel the <topic> SHOULD
505         include the "*private*" string.
506
507         Status messages:
508
509             SILC_STATUS_OK
510             SILC_STATUS_LIST_START
511             SILC_STATUS_LIST_END
512             SILC_STATUS_ERR_WILDCARDS
513             SILC_STATUS_ERR_NOT_REGISTERED
514             SILC_STATUS_ERR_TOO_MANY_PARAMS
515             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
516             SILC_STATUS_ERR_NO_CHANNEL_ID
517             SILC_STATUS_ERR_NO_SUCH_SERVER
518
519
520    6    SILC_COMMAND_TOPIC
521
522         Max Arguments:  2
523             Arguments:  (1) <Channel ID>  (2) [<topic>]
524
525         This command is used to change or view the topic of a channel.
526         The topic for channel <Channel ID> is returned if there is no
527         <topic> given.  If the <topic> parameter is present, the topic
528         for that channel will be changed, if the channel modes permit
529         this action.
530
531         After setting the topic the server MUST send the notify type
532         SILC_NOTIFY_TYPE_TOPIC_SET to its primary router and then to
533         the channel which topic was changed.
534
535         Reply messages to the command:
536
537         Max Arguments:  2
538             Arguments:  (1) <Status Payload>  (2) <Channel ID> 
539                         (3) [<topic>]
540
541         The command may reply with the topic of the channel if it is
542         set.
543
544         Status messages:
545
546             SILC_STATUS_OK
547             SILC_STATUS_ERR_NOT_ON_CHANNEL
548             SILC_STATUS_ERR_WILDCARDS
549             SILC_STATUS_ERR_NOT_REGISTERED
550             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
551             SILC_STATUS_ERR_NO_SUCH_CHANNEL
552             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
553             SILC_STATUS_ERR_NO_CHANNEL_ID
554             SILC_STATUS_ERR_BAD_CHANNEL_ID
555             SILC_STATUS_ERR_TOO_MANY_PARAMS
556             SILC_STATUS_ERR_NO_CHANNEL_PRIV
557
558
559    7    SILC_COMMAND_INVITE
560
561         Max Arguments:  4
562             Arguments:  (1) <Channel ID>       (2) [<Client ID>]
563                         (3) [<adding client>]  (4) [<removing client>]
564
565         This command is used to invite other clients to join to the
566         channel.  The <Client ID> argument is the target client's ID that
567         is being invited.  The <Channel ID> is the Channel ID of the
568         requested channel.  The sender of this command MUST be on the
569         channel.  The server MUST also send the notify type
570         SILC_NOTIFY_TYPE_INVITE to its primary router and then to the
571         client indicated by the <Client ID>.
572
573         The <adding client> and <removing client> can be used to add to
574         and remove from the invite list.  The format of the <adding client>
575         and <removing client> is as follows:
576
577             [<nickname>[@<server>]!][<username>]@[<hostname>]
578
579         When adding to or removing from the invite list the server MUST
580         send the notify type SILC_NOTIFY_TYPE_INVITE to its primary router
581         and MUST NOT send it to the client which was added to the list.
582         The client which executes this command MUST have at least channel
583         operator privileges to be able to add to or remove from the invite
584         list.  The wildcards MAY be used with this command.  If adding or
585         removing more than one client then the lists are an comma (`,')
586         separated.
587
588         Note that the <Client ID> provided MUST be resolved into correct
589         nickname and host name and add to the invite list before sending
590         the notify packet.
591         
592         When this command is given with only <Channel ID> argument then
593         the command merely returns the invite list of the channel.   This
594         command MUST fail if the requested channel does not exist, the
595         requested <Client ID> is already on the channel or if the channel
596         is invite only channel and the caller of this command does not
597         have at least channel operator privileges.
598
599         Reply messages to the command:
600
601         Max Arguments:  3
602             Arguments:  (1) <Status Payload>  (2) <Channel ID>
603                         (3) [<invite list>]
604
605         This command replies with the invite list of the channel if it
606         exists.  The <invite list> may be omitted if the list was not
607         altered.
608
609         Status messages:
610
611             SILC_STATUS_OK
612             SILC_STATUS_ERR_NOT_REGISTERED
613             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
614             SILC_STATUS_ERR_TOO_MANY_PARAMS
615             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
616             SILC_STATUS_ERR_NO_CLIENT_ID
617             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
618             SILC_STATUS_ERR_NO_CHANNEL_ID
619             SILC_STATUS_ERR_NOT_ON_CHANNEL
620             SILC_STATUS_ERR_USER_ON_CHANNEL
621             SILC_STATUS_ERR_NO_CHANNEL_PRIV
622
623
624    8    SILC_COMMAND_QUIT
625
626         Max Arguments:  1
627             Arguments:  (1) [<quit message>]
628
629         This command is used by client to end SILC session.  The server
630         must close the connection to a client which sends this command.
631         if <quit message> is given it will be sent to other clients on
632         channel if the client is on channel when quitting.
633
634         Reply messages to the command:
635
636         This command does not reply anything.
637
638
639     9   SILC_COMMAND_KILL
640
641         Max Arguments:  2
642             Arguments:  (1) <Client ID>  (2) [<comment>]
643
644         This command is used by SILC operators to remove a client from
645         SILC network.  The removing has temporary effects and client may
646         reconnect to SILC network.  The <Client ID> is the client to be
647         removed from SILC.  The <comment> argument may be provided to 
648         give to the removed client some information why it was removed
649         from the network.
650
651         When killing a client the router MUST first send notify type
652         SILC_NOTIFY_TYPE_KILLED to all channels the client has joined.
653         The packet MUST NOT be sent to the killed client on the channels.
654         Then, the router MUST send the same notify type to its primary
655         router.  Finally, the router MUST send the same notify type 
656         directly to the client which was killed.
657
658         Reply messages to the command:
659
660         Max Arguments:  1
661             Arguments:  (1) <Status Payload>
662
663         This command replies only with Status Payload.
664
665         Status messages:
666
667             SILC_STATUS_OK
668             SILC_STATUS_ERR_WILDCARDS
669             SILC_STATUS_ERR_NOT_REGISTERED
670             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
671             SILC_STATUS_ERR_TOO_MANY_PARAMS
672             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
673             SILC_STATUS_ERR_NO_CLIENT_ID
674             SILC_STATUS_ERR_NO_ROUTER_PRIV
675
676
677    10   SILC_COMMAND_INFO
678
679         Max Arguments:  2
680             Arguments:  (1) [<server>]  (2) [<Server ID>]
681
682         This command is used to fetch various information about a server.
683         If <server> argument is specified the command MUST be sent to
684         the requested server.
685
686         If the <Server ID> is specified the server information if fetched
687         by the provided Server ID.  One of the arguments must always be
688         present.
689
690         Reply messages to the command:
691
692         Max Arguments:  4
693             Arguments:  (1) <Status Payload>  (2) <Server ID>
694                         (3) <server name>     (4) <string>
695
696         This command replies with the Server ID of the server and a
697         string which tells the information about the server.
698
699         Status messages:
700
701             SILC_STATUS_OK
702             SILC_STATUS_ERR_WILDCARDS
703             SILC_STATUS_ERR_NOT_REGISTERED
704             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
705             SILC_STATUS_ERR_TOO_MANY_PARAMS
706             SILC_STATUS_ERR_NO_SUCH_SERVER
707             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
708             SILC_STATUS_ERR_NO_SERVER_ID
709
710
711    11   SILC_COMMAND_CONNECT
712
713         Max Arguments:  2
714             Arguments:  (1) <remote server/router>  (2) [<port>]
715
716         This command is used by operators to force a server to try to
717         establish a new connection to remote server or router.  The
718         Operator MUST specify the server/router to be connected by
719         setting <remote server> argument.  The port is 32 bit MSB value.
720
721         Reply messages to the command:
722
723         Max Arguments:  1
724             Arguments:  (1) <Status Payload>
725
726         This command replies only with Status Payload.
727
728
729
730         Status messages:
731
732             SILC_STATUS_OK
733             SILC_STATUS_ERR_WILDCARDS
734             SILC_STATUS_ERR_NOT_REGISTERED
735             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
736             SILC_STATUS_ERR_TOO_MANY_PARAMS
737             SILC_STATUS_ERR_NO_SERVER_PRIV
738             SILC_STATUS_ERR_NO_ROUTER_PRIV
739
740
741    12   SILC_COMMAND_PING
742
743         Max Arguments:  1
744             Arguments:  (1) <Server ID>
745
746         This command is used by client and server to test the communication
747         channel to its server if one suspects that the communication is not
748         working correctly.  The <Server ID> is the ID of the server the
749         sender is connected to.
750
751         Reply messages to the command:
752
753         Max Arguments:  1
754             Arguments:  (1) <Status Payload>
755
756         This command replies only with Status Payload.  Server returns
757         SILC_STATUS_OK in Status Payload if pinging was successful.
758
759
760
761         Status messages:
762
763             SILC_STATUS_OK
764             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
765             SILC_STATUS_ERR_TOO_MANY_PARAMS
766             SILC_STATUS_ERR_NO_SERVER_ID
767             SILC_STATUS_ERR_NO_SUCH_SERVER
768             SILC_STATUS_ERR_NOT_REGISTERED
769
770
771    13   SILC_COMMAND_OPER
772
773         Max Arguments:  2
774             Arguments:  (1) <username>  (2) <authentication payload>
775
776         This command is used by normal client to obtain server operator
777         privileges on some server or router.  Note that router operator
778         has router privileges that supersedes the server operator
779         privileges and this does not obtain those privileges.  Client
780         MUST use SILCOPER command to obtain router level privileges.
781
782         The <username> is the username set in the server configurations
783         as operator.  The <authentication payload> is the data that the
784         client is authenticated against.  It may be passphrase prompted
785         for user on client's screen or it may be public key or certificate
786         authentication data (data signed with private key).  The public
787         key that server will use to verify the signature found in the
788         payload should be verified.  It is recommended that the public
789         key is saved locally in the server and server would not use
790         any public keys received during the SKE.
791
792         After changing the mode the server MUST send the notify type
793         SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
794
795         Reply messages to the command:
796
797         Max Arguments:  1
798             Arguments:  (1) <Status Payload>
799
800         This command replies only with Status Payload.
801
802         Status messages:
803
804             SILC_STATUS_OK
805             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
806             SILC_STATUS_ERR_TOO_MANY_PARAMS
807             SILC_STATUS_ERR_NOT_REGISTERED
808             SILC_STATUS_ERR_AUTH_FAILED
809
810
811    14   SILC_COMMAND_JOIN
812
813         Max Arguments:  6
814             Arguments:  (1) <channel>       (2) <Client ID>
815                         (3) [<passphrase>]  (4) [<cipher>]
816                         (5) [<hmac>]        (6) [<founder auth>]
817
818         Join to channel/create new channel.  This command is used to
819         join to a channel.  If the channel does not exist the channel is
820         created.  If server is normal server this command MUST be sent
821         to router which will create the channel.  The channel MAY be
822         protected with passphrase.  If this is the case the passphrase
823         MUST be sent along the join command.
824
825         The name of the <channel> MUST NOT include any spaces (` '),
826         non-printable characters, commas (`,') or any wildcard characters.
827
828         The second argument <Client ID> is the Client ID of the client
829         which is joining to the client.  When client sends this command
830         to the server the <Client ID> MUST be the client's own ID.
831
832         Cipher to be used to secure the traffic on the channel MAY be
833         requested by sending the name of the requested <cipher>.  This
834         is used only if the channel does not exist and is created.  If
835         the channel already exists the cipher set previously for the
836         channel will be used to secure the traffic.  The computed MACs
837         of the channel message are produced by the default HMAC or by
838         the <hmac> provided for the command.
839
840         The <founder auth> is Authentication Payload providing the
841         authentication for gaining founder privileges on the channel
842         when joining the channel.  The client may provide this if it
843         knows that it is the founder of the channel and that the 
844         SILC_CMODE_FOUNDER_AUTH mode is set on the channel.  The server
845         MUST verify whether the client is able to gain the founder
846         privileges the same way as the client had given the
847         SILC_COMMAND_CUMODE command to gain founder privileges.  The
848         client is still able to join the channel even if the founder
849         privileges could not be gained.
850
851         The server MUST check whether the user is allowed to join to
852         the requested channel.  Various modes set to the channel affect
853         the ability of the user to join the channel.  These conditions
854         are:
855
856             o  The user MUST be invited to the channel if the channel
857                is invite-only channel.
858
859             o  The Client ID/nickname/username/host name MUST NOT match
860                any active bans.
861
862             o  The correct passphrase MUST be provided if passphrase 
863                is set to the channel.
864
865             o  The user count limit, if set, MUST NOT be reached.
866
867         If the client provided correct <founder auth> payload it can
868         override these conditions, except the condition for the passphrase.
869         The correct passphrase MUST be provided even if <founder auth>
870         payload is provided.
871
872         Reply messages to the command:
873
874         Max Arguments:  14
875             Arguments:  (1) <Status Payload>        (2) <channel> 
876                         (3) <Channel ID>            (4) <Client ID>
877                         (5) <channel mode mask>     (6) <created>
878                         (7) [<Channel Key Payload>] (8) [<ban list>]
879                         (9) [<invite list>]         (10) [<topic>]
880                         (11) [<hmac>]               (12) <list count>
881                         (13) <Client ID list>       (14) <client mode list>
882
883         This command replies with the channel name requested by the
884         client, channel ID of the channel and topic of the channel
885         if it exists.  The <Client ID> is the Client ID which was joined
886         to the channel.  It also replies with the channel mode mask
887         which tells all the modes set on the channel.  If the
888         channel is created the mode mask is zero (0).  If ban mask
889         and/or invite list is set they are sent as well.
890
891         The <list count>, <Client ID list> and <client mode list> are
892         the clients currently on the channel and their modes on the
893         channel.  The <Client ID list> is formed by adding the ID Payloads
894         one after the other.  The <client mode list> is formed by adding
895         32 bit MSB first order values one after the other.
896
897         Client receives the channel key in the reply message as well
898         inside <Channel Key Payload>.
899
900         Status messages:
901
902             SILC_STATUS_OK
903             SILC_STATUS_ERR_WILDCARDS
904             SILC_STATUS_ERR_NOT_REGISTERED
905             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
906             SILC_STATUS_ERR_TOO_MANY_PARAMS
907             SILC_STATUS_ERR_BAD_PASSWORD
908             SILC_STATUS_ERR_CHANNEL_IS_FULL
909             SILC_STATUS_ERR_NOT_INVITED
910             SILC_STATUS_ERR_BANNED_FROM_CHANNEL
911             SILC_STATUS_ERR_BAD_CHANNEL
912             SILC_STATUS_ERR_USER_ON_CHANNEL
913
914
915    15   SILC_COMMAND_MOTD
916
917         Max Arguments:  1
918             Arguments:  (1) <server>
919
920         This command is used to query the Message of the Day of the server.
921
922         Reply messages to the command:
923
924         Max Arguments:  3
925             Arguments:  (1) <Status Payload>  (2) <Server ID>
926                         (3) [<motd>]
927
928         This command replies with the motd message if it exists.
929
930         Status messages:
931
932             SILC_STATUS_OK
933             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
934             SILC_STATUS_ERR_TOO_MANY_PARAMS
935             SILC_STATUS_ERR_NOT_REGISTERED
936             SILC_STATUS_ERR_NO_SUCH_SERVER
937
938
939    16   SILC_COMMAND_UMODE
940
941         Max Arguments:  2
942             Arguments:  (1) <Client ID>  (2) <client mode mask>
943
944         This command is used by client to set/unset modes for itself.
945         However, there are some modes that the client MUST NOT set itself,
946         but they will be set by server.  However, client MAY unset any
947         mode.  Modes may be masked together ORing them thus having
948         several modes set.  Client MUST keep its client mode mask
949         locally so that the mode setting/unsetting would work without
950         problems.  Client may change only its own modes.
951
952         After changing the mode server MUST send the notify type
953         SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
954
955         The following client modes are defined:
956
957            0x0000    SILC_UMODE_NONE
958
959               No specific mode for client.  This is the initial
960               setting when new client is created.  The client is
961               normal client now.
962
963
964            0x0001    SILC_UMODE_SERVER_OPERATOR
965
966               Marks the user as server operator.  Client MUST NOT
967               set this mode itself.  Server sets this mode to the
968               client when client attains the server operator
969               privileges by SILC_COMMAND_OPER command.  Client
970               MAY unset the mode itself.
971
972
973            0x0002    SILC_UMODE_ROUTER_OPERATOR
974
975               Marks the user as router (SILC) operator.  Client
976               MUST NOT this mode itself.  Router sets this mode to
977               the client when client attains the router operator
978               privileges by SILC_COMMAND_SILCOPER command.  Client
979               MAY unset the mode itself.
980
981
982            0x0004    SILC_UMODE_GONE
983
984               Marks that the user is not currently present in the
985               SILC Network.  Client MAY set and unset this mode.
986
987         Reply messages to the command:
988
989         Max Arguments:  2
990             Arguments:  (1) <Status Payload>  (2) <client mode mask>
991
992         This command replies with the changed client mode mask that
993         the client MUST to keep locally.
994
995
996         Status messages:
997
998             SILC_STATUS_OK
999             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1000             SILC_STATUS_ERR_TOO_MANY_PARAMS
1001             SILC_STATUS_ERR_NOT_REGISTERED
1002             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1003             SILC_STATUS_ERR_BAD_CLIENT_ID
1004             SILC_STATUS_ERR_NOT_YOU
1005             SILC_STATUS_ERR_PERM_DENIED
1006             SILC_STATUS_ERR_UNKNOWN_MODE
1007             SILC_STATUS_ERR_NO_CLIENT_ID
1008
1009
1010    17   SILC_COMMAND_CMODE
1011
1012         Max Arguments:  7
1013             Arguments:  (1) <Channel ID>      (2) <channel mode mask>
1014                         (3) [<user limit>]    (4) [<passphrase>]
1015                         (5) [<cipher>]        (6) [<hmac>]
1016                         (7) [<auth payload>]
1017
1018         This command is used by client to set or change channel flags on
1019         a channel.  Channel has several modes that set various properties
1020         of a channel.  Modes may be masked together by ORing them thus
1021         having several modes set.  The <Channel ID> is the ID of the
1022         target channel.  The client changing channel mode MUST be on
1023         the same channel and poses sufficient privileges to be able to
1024         change the mode.
1025
1026         When the mode is changed SILC_NOTIFY_TYPE_CMODE_CHANGE notify
1027         type MUST be distributed to the channel.
1028
1029         The following channel modes are defined:
1030
1031            0x0000    SILC_CMODE_NONE
1032
1033               No specific mode on channel.  This is the default when
1034               channel is created.  This means that channel is just plain
1035               normal channel.
1036
1037
1038            0x0001    SILC_CMODE_PRIVATE
1039
1040               Channel is private channel.  Private channels are shown
1041               in the channel list listed with SILC_COMMAND_LIST command
1042               with indication that the channel is private.  Also,
1043               client on private channel will no be detected to be on
1044               the channel as the channel is not shown in the client's
1045               currently joined channel list.  Channel founder and 
1046               channel operator MAY set/unset this mode.
1047
1048               Typical implementation would use [+|-]p on user interface
1049               to set/unset this mode.
1050
1051
1052            0x0002    SILC_CMODE_SECRET
1053
1054               Channel is secret channel.  Secret channels are not shown
1055               in the list listed with SILC_COMMAND_LIST command.  Secret
1056               channels can be considered to be invisible channels.
1057               Channel founder and channel operator MAY set/unset this
1058               mode.
1059
1060               Typical implementation would use [+|-]s on user interface
1061               to set/unset this mode.
1062
1063
1064            0x0004    SILC_CMODE_PRIVKEY
1065
1066               Channel uses private channel key to protect the traffic
1067               on the channel.  When this mode is set the client will be
1068               responsible to set the key it wants to use to encrypt and
1069               decrypt the traffic on channel.  Server generated channel
1070               keys are not used at all.  This mode provides additional
1071               security as clients on channel may agree to use private
1072               channel key that even servers do not know.  Naturally,
1073               this requires that every client on the channel knows
1074               the key before hand (it is considered to be pre-shared-
1075               key).  The key material is RECOMMENDED to be processed
1076               as stated in the [SILC3] in the section Processing the
1077               Key Material.
1078
1079               As it is local setting it is possible to have several
1080               private channel keys on one channel.  In this case several
1081               clients can talk on same channel but only those clients
1082               that share the key with the message sender will be able
1083               to hear the talking.  Client SHOULD NOT display those
1084               message for the end user that it is not able to decrypt
1085               when this mode is set.
1086
1087               Only channel founder MAY set/unset this mode.  If this
1088               mode is unset the server will distribute new channel
1089               key to all clients on the channel which will be used
1090               thereafter.
1091
1092               Typical implementation would use [+|-]k on user interface
1093               to set/unset this mode.
1094
1095
1096            0x0008    SILC_CMODE_INVITE
1097
1098               Channel is invite only channel.  Client may join to this
1099               channel only if it is invited to the channel.  Channel
1100               founder and channel operator MAY set/unset this mode.
1101
1102               Typical implementation would use [+|-]i on user interface
1103               to set/unset this mode.
1104
1105
1106            0x0010    SILC_CMODE_TOPIC
1107
1108               The topic of the channel may only be set by client that
1109               is channel founder or channel operator.  Normal clients
1110               on channel will not be able to set topic when this mode
1111               is set.  Channel founder and channel operator MAY set/
1112               unset this mode.
1113
1114               Typical implementation would use [+|-]t on user interface
1115               to set/unset this mode.
1116
1117
1118            0x0020    SILC_CMODE_ULIMIT
1119
1120               User limit has been set to the channel.  New clients
1121               may not join to the channel when the limit set is
1122               reached.  Channel founder and channel operator MAY set/
1123               unset the limit.  The <user limit> argument is the
1124               number of limited users.
1125
1126               Typical implementation would use [+|-]l on user interface
1127               to set/unset this mode.
1128
1129
1130            0x0040    SILC_CMODE_PASSPHRASE
1131
1132               Passphrase has been set to the channel.  Client may
1133               join to the channel only if it is able to provide the
1134               correct passphrase.  Setting passphrases to channel
1135               is entirely safe as all commands are protected in the
1136               SILC network.  Only channel founder MAY set/unset
1137               the passphrase.  The <passphrase> argument is the
1138               set passphrase.
1139
1140               Typical implementation would use [+|-]a on user interface
1141               to set/unset this mode.
1142
1143
1144            0x0080    SILC_CMODE_CIPHER
1145
1146               Sets specific cipher to be used to protect channel
1147               traffic.  The <cipher> argument is the requested cipher.
1148               When set or unset the server must re-generate new
1149               channel key.  Only channel founder MAY set the cipher of 
1150               the channel.  When unset the new key is generated using
1151               default cipher for the channel.
1152
1153               Typical implementation would use [+|-]c on user interface
1154               to set/unset this mode.
1155
1156
1157            0x0100    SILC_CMODE_HMAC
1158
1159               Sets specific hmac to be used to compute the MACs of the
1160               channel message.  The <hmac> argument is the requested hmac.
1161               Only channel founder may set the hmac of the channel.
1162
1163               Typical implementation would use [+|-]h on user interface
1164               to set/unset this mode.
1165
1166
1167            0x0200    SILC_CMODE_FOUNDER_AUTH
1168
1169               Channel founder may set this mode to be able to regain
1170               channel founder rights even if the client leaves the 
1171               channel.  The <auth payload> is the Authentication Payload
1172               consisting of the authentication method and authentication
1173               data to be used in the authentication.  The server MUST
1174               NOT accept NONE authentication method.  Also, if the 
1175               method is public key authentication the server MUST NOT
1176               save the authentication data from the payload as the
1177               data is different on all authentications.  In this case the
1178               server only saves the authentication method.  However,
1179               server MUST verify the sent authentication payload and
1180               set the mode only if the verification was successful.
1181
1182               Note that this mode is effective only in the current server.
1183               The client MUST connect to the same server later to be able
1184               to regain the channel founder rights.  The server MUST save
1185               the public key of the channel founder and use that to identify
1186               the client which is claiming the channel founder rights.
1187               The rights may be claimed by the SILC_CUMODE_FOUNDER 
1188               channel user mode using SILC_COMMAND_CUMODE command.  The
1189               set authentication data remains valid as long as the channel
1190               exists or until the founder unsets this mode.
1191
1192               Typical implementation would use [+|-]f on user interface
1193               to set/unset this mode.
1194
1195         To make the mode system work, client MUST keep the channel mode
1196         mask locally so that the mode setting and unsetting would work
1197         without problems.  The client receives the initial channel mode
1198         mask when it joins to the channel.  When the mode changes on
1199         channel the server MUST distribute the changed channel mode mask
1200         to all clients on the channel by sending the notify type
1201         SILC_NOTIFY_TYPE_CMODE_CHANGE.  The notify type MUST also be sent
1202         to the server's primary router.
1203
1204         Reply messages to the command:
1205
1206         Max Arguments:  3
1207             Arguments:  (1) <Status Payload>  (2) <Channel ID>
1208                         (3) <channel mode mask>
1209
1210         This command replies with the changed channel mode mask that
1211         client MUST keep locally.
1212
1213         Status messages:
1214
1215             SILC_STATUS_OK
1216             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1217             SILC_STATUS_ERR_TOO_MANY_PARAMS
1218             SILC_STATUS_ERR_NOT_REGISTERED
1219             SILC_STATUS_ERR_NOT_ON_CHANNEL
1220             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1221             SILC_STATUS_ERR_BAD_CHANNEL_ID
1222             SILC_STATUS_ERR_NO_CHANNEL_ID
1223             SILC_STATUS_ERR_NO_CHANNEL_PRIV
1224             SILC_STATUS_ERR_UNKNOWN_MODE
1225             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1226             SILC_STATUS_ERR_AUTH_FAILED
1227
1228
1229    18   SILC_COMMAND_CUMODE
1230
1231         Max Arguments:  4
1232             Arguments:  (1) <Channel ID>    (2) <mode mask>
1233                         (3) <Client ID>     (4) [<auth payload>]
1234
1235         This command is used by client to change channel user modes on
1236         channel.  Users on channel may have some special modes and this
1237         command is used by channel operators to set or change these modes.
1238         The <Channel ID> is the ID of the target channel.  The <mode mask>
1239         is OR'ed mask of modes.  The <Client ID> is the target client.
1240         The client changing channel user modes MUST be on the same channel
1241         as the target client and poses sufficient privileges to be able to
1242         change the mode.
1243
1244         When the mode is changed SILC_NOTIFY_TYPE_CUMODE_CHANGE notify
1245         type is distributed to the channel.
1246
1247         The following channel modes are defined:
1248
1249            0x0000    SILC_CUMODE_NONE
1250
1251               No specific mode.  This is the normal situation for client.
1252               Also, this is the mode set when removing all modes from
1253               the target client.
1254
1255
1256            0x0001    SILC_CUMODE_FOUNDER
1257
1258               The client is channel founder of the channel.  Usually this
1259               mode is set only by the server when the channel was created.
1260               However, if the SILC_CMODE_FOUNDER_AUTH channel mode has
1261               been set, the client can claim channel founder privileges
1262               by providing the <auth payload> that the server will use
1263               to authenticate the client.  The public key that server will
1264               use to verify the <auth payload> must the same public key
1265               that was saved when the SILC_CMODE_FOUNDER_AUTH channel
1266               mode was set.  The client MAY remove this mode at any time.
1267
1268
1269            0x0002    SILC_CUMODE_OPERATOR
1270
1271               Sets channel operator privileges on the channel for a
1272               client on the channel.  Channel founder and channel operator
1273               MAY set/unset this mode.
1274
1275         Reply messages to the command:
1276
1277         Max Arguments:  4
1278             Arguments:  (1) <Status Payload>  (2) <channel user mode mask>
1279                         (3) <Channel ID>      (4) <Client ID>
1280
1281         This command replies with the changed channel user mode mask that
1282         client MUST keep locally. The <Channel ID> is the specified
1283         channel.  The <Client ID> is the target client.
1284
1285         Status messages:
1286
1287             SILC_STATUS_OK
1288             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1289             SILC_STATUS_ERR_TOO_MANY_PARAMS
1290             SILC_STATUS_ERR_NOT_REGISTERED
1291             SILC_STATUS_ERR_NOT_ON_CHANNEL
1292             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1293             SILC_STATUS_ERR_BAD_CHANNEL_ID
1294             SILC_STATUS_ERR_NO_CHANNEL_ID
1295             SILC_STATUS_ERR_NO_CHANNEL_PRIV
1296             SILC_STATUS_ERR_UNKNOWN_MODE
1297             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1298             SILC_STATUS_ERR_AUTH_FAILED
1299
1300
1301    19   SILC_COMMAND_KICK
1302
1303         Max Arguments:  3
1304             Arguments:  (1) <Channel ID>  (2) <Client ID>  
1305                         (3) [<comment>]
1306
1307         This command is used by channel operators to remove a client from
1308         channel.  The <channel> argument is the channel the client to be
1309         removed is on currently.  Note that the "kicker" must be on the same
1310         channel.  If <comment> is provided it will be sent to the removed
1311         client.
1312
1313         After kicking the client the server MUST send the notify type
1314         SILC_NOTIFY_TYPE_KICKED to the channel and to its primary router.
1315         The channel key MUST also be re-generated after kicking, unless
1316         the SILC_CMODE_PRIVKEY mode is set.
1317
1318         Reply messages to the command:
1319
1320         Max Arguments:  1
1321             Arguments:  (1) <Status Payload>
1322
1323         This command replies only with Status Payload.
1324
1325         Status messages:
1326
1327             SILC_STATUS_OK
1328             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1329             SILC_STATUS_ERR_TOO_MANY_PARAMS
1330             SILC_STATUS_ERR_NOT_REGISTERED
1331             SILC_STATUS_ERR_NO_SUCH_CHANNEL
1332             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1333             SILC_STATUS_ERR_NO_CHANNEL_PRIV
1334             SILC_STATUS_ERR_NO_CLIENT_ID
1335
1336
1337    20   SILC_COMMAND_BAN
1338
1339         Max Arguments:  3
1340             Arguments:  (1) <Channel ID>         (2) [<adding client>]
1341                         (3) [<removing client>]
1342
1343         This command is used to manage the ban list of the channel
1344         indicated by the <Channel ID>.  A client that is banned from
1345         channel is no longer able to join the channel.  The client which
1346         is executing this command MUST have at least channel operator
1347         privileges on the channel.
1348
1349         The <adding client> and <removing client> are used to add to and
1350         remove from the ban list.  The format of the <adding client> and
1351         the <removing client> is of following format:
1352
1353             [<nickname>[@<server>]!][<username>]@[<hostname>]
1354
1355         The server MUST send the notify type SILC_NOTIFY_TYPE_BAN to its
1356         primary router after adding to or removing from the ban list.
1357         The wildcards MAY be used with this command.  If adding or removing
1358         from than one clients then the lists are an comma (`,') separated.
1359
1360         If this command is executed without the ban arguments the command
1361         merely replies with the current ban list.
1362
1363
1364         Reply messages to the command:
1365
1366         Max Arguments:  3
1367             Arguments:  (1) <Status Payload>  (2) <Channel ID>
1368                         (3) [<ban list>]
1369
1370         This command replies with the <Channel ID> of the channel and
1371         the current <ban list> of the channel if it exists.
1372
1373         Status messages:
1374
1375             SILC_STATUS_OK
1376             SILC_STATUS_ERR_NOT_REGISTERED
1377             SILC_STATUS_ERR_TOO_MANY_PARAMS
1378             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1379             SILC_STATUS_ERR_NO_CHANNEL_ID
1380             SILC_STATUS_ERR_NOT_ON_CHANNEL
1381             SILC_STATUS_ERR_NO_CHANNEL_PRIV
1382
1383
1384    21   SILC_COMMAND_CLOSE
1385
1386         Max Arguments:  2
1387             Arguments:  (1) <remote server/router>  (2) [<port>]
1388
1389         This command is used only by operator to close connection to a
1390         remote site.
1391
1392         Reply messages to the command:
1393
1394         Max Arguments:  1
1395             Arguments:  (1) <Status Payload>
1396
1397         This command replies only with Status Payload.
1398
1399         Status messages:
1400
1401             SILC_STATUS_OK
1402             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1403             SILC_STATUS_ERR_TOO_MANY_PARAMS
1404             SILC_STATUS_ERR_NOT_REGISTERED
1405             SILC_STATUS_ERR_NO_SUCH_SERVER
1406             SILC_STATUS_ERR_NO_SERVER_PRIV
1407             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
1408
1409
1410    22   SILC_COMMAND_SHUTDOWN
1411
1412         Max Arguments:  0
1413             Arguments:  None
1414
1415         This command is used only by operator to shutdown the server.
1416         All connections to the server will be closed and the server is
1417         shutdown.
1418
1419         Reply messages to the command:
1420
1421         Max Arguments:  1
1422             Arguments:  (1) <Status Payload>
1423
1424         This command replies only with Status Payload.
1425
1426         Status messages:
1427
1428             SILC_STATUS_OK
1429             SILC_STATUS_ERR_NOT_REGISTERED
1430             SILC_STATUS_ERR_NO_SERVER_PRIV
1431
1432
1433    23   SILC_COMMAND_SILCOPER
1434
1435         Max Arguments:  2
1436             Arguments:  (1) <username>  (2) <authentication payload>
1437
1438         This command is used by normal client to obtain router operator
1439         privileges (also known as SILC operator) on the router.  Note
1440         that router operator has privileges that supersedes the server
1441         operator privileges.
1442
1443         The <username> is the username set in the server configurations
1444         as operator.  The <authentication payload> is the data that the
1445         client is authenticated against.  It may be passphrase prompted
1446         for user on client's screen or it may be public key or certificate
1447         authentication data (data signed with private key).  The public
1448         key that router will use to verify the signature found in the
1449         payload should be verified.  It is recommended that the public
1450         key is saved locally in the router and router would not use
1451         any public keys received during the SKE.
1452
1453         Difference between router operator and server operator is that
1454         router operator is able to handle cell level properties while
1455         server operator (even on router server) is able to handle only
1456         local properties, such as, local connections and normal server
1457         administration.  The router operator is also able to use the
1458         SILC_COMMAND_KILL command.
1459
1460         After changing the mode server MUST send the notify type
1461         SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
1462
1463         Reply messages to the command:
1464
1465         Max Arguments:  1
1466             Arguments:  (1) <Status Payload>
1467
1468         This command replies only with Status Payload.
1469
1470         Status messages:
1471
1472             SILC_STATUS_OK
1473             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1474             SILC_STATUS_ERR_TOO_MANY_PARAMS
1475             SILC_STATUS_ERR_NOT_REGISTERED
1476             SILC_STATUS_ERR_AUTH_FAILED
1477
1478
1479    24   SILC_COMMAND_LEAVE
1480
1481         Max Arguments:  1
1482             Arguments:  (1) <Channel ID>
1483
1484         This command is used by client to leave a channel the client is
1485         joined to. 
1486
1487         When leaving channel the server MUST send the notify type
1488         SILC_NOTIFY_TYPE_LEAVE to its primary router and to the channel.
1489         The channel key MUST also be re-generated when leaving the channel
1490         and distribute it to all clients still currently on the channel.
1491         The key MUST NOT be re-generated if the SILC_CMODE_PRIVKEY mode
1492         is set.
1493
1494         Reply messages to the command:
1495
1496         Max Arguments:  1
1497             Arguments:  (1) <Status Payload>
1498
1499         This command replies only with Status Payload.
1500
1501         Status messages:
1502
1503             SILC_STATUS_OK
1504             SILC_STATUS_ERR_NOT_REGISTERED
1505             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1506             SILC_STATUS_ERR_TOO_MANY_PARAMS
1507             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1508             SILC_STATUS_ERR_BAD_CHANNEL_ID
1509             SILC_STATUS_ERR_NO_CHANNEL_ID
1510
1511
1512    25   SILC_COMMAND_USERS
1513
1514         Max Arguments:  2
1515             Arguments:  (1) [<Channel ID>]  (2) [<channel name>]
1516
1517         This command is used to list user names currently on the requested
1518         channel; either the argument <Channel ID> or the <channel name>. 
1519         One of these arguments must be present.  The server MUST resolve
1520         the user names and send a comma (`,') separated list of user names
1521         on the channel.  Server or router MAY resolve the names by sending
1522         SILC_COMMAND_WHOIS or SILC_COMMAND_IDENTIFY commands.
1523
1524         If the requested channel is a private or secret channel, this
1525         command MUST NOT send the list of users, as private and secret
1526         channels cannot be seen by outside.  In this case the returned
1527         name list MAY include a indication that the server could not 
1528         resolve the names of the users on the channel.  Also, in this case
1529         Client ID's or client modes are not sent either.
1530
1531         Reply messages to the command:
1532
1533         Max Arguments:  5
1534             Arguments:  (1) <Status Payload>  (2) <Channel ID>
1535                         (3) <list count>      (4) <Client ID list>
1536                         (5) <client mode list>
1537
1538         This command replies with the Channel ID of the requested channel
1539         Client ID list of the users on the channel and list of their modes.
1540         The Client ID list has Client ID's of all users in the list.  The 
1541         <Client ID list> is formed by adding Client ID's one after another.
1542         The <client mode list> is formed by adding client's user modes on
1543         the channel one after another (4 bytes (32 bits) each).  The <list 
1544         count> of length of 4 bytes (32 bits), tells the number of entries
1545         in the lists.  Both lists MUST have equal number of entries.
1546
1547         Status messages:
1548
1549             SILC_STATUS_OK
1550             SILC_STATUS_ERR_NOT_REGISTERED
1551             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1552             SILC_STATUS_ERR_TOO_MANY_PARAMS
1553             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1554             SILC_STATUS_ERR_BAD_CHANNEL_ID
1555             SILC_STATUS_ERR_NO_CHANNEL_ID
1556             SILC_STATUS_ERR_NOT_ON_CHANNEL
1557
1558
1559    26   SILC_COMMAND_GETKEY
1560
1561         Max Arguments:  1
1562             Arguments:  (1) <ID Payload>
1563
1564         This command is used to fetch the public key of the client or
1565         server indicated by the <ID Payload>.  The public key is fetched
1566         from the server where to the client is connected.
1567
1568         Reply messages to the command:
1569
1570         Max Arguments:  3
1571             Arguments:  (1) <Status Payload>      (2) <ID Payload>
1572                         (3) [<Public Key Payload>]
1573
1574         This command replies with the client's or server's ID and with
1575         the <Public Key Payload>.
1576
1577         Status messages:
1578
1579             SILC_STATUS_OK
1580             SILC_STATUS_ERR_NOT_REGISTERED
1581             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1582             SILC_STATUS_ERR_TOO_MANY_PARAMS
1583             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1584             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
1585
1586
1587    27 - 199
1588
1589         Currently undefined commands.
1590
1591
1592    200 - 254
1593
1594         These commands are reserved for private use and will not be defined
1595         in this document.
1596
1597
1598    255  SILC_COMMAND_MAX   
1599
1600         Reserved command.  This must not be sent.
1601 .in 3
1602
1603
1604 .ti 0
1605 2.3 SILC Command Status Types
1606
1607 .ti 0
1608 2.3.1 SILC Command Status Payload
1609
1610 Command Status Payload is sent in command reply messages to indicate
1611 the status of the command.  The payload is one of argument in the
1612 command thus this is the data area in Command Argument Payload described
1613 in [SILC2].  The payload is only 2 bytes of length.  The following diagram
1614 represents the Command Status Payload (field is always in MSB order).
1615
1616
1617 .in 21
1618 .nf
1619                      1
1620  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
1621 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1622 |        Status Message         |
1623 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1624 .in 3
1625
1626 .ce
1627 Figure 6:  SILC Command Status Payload
1628
1629
1630 .in 6
1631 o Status Message (2 bytes) - Indicates the status message.
1632   All Status messages are described in the next section.
1633 .in 3
1634
1635
1636 .ti 0
1637 2.3.2 SILC Command Status List
1638
1639 Command Status messages are returned in the command reply messages
1640 to indicate whether the command were executed without errors.  If error
1641 has occurred the status indicates which error occurred.  Status payload
1642 only sends numeric reply about the status.  Receiver of the payload must
1643 convert the numeric values into human readable error messages.  The
1644 list of status messages below has an example human readable error
1645 messages that client may display for the user.
1646
1647 List of all defined command status messages following.
1648
1649 .in 0
1650    Generic status messages:
1651
1652    0    SILC_STATUS_OK
1653
1654         Ok status.  Everything went Ok.  The status payload maybe
1655         safely ignored in this case.
1656
1657    1    SILC_STATUS_LIST_START
1658
1659         Start of the list.  There will be several command replies and
1660         this reply is the start of the list.
1661
1662    2    SILC_STATUS_LIST_ITEM
1663
1664         Item in the list.  This is one of the item in the list but not the
1665         first or last one.
1666
1667    3    SILC_STATUS_LIST_END
1668
1669         End of the list.  There were several command replies and this
1670         reply is the last of the list.  There won't be other replies
1671         belonging to this list after this one.
1672
1673    4 - 9
1674
1675         Currently undefined and has been reserved for the future.
1676
1677
1678    Error status message:
1679
1680
1681
1682    10   SILC_STATUS_ERR_NO_SUCH_NICK
1683
1684         "No such nickname".  Requested nickname does not exist.
1685
1686    11   SILC_STATUS_ERR_NO_SUCH_CHANNEL
1687
1688         "No such channel".  Requested channel name does not exist.
1689
1690    12   SILC_STATUS_ERR_NO_SUCH_SERVER
1691
1692         "No such server".  Requested server name does not exist.
1693
1694    13   SILC_STATUS_ERR_TOO_MANY_TARGETS
1695
1696         "Duplicate recipients. No message delivered".  Message were
1697         tried to be sent to recipient which has several occurrences in 
1698         the recipient list.
1699
1700    14   SILC_STATUS_ERR_NO_RECIPIENT
1701
1702         "No recipient given".  Command required recipient which was
1703         not provided.
1704
1705    15   SILC_STATUS_ERR_UNKNOWN_COMMAND
1706
1707         "Unknown command".  Command sent to server is unknown by the
1708         server.
1709
1710    16   SILC_STATUS_ERR_WILDCARDS
1711
1712         "Wildcards cannot be used".  Wildcards were provided but they
1713         weren't permitted.
1714
1715    17   SILC_STATUS_ERR_NO_CLIENT_ID
1716
1717         "No Client ID given".  Client ID were expected as command
1718         parameter but were not found.
1719
1720    18   SILC_STATUS_ERR_NO_CHANNEL_ID
1721
1722         "No Channel ID given".  Channel ID were expected as command
1723         parameter but were not found.
1724
1725    19   SILC_STATUS_ERR_NO_SERVER_ID
1726
1727         "No Serve ID given".  Server ID were expected as command
1728         parameter but were not found.
1729
1730    20   SILC_STATUS_ERR_BAD_CLIENT_ID
1731
1732         "Bad Client ID".  Client ID provided were erroneous.
1733
1734    21   SILC_STATUS_ERR_BAD_CHANNEL_ID
1735
1736         "Bad Channel ID".  Channel ID provided were erroneous.
1737
1738    22   SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
1739
1740         "No such Client ID".  Client ID provided does not exist.
1741
1742    23   SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
1743
1744         "No such Channel ID".  Channel ID provided does not exist.
1745
1746    24   SILC_STATUS_ERR_NICKNAME_IN_USE
1747
1748         "Nickname already exists".  Nickname created could not be 
1749         registered because number of same nicknames were already set to
1750         maximum.  This is not expected to happen in real life but is
1751         possible to occur.
1752
1753    25   SILC_STATUS_ERR_NOT_ON_CHANNEL
1754
1755         "You are not on that channel".  The command were specified for
1756         channel user is not currently on.
1757
1758    26   SILC_STATUS_ERR_USER_NOT_ON_CHANNEL
1759
1760         "They are not on channel".  The requested target client is not
1761         on requested channel.
1762
1763    27   SILC_STATUS_ERR_USER_ON_CHANNEL
1764
1765         "User already on channel".  User were invited on channel they
1766         already are on.
1767
1768    28   SILC_STATUS_ERR_NOT_REGISTERED
1769
1770         "You have not registered".  User executed command that requires
1771         the client to be registered on the server before it may be
1772         executed.
1773
1774    29   SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
1775
1776         "Not enough parameters".  Command requires more parameters
1777         than provided.
1778
1779    30   SILC_STATUS_ERR_TOO_MANY_PARAMS
1780
1781         "Too many parameters".  Too many parameters were provided
1782         for the command.
1783
1784    31   SILC_STATUS_ERR_PERM_DENIED
1785
1786         "Permission denied".  Generic permission denied error status
1787         to indicate disallowed access.
1788
1789    32   SILC_STATUS_ERR_BANNED_FROM_SERVER
1790
1791         "You are banned from this server".  The client tried to register
1792         on server that has explicitly denied this host to connect.
1793
1794    33   SILC_STATUS_ERR_BAD_PASSWORD
1795
1796         "Cannot join channel. Incorrect password".  Password provided for 
1797         channel were not accepted.
1798
1799    34   SILC_STATUS_ERR_CHANNEL_IS_FULL
1800
1801         "Cannot join channel. Channel is full".  The channel is full
1802         and client cannot be joined to it.
1803
1804    35   SILC_STATUS_ERR_NOT_INVITED
1805
1806         "Cannot join channel. You have not been invited".  The channel
1807         is invite only channel and client has not been invited.
1808
1809    36   SILC_STATUS_ERR_BANNED_FROM_CHANNEL
1810
1811         "Cannot join channel. You have been banned".  The client has
1812         been banned from the channel.
1813
1814    37   SILC_STATUS_ERR_UNKNOWN_MODE
1815
1816         "Unknown mode".  Mode provided by the client were unknown to
1817         the server.
1818
1819    38   SILC_STATUS_ERR_NOT_YOU
1820
1821         "Cannot change mode for other users".  User tried to change
1822         someone else's mode.
1823
1824    39   SILC_STATUS_ERR_NO_CHANNEL_PRIV
1825
1826         "Permission denied. You are not channel operator".  Command may 
1827         be executed only by channel operator.
1828
1829    40   SILC_STATUS_ERR_NO_CHANNEL_FOPRIV
1830
1831         "Permission denied. You are not channel founder".  Command may 
1832         be executed only by channel operator.
1833
1834    41   SILC_STATUS_ERR_NO_SERVER_PRIV
1835
1836         "Permission denied. You are not server operator".  Command may
1837         be executed only by server operator.
1838
1839    42   SILC_STATUS_ERR_NO_ROUTER_PRIV
1840
1841         "Permission denied. You are not SILC operator".  Command may be
1842         executed only by router (SILC) operator.
1843
1844    43   SILC_STATUS_ERR_BAD_NICKNAME
1845
1846         "Bad nickname".  Nickname requested contained illegal characters
1847         or were malformed.
1848
1849    44   SILC_STATUS_ERR_BAD_CHANNEL
1850
1851         "Bad channel name".  Channel requested contained illegal characters
1852         or were malformed.
1853
1854    45   SILC_STATUS_ERR_AUTH_FAILED
1855
1856         "Authentication failed".  The authentication data sent as 
1857         argument were wrong and thus authentication failed.
1858
1859    46   SILC_STATUS_ERR_UNKOWN_ALGORITHM
1860
1861         "The algorithm was not supported."  The server does not support the
1862         requested algorithm.
1863
1864    47   SILC_STATUS_ERR_NO_SUCH_SERVER_ID
1865
1866         "No such Server ID".  Server ID provided does not exist.
1867
1868 .in 3
1869
1870
1871 .ti 0
1872 3 Security Considerations
1873
1874 Security is central to the design of this protocol, and these security
1875 considerations permeate the specification.  Common security considerations
1876 such as keeping private keys truly private and using adequate lengths for
1877 symmetric and asymmetric keys must be followed in order to maintain the
1878 security of this protocol.
1879
1880
1881 .ti 0
1882 4 References
1883
1884 [SILC1]      Riikonen, P., "Secure Internet Live Conferencing (SILC),
1885              Protocol Specification", Internet Draft, April 2001.
1886
1887 [SILC2]      Riikonen, P., "SILC Packet Protocol", Internet Draft,
1888              April 2001.
1889
1890 [SILC3]      Riikonen, P., "SILC Key Exchange and Authentication 
1891              Protocols", Internet Draft, April 2001.
1892
1893 [IRC]        Oikarinen, J., and Reed D., "Internet Relay Chat Protocol",
1894              RFC 1459, May 1993.
1895
1896 [IRC-ARCH]   Kalt, C., "Internet Relay Chat: Architecture", RFC 2810,
1897              April 2000.
1898
1899 [IRC-CHAN]   Kalt, C., "Internet Relay Chat: Channel Management", RFC
1900              2811, April 2000.
1901
1902 [IRC-CLIENT] Kalt, C., "Internet Relay Chat: Client Protocol", RFC
1903              2812, April 2000.
1904
1905 [IRC-SERVER] Kalt, C., "Internet Relay Chat: Server Protocol", RFC
1906              2813, April 2000.
1907
1908 [SSH-TRANS]  Ylonen, T., et al, "SSH Transport Layer Protocol", 
1909              Internet Draft.
1910
1911 [PGP]        Callas, J., et al, "OpenPGP Message Format", RFC 2440,
1912              November 1998.
1913
1914 [SPKI]       Ellison C., et al, "SPKI Certificate Theory", RFC 2693,
1915              September 1999.
1916
1917 [PKIX-Part1] Housley, R., et al, "Internet X.509 Public Key 
1918              Infrastructure, Certificate and CRL Profile", RFC 2459,
1919              January 1999.
1920
1921 [Schneier]   Schneier, B., "Applied Cryptography Second Edition",
1922              John Wiley & Sons, New York, NY, 1996.
1923
1924 [Menezes]    Menezes, A., et al, "Handbook of Applied Cryptography",
1925              CRC Press 1997.
1926
1927 [OAKLEY]     Orman, H., "The OAKLEY Key Determination Protocol",
1928              RFC 2412, November 1998.
1929
1930 [ISAKMP]     Maughan D., et al, "Internet Security Association and
1931              Key Management Protocol (ISAKMP)", RFC 2408, November
1932              1998.
1933
1934 [IKE]        Harkins D., and Carrel D., "The Internet Key Exchange
1935              (IKE)", RFC 2409, November 1998.
1936
1937 [HMAC]       Krawczyk, H., "HMAC: Keyed-Hashing for Message
1938              Authentication", RFC 2104, February 1997.
1939
1940 [PKCS1]      Kalinski, B., and Staddon, J., "PKCS #1 RSA Cryptography
1941              Specifications, Version 2.0", RFC 2437, October 1998.
1942
1943 [RFC2119]    Bradner, S., "Key Words for use in RFCs to Indicate
1944              Requirement Levels", BCP 14, RFC 2119, March 1997.
1945
1946
1947
1948
1949
1950
1951
1952
1953 .ti 0
1954 5 Author's Address
1955
1956 .nf
1957 Pekka Riikonen
1958 Snellmanninkatu 34 A 15
1959 70100 Kuopio
1960 Finland
1961
1962 EMail: priikone@iki.fi
1963
1964 This Internet-Draft expires XXX
1965