updates.
[silc.git] / doc / draft-riikonen-silc-commands-03.nroff
index 6bf956d6aa8406034bbb095aa1dd7ea0d99172e5..421013fe748e1d2fd6ca767a94934ff4a88e6942 100644 (file)
@@ -284,11 +284,12 @@ List of all defined commands in SILC follows.
         <count> option were defined in the query there will be only
         <count> many replies from the server.
 
-        The server may return the list of channel the client has joined.
-        In this case the list is list of Channel Payloads.  The Mode Mask
-        in the Channel Payload (see [SILC2] and section 2.3.2.3 for the
-        Channel Payload) is the client's mode on the channel.  The list
-        is encoded by adding the Channel Payloads one after the other.
+        The server may return the list of channels if the client has
+        joined channels.  In this case the list is list of Channel
+        Payloads.  The Mode Mask in the Channel Payload (see [SILC2] and
+        section 2.3.2.3 for the Channel Payload) is the client's mode
+        on the channel.  The list is encoded by adding the Channel
+        Payloads one after the other.
 
         The server may also send client's user mode, idle time, and the
         fingerprint of the client's public key.  The <fingerprint> is the
@@ -965,7 +966,7 @@ List of all defined commands in SILC follows.
    16   SILC_COMMAND_UMODE
 
         Max Arguments:  2
-            Arguments:  (1) <Client ID>  (2) <client mode mask>
+            Arguments:  (1) <Client ID>  (2) [<client mode mask>]
 
         This command is used by client to set/unset modes for itself.
         However, there are some modes that the client MUST NOT set itself,
@@ -984,7 +985,7 @@ List of all defined commands in SILC follows.
 
               No specific mode for client.  This is the initial
               setting when new client is created.  The client is
-              normal client now.
+              normal client and is present in the network.
 
 
            0x00000001    SILC_UMODE_SERVER_OPERATOR
@@ -999,8 +1000,8 @@ List of all defined commands in SILC follows.
            0x00000002    SILC_UMODE_ROUTER_OPERATOR
 
               Marks the user as router (SILC) operator.  Client
-              MUST NOT this mode itself.  Router sets this mode to
-              the client when client attains the router operator
+              MUST NOT set this mode itself.  Router sets this mode
+              to the client when client attains the router operator
               privileges by SILC_COMMAND_SILCOPER command.  Client
               MAY unset the mode itself.
 
@@ -1010,6 +1011,94 @@ List of all defined commands in SILC follows.
               Marks that the user is not currently present in the
               SILC Network.  Client MAY set and unset this mode.
 
+
+           0x00000008    SILC_UMODE_INDISPOSED
+
+              Marks that the user is currently indisposed and may
+              not be able to receive any messages, and that user may
+              not be present in the network.  Client MAY set and
+              unset this mode.
+
+
+           0x00000010    SILC_UMODE_BUSY
+
+              Marks that the user is currently busy and may not
+              want to receive any messages, and that user may not
+              be present in the network.  Client MAY set and unset
+              this mode.
+
+
+           0x00000020    SILC_UMODE_PAGE
+
+              User is not currently present or is unable to receive
+              messages, and prefers to be paged in some mechanism
+              if the user needs to be reached.  Client MAY set and
+              unset this mode.
+
+
+           0x00000040    SILC_UMODE_HYPER
+
+              Marks that the user is hyper active and is eager to
+              receive and send messages.   Client MAY set and unset
+              this mode.
+
+
+           0x00000080    SILC_UMODE_ROBOT
+
+              Marks that the client is actually a robot program.
+              Client MAY set and unset this mode.
+
+
+           0x00000100    SILC_UMODE_ANONYMOUS
+
+              Marks that the client is anonymous client.  Server
+              that specificly is designed for anonymous services
+              can set and unset this mode.  Client MUST NOT set or
+              unset this mode itself.  A client with this mode set
+              would have the username and the hostname information
+              scrambled by the server which set this mode.
+
+
+           0x00000200    SILC_UMODE_BLOCK_PRIVMSG
+
+              Marks that the client wishes to block private
+              messages sent to the client, unless the Private
+              Message Key flag is set in the SILC packet header.
+              If this mode is set server MUST NOT deliver private
+              messages to the client without the Private Message
+              Key flag being set.
+
+              A separate service could provide additional filtering
+              features for accepting private messages from certain
+              sender.  However, this document does not specify such
+              service.
+
+              The client MAY set and unset this mode.
+
+
+           0x00000400    SILC_UMODE_DETACHED
+
+              Marks that the client is detached from the SILC network.
+              This means that the actual network connection to the
+              client is lost but the client entry is still valid.  The
+              detached client can be resumed at a later time.  This
+              mode MUST NOT be set by client.  It can only be set when
+              client has issued command SILC_COMMAND_DETACH.  The server
+              sets this mode.  This mode cannot be unset with this
+              command.  It is unset when the client is resuming back to
+              the network and SILC_PACKET_RESUME_CLIENT packet is
+              received.
+
+              This flag MUST NOT be used to determine whether a packet
+              can be sent to the client or not.  Only the server that
+              had the original client connection can make the decision
+              by noticising that the network connection is not active.
+              In this case the default case is to discard the packet.
+
+        If the <client mode mask> was not provided this command merely
+        returns the mode mask to the client.
+
+
         Reply messages to the command:
 
         Max Arguments:  2
@@ -1036,7 +1125,7 @@ List of all defined commands in SILC follows.
    17   SILC_COMMAND_CMODE
 
         Max Arguments:  7
-            Arguments:  (1) <Channel ID>      (2) <channel mode mask>
+            Arguments:  (1) <Channel ID>      (2) [<channel mode mask>]
                         (3) [<user limit>]    (4) [<passphrase>]
                         (5) [<cipher>]        (6) [<hmac>]
                         (7) [<auth payload>]
@@ -1246,7 +1335,9 @@ List of all defined commands in SILC follows.
         channel the server MUST distribute the changed channel mode mask
         to all clients on the channel by sending the notify type
         SILC_NOTIFY_TYPE_CMODE_CHANGE.  The notify type MUST also be sent
-        to the server's primary router.
+        to the server's primary router.  If the <channel mode mask> was
+        not provided this command merely returns the mode mask to the
+        client.
 
         Reply messages to the command:
 
@@ -1318,7 +1409,24 @@ List of all defined commands in SILC follows.
 
               Sets channel operator privileges on the channel for a
               client on the channel.  Channel founder and channel operator
-              MAY set/unset this mode.
+              MAY set/unset this mode.  The client MAY remove this mode
+              at any time.
+
+
+           0x00000004    SILC_CUMODE_BLOCK_MESSAGES
+
+              Marks that the client wishes not to receive any channel
+              messages sent for the channel.  Client MAY set and unset
+              this mode to itself.  Client MUST NOT set it to anyone else.
+              When this mode is set server MUST NOT deliver channel
+              messages to this client.  Other packets such as channel
+              key packets are still sent to the client.
+
+              A separate service could provide additional filtering
+              features for accepting channel messages from certain
+              sender.  However, this document does not specify such
+              service.
+
 
         Reply messages to the command:
 
@@ -1523,16 +1631,13 @@ List of all defined commands in SILC follows.
         This command is used to list user names currently on the requested
         channel; either the argument <Channel ID> or the <channel name>. 
         One of these arguments must be present.  The server MUST resolve
-        the user names and send a comma (`,') separated list of user names
-        on the channel.  Server or router MAY resolve the names by sending
-        SILC_COMMAND_WHOIS or SILC_COMMAND_IDENTIFY commands.
+        the joined clients and reply with a lists of users on the channel
+       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, as private and secret
-        channels cannot be seen by outside.  In this case the returned
-        name list MAY include a indication that the server could not 
-        resolve the names of the users on the channel.  Also, in this case
-        Client ID's or client modes are not sent either.
+        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.
 
         Reply messages to the command:
 
@@ -1625,7 +1730,7 @@ represents the Command Status Payload (field is always in MSB order).
                      1
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Status Message         |
+|     Status    |     Error     |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .in 3
 
@@ -1634,10 +1739,49 @@ Figure 6:  SILC Command Status Payload
 
 
 .in 6
-o Status Message (2 bytes) - Indicates the status message.
-  All Status messages are described in the next section.
+o Status (1 byte) - Indicates the status message type,
+  error, start of list, entry of list or end of list.
+
+o Error (1 byte) - Indicates the error if the Status
+  field is some list status, which means there are list
+  of errors.
 .in 3
 
+The values in Status and Error fields are set according
+the following rules:
+
+.in 6
+o If there is single reply and error has not occurred
+  then Status field includes value SILC_STATUS_OK, and
+  the Error field MUST be ignored (and set to zero
+  value).
+
+o If there is single error, then Status field includes
+  one of the error values, and the Error field MUST be
+  ignored (and set to zero value).
+
+o If there will be multiple successful command replies
+  then Status field includes SILC_STATUS_LIST_START, 
+  SILC_STATUS_LIST_ITEM or SILC_STATUS_LIST_END value,
+  and Error field is set to SILC_STATUS_OK.
+
+o If there are multiple error replies then Status field
+  includes SILC_STATUS_LIST_START, SILC_STATUS_LIST_ITEM
+  or SILC_STATUS_LIST_END value, and the Error field
+  includes the error value.
+.in 3
+
+This way it is possible to send single successful or
+single error reply, but also multiple successful and
+multiple error replies.  Note that it is possible to
+send both list of successful replies and list of error
+replies at the same time, however in this case the
+list of error replies MUST be sent after the successful
+replies.  This way the recipient may ignore the multiple
+errors if it wishes to do so.
+
+All Status messages are described in the next section.
+
 
 .ti 0
 2.3.2 SILC Command Status List