updates.
[silc.git] / apps / silcd / idlist.h
index 57eb1d065931097edb11aa24c067e18aed12423a..0fd6207b0f5a1413b0dde7b919d6f92636605707 100644 (file)
@@ -33,6 +33,13 @@ typedef struct {
   void *timeout_queue;
 } *SilcIDListPurge;
 
+/* Channel key re-key context. */
+typedef struct {
+  void *context;
+  SilcChannelEntry channel;
+  unsigned int key_len;
+} *SilcServerChannelRekey;
+
 /*
    Generic ID list data structure.
 
@@ -394,6 +401,10 @@ struct SilcClientEntryStruct {
 
        HMAC of the channel.
 
+   SilcServerChannelRekey rekey
+
+       Channel key re-key context.
+
 */
 struct SilcChannelEntryStruct {
   char *channel_name;
@@ -426,6 +437,8 @@ struct SilcChannelEntryStruct {
   unsigned int key_len;
   unsigned char iv[SILC_CIPHER_MAX_IV_SIZE];
   SilcHmac hmac;
+
+  SilcServerChannelRekey rekey;
 };
 
 /* 
@@ -507,20 +520,21 @@ silc_idlist_find_server_by_conn(SilcIDList id_list, char *hostname,
 SilcServerEntry
 silc_idlist_replace_server_id(SilcIDList id_list, SilcServerID *old_id,
                              SilcServerID *new_id);
-void silc_idlist_del_server(SilcIDList id_list, SilcServerEntry entry);
+int silc_idlist_del_server(SilcIDList id_list, SilcServerEntry entry);
 SilcClientEntry
 silc_idlist_add_client(SilcIDList id_list, unsigned char *nickname, 
                       unsigned int nickname_len, char *username, 
                       char *userinfo, SilcClientID *id, 
                       SilcServerEntry router, void *connection);
 int silc_idlist_del_client(SilcIDList id_list, SilcClientEntry entry);
-SilcClientEntry *
-silc_idlist_get_clients_by_nickname(SilcIDList id_list, char *nickname,
-                                   char *server, unsigned int *clients_count);
-SilcClientEntry *
-silc_idlist_get_clients_by_hash(SilcIDList id_list, char *nickname,
-                               SilcHash md5hash,
-                               unsigned int *clients_count);
+int silc_idlist_get_clients_by_nickname(SilcIDList id_list, char *nickname,
+                                       char *server, 
+                                       SilcClientEntry **clients,
+                                       unsigned int *clients_count);
+int silc_idlist_get_clients_by_hash(SilcIDList id_list, char *nickname,
+                                   SilcHash md5hash,
+                                   SilcClientEntry **clients,
+                                   unsigned int *clients_count);
 SilcClientEntry
 silc_idlist_find_client_by_hash(SilcIDList id_list, char *nickname,
                                SilcHash md5hash, SilcIDCacheEntry *ret_entry);