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