Merge commit 'origin/silc.1.1.branch'
[silc.git] / doc / draft-riikonen-silc-pp-01.nroff
index 8ab11cf1f61516f66b9b7fadd3f61626f15d7bee..da02ad4392341ae4e90dc9590774951e5f173c2b 100644 (file)
@@ -603,7 +603,7 @@ List of SILC Packet types are defined as follows.
           This packet is used to request the authentication method to
           be used in the SILC Connection Authentication Protocol.  If 
           initiator of the protocol does not know the mandatory 
-          authentication method this packet is used to determine it.
+          authentication method this packet may be used to determine it.
 
           The party receiving this payload must respond with the same
           packet including the mandatory authentication method.
@@ -1125,9 +1125,8 @@ ID's sent in arguments are sent inside ID Payload.
 
       Sent when an client is invited to a channel.  This is also sent
       when the invite list of the channel is changed.  This notify type
-      is sent between routers and if the <Client ID> is argument is
-      provided to the client as well.  In this case the packet is
-      destined to the client.
+      is sent between routers and if an client was invited to the 
+      client as well.  In this case the packet is destined to the client.
 
       Max Arguments:  5
           Arguments:  (1) <Channel ID>          (2) <channel name>
@@ -1144,8 +1143,8 @@ ID's sent in arguments are sent inside ID Payload.
       and the <removing client> is defined in the [SILC1] with
       SILC_COMMAND_INVITE command.
 
-      The <adding client> and <removing client> is never sent to the
-      client indicated by the <Client ID>.
+      The <adding client> and <removing client> is never sent when the
+      packet is destined to a client.
 
 
 2     SILC_NOTIFY_TYPE_JOIN
@@ -1160,11 +1159,7 @@ ID's sent in arguments are sent inside ID Payload.
           Arguments:  (1) [<Client ID>]       (2) <Channel ID>
 
       The <Client ID> is the client that joined to the channel indicated
-      by the <Channel ID>.  The <adding client> and <removing client>
-      indicates the added or removed client in the current invite list.
-      The format of the <adding client> and the <removing client> is
-      defined in the [SILC1] with SILC_COMMAND_INVITE command.  If the
-      <Client ID> is not provided then this
+      by the <Channel ID>.
 
 
 3     SILC_NOTIFY_TYPE_LEAVE
@@ -1229,11 +1224,17 @@ ID's sent in arguments are sent inside ID Payload.
       Sent when channel mode has changed.  This type must be sent only to
       the clients who is joined on the channel whose mode was changed.
 
-      Max Arguments:  2
-          Arguments:  (1) <Client ID>  (2) <mode mask>
+      Max Arguments:  4
+          Arguments:  (1) <ID Payload>  (2) <mode mask>
+                      (3) [<cipher>]   (4) <[hmac>]     
 
-      The <Client ID> is the client who changed the mode.  The <mode mask>
-      is the new mode mask of the channel.
+      The <ID Payload> is the ID (usually Client ID but it can be Server ID
+      as well when the router is enforcing channel mode change) of the
+      entity which changed the mode.  The <mode mask> is the new mode mask
+      of the channel.  The client can safely ignore the <cipher> argument
+      since the SILC_PACKET_CHANNEL_KEY packet will force the new channel
+      key change anyway.  The <hmac> argument is important since the client
+      is responsible of setting the new HMAC and the hmac key into use.
 
 
 8     SILC_NOTIFY_TYPE_CUMODE_CHANGE
@@ -1431,8 +1432,8 @@ represents the Channel Message Payload.
                      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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|         Message Length        |                               |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
+|            Flags              |         Message Length        |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                         Message Data                          ~
 |                                                               |
@@ -1458,6 +1459,49 @@ Figure 12:  Channel Message Payload
 
 
 .in 6
+o Flags (2 bytes) - Includes the flags of the channel
+  messages.  The flags can indicate a reason or purpose
+  for the channel message.  Note, that the Private Message
+  Payload use these same flags for the same purpose.  The
+  following flags are defined:
+
+  0x0000  SILC_MESSAGE_FLAG_NONE
+
+          No specific flags set.
+
+  0x0001  SILC_MESSAGE_FLAG_AUTREPLY
+
+          This message is an automatic reply to a earlier
+          received message.
+
+  0x0002  SILC_MESSAGE_FLAG_NOREPLY
+
+          There should not be reply messages to this
+          message.
+
+  0x0004  SILC_MESSAGE_FLAG_ACTION
+
+          The sender is performing an action and the message
+          is the indication of the action.
+
+  0x0008  SILC_MESSAGE_FLAG_NOTICE
+
+          The message is for example and informational notice
+          type message.
+
+  0x0010  SILC_MESSAGE_FLAG_REQUEST
+
+          This is a generic request flag to send request
+          messages.
+
+  0x0020 - 0x0200 RESERVED
+
+          Reserved for future flags
+
+  0x0400 - 0x8000 PRIVATE RANGE
+
+         Private range for free use.
+
 o Message Length (2 bytes) - Indicates the length of the
   the Message Data field in the payload, not including any 
   other field.
@@ -1629,16 +1673,22 @@ diagram represents the Private Message Payload.
                      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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-|        Nickname Length        |                               |
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
+|            Flags              |        Nickname Length        |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |                                                               |
 ~                            Nickname                           ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|      Message Data Length      |                               |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
 |                                                               |
 ~                          Message Data                         ~
 |                                                               |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|                                                               |
+~                             Padding                           ~
+|                                                               |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .in 3
 
 .ce
@@ -1646,6 +1696,13 @@ Figure 14:  Private Message Payload
 
 
 .in 6
+o Flags (2 bytes) - This field includes the flags of the
+  private message.  They can indicate a different reason or
+  purpose for the private message.  See the section 2.3.9
+  Channel Message Payload for defined flags.  Note, that
+  the Channel Message Payload use the same flags for the
+  same purpose.
+
 o Nickname Length (2 bytes) - Indicates the length of the
   Nickname field, not including any other field.
 
@@ -1657,9 +1714,19 @@ o Nickname (variable length) - Nickname of the sender of the
   to the Client ID in the SILC Packet Header.  This nickname 
   is merely provided to be displayed by the client.
 
+o Message Data Length (2 bytes) - Indicates the length of the
+  Message Data field, not includes any other field.
+
 o Message Data (variable length) - The actual message to
   the client.  Rest of the packet is reserved for the message
   data.
+
+o Padding (variable length) - This field is present only
+  when the private message payload is encrypted with private
+  message key.  In this case the padding is applied to make
+  the packet multiple by eight (8), or by the block size of
+  the cipher, which ever is larger.  When encrypted with
+  normal session keys, this field must not be included.
 .in 3