Every command that has some kind of ID as argument (for example
<Client ID>) are actually ID Payloads, defined in [SILC2] that includes
the type of the ID, length of the ID and the actual ID data. This
-way variable length ID's can be sent as arguments.
+way variable length ID's can be sent as arguments. Also note that
+all passphrases that may be sent in commands MUST be UTF-8 [RFC2279]
+encoded.
.ti 0
1 SILC_COMMAND_WHOIS
- Max Arguments: 3328
+ Max Arguments: 256
Arguments: (1) [<nickname>[@<server>]] (2) [<count>]
(3) [<Client ID>] (n) [...]
<count> option were defined in the query there will be only
<count> many replies from the server.
- The server may return the list of channel the client has joined.
- In this case the list is list of Channel Payloads. The Mode Mask
- in the Channel Payload (see [SILC2] and section 2.3.2.3 for the
- Channel Payload) is the client's mode on the channel. The list
- is encoded by adding the Channel Payloads one after the other.
+ The server may return the list of channels if the client has
+ joined channels. In this case the list is list of Channel
+ Payloads. The Mode Mask in the Channel Payload (see [SILC2] and
+ section 2.3.2.3 for the Channel Payload) is the client's mode
+ on the channel. The list is encoded by adding the Channel
+ Payloads one after the other.
The server may also send client's user mode, idle time, and the
fingerprint of the client's public key. The <fingerprint> is the
3 SILC_COMMAND_IDENTIFY
- Max Arguments: 3328
+ Max Arguments: 256
Arguments: (1) [<nickname>[@<server>]] (2) [<server name>]
(3) [<channel name>] (4) [<count>]
(5) [<ID Payload>] (n) [...]
(3) [<invite list>]
This command replies with the invite list of the channel if it
- exists. The <invite list> may be omitted if the list was not
- altered.
+ exists.
Status messages:
SILC_STATUS_ERR_NO_SERVER_ID
- 11 SILC_COMMAND_CONNECT
-
- Max Arguments: 2
- Arguments: (1) <remote server/router> (2) [<port>]
-
- This command is used by operators to force a server to try to
- establish a new connection to remote server or router. The
- Operator MUST specify the server/router to be connected by
- setting <remote server> argument. The port is 32 bit MSB value.
-
- Reply messages to the command:
+ 11 SILC_COMMAND_STATS
Max Arguments: 1
- Arguments: (1) <Status Payload>
+ Arguments: (1) <Server ID>
- This command replies only with Status Payload.
+ This command is used to fetch various statistical information
+ from the server indicated by <Server ID>, which is the ID of
+ server where sender is connected to. Server receiving this
+ command MAY also send this further to its router for fetching
+ other cell and network wide statistics to accompany the reply.
+ Reply messages to the command:
+ Max Arguments: 3
+ Arguments: (1) <Status Payload> (2) <Server ID>
+ (3) [<statistics structure>]
+
+ This command replies with the Server ID of the server and
+ optional statistics structure which includes 32 bit MSB first
+ ordered integer values to represent various statistical
+ information. The structure is as follows:
+
+ starttime - time when server was started
+ uptime - uptime of the server
+ my clients - number of locally connected clients
+ my channels - number of locally created channels
+ my server ops - number of local server operators
+ my router ops - number of local router operators
+ cell clients - number of clients in local cell
+ cell channels - number of channels in local cell
+ cell servers - number of servers in local cell
+ clients - number of client in SILC network
+ channels - number of channels in SILC network
+ servers - number of servers in SILC network
+ routers - number of routers in SILC network
+ server ops - number of server operators in SILC network
+ router ops - number of router operators in SILC network
+
+ If some value is unknown it is set to zero (0) value. The
+ "starttime" is the start time of the server, and is seconds
+ since Epoch (POSIX.1). The "uptime" is time difference of
+ current time and "starttime" in the server, and is seconds
+ in value.
Status messages:
SILC_STATUS_OK
- SILC_STATUS_ERR_WILDCARDS
SILC_STATUS_ERR_NOT_REGISTERED
SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
SILC_STATUS_ERR_TOO_MANY_PARAMS
- SILC_STATUS_ERR_NO_SERVER_PRIV
- SILC_STATUS_ERR_NO_ROUTER_PRIV
+ SILC_STATUS_ERR_NO_SUCH_SERVER_ID
+ SILC_STATUS_ERR_NO_SUCH_SERVER
+ SILC_STATUS_ERR_NO_SERVER_ID
12 SILC_COMMAND_PING
16 SILC_COMMAND_UMODE
Max Arguments: 2
- Arguments: (1) <Client ID> (2) <client mode mask>
+ Arguments: (1) <Client ID> (2) [<client mode mask>]
This command is used by client to set/unset modes for itself.
However, there are some modes that the client MUST NOT set itself,
The following client modes are defined:
- 0x0000 SILC_UMODE_NONE
+ 0x00000000 SILC_UMODE_NONE
No specific mode for client. This is the initial
setting when new client is created. The client is
- normal client now.
+ normal client and is present in the network.
- 0x0001 SILC_UMODE_SERVER_OPERATOR
+ 0x00000001 SILC_UMODE_SERVER_OPERATOR
Marks the user as server operator. Client MUST NOT
set this mode itself. Server sets this mode to the
MAY unset the mode itself.
- 0x0002 SILC_UMODE_ROUTER_OPERATOR
+ 0x00000002 SILC_UMODE_ROUTER_OPERATOR
Marks the user as router (SILC) operator. Client
- MUST NOT this mode itself. Router sets this mode to
- the client when client attains the router operator
+ MUST NOT set this mode itself. Router sets this mode
+ to the client when client attains the router operator
privileges by SILC_COMMAND_SILCOPER command. Client
MAY unset the mode itself.
- 0x0004 SILC_UMODE_GONE
+ 0x00000004 SILC_UMODE_GONE
Marks that the user is not currently present in the
SILC Network. Client MAY set and unset this mode.
+
+ 0x00000008 SILC_UMODE_INDISPOSED
+
+ Marks that the user is currently indisposed and may
+ not be able to receive any messages, and that user may
+ not be present in the network. Client MAY set and
+ unset this mode.
+
+
+ 0x00000010 SILC_UMODE_BUSY
+
+ Marks that the user is currently busy and may not
+ want to receive any messages, and that user may not
+ be present in the network. Client MAY set and unset
+ this mode.
+
+
+ 0x00000020 SILC_UMODE_PAGE
+
+ User is not currently present or is unable to receive
+ messages, and prefers to be paged in some mechanism
+ if the user needs to be reached. Client MAY set and
+ unset this mode.
+
+
+ 0x00000040 SILC_UMODE_HYPER
+
+ Marks that the user is hyper active and is eager to
+ receive and send messages. Client MAY set and unset
+ this mode.
+
+
+ 0x00000080 SILC_UMODE_ROBOT
+
+ Marks that the client is actually a robot program.
+ Client MAY set and unset this mode.
+
+
+ 0x00000100 SILC_UMODE_ANONYMOUS
+
+ Marks that the client is anonymous client. Server
+ that specificly is designed for anonymous services
+ can set and unset this mode. Client MUST NOT set or
+ unset this mode itself. A client with this mode set
+ would have the username and the hostname information
+ scrambled by the server which set this mode.
+
+
+ 0x00000200 SILC_UMODE_BLOCK_PRIVMSG
+
+ Marks that the client wishes to block private
+ messages sent to the client, unless the Private
+ Message Key flag is set in the SILC packet header.
+ If this mode is set server MUST NOT deliver private
+ messages to the client without the Private Message
+ Key flag being set.
+
+ A separate service could provide additional filtering
+ features for accepting private messages from certain
+ sender. However, this document does not specify such
+ service.
+
+ The client MAY set and unset this mode.
+
+
+ 0x00000400 SILC_UMODE_DETACHED
+
+ Marks that the client is detached from the SILC network.
+ This means that the actual network connection to the
+ client is lost but the client entry is still valid. The
+ detached client can be resumed at a later time. This
+ mode MUST NOT be set by client. It can only be set when
+ client has issued command SILC_COMMAND_DETACH. The server
+ sets this mode. This mode cannot be unset with this
+ command. It is unset when the client is resuming back to
+ the network and SILC_PACKET_RESUME_CLIENT packet is
+ received.
+
+ This flag MUST NOT be used to determine whether a packet
+ can be sent to the client or not. Only the server that
+ had the original client connection can make the decision
+ by noticising that the network connection is not active.
+ In this case the default case is to discard the packet.
+
+ If the <client mode mask> was not provided this command merely
+ returns the mode mask to the client.
+
+
Reply messages to the command:
Max Arguments: 2
17 SILC_COMMAND_CMODE
Max Arguments: 7
- Arguments: (1) <Channel ID> (2) <channel mode mask>
+ Arguments: (1) <Channel ID> (2) [<channel mode mask>]
(3) [<user limit>] (4) [<passphrase>]
(5) [<cipher>] (6) [<hmac>]
(7) [<auth payload>]
The following channel modes are defined:
- 0x0000 SILC_CMODE_NONE
+ 0x00000000 SILC_CMODE_NONE
No specific mode on channel. This is the default when
channel is created. This means that channel is just plain
normal channel.
- 0x0001 SILC_CMODE_PRIVATE
+ 0x00000001 SILC_CMODE_PRIVATE
Channel is private channel. Private channels are shown
in the channel list listed with SILC_COMMAND_LIST command
to set/unset this mode.
- 0x0002 SILC_CMODE_SECRET
+ 0x00000002 SILC_CMODE_SECRET
Channel is secret channel. Secret channels are not shown
in the list listed with SILC_COMMAND_LIST command. Secret
to set/unset this mode.
- 0x0004 SILC_CMODE_PRIVKEY
+ 0x00000004 SILC_CMODE_PRIVKEY
Channel uses private channel key to protect the traffic
on the channel. When this mode is set the client will be
to set/unset this mode.
- 0x0008 SILC_CMODE_INVITE
+ 0x00000008 SILC_CMODE_INVITE
Channel is invite only channel. Client may join to this
channel only if it is invited to the channel. Channel
to set/unset this mode.
- 0x0010 SILC_CMODE_TOPIC
+ 0x00000010 SILC_CMODE_TOPIC
The topic of the channel may only be set by client that
is channel founder or channel operator. Normal clients
to set/unset this mode.
- 0x0020 SILC_CMODE_ULIMIT
+ 0x00000020 SILC_CMODE_ULIMIT
User limit has been set to the channel. New clients
may not join to the channel when the limit set is
to set/unset this mode.
- 0x0040 SILC_CMODE_PASSPHRASE
+ 0x00000040 SILC_CMODE_PASSPHRASE
Passphrase has been set to the channel. Client may
join to the channel only if it is able to provide the
to set/unset this mode.
- 0x0080 SILC_CMODE_CIPHER
+ 0x00000080 SILC_CMODE_CIPHER
Sets specific cipher to be used to protect channel
traffic. The <cipher> argument is the requested cipher.
to set/unset this mode.
- 0x0100 SILC_CMODE_HMAC
+ 0x00000100 SILC_CMODE_HMAC
Sets specific hmac to be used to compute the MACs of the
channel message. The <hmac> argument is the requested hmac.
to set/unset this mode.
- 0x0200 SILC_CMODE_FOUNDER_AUTH
+ 0x00000200 SILC_CMODE_FOUNDER_AUTH
Channel founder may set this mode to be able to regain
channel founder rights even if the client leaves the
Typical implementation would use [+|-]f on user interface
to set/unset this mode.
+
+ 0x00000400 SILC_CMODE_SILENCE_USERS
+
+ Channel founder may set this mode to silence normal users
+ on the channel. Users with operator privileges are not
+ affected by this mode. Messages sent by normal users
+ are dropped by servers when this mode is set. This mode
+ can be used to moderate the channel. Only channel founder
+ may set/unset this mode.
+
+
+ 0x00000800 SILC_CMODE_SILENCE_OPERS
+
+ Channel founder may set this mode to silence operators
+ on the channel. When used with SILC_CMODE_SILENCE_USERS
+ mode this can be used to set the channel in state where only
+ the founder of the channel may send messages to the channel.
+ Messages sent by operators are dropped by servers when this
+ mode is set. Only channel founder may set/unset this mode.
+
+
To make the mode system work, client MUST keep the channel mode
mask locally so that the mode setting and unsetting would work
without problems. The client receives the initial channel mode
channel the server MUST distribute the changed channel mode mask
to all clients on the channel by sending the notify type
SILC_NOTIFY_TYPE_CMODE_CHANGE. The notify type MUST also be sent
- to the server's primary router.
+ to the server's primary router. If the <channel mode mask> was
+ not provided this command merely returns the mode mask to the
+ client.
Reply messages to the command:
SILC_STATUS_ERR_BAD_CHANNEL_ID
SILC_STATUS_ERR_NO_CHANNEL_ID
SILC_STATUS_ERR_NO_CHANNEL_PRIV
+ SILC_STATUS_ERR_NO_CHANNEL_FOPRIV
SILC_STATUS_ERR_UNKNOWN_MODE
SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
SILC_STATUS_ERR_AUTH_FAILED
The following channel modes are defined:
- 0x0000 SILC_CUMODE_NONE
+ 0x00000000 SILC_CUMODE_NONE
No specific mode. This is the normal situation for client.
Also, this is the mode set when removing all modes from
the target client.
- 0x0001 SILC_CUMODE_FOUNDER
+ 0x00000001 SILC_CUMODE_FOUNDER
The client is channel founder of the channel. Usually this
mode is set only by the server when the channel was created.
mode was set. The client MAY remove this mode at any time.
- 0x0002 SILC_CUMODE_OPERATOR
+ 0x00000002 SILC_CUMODE_OPERATOR
Sets channel operator privileges on the channel for a
client on the channel. Channel founder and channel operator
- MAY set/unset this mode.
+ MAY set/unset this mode. The client MAY remove this mode
+ at any time.
+
+
+ 0x00000004 SILC_CUMODE_BLOCK_MESSAGES
+
+ Marks that the client wishes not to receive any channel
+ messages sent for the channel. Client MAY set and unset
+ this mode to itself. Client MUST NOT set it to anyone else.
+ When this mode is set server MUST NOT deliver channel
+ messages to this client. Other packets such as channel
+ key packets are still sent to the client.
+
+ A separate service could provide additional filtering
+ features for accepting channel messages from certain
+ sender. However, this document does not specify such
+ service.
+
Reply messages to the command:
SILC_STATUS_ERR_BAD_CHANNEL_ID
SILC_STATUS_ERR_NO_CHANNEL_ID
SILC_STATUS_ERR_NO_CHANNEL_PRIV
+ SILC_STATUS_ERR_NO_CHANNEL_FOPRIV
SILC_STATUS_ERR_UNKNOWN_MODE
SILC_STATUS_ERR_NO_SUCH_CLIENT_ID
SILC_STATUS_ERR_AUTH_FAILED
SILC_STATUS_ERR_NO_CHANNEL_PRIV
- 21 SILC_COMMAND_CLOSE
-
- Max Arguments: 2
- Arguments: (1) <remote server/router> (2) [<port>]
+ 21 <deprecated command>
- This command is used only by operator to close connection to a
- remote site.
- Reply messages to the command:
-
- Max Arguments: 1
- Arguments: (1) <Status Payload>
-
- This command replies only with Status Payload.
-
- Status messages:
-
- SILC_STATUS_OK
- SILC_STATUS_ERR_NOT_ENOUGH_PARAMS
- SILC_STATUS_ERR_TOO_MANY_PARAMS
- SILC_STATUS_ERR_NOT_REGISTERED
- SILC_STATUS_ERR_NO_SUCH_SERVER
- SILC_STATUS_ERR_NO_SERVER_PRIV
- SILC_STATUS_ERR_NO_SUCH_SERVER_ID
-
-
- 22 SILC_COMMAND_SHUTDOWN
-
- Max Arguments: 0
- Arguments: None
-
- This command is used only by operator to shutdown the server.
- All connections to the server will be closed and the server is
- shutdown.
-
- Reply messages to the command:
-
- Max Arguments: 1
- Arguments: (1) <Status Payload>
-
- This command replies only with Status Payload.
-
- Status messages:
-
- SILC_STATUS_OK
- SILC_STATUS_ERR_NOT_REGISTERED
- SILC_STATUS_ERR_NO_SERVER_PRIV
+ 22 <deprecated command>
23 SILC_COMMAND_SILCOPER
Reply messages to the command:
- Max Arguments: 1
- Arguments: (1) <Status Payload>
+ Max Arguments: 2
+ Arguments: (1) <Status Payload> (2) <Channel ID>
- This command replies only with Status Payload.
+ The <Channel ID> is the ID of left channel.
Status messages:
This command is used to list user names currently on the requested
channel; either the argument <Channel ID> or the <channel name>.
One of these arguments must be present. The server MUST resolve
- the user names and send a comma (`,') separated list of user names
- on the channel. Server or router MAY resolve the names by sending
- SILC_COMMAND_WHOIS or SILC_COMMAND_IDENTIFY commands.
+ the joined clients and reply with a lists of users on the channel
+ and with list of user modes on the channel.
If the requested channel is a private or secret channel, this
- command MUST NOT send the list of users, as private and secret
- channels cannot be seen by outside. In this case the returned
- name list MAY include a indication that the server could not
- resolve the names of the users on the channel. Also, in this case
- Client ID's or client modes are not sent either.
+ command MUST NOT send the list of users, but error is returned
+ to the sender, except if the sender is on the channel, or the
+ sender is server.
Reply messages to the command:
1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-| Status Message |
+| Status | Error |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.in 3
.in 6
-o Status Message (2 bytes) - Indicates the status message.
- All Status messages are described in the next section.
+o Status (1 byte) - Indicates the status message type,
+ error, start of list, entry of list or end of list.
+
+o Error (1 byte) - Indicates the error if the Status
+ field is some list status, which means there are list
+ of errors.
.in 3
+The values in Status and Error fields are set according
+the following rules:
+
+.in 6
+o If there is single reply and error has not occurred
+ then Status field includes value SILC_STATUS_OK, and
+ the Error field MUST be ignored (and set to zero
+ value).
+
+o If there is single error, then Status field includes
+ one of the error values, and the Error field MUST be
+ ignored (and set to zero value).
+
+o If there will be multiple successful command replies
+ then Status field includes SILC_STATUS_LIST_START,
+ SILC_STATUS_LIST_ITEM or SILC_STATUS_LIST_END value,
+ and Error field is set to SILC_STATUS_OK.
+
+o If there are multiple error replies then Status field
+ includes SILC_STATUS_LIST_START, SILC_STATUS_LIST_ITEM
+ or SILC_STATUS_LIST_END value, and the Error field
+ includes the error value.
+.in 3
+
+This way it is possible to send single successful or
+single error reply, but also multiple successful and
+multiple error replies. Note that it is possible to
+send both list of successful replies and list of error
+replies at the same time, however in this case the
+list of error replies MUST be sent after the successful
+replies. This way the recipient may ignore the multiple
+errors if it wishes to do so.
+
+All Status messages are described in the next section.
+
.ti 0
2.3.2 SILC Command Status List
[RFC2119] Bradner, S., "Key Words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997.
-
-
+[RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
+ 10646", RFC 2279, January 1998.
70100 Kuopio
Finland
-EMail: priikone@silcnet.org
+EMail: priikone@iki.fi
This Internet-Draft expires XXX