updates.
[silc.git] / doc / draft-riikonen-silc-pp-01.nroff
index 4d27be3520c7542861f2977ed44843bf5362eb6e..708dfe16c63404ff5a45d1ed6caaf0c7e070450b 100644 (file)
@@ -104,6 +104,8 @@ 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.3.28 Set Mode List 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 +150,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
@@ -751,8 +754,38 @@ 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
 
-     31 - 199
+          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_SET_MODE_LIST
+
+          This packet is used to distribute list of Set Mode payloads
+          from server to routers.  This is equivalent to the packet
+          SILC_PACKET_SET_MODE except that it may include several
+          payloads.  Client must not send this packet.
+
+          Payload of the packet:  See section 2.3.28 Set Mode List
+                                  Payload
+
+     33   SILC_PACKET_HEARTBEAT
+
+          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.
+
+
+     34 - 199
 
          Currently undefined commands.
 
@@ -1178,13 +1211,13 @@ ID's sent in arguments are sent inside ID Payload.
       only to the clients who is joined on the channel where the target 
       client is on.
 
-      Max Arguments: 3
+      Max Arguments:  3
           Arguments:  (1) <Client ID>  (2) <mode mask>
                       (3) <Target Client ID>
 
       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
@@ -1195,6 +1228,21 @@ ID's sent in arguments are sent inside ID Payload.
           Arguments:  (1) <motd>
 
       The <motd> is the Message of the Day.
+
+
+10    SILC_NOTIFY_TYPE_CHANNEL_CHANGE
+
+      Sent when channel's ID has changed for a reason or another.  This 
+      is sent by noral server to the client.  Client must change the 
+      old Channel ID to the new one.  This type must be sent only to the
+      clients who is joined on the channel.
+
+      Max Arguments:  2
+          Arguments:  (1) <Old Channel ID>  (2) <New Channel ID>
+
+      The <Old Channel ID> is the channel's old ID and the <New Channel ID>
+      is the new one that must replace the old one.
+
 .in 3
 
 Notify types starting from 16384 are reserved for private notify
@@ -1970,7 +2018,7 @@ o Client ID (variable length) - The Client ID of the client
 2.3.22 New Channel List Payload
 
 This payload is used to distribute list of new channels from server
-to routers.  It might convenient to send list of new channels when
+to routers.  It might be convenient to send list of new channels when
 existing server connects to router, instead of sending them one
 by one.
 
@@ -1988,14 +2036,14 @@ packet.  They must not be sent in any other packet type.
 .ti 0
 2.3.23 New Channel User List Payload
 
-This payload is used to distribute list of channel users on specific
-channel from server to routers.  It might convenient to send list of
-channel users when existing server connects to router, instead of
-sending them one by one.
+This payload is used to distribute list of channel users on a channel
+from server to routers.  It might convenient to send list of channel
+users when existing server connects to router, instead of sending them
+one by one.  One list may include users for several different channels.
 
 There is no specific payload for this packet type.  The packet type
 uses same payload as described in 2.3.20 New Channel User Payload.
-To form a list several payloads is put in the packet each after each.
+To form a list several payloads is put in the packet one after another.
 The payload is variable in length but can be calculated by calculating
 the length of the fields together.  This forms one New Channel User
 Payload in the list.
@@ -2130,6 +2178,109 @@ 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.3.28 Set Mode List Payload
+
+This paylaod is used to distribute list of Set Mode payloads inside
+one packet.  When server announces channels and client's on those 
+channels to its primary router when it connects to it, it is convenient
+to send list of Set Mode payloads to set the modes for the channel
+and clients on those channel.  One list may include several mode
+types.
+
+There is no specific payload for this packet type.  The packet type
+uses same payload as described in 2.3.27 Set Mode Payload.  To form a
+list several payloads are put in the packet one after another.  The
+payload is variable in length but can be calculated by calculating the
+length of the fields together.  This forms one Set Mode payload in the
+list.
+
+The list of payloads may only be sent with packet SILC_PACKET_SET_MODE_LIST.
+They must not be sent in any other packet type.
+
 
 .ti 0
 2.4 SILC ID Types