+/* Context for holding cache information to periodically purge
+ the cache. */
+typedef struct {
+ SilcIDCache cache;
+ SilcUInt32 timeout;
+} *SilcIDListPurge;
+
+/* Channel key re-key context. */
+typedef struct {
+ SilcChannelEntry channel;
+ SilcUInt32 key_len;
+ SilcTask task;
+} *SilcServerChannelRekey;
+
+/* Generic rekey context for connections */
+typedef struct {
+ /* Current sending encryption key, provided for re-key. The `pfs'
+ is TRUE if the Perfect Forward Secrecy is performed in re-key. */
+ unsigned char *send_enc_key;
+ SilcUInt32 enc_key_len;
+ int ske_group;
+ bool pfs;
+ SilcUInt32 timeout;
+ void *context;
+} *SilcServerRekey;
+
+/* ID List Entry status flags. */
+typedef SilcUInt8 SilcIDListStatus;
+#define SILC_IDLIST_STATUS_NONE 0x00 /* No status */
+#define SILC_IDLIST_STATUS_REGISTERED 0x01 /* Entry is registered */
+#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 */
+#define SILC_IDLIST_STATUS_RESUMED 0x10 /* Entry is resumed */
+#define SILC_IDLIST_STATUS_LOCAL 0x20 /* Entry locally connected */
+#define SILC_IDLIST_STATUS_RESUME_RES 0x40 /* Entry resolved while
+ resuming */
+#define SILC_IDLIST_STATUS_NOATTR 0x80 /* Entry does not support
+ attributes in WHOIS */
+
+/*
+ Generic ID list data structure.
+
+ This structure is included in all ID list entries and it includes data
+ pointers that are common to all ID entries. This structure is always
+ defined to the first field in the ID entries and is used to explicitly
+ type cast to this type without first explicitly casting to correct ID
+ entry type. Hence, the ID list entry is type casted to this type to
+ get this data from the ID entry (which is usually opaque pointer).
+
+ Note that some of the fields may be NULL.
+
+*/
+typedef struct {
+ /* Send and receive symmetric keys */
+ SilcCipher send_key;
+ SilcCipher receive_key;
+
+ /* HMAC */
+ SilcHmac hmac_send;
+ SilcHmac hmac_receive;
+
+ /* Packet sequence numbers */
+ SilcUInt32 psn_send;
+ SilcUInt32 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;
+
+/*