updates
authorPekka Riikonen <priikone@silcnet.org>
Mon, 17 Jul 2000 11:45:20 +0000 (11:45 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 17 Jul 2000 11:45:20 +0000 (11:45 +0000)
CHANGES
configure.in
doc/CodingStyle
doc/Makefile.am
doc/draft-riikonen-silc-pp-00.nroff
doc/draft-riikonen-silc-spec-00.nroff
includes/version.h
lib/silccore/silccommand.h
lib/silccore/silcsockconn.h

diff --git a/CHANGES b/CHANGES
index f9fcec412f9be07291fbc4c0208ec433af670a3b..84533b5549d82e0de89c285f118b182a3e1e53ec 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Sat Jul 15 15:33:48 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Added command lagging support in server. Client may execute
+         commands now only once in two seconds.
+
 Thu Jul 13 22:10:21 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Optimized packet reception. MAC computation and checking is now
index 36c386ad72cf15e90ad452a1345bae03d8c78a86..8957dacd71aa0cdc287de379ca0959f33b3c4dff 100644 (file)
@@ -33,7 +33,7 @@ case "$target" in
     ;;
 esac
 
-AM_INIT_AUTOMAKE(silc, 10072000)
+AM_INIT_AUTOMAKE(silc, 14072000)
 AC_PREREQ(2.3)
 AM_CONFIG_HEADER(includes/silcdefs.h)
 
index 6d732baba530c0b9aa598b5b28a5337dcba07e17..09aa84077d3570caa42383a1a5888ebc6bc25cdd 100644 (file)
@@ -1,7 +1,7 @@
 Coding Style in SILC source tree
 ================================
 
-This documents describes the coding style and coding conventions used
+This document describes the coding style and coding conventions used
 in the SILC source tree.  The purpose of the document is to describe the
 common way to program for SILC and thus should be learned when programming
 new code.  The document describes various conventions regarding variable
@@ -420,7 +420,7 @@ by memset() before freeing the memory.  Common way to do is,
        memset(ptr, 'F', sizeof(*ptr));
        silc_free(ptr);
 
-Where 'F' indicates free'd memory if you ever check it with debugger.
+Where 'F' indicates free'd memory if you'd ever check it with debugger.
 Other choice is to use 0 instead of 'F'.  The pointer after freeing 
 should be set to NULL if appropriate, ptr = NULL.
 
index 0d089525a25bc695a2fee41256ea3c55bc1eb11c..ac405ee09704e4d3307b6c789cf62686ec915984 100644 (file)
@@ -26,6 +26,9 @@ all:
 
 dist-hook:
        -rm -f draft-riikonen*.txt
+       touch draft-riikonen-silc-spec-00.txt
+       touch draft-riikonen-silc-pp-00.txt
+       touch draft-riikonen-silc-ke-auth-00.txt
        ./makerfc draft-riikonen-silc-spec-00.nroff \
                draft-riikonen-silc-spec-00.txt
        ./makerfc draft-riikonen-silc-pp-00.nroff \
index 569573e9875c2565719ecdf67a0d66c224e7f806..1ed4915b805bdf25c312706fd9e3581eeffbea70 100644 (file)
@@ -1312,8 +1312,9 @@ o Private Message Key (variable length) - The actual private
 .ti 0
 2.3.12 Command Payload
 
-Command Payload is used to send SILC commands from client to server.  
-Following diagram represents the Command Payload.
+Command Payload is used to send SILC commands from client to server.
+Also server may send commands to other servers.  Following diagram
+represents the Command Payload.
 
 
 .in 5
@@ -1321,8 +1322,10 @@ Following diagram represents the Command 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
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| SILC Command  | Arguments Num |         Payload Length        |
+|         Payload Length        | SILC Command  | Arguments Num |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+|        Command Unifier        |
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 .in 3
 
 .ce
@@ -1330,6 +1333,10 @@ Figure 13:  Command Payload
 
 
 .in 6
+o Payload Length (2 bytes) - Length of the entire command 
+  payload including any command argument payloads associated 
+  with this payload.
+
 o SILC Command (1 byte) - SILC Command identifier.  This must 
   be set to non-zero value.  If zero (0) value is found in this 
   field the packet must be discarded.
@@ -1339,9 +1346,14 @@ o Arguments Num (1 byte) - Indicates the number of arguments
   field is set to zero (0).  The arguments must follow the 
   command payload.
 
-o Payload Length (2 bytes) - Length of the entire command 
-  payload including any command argument payloads associated 
-  with this payload.
+o Command Unifier (2 bytes) - Unifies this command at the
+  sender's end.  The entity who replies to this command must
+  set the value found from this field into the Command Payload
+  used to send the reply to the sender.  This way the sender
+  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.
 .in 3
 
 See [SILC1] for detailed description of different SILC commands,
@@ -1405,11 +1417,15 @@ o Argument Data (variable length) - Argument data.
 .ti 0
 2.3.13 Command Reply Payload
 
-Command Reply Payload is used to send replies to the commands sent
-by the client.  The Command Reply Payload is identical to the
-Command Payload hence see the upper sections for Command Payload
-and for Command Argument Payload specifications.  Command Reply
-message uses the Command Argument Payload as well.
+Command Reply Payload is used to send replies to the commands.  The
+Command Reply Payload is identical to the Command Payload thus see the
+upper sections for Command Payload and for Command Argument Payload
+specifications.  Command Reply message uses the Command Argument Payload
+as well.
+
+The entity who sends the reply packet must set the Command Unifier
+field in the reply packet's Command Payload to the value it received
+in the original command packet.
 
 See SILC Commands in [SILC1] for detailed description of different
 SILC commands, their arguments and their reply messages.
index e3446e08a339a80535ca24bf37724aeebd8ef2ed..72897fd0c4d6fe5469403d11ff2a975c93dea69c 100644 (file)
@@ -1651,19 +1651,23 @@ List of all defined commands in SILC follows.
         None.  This is reserved command and must not be sent.
 
 
-   2    SILC_COMMAND_WHOIS
+   1    SILC_COMMAND_WHOIS
 
-        Max Arguments:  2
-            Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
+        Max Arguments:  3
+            Arguments:  (1) <nickname>[@<server>]  (2) [<Client ID>]
+                        (3) [<count>]
+
+        Whois command is used to query various information about specific
+        user.  The user maybe requested by their nickname and server name.
+        The query may find multiple matching users as there are no unique
+        nicknames in the SILC.  The <count> option maybe given to narrow
+        down the number of accepted results.  If this is not defined there
+        are no limit of accepted results.  The query may also be narrowed
+        down by defining the server name of the nickname.
 
-        Whois.  Whois command is used to query various information about
-        specific user.  The user maybe requested by their nickname and
-        server name.  The query may find multiple matching users as
-        there are no unique nicknames in the SILC.  The <count> option
-        maybe given to narrow down the number of accepted results.  If
-        this is not defined there are no limit of accepted results.
-        The query may also be narrowed down by defining the server name
-        of the nickname.
+        It is also possible to search the user by Client ID.  If <Client ID>
+        is provided server must use it as the search value instead of
+        the <nickname>.
 
         To prevent miss-use of this service wildcards in the nickname
         or in the servername are not permitted.  It is not allowed
@@ -1709,7 +1713,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_TOO_MANY_PARAMS
 
 
-   3    SILC_COMMAND_WHOWAS
+   2    SILC_COMMAND_WHOWAS
 
         Max Arguments:  2
             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
@@ -1758,7 +1762,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_TOO_MANY_PARAMS
 
 
-   4    SILC_COMMAND_IDENTIFY
+   3    SILC_COMMAND_IDENTIFY
 
         Max Arguments:  2
             Arguments:  (1) <nickname>[@<server>]  (2) [<count>]
@@ -1781,7 +1785,7 @@ List of all defined commands in SILC follows.
         be based on specific nickname request.
 
         Implementations may not want to give interface access to this
-        commands as it is hardly a command that would be used a end user.
+        command as it is hardly a command that would be used a end user.
         However, it must be implemented as it is used with private message
         sending.
 
@@ -1817,7 +1821,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_TOO_MANY_PARAMS
 
 
-   5    SILC_COMMAND_NICK
+   4    SILC_COMMAND_NICK
 
         Max Arguments:  1
             Arguments:  (1) <nickname>
@@ -1851,7 +1855,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_TOO_MANY_PARAMS
 
 
-   6    SILC_COMMAND_LIST
+   5    SILC_COMMAND_LIST
 
         Max Arguments:  2
             Arguments:  (1) [<Channel ID>] [<server>]
@@ -1895,7 +1899,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SUCH_SERVER
 
 
-   7    SILC_COMMAND_TOPIC
+   6    SILC_COMMAND_TOPIC
 
         Max Arguments:  2
             Arguments:  (1) <Channel ID>  (2) [<server>]]
@@ -1929,7 +1933,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_CHANNEL_PRIV
 
 
-   8    SILC_COMMAND_INVITE
+   7    SILC_COMMAND_INVITE
 
         Max Arguments:  2
             Arguments:  (1) <Client ID>  (2) <Channel ID>
@@ -1964,7 +1968,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_USER_ON_CHANNEL
 
 
-   9    SILC_COMMAND_QUIT
+   8    SILC_COMMAND_QUIT
 
         Max Arguments:  1
             Arguments:  (1) [<quit message>]
@@ -1979,7 +1983,7 @@ List of all defined commands in SILC follows.
         This command does not reply anything.
 
 
-   10   SILC_COMMAND_KILL
+    9   SILC_COMMAND_KILL
 
         Max Arguments:  2
             Arguments:  (1) <Client ID>  (2) [<comment>]
@@ -2012,7 +2016,7 @@ List of all defined commands in SILC follows.
 
 
 
-   11   SILC_COMMAND_INFO
+   10   SILC_COMMAND_INFO
 
         Max Arguments:  1
             Arguments:  (1) [<server>]
@@ -2040,7 +2044,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SUCH_SERVER
 
 
-   12   SILC_COMMAND_CONNECT
+   11   SILC_COMMAND_CONNECT
 
         Max Arguments:  2
             Arguments:  (1) <Server ID>  
@@ -2073,7 +2077,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_ROUTER_PRIV
 
 
-   13   SILC_COMMAND_PING
+   12   SILC_COMMAND_PING
 
         Max Arguments:  1
             Arguments:  (1) <Server ID>
@@ -2101,7 +2105,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NOT_REGISTERED
 
 
-   14   SILC_COMMAND_OPER
+   13   SILC_COMMAND_OPER
 
         Max Arguments:  2
             Arguments:  (1) <username>  (2) <authentication data>
@@ -2136,7 +2140,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_AUTH_FAILED
 
 
-   15   SILC_COMMAND_JOIN
+   14   SILC_COMMAND_JOIN
 
         Max Arguments:  3
             Arguments:  (1) <channel>  (2) [<passphrase>] 
@@ -2207,7 +2211,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_USER_ON_CHANNEL
 
 
-   16   SILC_COMMAND_MOTD
+   15   SILC_COMMAND_MOTD
 
         Max Arguments:  1
             Arguments:  (1) <server>
@@ -2230,7 +2234,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SUCH_SERVER
 
 
-   17   SILC_COMMAND_UMODE
+   16   SILC_COMMAND_UMODE
 
         Max Arguments:  2
             Arguments:  (1) <Client ID>  (2) <client mode mask>
@@ -2292,7 +2296,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_CLIENT_ID
 
 
-   18   SILC_COMMAND_CMODE
+   17   SILC_COMMAND_CMODE
 
         Max Arguments:  8
             Arguments:  (1) <Channel ID>    (2) <channel mode mask>
@@ -2512,7 +2516,7 @@ List of all defined commands in SILC follows.
 
 
 
-   19   SILC_COMMAND_KICK
+   18   SILC_COMMAND_KICK
 
         Max Arguments:  3
             Arguments:  (1) <channel>  (2) <Client ID>  
@@ -2543,7 +2547,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_CLIENT_ID
 
 
-   20   SILC_COMMAND_RESTART
+   19   SILC_COMMAND_RESTART
 
         Max Arguments:  0
             Arguments:  None
@@ -2567,7 +2571,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SERVER_PRIV
 
 
-   21   SILC_COMMAND_CLOSE
+   20   SILC_COMMAND_CLOSE
 
         Max Arguments:  1
             Arguments:  (1) <Server ID>
@@ -2596,7 +2600,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SUCH_SERVER_ID
 
 
-   22   SILC_COMMAND_DIE
+   21   SILC_COMMAND_DIE
 
         Max Arguments:  0
             Arguments:  None
@@ -2621,7 +2625,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_SERVER_PRIV
 
 
-   23   SILC_COMMAND_SILCOPER
+   22   SILC_COMMAND_SILCOPER
 
         Max Arguments:  2
             Arguments:  (1) <username>  (2) <authentication data>
@@ -2661,7 +2665,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_AUTH_FAILED
 
 
-   24   SILC_COMMAND_LEAVE
+   23   SILC_COMMAND_LEAVE
 
         Max Arguments:  1
             Arguments:  (1) <Channel ID>
@@ -2689,7 +2693,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NO_CHANNEL_ID
 
 
-   25   SILC_COMMAND_NAMES
+   24   SILC_COMMAND_NAMES
 
         Max Arguments:  1
             Arguments:  (1) <Channel ID>
@@ -2732,7 +2736,7 @@ List of all defined commands in SILC follows.
             SILC_STATUS_ERR_NOT_ON_CHANNEL
 
 
-   26 - 254
+   25 - 254
 
         Currently undefined commands.
 
index b192a1d574a2dc1b2a63bb0e20ca8fc74060bf8d..503a6a2872e38667b077c58e46376b7af113c8dc 100644 (file)
@@ -33,7 +33,7 @@ typedef unsigned char SilcVersion;
 #define SILC_VERSION_1 '\1'
 
 /* SILC version string */
-const char *silc_version = "10072000";
+const char *silc_version = "14072000";
 const char *silc_name = "SILC";
 const char *silc_fullname = "Secure Internet Live Conferencing";
 
index 39a2e289fb32e5309c5b55fd691e0d4a37876eed..155027d6195351bbda6d36a248c3a4d5aa4015e6 100644 (file)
@@ -55,30 +55,30 @@ typedef enum {
 /* All SILC commands. These are commands that have client and server
    counterparts. These are pretty much the same as in IRC. */
 #define SILC_COMMAND_NONE               0
-#define SILC_COMMAND_WHOIS             2
-#define SILC_COMMAND_WHOWAS            3
-#define SILC_COMMAND_IDENTIFY           4
-#define SILC_COMMAND_NICK              5
-#define SILC_COMMAND_LIST              6
-#define SILC_COMMAND_TOPIC             7
-#define SILC_COMMAND_INVITE            8
-#define SILC_COMMAND_QUIT              9
-#define SILC_COMMAND_KILL              10
-#define SILC_COMMAND_INFO              11
-#define SILC_COMMAND_CONNECT           12
-#define SILC_COMMAND_PING              13
-#define SILC_COMMAND_OPER              14
-#define SILC_COMMAND_JOIN              15
-#define SILC_COMMAND_MOTD              16
-#define SILC_COMMAND_UMODE             17
-#define SILC_COMMAND_CMODE             18
-#define SILC_COMMAND_KICK              19
-#define        SILC_COMMAND_RESTART            20
-#define        SILC_COMMAND_CLOSE              21
-#define        SILC_COMMAND_DIE                22
-#define SILC_COMMAND_SILCOPER          23
-#define SILC_COMMAND_LEAVE             24
-#define SILC_COMMAND_NAMES             25
+#define SILC_COMMAND_WHOIS             1
+#define SILC_COMMAND_WHOWAS            2
+#define SILC_COMMAND_IDENTIFY           3
+#define SILC_COMMAND_NICK              4
+#define SILC_COMMAND_LIST              5
+#define SILC_COMMAND_TOPIC             6
+#define SILC_COMMAND_INVITE            7
+#define SILC_COMMAND_QUIT              8
+#define SILC_COMMAND_KILL              9
+#define SILC_COMMAND_INFO              10
+#define SILC_COMMAND_CONNECT           11
+#define SILC_COMMAND_PING              12
+#define SILC_COMMAND_OPER              13
+#define SILC_COMMAND_JOIN              14
+#define SILC_COMMAND_MOTD              15
+#define SILC_COMMAND_UMODE             16
+#define SILC_COMMAND_CMODE             17
+#define SILC_COMMAND_KICK              18
+#define        SILC_COMMAND_RESTART            19
+#define        SILC_COMMAND_CLOSE              20
+#define        SILC_COMMAND_DIE                21
+#define SILC_COMMAND_SILCOPER          22
+#define SILC_COMMAND_LEAVE             23
+#define SILC_COMMAND_NAMES             24
 
 /* Local commands. Local commands are unofficial commands and
    are implementation specific commands. These are used only by the
index 5706b682ab3ca11f6f0cb819105df099a1806215..291a5a46e798546d964f12d42421446cc8bb98e5 100644 (file)
@@ -76,6 +76,13 @@ typedef enum {
        indicate several different status that can affect the use of the
        socket object.
 
+   char *hostname
+   char *ip
+   unsigned short port
+
+       Resolved hostname, IP address and port of the connection who owns
+       this object.
+
    SilcBuffer inbuf
    SilcBuffer outbuf