typedef struct {
SilcIDCache cache;
SilcSchedule schedule;
+ uint32 timeout;
} *SilcIDListPurge;
/* Channel key re-key context. */
#define SILC_IDLIST_STATUS_RESOLVED 0x02 /* Entry info is resolved */
#define SILC_IDLIST_STATUS_RESOLVING 0x04 /* Entry is being resolved
with WHOIS or IDENTIFY */
+#define SILC_IDLIST_STATUS_DISABLED 0x08 /* Entry is disabled */
/*
Generic ID list data structure.
SilcCipher send_key;
SilcCipher receive_key;
- /* Re-key context */
- SilcServerRekey rekey;
-
- /* Hash selected in the SKE protocol, NULL if not needed at all */
- SilcHash hash;
-
/* HMAC */
SilcHmac hmac_send;
SilcHmac hmac_receive;
+ /* Packet sequence numbers */
+ uint32 psn_send;
+ uint32 psn_receive;
+
+ /* Hash selected in the SKE protocol, NULL if not needed at all */
+ SilcHash hash;
+
/* Public key */
SilcPublicKey public_key;
+ unsigned char fingerprint[20];
+
+ /* Re-key context */
+ SilcServerRekey rekey;
long last_receive; /* Time last received data */
long last_sent; /* Time last sent data */
+ unsigned long created; /* Time when entry was created */
+
SilcIDListStatus status; /* Status mask of the entry */
} *SilcIDListData, SilcIDListDataStruct;
/* All users on this channel */
SilcHashTable user_list;
+ uint32 user_count;
/* Pointer to the router */
SilcServerEntry router;
SilcHmac hmac;
SilcServerChannelRekey rekey;
+
+ unsigned long created;
+ bool disabled;
};
/*
SilcClientEntry
silc_idlist_add_client(SilcIDList id_list, char *nickname, char *username,
char *userinfo, SilcClientID *id,
- SilcServerEntry router, void *connection);
+ SilcServerEntry router, void *connection,
+ int expire);
int silc_idlist_del_client(SilcIDList id_list, SilcClientEntry entry);
int silc_idlist_get_clients_by_nickname(SilcIDList id_list, char *nickname,
char *server,
SilcChannelEntry
silc_idlist_add_channel(SilcIDList id_list, char *channel_name, int mode,
SilcChannelID *id, SilcServerEntry router,
- SilcCipher channel_key, SilcHmac hmac);
+ SilcCipher channel_key, SilcHmac hmac,
+ int expire);
int silc_idlist_del_channel(SilcIDList id_list, SilcChannelEntry entry);
SilcChannelEntry
silc_idlist_find_channel_by_name(SilcIDList id_list, char *name,