+/* Internal context for conn->internal in SilcClientConnection. */
+struct SilcClientConnectionInternalStruct {
+ SilcClientConnectionParams params; /* Connection parameters */
+ SilcFSMStruct fsm; /* Connection FSM */
+ SilcFSMThreadStruct event_thread; /* FSM thread for events */
+ SilcFSMEventStruct wait_event; /* Event signaller */
+ SilcSchedule schedule; /* Connection's scheduler */
+ SilcMutex lock; /* Connection lock */
+ SilcSKE ske; /* Key exchange protocol */
+ SilcSKERekeyMaterial rekey; /* Rekey material */
+ SilcList thread_pool; /* Packet thread pool */
+ SilcList pending_commands; /* Pending commands list */
+ SilcHash hash; /* Negotiated hash function */
+ SilcHash sha1hash; /* SHA-1 default hash context */
+ SilcBuffer local_idp; /* Local ID Payload */
+ SilcBuffer remote_idp; /* Remote ID Payload */
+ SilcAsyncOperation op; /* Protocols async operation */
+ SilcAsyncOperation cop; /* Async operation for application */
+ SilcHashTable attrs; /* Configured user attributes */
+ SilcStream user_stream; /* Low level stream in connecting */
+ char *disconnect_message; /* Disconnection message */
+ char *away_message; /* Away message */
+
+ SilcIDCache client_cache; /* Client entry cache */
+ SilcIDCache channel_cache; /* Channel entry cache */
+ SilcIDCache server_cache; /* Server entry cache */
+
+ SilcUInt32 remote_version; /* Remote SILC protocol version */
+ SilcAtomic16 cmd_ident; /* Current command identifier */
+ SilcUInt8 retry_count; /* Packet retry counter */
+ SilcUInt8 retry_timer; /* Packet retry timer */
+ SilcClientConnectionStatus status; /* Connection callback status */
+ SilcStatus error; /* Connection callback error */
+
+ /* Events */
+ unsigned int connect : 1; /* Connect remote host */
+ unsigned int disconnected : 1; /* Disconnect remote connection */
+ unsigned int key_exchange : 1; /* Start key exchange */
+ unsigned int rekeying : 1; /* Start rekey */
+
+ /* Flags */
+ unsigned int verbose : 1; /* Notify application */
+ unsigned int registering : 1; /* Set when registering to network */
+ unsigned int rekey_responder : 1; /* Set when rekeying as responder */
+ unsigned int auth_request : 1; /* Set when requesting auth method */
+};