- SilcCipher channel_key;
- unsigned char *key;
- unsigned int key_len;
- unsigned char iv[SILC_CIPHER_MAX_IV_SIZE];
-} *SilcChannelEntry;
-
-/* Command identifier used by ID list routines when sending WHOIS/IDENTIFY
- commands to routers. */
-#define SILC_IDLIST_IDENT 3333
-
-/* Prototypes (some functions are defined in the silcapi.h) */
-
+ SilcCipher channel_key; /* The channel key */
+ unsigned char *key; /* Raw key data */
+ SilcUInt32 key_len;
+ unsigned char iv[SILC_CIPHER_MAX_IV_SIZE]; /* Current IV */
+ SilcHmac hmac; /* Current HMAC */
+ SilcDList private_keys; /* List of private keys or NULL */
+ SilcChannelPrivateKey curr_key; /* Current private key */
+
+ /* Old channel key is saved for a short period of time when rekey occurs
+ in case if someone is sending messages after the rekey encrypted with
+ the old key, we can still decrypt them. */
+ SilcCipher old_channel_key;
+ SilcHmac old_hmac;
+ SilcTask rekey_task;
+};
+
+/* Server entry context. This represents one server. When server information
+ is resolved with INFO command the server info is saved in this context.
+ Also the connected servers are saved here. */
+struct SilcServerEntryStruct {
+ char *server_name;
+ char *server_info;
+ SilcServerID *server_id;
+};
+
+/* Prototypes. These are used only by the library. Application should not
+ call these directly. */
+
+SilcClientEntry
+silc_client_add_client(SilcClient client, SilcClientConnection conn,
+ char *nickname, char *username,
+ char *userinfo, SilcClientID *id, SilcUInt32 mode);
+void silc_client_update_client(SilcClient client,
+ SilcClientConnection conn,
+ SilcClientEntry client_entry,
+ const char *nickname,
+ const char *username,
+ const char *userinfo,
+ SilcUInt32 mode);
+void silc_client_del_client_entry(SilcClient client,
+ SilcClientConnection conn,
+ SilcClientEntry client_entry);