updates.
[silc.git] / doc / draft-riikonen-silc-pp-01.nroff
index 2e3527f16393bb324f2830284c9b1991447b2640..110daec46c99e9e2e1dc932d60bde7a4c7aed475 100644 (file)
@@ -104,6 +104,7 @@ Table of Contents
       2.3.24 Replace ID Payload ................................. 36
       2.3.25 Remove ID Payload .................................. 37
       2.3.26 Remove Channel User Payload ........................ 38
+      2.3.27 Set Mode Payload ................................... XXX
   2.4 SILC ID Types ............................................. 39
   2.5 Packet Encryption And Decryption .......................... 39
       2.5.1 Normal Packet Encryption And Decryption ............. 39
@@ -148,6 +149,7 @@ Figure 19:  New Channel Payload
 Figure 20:  New Channel User Payload
 Figure 21:  Replace ID Payload
 Figure 22:  Remove Channel User Payload
+Figure 23:  Set Mode Payload
 
 
 .ti 0
@@ -712,10 +714,10 @@ List of SILC Packet types are defined as follows.
           this packet.  This packet maybe sent to entity that is
           indirectly connected to the sender.
 
-          When received and the replaced ID is Client ID the server or
+          When received and the removed ID is Client ID the server or
           router must distribute SILC_NOTIFY_TYPE_SIGNOFF to the
           local clients on the channels (if any) of the client whose
-          ID was changed.  However, the notify type must be sent only
+          ID was removed.  However, the notify type must be sent only
           once per client.
 
           Payload of the packet:  See section 2.3.25 Remove ID Payload
@@ -729,7 +731,7 @@ List of SILC Packet types are defined as follows.
           that is indirectly connected to the sender.
 
           When received, the server or router must distribute
-          SILC_NOTIFY_TYPE_LEAVEW to local clients on the channel.
+          SILC_NOTIFY_TYPE_LEAVE to local clients on the channel.
 
           Payload of the packet:  See section 2.3.26 Remove Channel User
                                   Payload
@@ -751,8 +753,28 @@ List of SILC Packet types are defined as follows.
           as SILC Key Exchange protocol is executed.  This packet does
           not have a payload.
 
+     
+     31   SILC_PACKET_SET_MODE
+
+          This packet is used by servers and routers to inform each 
+          other about changed modes.  When channel's and client'c channel
+          mode is changed this packet is used to distribute the information
+          to all routers in the network.  Server can send this packet but
+          must not receive it.  Router can send and receive this packet.
+          Client must not send or receive this packet.
+
+          Payload of the packet:  See section 2.3.27 Set Mode Payload
+
+
+     32   SILC_PACKET_HEARTBEAT
 
-     31 - 199
+          This packet is used by clients, servers and routers to keep the
+          connection alive.  It is recommended that all servers implement
+          keepalive actions and perform it to both direction in a link.
+          This packet does not have a payload.
+
+
+     33 - 199
 
          Currently undefined commands.
 
@@ -1028,8 +1050,7 @@ Notify payload is used to send notify messages.  The payload is usually
 sent from server to client, however, server may send it to another
 server as well.  This payload may also be sent to a channel.  Client must
 not send this payload.  The receiver of this payload may totally ignore the
-contents of the payload, however, notify message should be noted and
-possibly logged.
+contents of the payload, however, notify message should be audited.
 
 The payload may only be sent with SILC_PACKET_NOTIFY packet.  It must
 not be sent in any other packet type.  Following diagram represents the
@@ -1185,7 +1206,7 @@ ID's sent in arguments are sent inside ID Payload.
 
       The <Client ID> is the client who changed the mode.  The <mode mask>
       is the new mode mask of the channel.  The <Target Client ID> is the
-      client whose mode was changed.
+      client which mode was changed.
 
 
 9     SILC_NOTIFY_TYPE_MOTD
@@ -1341,6 +1362,10 @@ payload with the session key shared between the server and
 the client.  After that, client starts using the key received
 in this payload to protect the traffic on the channel.
 
+The client who is joining to the channel receives its key in the
+SILC_COMMAND_JOIN command reply message thus it is not necessary to
+send this payload to the entity who sent the SILC_COMMAND_JOIN command.
+
 Channel keys are cell specific thus every router in cell have
 to create a channel key and distribute it if any client in the
 cell has joined to a channel.  Channel traffic between cell's
@@ -1585,7 +1610,8 @@ o Command Unifier (2 bytes) - Unifies this command at the
   can identify which command reply belongs to which originally
   sent command.  What this field includes is implementation
   issue but it is recommended that wrapping counter value is
-  used in the field.
+  used in the field.  Value zero (0) in this field means that
+  no specific value is set.
 .in 3
 
 See [SILC1] for detailed description of different SILC commands,
@@ -1702,6 +1728,10 @@ create their own ID's.  Server registers itself to the network by sending
 SILC_PACKET_NEW_SERVER to the router it connected to.  The case is same
 when router connects to another router.
 
+However, this payload is not and must not be used to send information
+about new channels.  New channels are always distributed by sending the
+dedicated SILC_PACKET_NEW_CHANNEL packet.
+
 Hence, this payload is very important and used every time when some
 new entity is registered to the SILC network.  Client never sends this
 payload.  Both client and server (and router) may receive this payload.
@@ -2059,10 +2089,9 @@ o New ID Data (variable length) - The actual new ID data.
 2.3.25 Remove ID Payload
 
 Remove ID payload is used to remove ID from SILC network.  This is used
-for example when client exits SILC network.  The server must in this
-case send this payload to notify that this ID is not valid anymore.
-After this has been send the old ID must not be used anymore.  Client
-must not send this payload.
+when client, server, router or channel is removed from the SILC network.
+After this payload has been send the old ID must not be used anymore.
+Client must not send or receive this payload.
 
 The packet uses generic ID Payload as New ID Payload.  See section
 2.3.2.1 for generic ID Payload.
@@ -2123,6 +2152,89 @@ o Channel ID Data (variable length) - The Channel ID of the channel
 .in 3
 
 
+.ti 0
+2.3.27 Set Mode Payload
+
+Set Mode Payload is used by servers and routers to distribute to each 
+other the information about changed modes in the SILC network.  The 
+payload is sent when channel's or client's channel mode is changed.  
+Server can send this to router which will broadcast it further to other
+routers.  However, normal server must not reiceve this payload.  Client
+must not send or receive this payload.
+
+The payload may only be sent with SILC_PACKET_SET_MODE packet.
+It must not be sent in any other packet type.  Following diagram
+represents the Set Mode Payload.
+
+
+
+.in 5
+.nf
+.in 5
+.nf
+                     1                   2                   3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|           Mode Type           |        Payload Length         |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                           Mode Mask                           |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+| Argument Nums |
++-+-+-+-+-+-+-+-+
+.in 3
+
+.ce
+Figure 23:  Set Mode Payload
+
+
+.in 6
+o Mode type (2 bytes) - Indicates the type of the mode that was
+  changed.  Every type has arguments associated to the type which
+  are defined below.  The following types are defined:
+
+  0        SILC_MODE_TYPE_CHANNEL
+
+           Max Arguments:  2
+               Arguments:  (1) <Channel ID>  (2) <Client ID>
+
+           The <Channel ID> is the channel which mode was set and the
+           <Client ID> is the client who set it.
+
+
+  1        SILC_MODE_TYPE_UCHANNEL
+
+           Max Arguments:  3
+               Arguments:  (1) <Channel ID>        (2) <Client ID>  
+                           (3) <Target Client ID>
+
+           The <Channel ID> is the channel where the <Client ID> and
+           the <Target Client ID> is on.  The <Client ID> is the client
+           who set the <Target Client ID> mode.
+
+
+  2 -      RESERVED
+
+           Reserved types.
+
+
+  32768 -  Private range
+
+           Rest of the types are reserved for private use.
+
+o Payload Length (2 bytes) - Length of the entire Set Mode Payload
+  including any associated Argument Payloads.
+
+o Mode Mask (4 bytes) - Indicates the set mode mask.  This is
+  specified by the mode type.  See definitions of SILC_COMMAND_UMODE
+  for client modes, SILC_COMMAND_CMODE for channel modes and
+  SILC_COMMAND_CUMODE for client's channel modes in [SILC1].
+
+o Argument Nums (2 bytes) - Indicates the number of Argument
+  Payloads associated to this payload.  Mode types may define
+  arguments to be send along this payload.
+.in 3
+
+
 
 .ti 0
 2.4 SILC ID Types
@@ -2491,7 +2603,10 @@ and additional documents on the issue may be written.
 3 Security Considerations
 
 Security is central to the design of this protocol, and these security
-considerations permeate the specification.
+considerations permeate the specification.  Common security considerations
+such as keeping private keys truly private and using adequate lengths for 
+symmetric and asymmetric keys must be followed in order to maintain the   
+security of this protocol.
 
 
 .ti 0