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