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