Merge commit 'origin/silc.1.1.branch'
[silc.git] / doc / draft-riikonen-silc-commands-04.nroff
index 0dfaabeb8b956c9513eb28b546e33e14da639711..562966c302607a69ebf5e1b8a2a798df6c94320f 100644 (file)
@@ -8,7 +8,7 @@
 .ds RF FORMFEED[Page %]
 .ds CF
 .ds LH Internet Draft
-.ds RH XXX
+.ds RH 25 November 2002
 .ds CH
 .na
 .hy 0
@@ -16,8 +16,8 @@
 .nf
 Network Working Group                                        P. Riikonen
 Internet-Draft
-draft-riikonen-silc-commands-04.txt                          XXX
-Expires: XXX
+draft-riikonen-silc-commands-04.txt                     25 November 2002
+Expires: 25 April 2003
 
 .in 3
 
@@ -73,15 +73,15 @@ Table of Contents
 1 Introduction ..................................................  2
   1.1 Requirements Terminology ..................................  2
 2 SILC Commands .................................................  2
-  2.1 SILC Commands Syntax ......................................  2
-  2.2 SILC Command Argument Idioms ..............................  2
+  2.1 SILC Commands Syntax ......................................  4
+  2.2 SILC Command Argument Idioms ..............................  4
   2.3 SILC Commands List ........................................  4
-  2.4 SILC Command Status Payload ............................... 40
-3 SILC Status Types ............................................. 41
-4 Security Considerations ....................................... 47
-5 References .................................................... 47
-6 Author's Address .............................................. 49
-Appendix A ...................................................... 49
+  2.4 SILC Command Status Payload ............................... 42
+3 SILC Status Types ............................................. 43
+4 Security Considerations ....................................... 49
+5 References .................................................... 49
+6 Author's Address .............................................. 51
+Appendix A ...................................................... 51
 
 
 .ti 0
@@ -198,7 +198,7 @@ Every command reply also defines set of status message that it
 may return inside the <Status Payload>.  All status messages
 are defined in the section 2.3 SILC Command Status Payload
 The status messages defined with the command are recommendations.
-It is possible to return other status messages not listes with
+It is possible to return other status messages not listed with
 the command reply definition.
 .in 3
 
@@ -301,7 +301,7 @@ List of all defined commands in SILC follows.
 
         The command replies include the Client ID of the nickname,
         nickname and server name, user name and host name and user's real
-        name.  Client SHOULD process these replies only after the last
+        name.  Client should process these replies only after the last
         reply has been received with the STATUS_LIST_END status.  If the
         <count> option were defined in the query there will be only
         <count> many replies from the server.
@@ -399,7 +399,7 @@ List of all defined commands in SILC follows.
 
         Identify command is used to query information about an entity by
         the entity's name or ID.  This command can be used to query
-        information about clients, server and channels.
+        information about clients, servers and channels.
 
         The query may find multiple matching entities.  The <count> option
         may be given to narrow down the number of accepted results.  If
@@ -420,8 +420,8 @@ List of all defined commands in SILC follows.
 
         Implementations may not want to give interface access to this
         command as it is hardly a command that would be used by an end
-        user.  However, it must be implemented as it is used with private
-        message sending.
+        user.  However, it must be implemented as it is most likely used
+        with private message sending.
 
         The IDENTIFY command MUST be always sent to the router by server
         so that all users are searched.  However, server MUST still search
@@ -483,8 +483,8 @@ List of all defined commands in SILC follows.
         When nickname is changed new Client ID is generated.  Server MUST
         distribute SILC_NOTIFY_TYPE_NICK_CHANGE to local clients on the
         channels (if any) the client is joined on.  Then it MUST send
-        SILC_PACKET_REPLACE_ID to its primary route to replace the old
-        Client ID with the new one.
+        SILC_NOTIFY_TYPE_NICK_CHANGE notify  to its primary route to 
+        notify about nickname and Client ID change.
 
         Reply messages to the command:
 
@@ -492,7 +492,7 @@ List of all defined commands in SILC follows.
             Arguments:  (1) <Status Payload>  (2) <New ID Payload>
                         (3) <nickname>
 
-        This command is replied always with New ID Payload that is
+        This command replies always with <New ID Payload> that is
         generated by the server every time user changes their nickname.
         Client receiving this payload MUST start using the received
         Client ID as its current valid Client ID.  The New ID Payload
@@ -595,41 +595,60 @@ List of all defined commands in SILC follows.
 
         Max Arguments:  4
             Arguments:  (1) <Channel ID>       (2) [<Client ID>]
-                        (3) [<adding client>]  (4) [<removing client>]
+                        (3) [<add | del>]      (4) [<invite list>]
 
-        This command is used to invite other clients to join to the
-        channel.  The <Client ID> argument is the target client's ID that
-        is being invited.  The <Channel ID> is the Channel ID of the
-        requested channel.  The sender of this command MUST be on the
-        channel.  The server MUST also send the notify type
-        SILC_NOTIFY_TYPE_INVITE to its primary router and then to the
-        client indicated by the <Client ID>.
+        This command can be used to invite other clients to join to a
+        channel, and to manage the channel's invite list.  The <Client
+        ID> argument is the target client's ID that is being invited.
+        The <Channel ID> is the Channel ID of the requested channel.
+        The sender of this command MUST be on the channel.  The server
+        MUST also send the notify type SILC_NOTIFY_TYPE_INVITE to its
+        primary router and then to the client indicated by the <Client
+        ID>.
 
-        The <adding client> and <removing client> can be used to add to
-        and remove from the invite list.  The format of the <adding client>
-        and <removing client> is as follows:
+        The <add | del> is an argument of size of 1 byte where 0x00 means
+        adding a client to invite list, and 0x01 means deleting a client
+        from invite list.  The <invite list>, if present, indicates
+        the information to be added to or removed from the invite list.
+        It may include a string for matching clients, public key of a
+        client or Client ID of a client.  The <invite list> format is
+        as follows:
 
-            [<nickname>[@<server>]!][<username>]@[<hostname>]
+          2 bytes         - Number of arguments in the list
+          variable length - Argument Payloads
+
+        The following Argument Types has been defined for invite list
+        Argument Payloads:
+
+          0x01 - Argument is an invite string of following format:
+
+            [<nickname>[@<server>]!][<username>]@[<hostname or IP/MASK>]
+
+            The <hostname> may also be in format of IP/MASK to indicate
+            a network.
+
+          0x02 - Argument is the public key of a client
+          0x03 - Argument is the Client ID of a client
+
+        If unknown type value is received or there is invalid amount of
+        Argument Payloads present in the list, the command MUST be
+        discarded.  When argument that is to be deleted from the invite
+        list does not exist in the list the argument is ignored.
 
         When adding to or removing from the invite list the server MUST
-        send the notify type SILC_NOTIFY_TYPE_INVITE to its primary router
-        and MUST NOT send it to the client which was added to the list.
+        send the notify type SILC_NOTIFY_TYPE_INVITE to its primary router.
         The client which executes this command MUST have at least channel
         operator privileges to be able to add to or remove from the invite
-        list.  The wildcards MAY be used with this command.  If adding or
-        removing more than one client then the lists are an comma (`,')
-        separated.
-
-        Note that the <Client ID> provided MUST be resolved into correct
-        nickname and host name and add to the invite list before sending
-        the notify packet.
-        
+        list.  The wildcards MAY be used with this command.  When this
+        command is used to invite explicit client with <Client ID> the
+        ID MUST be added to the invite list by the server.
+
         When this command is given with only <Channel ID> argument then
         the command merely returns the invite list of the channel.   This
         command MUST fail if the requested channel does not exist, the
         requested <Client ID> is already on the channel or if the channel
         is invite only channel and the caller of this command does not
-        have at least channel operator privileges.
+        have at least channel operator privileges on the channel.
 
         Reply messages to the command:
 
@@ -674,7 +693,7 @@ List of all defined commands in SILC follows.
     9   SILC_COMMAND_KILL
 
         Max Arguments:  3
-            Arguments:  (1) <Client ID>         (2) [<comment>]
+            Arguments:  (1) <Client ID>          (2) [<comment>]
                         (3) [<auth payload>]
 
         This command can be used by SILC operators to remove a client from
@@ -695,7 +714,9 @@ List of all defined commands in SILC follows.
         The packet MUST NOT be sent to the killed client on the channels.
         Then, the router MUST send the same notify type to its primary
         router.  Finally, the router MUST send the same notify type 
-        directly to the client which was killed.
+        directly to the client which was killed.  The killed client MUST
+        also be removed from the invite lists of joined channels if it
+        is explicitly added in the invite lists.
 
         Normal client killing by authentication:
 
@@ -935,8 +956,8 @@ List of all defined commands in SILC follows.
             o  The user MUST be invited to the channel if the channel
                is invite-only channel.
 
-            o  The Client ID/nickname/username/host name MUST NOT match
-               any active bans.
+            o  The Client ID/nickname/username/host name/public key
+               MUST NOT match any active bans.
 
             o  The correct passphrase MUST be provided if passphrase 
                is set to the channel.
@@ -1204,11 +1225,11 @@ List of all defined commands in SILC follows.
 
    17   SILC_COMMAND_CMODE
 
-        Max Arguments:  7
+        Max Arguments:  8
             Arguments:  (1) <Channel ID>      (2) [<channel mode mask>]
                         (3) [<user limit>]    (4) [<passphrase>]
                         (5) [<cipher>]        (6) [<hmac>]
-                        (7) [<auth payload>]
+                        (7) [<auth payload>]  (8) [<founder pubkey>]
 
         This command is used by client to set or change channel flags on
         a channel.  Channel has several modes that set various properties
@@ -1267,9 +1288,8 @@ List of all defined commands in SILC follows.
               channel key that even servers do not know.  Naturally,
               this requires that every client on the channel knows
               the key before hand (it is considered to be pre-shared-
-              key).  The key material is RECOMMENDED to be processed
-              as stated in the [SILC3] in the section Processing the
-              Key Material.
+              key).  The key material SHOULD be processed as stated
+              in the [SILC3] in the section Processing the Key Material.
 
               As it is local setting it is possible to have several
               private channel keys on one channel.  In this case several
@@ -1365,15 +1385,17 @@ List of all defined commands in SILC follows.
               channel founder rights even if the client leaves the 
               channel.  The <auth payload> is the Authentication Payload
               consisting of the public key authentication method and the
-              authentication data for that method.  The passphrase
-              method cannot be used with this mode.  The server MUST NOT
-              accept NONE authentication method.  The server does not
-              save <auth payload> but MUST verify it.  The public key
-              used to verify the payload is the public key of the
-              client sending this command.  The mode may be set only
-              if the <auth payload> was verified successfully.  The
-              server also MUST save the founder's public key.  The
-              hash function used with the <auth payload> MUST be sha1.
+              digital signature for that method.  The passphrase or NONE
+              authentication methods MUST NOT be accepted.
+
+              The server does not save <auth payload> but MUST verify it.
+              The public key used to verify the payload is the <founder
+              pubkey> if present, or the public key of the client sending
+              this command.  If <founder pubkey> is present also that
+              public key MUST be saved as founder's public key.  This
+              mode may be set only if the <auth payload> was verified
+              successfully.  The hash function used with the <auth
+              payload> MUST be sha1.
 
               The public key of the founder is sent in the
               SILC_NOTIFY_TYPE_CMODE_CHANGE notify type so that other
@@ -1384,12 +1406,20 @@ List of all defined commands in SILC follows.
               user mode, or during joining procedure with the command
               SILC_COMMAND_JOIN.
 
+              If this mode is already set but the <founder pubkey> is
+              different the new key will replace the old founder key and
+              the new key is distributed in the network with the
+              SILC_NOTIFY_TYPE_CMODE_CHANGE notify.  Only the original
+              founder may set this mode multiple times and the client
+              MUST have SILC_CUMODE_FOUNDER mode on the channel.
+
               When this channel mode is set the channel also becomes
               permanent.  If all clients leave the channel while this
               mode is set the channel MUST NOT be destroyed.  The founder
               can reclaim the founder mode back on these empty channels
               at any time.  Implementations MAY limit the number of how
-              many channels a user can own.
+              many channels a user can own and how long they remain
+              persistent.
 
               Typical implementation would use [+|-]f on user interface
               to set/unset this mode.
@@ -1428,12 +1458,13 @@ List of all defined commands in SILC follows.
 
         Reply messages to the command:
 
-        Max Arguments:  3
-            Arguments:  (1) <Status Payload>  (2) <Channel ID>
-                        (3) <channel mode mask>
+        Max Arguments:  4
+            Arguments:  (1) <Status Payload>    (2) <Channel ID>
+                        (3) <channel mode mask> (4) [<founder pubkey>]
 
         This command replies with the changed channel mode mask that
-        client MUST keep locally.
+        client MUST keep locally.  It may also return the channel
+        founder's public key if it is set.
 
         Status messages:
 
@@ -1487,7 +1518,7 @@ List of all defined commands in SILC follows.
               been set, the client can claim channel founder privileges
               by providing the <auth payload> that the server will use
               to authenticate the client.  The public key that server will
-              use to verify the <auth payload> MUST the same public key
+              use to verify the <auth payload> MUST be the same public key
               that was saved when the SILC_CMODE_FOUNDER_AUTH channel
               mode was set.  The client MAY remove this mode at any time.
 
@@ -1582,7 +1613,7 @@ List of all defined commands in SILC follows.
    19   SILC_COMMAND_KICK
 
         Max Arguments:  3
-            Arguments:  (1) <Channel ID>  (2) <Client ID>  
+            Arguments:  (1) <Channel ID>      (2) <Client ID>  
                         (3) [<comment>]
 
         This command is used by channel operators to remove a client from
@@ -1593,8 +1624,10 @@ List of all defined commands in SILC follows.
 
         After kicking the client the server MUST send the notify type
         SILC_NOTIFY_TYPE_KICKED to the channel and to its primary router.
-        The channel key MUST also be re-generated after kicking, unless
-        the SILC_CMODE_PRIVKEY mode is set.
+        The kicked client MUST be removed from the invite list of the
+        channel if it is explicitly added in the list.  The channel key
+        MUST also be re-generated after kicking, unless the
+        SILC_CMODE_PRIVKEY mode is set.
 
         Reply messages to the command:
 
@@ -1620,8 +1653,8 @@ List of all defined commands in SILC follows.
    20   SILC_COMMAND_BAN
 
         Max Arguments:  3
-            Arguments:  (1) <Channel ID>         (2) [<adding client>]
-                        (3) [<removing client>]
+            Arguments:  (1) <Channel ID>         (2) [<add | del>]
+                        (3) [<ban list>]
 
         This command is used to manage the ban list of the channel
         indicated by the <Channel ID>.  A client that is banned from
@@ -1629,20 +1662,40 @@ List of all defined commands in SILC follows.
         is executing this command MUST have at least channel operator
         privileges on the channel.
 
-        The <adding client> and <removing client> are used to add to and
-        remove from the ban list.  The format of the <adding client> and
-        the <removing client> is of following format:
+        The <add | del> is an argument of size of 1 byte where 0x00 means
+        adding a client to ban list, and 0x01 means deleting a client
+        from ban list.  The <ban list>, if present, indicates the
+        information to be added to or removed from the ban list.  It
+        may include a string for matching clients, public key of a
+        client or Client ID of a client.  The <ban list> format is
+        as follows:
 
-            [<nickname>[@<server>]!][<username>]@[<hostname>]
+          2 bytes         - Number of arguments in the list
+          variable length - Argument Payloads
 
-        The server MUST send the notify type SILC_NOTIFY_TYPE_BAN to its
-        primary router after adding to or removing from the ban list.
-        The wildcards MAY be used with this command.  If adding or removing
-        from than one clients then the lists are an comma (`,') separated.
+        The following Argument Types has been defined for ban list
+        Argument Payloads:
+
+          0x01 - Argument is an ban string of following format:
 
-        If this command is executed without the ban arguments the command
-        merely replies with the current ban list.
+            [<nickname>[@<server>]!][<username>]@[<hostname or IP/MASK>]
 
+            The <hostname> may also be in format of IP/MASK to indicate
+            a network.
+
+          0x02 - Argument is the public key of a client
+          0x03 - Argument is the Client ID of a client
+
+        If unknown type value is received or there is invalid amount of
+        Argument Payloads present in the list, the command MUST be
+        discarded.  When argument that is to be deleted from the ban
+        list does not exist in the list the argument is ignored.
+
+        The server MUST send the notify type SILC_NOTIFY_TYPE_BAN to its
+        primary router after adding to or removing from the ban list.
+        The wildcards MAY be used with this command.  If this command
+        is executed without the ban arguments the command merely replies
+        with the current ban list.
 
         Reply messages to the command:
 
@@ -1840,9 +1893,9 @@ List of all defined commands in SILC follows.
         and with list of user modes on the channel.
 
         If the requested channel is a private or secret channel, this
-        command MUST NOT send the list of users, but error is returned
-        to the sender, except if the sender is on the channel, or the
-        sender is server.
+        command MUST NOT send the list of users, except if the sender is 
+        on the channel, or the sender is a server.  Otherwise, error is
+        returned to the sender.
 
         Reply messages to the command:
 
@@ -2433,7 +2486,7 @@ Finland
 
 EMail: priikone@iki.fi
 
-This Internet-Draft expires XXX
+This Internet-Draft expires 25 April 2003
 
 
 .ti 0