+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
;;
esac
-AM_INIT_AUTOMAKE(silc, 10072000)
+AM_INIT_AUTOMAKE(silc, 14072000)
AC_PREREQ(2.3)
AM_CONFIG_HEADER(includes/silcdefs.h)
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
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.
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 \
.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
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
.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.
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,
.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.
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
SILC_STATUS_ERR_TOO_MANY_PARAMS
- 3 SILC_COMMAND_WHOWAS
+ 2 SILC_COMMAND_WHOWAS
Max Arguments: 2
Arguments: (1) <nickname>[@<server>] (2) [<count>]
SILC_STATUS_ERR_TOO_MANY_PARAMS
- 4 SILC_COMMAND_IDENTIFY
+ 3 SILC_COMMAND_IDENTIFY
Max Arguments: 2
Arguments: (1) <nickname>[@<server>] (2) [<count>]
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.
SILC_STATUS_ERR_TOO_MANY_PARAMS
- 5 SILC_COMMAND_NICK
+ 4 SILC_COMMAND_NICK
Max Arguments: 1
Arguments: (1) <nickname>
SILC_STATUS_ERR_TOO_MANY_PARAMS
- 6 SILC_COMMAND_LIST
+ 5 SILC_COMMAND_LIST
Max Arguments: 2
Arguments: (1) [<Channel ID>] [<server>]
SILC_STATUS_ERR_NO_SUCH_SERVER
- 7 SILC_COMMAND_TOPIC
+ 6 SILC_COMMAND_TOPIC
Max Arguments: 2
Arguments: (1) <Channel ID> (2) [<server>]]
SILC_STATUS_ERR_NO_CHANNEL_PRIV
- 8 SILC_COMMAND_INVITE
+ 7 SILC_COMMAND_INVITE
Max Arguments: 2
Arguments: (1) <Client ID> (2) <Channel ID>
SILC_STATUS_ERR_USER_ON_CHANNEL
- 9 SILC_COMMAND_QUIT
+ 8 SILC_COMMAND_QUIT
Max Arguments: 1
Arguments: (1) [<quit message>]
This command does not reply anything.
- 10 SILC_COMMAND_KILL
+ 9 SILC_COMMAND_KILL
Max Arguments: 2
Arguments: (1) <Client ID> (2) [<comment>]
- 11 SILC_COMMAND_INFO
+ 10 SILC_COMMAND_INFO
Max Arguments: 1
Arguments: (1) [<server>]
SILC_STATUS_ERR_NO_SUCH_SERVER
- 12 SILC_COMMAND_CONNECT
+ 11 SILC_COMMAND_CONNECT
Max Arguments: 2
Arguments: (1) <Server ID>
SILC_STATUS_ERR_NO_ROUTER_PRIV
- 13 SILC_COMMAND_PING
+ 12 SILC_COMMAND_PING
Max Arguments: 1
Arguments: (1) <Server ID>
SILC_STATUS_ERR_NOT_REGISTERED
- 14 SILC_COMMAND_OPER
+ 13 SILC_COMMAND_OPER
Max Arguments: 2
Arguments: (1) <username> (2) <authentication data>
SILC_STATUS_ERR_AUTH_FAILED
- 15 SILC_COMMAND_JOIN
+ 14 SILC_COMMAND_JOIN
Max Arguments: 3
Arguments: (1) <channel> (2) [<passphrase>]
SILC_STATUS_ERR_USER_ON_CHANNEL
- 16 SILC_COMMAND_MOTD
+ 15 SILC_COMMAND_MOTD
Max Arguments: 1
Arguments: (1) <server>
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>
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>
- 19 SILC_COMMAND_KICK
+ 18 SILC_COMMAND_KICK
Max Arguments: 3
Arguments: (1) <channel> (2) <Client ID>
SILC_STATUS_ERR_NO_CLIENT_ID
- 20 SILC_COMMAND_RESTART
+ 19 SILC_COMMAND_RESTART
Max Arguments: 0
Arguments: None
SILC_STATUS_ERR_NO_SERVER_PRIV
- 21 SILC_COMMAND_CLOSE
+ 20 SILC_COMMAND_CLOSE
Max Arguments: 1
Arguments: (1) <Server ID>
SILC_STATUS_ERR_NO_SUCH_SERVER_ID
- 22 SILC_COMMAND_DIE
+ 21 SILC_COMMAND_DIE
Max Arguments: 0
Arguments: None
SILC_STATUS_ERR_NO_SERVER_PRIV
- 23 SILC_COMMAND_SILCOPER
+ 22 SILC_COMMAND_SILCOPER
Max Arguments: 2
Arguments: (1) <username> (2) <authentication data>
SILC_STATUS_ERR_AUTH_FAILED
- 24 SILC_COMMAND_LEAVE
+ 23 SILC_COMMAND_LEAVE
Max Arguments: 1
Arguments: (1) <Channel ID>
SILC_STATUS_ERR_NO_CHANNEL_ID
- 25 SILC_COMMAND_NAMES
+ 24 SILC_COMMAND_NAMES
Max Arguments: 1
Arguments: (1) <Channel ID>
SILC_STATUS_ERR_NOT_ON_CHANNEL
- 26 - 254
+ 25 - 254
Currently undefined commands.
#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";
/* 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
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