The SILC Project

source navigation ]
identifier search ]
freetext search ]
file search ]

silc/doc/draft-riikonen-silc-commands-07.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 15 January 2007
 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-07.txt                      15 January 2007
 20 Expires: 15 July 2007
 21 
 22 .in 3
 23 
 24 .ce 2
 25 SILC Commands
 26 <draft-riikonen-silc-commands-07.txt>
 27 
 28 .ti 0
 29 Status of this Draft
 30 
 31 By submitting this Internet-Draft, each author represents that any
 32 applicable patent or other IPR claims of which he or she is aware
 33 have been or will be disclosed, and any of which he or she becomes
 34 aware will be disclosed, in accordance with Section 6 of BCP 79.
 35 
 36 Internet-Drafts are working documents of the Internet Engineering
 37 Task Force (IETF), its areas, and its working groups. Note that
 38 other groups may also distribute working documents as Internet-
 39 Drafts. Internet-Drafts are draft documents valid for a maximum of
 40 six months and may be updated, replaced, or obsoleted by other
 41 documents at any time. It is inappropriate to use Internet-Drafts as
 42 reference material or to cite them other than as "work in progress".
 43 
 44 The list of current Internet-Drafts can be accessed at
 45 http://www.ietf.org/1id-abstracts.html
 46 The list of Internet-Draft Shadow Directories can be accessed at
 47 http://www.ietf.org/shadow.html.
 48 
 49 
 50 .ti 0
 51 Abstract
 52 
 53 This memo describes the commands used in the Secure Internet Live
 54 Conferencing (SILC) protocol, specified in the Secure Internet Live
 55 Conferencing, Protocol Specification [SILC1].  The SILC Commands are
 56 very important part of the SILC protocol.  Usually the commands are used
 57 by SILC clients to manage the SILC session, but also SILC servers may
 58 use the commands.  This memo specifies detailed command messages and
 59 command reply messages.
 60 
 61 
 62 
 63 
 64 
 65 
 66 
 67 
 68 .ti 0
 69 Table of Contents
 70 
 71 .nf
 72 1 Introduction ..................................................  2
 73   1.1 Requirements Terminology ..................................  2
 74 2 SILC Commands .................................................  2
 75   2.1 SILC Commands Syntax ......................................  4
 76   2.2 SILC Command Argument Idioms ..............................  4
 77   2.3 SILC Commands List ........................................  5
 78   2.4 SILC Command Status Payload ............................... 43
 79 3 SILC Status Types ............................................. 44
 80 4 Security Considerations ....................................... 51
 81 5 References .................................................... 51
 82 6 Author's Address .............................................. 52
 83 Appendix A ...................................................... 52
 84 Full Copyright Statement ........................................ 54
 85 
 86 
 87 .ti 0
 88 1. Introduction
 89 
 90 This document describes the commands used in the Secure Internet Live
 91 Conferencing (SILC) protocol, specified in the Secure Internet Live
 92 Conferencing, Protocol Specification [SILC1].  This document specifies
 93 detailed command messages and command reply messages.
 94 
 95 Commands are very important part on SILC network especially for client
 96 which uses commands to operate on the SILC network.  Commands are used
 97 to set nickname, join to channel, change modes and many other things.
 98 
 99 See the [SILC1] for the requirements and the restrictions for the usage
100 of the SILC commands.  The [SILC2] defines the command packet type and
101 the Command Payload which is actually used to deliver the commands and
102 command reply messages.
103 
104 
105 .ti 0
106 1.1 Requirements Terminology
107 
108 The keywords MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, RECOMMENDED,
109 MAY, and OPTIONAL, when they appear in this document, are to be
110 interpreted as described in [RFC2119].
111 
112 
113 .ti 0
114 2 SILC Commands
115 
116 .ti 0
117 2.1 SILC Commands Syntax
118 
119 This section briefly describes the syntax of the command notions
120 in this document.  Every field in command is separated from each
121 other by whitespaces (` ') indicating that each field is independent
122 argument and each argument MUST have own Command Argument Payload.
123 The number of maximum arguments are defined with each command
124 separately.  The Command Argument Payload is described in [SILC2].
125 
126 Every command defines specific number for each argument.  Currently,
127 they are defined in ascending order; first argument has number one
128 (1), second has number two (2) and so on.  This number is set into the
129 Argument Type field in the Command Argument Payload.  This makes it
130 possible to send the arguments in free order as the number MUST be
131 used to identify the type of the argument.  This makes is it also
132 possible to have multiple optional arguments in commands and in
133 command replies.  The number of argument is marked in parentheses
134 before the actual argument.
135 
136 
137 
138 .in 6
139 Example:  Arguments:  (1) <nickname> (2) <username@host>
140 .in 3
141 
142 
143 Every command replies with Status Payload.  This payload tells the
144 sender of the command whether the command was completed successfully or
145 whether there was an error.  If error occurred the payload includes the
146 error type.  In the next section the Status Payload is not described
147 as it is common to all commands and has been described here.  Commands
148 MAY reply with other arguments as well.  These arguments are command
149 specific and are described in the next section.
150 
151 Example command:
152 .in 6
153 
154 EXAMPLE_COMMAND
155 
156 .in 8
157 Max Arguments:  3
158     Arguments:  (1) <nickname>[@<server>]  (2) <message>
159                 (3) [<count>]
160 
161 The command has maximum of 3 arguments.  However, only first
162 and second arguments are mandatory.
163 
164 First argument <nickname> is mandatory but may have optional
165 <nickname@server> format as well.  Second argument is mandatory
166 <message> argument.  Third argument is optional <count> argument.
167 
168 The numbers in parentheses are the argument specific numbers
169 that specify the type of the argument in Command Argument Payload.
170 The receiver always knows that, say, argument number two (2) is
171 <message> argument, regardless of the ordering of the arguments in
172 the Command Payload.
173 
174 Reply messages to the command:
175 
176 Max Arguments:  4
177     Arguments:  (1) <Status Payload>  (2) [<channel list>]
178                 (3) <idle time>       (4) [<away message>]
179 
180 This command may reply with maximum of 4 arguments.  However,
181 only the first and third arguments are mandatory.  The numbers
182 in the parentheses have the same meaning as in the upper
183 command sending specification.
184 
185 Every command reply with <Status Payload>, it is mandatory
186 argument for all command replies and for this reason it is not
187 described in the command reply descriptions.
188 
189 
190 
191 Status messages:
192 
193     SILC_STATUS_OK
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 Payload
200 The status messages defined with the command are recommendations.
201 It is possible to return other status messages not listed with
202 the command reply definition.
203 .in 3
204 
205 
206 .ti 0
207 2.2 SILC Command Argument Idioms
208 
209 All commands that has an ID as argument (for example <Client ID>) are
210 actually ID Payloads, defined in [SILC2] that includes the type of the
211 ID, length of the ID and the actual ID data.  This way variable length
212 ID's can be sent as arguments.
213 
214 All passphrases that may be sent in commands as arguments MUST be
215 UTF-8 [RFC3629] encoded.  All strings sent as arguments in command and
216 command reply are also UTF-8 encoded, unless otherwise defined.  See
217 the [SILC1] for general UTF-8 definition in SILC protocol.
218 
219 All public keys and certificates that are sent as arguments are actually
220 Public Key Payloads [SILC2].  This way it is possible to send different
221 kind of public keys and certificate types as arguments.
222 
223 
224 
225 
226 .ti 0
227 2.3 SILC Commands List
228 
229 This section lists all SILC commands, however, it is expected that a
230 implementation and especially client implementation has many more
231 commands that has only local affect.  These commands are official
232 SILC commands that has both client and server sides and cannot be
233 characterized as local commands.
234 
235 List of all defined commands in SILC follows.
236 
237 .in 0
238    0    SILC_COMMAND_NONE
239 
240         None.  This is reserved command and MUST NOT be sent.
241 
242 
243    1    SILC_COMMAND_WHOIS
244 
245         Max Arguments:  256
246             Arguments:  (1) [<nickname>[@<server>]]   (2) [<count>]
247                         (3) [<Requested Attributes>]  (4) [<Client ID>]
248                         (n) [...]
249 
250         Whois command is used to query various information about specific
251         user.  The user may be requested by their nickname and server name.
252         The query may find multiple matching users as there are no unique
253         nicknames in the SILC.  The <count> option may be given to narrow
254         down the number of accepted results.  If this is not defined there
255         are no limit of accepted results.  The query may also be narrowed
256         down by defining the server name of the nickname.  The <count> is
257         32 bit MSB first order integer.
258 
259         It is also possible to search the user by Client ID.  If the
260         <Client ID> is provided server MUST use it as the search value
261         instead of the <nickname>.  It is also possible to define multiple
262         Client ID's to search multiple users sending only one WHOIS
263         command.  In this case the Client ID's are appended as normal
264         arguments.
265 
266         The <Requested Attributes> is defined in [ATTRS] and can be used
267         to request various information about the client.  See Appendix A
268         for definition of using these attributes in SILC.  If neither the
269         <nickname> or <Client ID> arguments are present but the attributes
270         are, the server MUST use the attributes to do the searching.  If
271         none of the arguments, <nickname>, <Client ID> and <Requested
272         Attributes> are present, error MUST be retuned.  Server MAY
273         use the <Requested Attributes> to narrow down the search if they
274         present at any time.
275 
276         To prevent miss-use of this command wildcards in the nickname
277         or in the server name are not permitted.  It is not allowed
278         to request all users on some server.  The WHOIS requests MUST
279         be based on explicit nickname request.
280 
281         The WHOIS request MUST be always sent to the router by normal
282         server so that all users are searched.  However, the server still
283         MUST search its locally connected clients.  The router MUST send
284         this command to the server which owns the requested client, if
285         the router is unable to provide all mandatory information about
286         the client.  That server MUST reply to the command.  Server MUST
287         NOT send whois replies to the client until it has received the
288         reply from its router.
289 
290         Reply messages to the command:
291 
292         Max Arguments:  11
293             Arguments:  (1) <Status Payload>       (2) <Client ID>
294                         (3) <nickname>[@<server>]  (4) <username@host>
295                         (5) <real name>            (6) [<Channel Payload
296                                                          list>]
297                         (7) [<user mode>]          (8) [<idle time>]
298                         (9) [<fingerprint>]        (10) <channel user
299                                                          mode list>
300                         (11) [<Attributes>]
301 
302 
303         This command may reply with several command reply messages to
304         form a list of results.  In this case the status payload will
305         include STATUS_LIST_START status in the first reply and
306         STATUS_LIST_END in the last reply to indicate the end of the
307         list.  If there are only one reply the status is set to normal
308         STATUS_OK.  If multiple Client IDs was requested then each found
309         and unfound client MUST cause successful or error reply,
310         respectively.
311 
312         The command replies include the Client ID of the nickname,
313         nickname and server name, user name and host name and user's real
314         name.  Client should process these replies only after the last
315         reply has been received with the STATUS_LIST_END status.  If the
316         <count> option were defined in the query there will be only
317         <count> many replies from the server.
318 
319         The server returns the list of channels if the client has
320         joined channels.  In this case the list is list of Channel
321         Payloads.  The Mode Mask in the Channel Payload is the channel's
322         mode.  The list is encoded by adding the Channel Payloads one
323         after the other.  Private and secret channels MUST NOT be sent,
324         except if the sender of this command is on those channels, or
325         the sender is server.  The <channel user mode list> MUST also
326         be sent if client is joined channels.  This list includes 32 bit
327         MSB first order values one after the other and each indicate
328         the user's mode on a channel.  The order of these values MUST
329         be same as the channel order in the <Channel Payload list>.
330 
331         The server also returns client's user mode, idle time, and the
332         fingerprint of the client's public key.  The <fingerprint> is the
333         binary hash digest of the public key.  The fingerprint MUST NOT
334         be sent if the server has not verified the proof of possession of
335         the corresponding private key.  Server can do this during the
336         SILC Key Exchange protocol.  The <fingerprint> is SHA1 digest.
337 
338         The <Attributes> is the reply to the <Requested Attributes>.
339         See the Appendix A for more information.
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_NO_SUCH_CLIENT_ID
348             SILC_STATUS_ERR_WILDCARDS
349             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
350             SILC_STATUS_ERR_TOO_MANY_PARAMS
351 
352 
353    2    SILC_COMMAND_WHOWAS
354 
355         Max Arguments:  2
356             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
357 
358         Whowas.  This command is used to query history information about
359         specific user.  The user may be requested by their nickname and
360         server name.  The query may find multiple matching users as there
361         are no unique nicknames in the SILC.  The <count> option may be
362         given to narrow down the number of accepted results.  If this
363         is not defined there are no limit of accepted results.  The query
364         may also be narrowed down by defining the server name of the
365         nickname.  The <count> is 32 bit MSB first order integer.
366 
367         To prevent miss-use of this command wildcards in the nickname
368         or in the server name are not permitted.  The WHOWAS requests MUST
369         be based on specific nickname request.
370 
371         The WHOWAS request MUST be always sent to the router by server
372         so that all users are searched.  However, the server still must
373         search its locally connected clients.
374 
375         Reply messages to the command:
376 
377         Max Arguments:  5
378             Arguments:  (1) <Status Payload>        (2) <Client ID>
379                         (3) <nickname>[@<server>]   (4) <username@host>
380                         (5) [<real name>]
381 
382         This command may reply with several command reply messages to form
383         a list of results.  In this case the status payload will include
384         STATUS_LIST_START status in the first reply and STATUS_LIST_END in
385         the last reply to indicate the end of the list.  If there are only
386         one reply the status is set to normal STATUS_OK.
387 
388         The command replies with nickname and user name and host name.
389         Every server MUST keep history for some period of time of its
390         locally connected clients.
391 
392         Status messages:
393 
394             SILC_STATUS_OK
395             SILC_STATUS_LIST_START
396             SILC_STATUS_LIST_END
397             SILC_STATUS_ERR_NO_SUCH_NICK
398             SILC_STATUS_ERR_WILDCARDS
399             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
400             SILC_STATUS_ERR_TOO_MANY_PARAMS
401 
402 
403    3    SILC_COMMAND_IDENTIFY
404 
405         Max Arguments:  256
406             Arguments:  (1) [<nickname>[@<server>]]  (2) [<server name>]
407                         (3) [<channel name>]         (4) [<count>]
408                         (5) [<ID Payload>]           (n) [...]
409 
410         Identify command is used to query information about an entity by
411         the entity's name or ID.  This command can be used to query
412         information about clients, servers and channels.
413 
414         The query may find multiple matching entities.  The <count> option
415         may be given to narrow down the number of accepted results.  If
416         this is not defined there are no limit of accepted results.  The
417         <count> is 32 bit MSB first order integer.
418 
419         It is also possible to search the entity by its ID.  If the
420         <ID Payload> is provided server must use it as the search value
421         instead of the entity's name.  One of the arguments MUST be given.
422         It is also possible to define multiple ID Payloads to search
423         multiple entities sending only one IDENTIFY command.  In this case
424         the ID Payloads are appended as normal arguments.  The type of the
425         entity is defined by the type of the ID Payload.
426 
427         To prevent miss-use of this command wildcards in the names are
428         not permitted.  It is not allowed to request for example all users
429         on server.
430 
431         Implementations may not want to give interface access to this
432         command as it is hardly a command that would be used by an end
433         user.  However, it must be implemented as it is most likely used
434         with private message sending.
435 
436         The IDENTIFY command MUST be always sent to the router by server
437         so that all users are searched.  However, server MUST still search
438         its locally connected clients.
439 
440         Reply messages to the command:
441 
442         Max Arguments:  4
443             Arguments:  (1) <Status Payload>   (2) <ID Payload>
444                         (3) [<entity's name>]  (4) [<info>]
445 
446         This command may reply with several command reply messages to form
447         a list of results.  In this case the status payload will include
448         STATUS_LIST_START status in the first reply and STATUS_LIST_END in
449         the last reply to indicate the end of the list.  If there are only
450         one reply the status is set to normal STATUS_OK.  If multiple Client
451         IDs was requested then each found and unfound client must cause
452         successful or error reply, respectively.
453 
454         When querying clients the <entity's name> must include the client's
455         nickname in the following format: nickname[@server].  The
456         <info> must include the client's username and host in the following
457         format: username@host.
458 
459         When querying servers the <entity's name> must include the server's
460         full name.  The <info> may be omitted.
461 
462         When querying channels the <entity's name> must include the
463         channel's name.  The <info> may be omitted.
464 
465         If the <count> option were defined in the query there will be only
466         <count> many replies from the server.
467 
468         Status messages:
469 
470             SILC_STATUS_OK
471             SILC_STATUS_LIST_START
472             SILC_STATUS_LIST_END
473             SILC_STATUS_ERR_NO_SUCH_NICK
474             SILC_STATUS_ERR_NO_SUCH_SERVER
475             SILC_STATUS_ERR_NO_SUCH_CHANNEL
476             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
477             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
478             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
479             SILC_STATUS_ERR_WILDCARDS
480             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
481             SILC_STATUS_ERR_TOO_MANY_PARAMS
482 
483 
484    4    SILC_COMMAND_NICK
485 
486         Max Arguments:  1
487             Arguments:  (1) <nickname>
488 
489         Set/change nickname.  This command is used to set nickname for
490         user.  See [SILC1] for definition of correctly formatted
491         nickname.
492 
493         When nickname is changed new Client ID is generated.  Server MUST
494         distribute SILC_NOTIFY_TYPE_NICK_CHANGE to local clients on the
495         channels (if any) the client is joined on.  Then it MUST send
496         SILC_NOTIFY_TYPE_NICK_CHANGE notify to its primary route to
497         notify about nickname and Client ID change.
498 
499         Reply messages to the command:
500 
501         Max Arguments:  3
502             Arguments:  (1) <Status Payload>  (2) <New ID Payload>
503                         (3) <nickname>
504 
505         This command replies always with <New ID Payload> that is
506         generated by the server every time user changes their nickname.
507         Client receiving this payload MUST start using the received
508         Client ID as its current valid Client ID.  The New ID Payload
509         is described in [SILC2].  The <nickname> is the user's new
510         nickname.
511 
512         Status messages:
513 
514             SILC_STATUS_OK
515             SILC_STATUS_ERR_WILDCARDS
516             SILC_STATUS_ERR_NICKNAME_IN_USE
517             SILC_STATUS_ERR_BAD_NICKNAME
518             SILC_STATUS_ERR_NOT_REGISTERED
519             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
520             SILC_STATUS_ERR_TOO_MANY_PARAMS
521 
522 
523    5    SILC_COMMAND_LIST
524 
525         Max Arguments:  1
526             Arguments:  (1) [<Channel ID>]
527 
528         The list command is used to list channels and their topics on the
529         current server.  If the <Channel ID> parameter is used, only the
530         status of that channel is displayed.  Secret channels are not
531         listed at all.  Private channels are listed with status indicating
532         that the channel is private.  Router MAY reply with all channels
533         it knows about.
534 
535         Reply messages to the command:
536 
537         Max Arguments:  5
538             Arguments:  (1) <Status Payload>  (2) <Channel ID>
539                         (3) <channel>         (4) [<topic>]
540                         (5) [<user count>]
541 
542         This command may reply with several command reply messages to form
543         a list of results.  In this case the status payload will include
544         STATUS_LIST_START status in the first reply and STATUS_LIST_END in
545         the last reply to indicate the end of the list.  If there are only
546         one reply the status is set to normal STATUS_OK.
547 
548         This command replies with Channel ID, name and the topic of the
549         channel.  If the channel is private channel the <topic> SHOULD
550         include the "*private*" string.
551 
552         Status messages:
553 
554             SILC_STATUS_OK
555             SILC_STATUS_LIST_START
556             SILC_STATUS_LIST_END
557             SILC_STATUS_ERR_WILDCARDS
558             SILC_STATUS_ERR_NOT_REGISTERED
559             SILC_STATUS_ERR_TOO_MANY_PARAMS
560             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
561             SILC_STATUS_ERR_NO_CHANNEL_ID
562             SILC_STATUS_ERR_NO_SUCH_SERVER
563 
564 
565    6    SILC_COMMAND_TOPIC
566 
567         Max Arguments:  2
568             Arguments:  (1) <Channel ID>  (2) [<topic>]
569 
570         This command is used to change or view the topic of a channel.
571         The topic for channel <Channel ID> is returned if there is no
572         <topic> given.  If the <topic> parameter is present, the topic
573         for that channel will be changed, if the channel modes permit
574         this action.
575 
576         After setting the topic the server MUST send the notify type
577         SILC_NOTIFY_TYPE_TOPIC_SET to its primary router and then to
578         the channel which topic was changed.
579 
580         Reply messages to the command:
581 
582         Max Arguments:  2
583             Arguments:  (1) <Status Payload>  (2) <Channel ID>
584                         (3) [<topic>]
585 
586         The command may reply with the topic of the channel if it is
587         set.
588 
589         Status messages:
590 
591             SILC_STATUS_OK
592             SILC_STATUS_ERR_NOT_ON_CHANNEL
593             SILC_STATUS_ERR_WILDCARDS
594             SILC_STATUS_ERR_NOT_REGISTERED
595             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
596             SILC_STATUS_ERR_NO_SUCH_CHANNEL
597             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
598             SILC_STATUS_ERR_NO_CHANNEL_ID
599             SILC_STATUS_ERR_BAD_CHANNEL_ID
600             SILC_STATUS_ERR_TOO_MANY_PARAMS
601             SILC_STATUS_ERR_NO_CHANNEL_PRIV
602 
603 
604    7    SILC_COMMAND_INVITE
605 
606         Max Arguments:  4
607             Arguments:  (1) <Channel ID>       (2) [<Client ID>]
608                         (3) [<add | del>]      (4) [<invite list>]
609 
610         This command can be used to invite other clients to join to a
611         channel, and to manage the channel's invite list.  The <Client
612         ID> argument is the target client's ID that is being invited.
613         The <Channel ID> is the Channel ID of the requested channel.
614         The sender of this command MUST be on the channel.  The server
615         MUST also send the notify type SILC_NOTIFY_TYPE_INVITE to its
616         primary router and then to the client indicated by the <Client
617         ID>.
618 
619         The <add | del> is an argument of size of 1 byte where 0x00 means
620         adding a client to invite list, and 0x01 means deleting a client
621         from invite list.  The <invite list>, if present, indicates
622         the information to be added to or removed from the invite list.
623         It may include a string for matching clients, public key of a
624         client (Public Key Payload) or Client ID of a client.  The
625         <invite list> is an Argument List Payload.
626 
627         The following Argument Types has been defined for invite list
628         Argument Payloads:
629 
630           0x01 - Argument is an invite string of following format:
631 
632             [<nickname>[@<server>]!][<username>]@[<hostname or IP/MASK>]
633 
634             The <hostname> may also be in format of IP/MASK to indicate
635             a network, for example 10.2.1.0/255.255.0.0.
636 
637           0x02 - Argument is the public key of a client
638           0x03 - Argument is the Client ID of a client
639 
640         If unknown type value is received or there is invalid amount of
641         Argument Payloads present in the list, the command MUST be
642         discarded.  When argument that is to be deleted from the invite
643         list does not exist in the list the argument is ignored.
644 
645         When adding to or removing from the invite list the server MUST
646         send the notify type SILC_NOTIFY_TYPE_INVITE to its primary router.
647         When the SILC_CHANNEL_MODE_INVITE is set the client which executes
648         this command MUST have at least channel operator privileges to be
649         able to add to or remove from the invite list.  If this channel
650         mode is not set the list manipulation is allowed for all clients.
651         Wildcards MAY be used with this command.  When this command is
652         used to invite explicit client with <Client ID> the ID MUST be
653         added to the invite list by the server.
654 
655         When this command is given with only <Channel ID> argument then
656         the command merely returns the invite list of the channel.   This
657         command MUST fail if the requested channel does not exist, the
658         requested <Client ID> is already on the channel or if the channel
659         is invite only channel and the caller of this command does not
660         have at least channel operator privileges on the channel.
661 
662         Reply messages to the command:
663 
664         Max Arguments:  3
665             Arguments:  (1) <Status Payload>  (2) <Channel ID>
666                         (3) [<invite list>]
667 
668         This command replies with the invite list of the channel if it
669         exists.
670 
671         Status messages:
672 
673             SILC_STATUS_OK
674             SILC_STATUS_ERR_NOT_REGISTERED
675             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
676             SILC_STATUS_ERR_TOO_MANY_PARAMS
677             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
678             SILC_STATUS_ERR_NO_CLIENT_ID
679             SILC_STATUS_ERR_NO_SUCH_CHANNEL_ID
680             SILC_STATUS_ERR_NO_CHANNEL_ID
681             SILC_STATUS_ERR_NOT_ON_CHANNEL
682             SILC_STATUS_ERR_USER_ON_CHANNEL
683             SILC_STATUS_ERR_NO_CHANNEL_PRIV
684             SILC_STATUS_ERR_RESOURCE_LIMIT
685 
686 
687    8    SILC_COMMAND_QUIT
688 
689         Max Arguments:  1
690             Arguments:  (1) [<quit message>]
691 
692         This command is used by client to end SILC session.  The server
693         must close the connection to a client which sends this command.
694         if <quit message> is given it will be sent to other clients on
695         channel if the client is on channel when quitting.
696 
697         Reply messages to the command:
698 
699         This command does not reply anything.
700 
701 
702     9   SILC_COMMAND_KILL
703 
704         Max Arguments:  3
705             Arguments:  (1) <Client ID>          (2) [<comment>]
706                         (3) [<auth payload>]
707 
708         This command can be used by SILC operators to remove a client from
709         SILC network.  It also can be used by a normal client to remove
710         its own client from network by providing correct authentication
711         data.
712 
713         Router operator killing a client:
714 
715         The removing has temporary effects and client may reconnect to
716         SILC network.  The <Client ID> is the client to be removed from SILC.
717         The <comment> argument may be provided to give to the removed client
718         some information why it was removed from the network.  The killer
719         MUST have SILC operator privileges.
720 
721         When killing a client the router MUST first send notify type
722         SILC_NOTIFY_TYPE_KILLED to all channels the client has joined.
723         The packet MUST NOT be sent to the killed client on the channels.
724         Then, the router MUST send the same notify type to its primary
725         router.  Finally, the router MUST send the same notify type
726         destined directly to the client which was killed.  The killed
727         client MUST also be removed from the invite lists of joined
728         channels if it is explicitly added in the invite lists.
729 
730         Normal client killing by authentication:
731 
732         When normal client executes this command the <Client ID> is the
733         destination client to be removed from the network.  The client
734         MUST provide the <auth payload> which includes a digital signature
735         that MUST be verified with the public key of the client indicated
736         by <Client ID>.  The <Client ID> MUST be local client to the server.
737         If the signature verification is successful the server sends
738         SILC_NOTIFY_TYPE_SIGNOFF to network and to the destination client.
739         The SILC_NOTIFY_TYPE_KILLED MUST NOT be used in this case.  If the
740         verification fails the destination client remains in network.
741         The hash function used in <auth payload> computing is selected
742         by user or SHA1 otherwise.
743 
744         Reply messages to the command:
745 
746         Max Arguments:  2
747             Arguments:  (1) <Status Payload>  (2) <Client ID>
748 
749         This command returns with the requested Client ID.
750 
751         Status messages:
752 
753             SILC_STATUS_OK
754             SILC_STATUS_ERR_WILDCARDS
755             SILC_STATUS_ERR_NOT_REGISTERED
756             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
757             SILC_STATUS_ERR_TOO_MANY_PARAMS
758             SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
759             SILC_STATUS_ERR_NO_CLIENT_ID
760             SILC_STATUS_ERR_NO_ROUTER_PRIV
761 
762 
763    10   SILC_COMMAND_INFO
764 
765         Max Arguments:  2
766             Arguments:  (1) [<server>]  (2) [<Server ID>]
767 
768         This command is used to fetch various information about a server.
769         If <server> argument is specified the command MUST be sent to
770         the requested server.
771 
772         If the <Server ID> is specified the server information if fetched
773         by the provided Server ID.  One of the arguments MUST always be
774         present.
775 
776         Reply messages to the command:
777 
778         Max Arguments:  4
779             Arguments:  (1) <Status Payload>  (2) <Server ID>
780                         (3) <server name>     (4) <string>
781 
782         This command replies with the Server ID of the server and a
783         string which tells the information about the server.
784 
785         Status messages:
786 
787             SILC_STATUS_OK
788             SILC_STATUS_ERR_WILDCARDS
789             SILC_STATUS_ERR_NOT_REGISTERED
790             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
791             SILC_STATUS_ERR_TOO_MANY_PARAMS
792             SILC_STATUS_ERR_NO_SUCH_SERVER
793             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
794             SILC_STATUS_ERR_NO_SERVER_ID
795 
796 
797    11   SILC_COMMAND_STATS
798 
799         Max Arguments:  1
800             Arguments:  (1) <Server ID>
801 
802         This command is used to fetch various statistical information
803         from the server indicated by <Server ID>, which is the ID of
804         server where sender is connected to.  Server receiving this
805         command MAY also send this further to its router for fetching
806         other cell and network wide statistics to accompany the reply.
807 
808         Reply messages to the command:
809 
810         Max Arguments:  3
811             Arguments:  (1) <Status Payload>          (2) <Server ID>
812                         (3) [<statistics structure>]
813 
814         This command replies with the Server ID of the server and
815         optional statistics structure which includes 32 bit MSB first
816         ordered integer values to represent various statistical
817         information.  The structure is as follows:
818 
819           starttime      - time when server was started
820           uptime         - uptime of the server
821           my clients     - number of locally connected clients
822           my channels    - number of locally created channels
823           my server ops  - number of local server operators
824           my router ops  - number of local router operators
825           cell clients   - number of clients in local cell
826           cell channels  - number of channels in local cell
827           cell servers   - number of servers in local cell
828           clients        - number of client in SILC network
829           channels       - number of channels in SILC network
830           servers        - number of servers in SILC network
831           routers        - number of routers in SILC network
832           server ops     - number of server operators in SILC network
833           router ops     - number of router operators in SILC network
834 
835         If some value is unknown it is set to zero (0) value.  The
836         "starttime" is the start time of the server, and is seconds
837         since Epoch (POSIX.1).  The "uptime" is time difference of
838         current time and "starttime" in the server, and is seconds
839         in value.
840 
841         Status messages:
842 
843             SILC_STATUS_OK
844             SILC_STATUS_ERR_NOT_REGISTERED
845             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
846             SILC_STATUS_ERR_TOO_MANY_PARAMS
847             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
848             SILC_STATUS_ERR_NO_SUCH_SERVER
849             SILC_STATUS_ERR_NO_SERVER_ID
850 
851 
852    12   SILC_COMMAND_PING
853 
854         Max Arguments:  1
855             Arguments:  (1) <Server ID>
856 
857         This command is used by client and server to test the communication
858         channel to its server if one suspects that the communication is not
859         working correctly.  The <Server ID> is the ID of the server the
860         sender is connected to.
861 
862         Reply messages to the command:
863 
864         Max Arguments:  1
865             Arguments:  (1) <Status Payload>
866 
867         This command replies only with Status Payload.  Server returns
868         SILC_STATUS_OK in Status Payload if pinging was successful.
869 
870 
871 
872         Status messages:
873 
874             SILC_STATUS_OK
875             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
876             SILC_STATUS_ERR_TOO_MANY_PARAMS
877             SILC_STATUS_ERR_NO_SERVER_ID
878             SILC_STATUS_ERR_NO_SUCH_SERVER
879             SILC_STATUS_ERR_NOT_REGISTERED
880 
881 
882    13   SILC_COMMAND_OPER
883 
884         Max Arguments:  2
885             Arguments:  (1) <username>  (2) <authentication payload>
886 
887         This command is used by normal client to obtain server operator
888         privileges on some server or router.  Note that router operator
889         has router privileges that supersedes the server operator
890         privileges and this does not obtain those privileges.  Client
891         MUST use SILCOPER command to obtain router level privileges.
892 
893         The <username> is the username set in the server configurations
894         as operator.  The <authentication payload> is the data that the
895         client is authenticated against.  It may be passphrase prompted
896         for user on client's screen or it may be public key authentication
897         based on digital signatures.  The public key used to verify the
898         signature should be locally saved in the server, and server should
899         not use public key received during the SKE to verify this signature.
900 
901         After changing the mode the server MUST send the notify type
902         SILC_NOTIFY_TYPE_UMODE_CHANGE to its primary router.
903 
904         Reply messages to the command:
905 
906         Max Arguments:  1
907             Arguments:  (1) <Status Payload>
908 
909         This command replies only with Status Payload.
910 
911         Status messages:
912 
913             SILC_STATUS_OK
914             SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
915             SILC_STATUS_ERR_TOO_MANY_PARAMS
916             SILC_STATUS_ERR_NOT_REGISTERED
917             SILC_STATUS_ERR_AUTH_FAILED
918 
919 
920    14   SILC_COMMAND_JOIN
921 
922         Max Arguments:  7
923             Arguments:  (1) <channel>         (2) <Client ID>
924                         (3) [<passphrase>]    (4) [<cipher>]
925                         (5) [<hmac>]          (6) [<founder auth>]
926                         (7) [<channel auth>]
927 
928         Join to channel/create new channel.  This command is used to
929         join to a channel.  If the channel does not exist the channel is
930         created.  If server is normal server this command MUST be sent
931         to router which will create the channel.  The channel MAY be
932         protected with passphrase.  If this is the case the passphrase
933         MUST be sent along the join command.  See the [SILC1] for
934         definition of correctly formatted channel name, <channel>.
935 
936         The second argument <Client ID> is the Client ID of the client
937         which is joining to the client.  When client sends this command
938         to the server the <Client ID> MUST be the client's own ID.
939 
940         Cipher to be used to secure the traffic on the channel MAY be
941         requested by sending the name of the requested <cipher>.  This
942         is used only if the channel does not exist and is created.  If
943         the channel already exists the cipher set previously for the
944         channel will be used to secure the traffic.  The computed MACs
945         of the channel message are produced by the default HMAC or by
946         the <hmac> provided for the command.
947 
948         The <founder auth> is Authentication Payload providing the
949         authentication for gaining founder privileges on the channel
950         when joining the channel.  The client may provide this if it
951         knows that it is the founder of the channel and that the
952         SILC_CMODE_FOUNDER_AUTH mode is set on the channel.  The server
953         MUST verify whether the client is able to gain the founder
954         privileges the same way as the client had given the
955         SILC_COMMAND_CUMODE command to gain founder privileges.  The
956         client is still able to join the channel even if the founder
957         privileges could not be gained.  The hash function used with
958         the <founder payload> is selected by user or SHA1 otherwise.
959 
960         If the <channel auth> is present and the channel mode
961         SILC_CMODE_CHANNEL_AUTH is set the server MUST verify the
962         <channel auth> with channel public key(s).  If public key that
963         can verify <channel auth> does not exist on the channel public
964         key list the client MUST NOT be allowed to join the channel.
965         Because more than one public key may be set on channel the
966         <channel auth> Authentication Payload's Public Data field
967         MUST include an indication of the public key to be used.  The
968         first 20 bytes of the Public Data field MUST be SHA-1 digest of
969         the public key that must be used in verification.  The digest
970         is the SILC Public Key fingerprint.  Rest of thePublic Data field
971         are set as defined in [SILC1].  This way server can determine from
972         the digest whether that public key exist on the channel and then
973         use that key in verification.  The hash function used with
974         <channel auth> is selected by user or SHA1 otherwise.
975 
976         The server MUST check whether the user is allowed to join to
977         the requested channel.  Various modes set to the channel affect
978         the ability of the user to join the channel.  These conditions
979         are:
980 
981             o  The user MUST be invited to the channel if the channel
982                is invite-only channel.
983 
984             o  The Client ID/nickname/username/host name/public key
985                MUST NOT match any active bans.
986 
987             o  The correct passphrase MUST be provided if passphrase
988                is set to the channel, and/or digital signature verification
989                with channel public key MUST be successful if public keys
990                has been set to the channel.
991 
992             o  The user count limit, if set, MUST NOT be reached.
993 
994         If the client provided correct <founder auth> payload it can
995         override these conditions, except the condition for the passphrase.
996         The correct passphrase MUST be provided even if <founder auth>
997         payload is provided.
998 
999         Reply messages to the command:
1000 
1001         Max Arguments:  17
1002             Arguments:  (1) <Status Payload>        (2) <channel>
1003                         (3) <Channel ID>            (4) <Client ID>
1004                         (5) <channel mode mask>     (6) <created>
1005                         (7) [<Channel Key Payload>] (8) [<ban list>]
1006                         (9) [<invite list>]         (10) [<topic>]
1007                         (11) [<hmac>]               (12) <list count>
1008                         (13) <Client ID list>       (14) <client mode list>
1009                         (15) [<founder pubkey>]     (16) [<channel pubkeys>]
1010                         (17) [<user limit>]
1011 
1012         This command replies with the channel name requested by the
1013         client, channel ID of the channel and topic of the channel
1014         if it exists.  The <Client ID> is the Client ID which was joined
1015         to the channel.  It also replies with the channel mode mask
1016         which tells all the modes set on the channel.  If the channel
1017         is created the mode mask is zero (0) and <created> is 0x01.
1018         If ban mask and/or invite list is set they are sent as well.
1019         The <user limit> is the user limit on the channel, if one is set.
1020 
1021         The <list count>, <Client ID list> and <client mode list> are
1022         the clients currently on the channel and their modes on the
1023         channel.  The <Client ID list> is formed by adding the ID Payloads
1024         one after the other.  The <client mode list> is formed by adding
1025         32 bit MSB first order values one after the other.  The <founder
1026         pubkey> is the public key (or certificate) of the channel founder.
1027         The <channel pubkeys> is Argument List Payload containing the
1028         channel public keys that has been set for the channel.
1029 
1030         Client receives the channel key in the reply message as well