+/****s* silcclient/SilcClientAPI/SilcClient
+ *
+ * NAME
+ *
+ * typedef struct SilcClientStruct { ... } *SilcClient
+ *
+ * DESCRIPTION
+ *
+ * This is the actual SILC Client structure which represents one
+ * SILC Client. It is allocated with the silc_client_alloc function
+ * and given as argument to all SILC Client Library functions. It
+ * is initialized with silc_client_init function, and freed with
+ * silc_client_free function.
+ *
+ * SOURCE
+ */
+struct SilcClientStruct {
+ /*
+ * The following fields are set by application
+ */
+ char *nickname; /* Nickname, MAY be set by application */
+ char *username; /* Username, MUST be set by application */
+ char *hostname; /* hostname, MUST be set by application */
+ char *realname; /* Real name, MUST be set be application */
+
+ SilcPublicKey public_key; /* Public key of user, set by application */
+ SilcPrivateKey private_key; /* Private key of user, set by application */
+ SilcPKCS pkcs; /* PKCS allocated by application */
+
+ /*
+ * The following fields are set by the library
+ */
+
+ /* Scheduler, set by library. Application may use this pointer. */
+ SilcSchedule schedule;
+
+ /* Random Number Generator. Application should use this as its primary
+ random number generator. */
+ SilcRng rng;
+
+ /* Application specific user data pointer. Client library does not
+ touch this. This the context sent as argument to silc_client_alloc.
+ Application can use it freely. */
+ void *application;
+
+ /* Generic hash context for application usage */
+ SilcHash md5hash;
+ SilcHash sha1hash;
+
+ /* Internal data for client library. Application cannot access this
+ data at all. */
+ SilcClientInternal internal;
+};
+/***/
+
+/****s* silcclient/SilcClientAPI/SilcClientConnection
+ *
+ * NAME
+ *
+ * typedef struct SilcClientConnectionStruct { ... }
+ * *SilcClientConnection
+ *
+ * DESCRIPTION
+ *
+ * This structure represents a connection. When connection is created
+ * to server this is context is returned to the application in the
+ * "connected" client operation. It includes all the important
+ * data for the session, such as nickname, local and remote IDs, and
+ * other information.
+ *
+ * SOURCE
+ */
+struct SilcClientConnectionStruct {
+ /*
+ * Local data
+ */
+ char *nickname; /* Current nickname */
+ SilcClientEntry local_entry; /* Own Client Entry */
+ SilcClientID *local_id; /* Current Client ID */
+ unsigned char *local_id_data; /* Current Client ID decoded */
+ SilcUInt32 local_id_data_len;
+
+ /*
+ * Remote data
+ */
+ char *remote_host; /* Remote host name */
+ int remote_port; /* Remote port */
+ SilcServerID *remote_id; /* Remote Server ID */
+ unsigned char *remote_id_data; /* Remote Server ID decoded */
+ SilcUInt32 remote_id_data_len;
+
+ /*
+ * Common data
+ */
+
+ /* Current command identifier for a command that was sent last.
+ Application may get the value from this variable to find out the
+ command identifier for last command. */
+ SilcUInt16 cmd_ident;
+
+ /* User data context. Library does not touch this. Application may
+ freely set and use this pointer for its needs. */
+ void *context;
+
+ /* Pointer back to the SilcClient. Application may use this. */
+ SilcClient client;
+
+ /* Current channel. Application may use and set this pointer if needed. */
+ SilcChannelEntry current_channel;
+
+ /* Socket connection object for this connection. Application may
+ use this if needed. The sock->user_data is back pointer to this
+ structure. */
+ SilcSocketConnection sock;
+
+ /* Internal data for client library. Application cannot access this
+ data at all. */
+ SilcClientConnectionInternal internal;
+};
+/***/
+
+/****s* silcclient/SilcClientAPI/SilcClientEntry
+ *
+ * NAME
+ *
+ * typedef struct SilcClientEntryStruct { ... } *SilcClientEntry
+ *
+ * DESCRIPTION
+ *
+ * This structure represents a client or a user in the SILC network.
+ * The local user has this structure also and it can be accessed from
+ * SilcClientConnection structure. All other users in the SILC network
+ * that are accessed using the Client Library routines will have their
+ * own SilcClientEntry structure. For example, when finding users by
+ * their nickname the Client Library returns this structure back to
+ * the application.
+ *
+ * SOURCE
+ */
+struct SilcClientEntryStruct {
+ /* General information */
+ char *nickname; /* nickname */
+ char *username; /* username */
+ char *hostname; /* hostname */
+ char *server; /* SILC server name */
+ char *realname; /* Realname (userinfo) */
+
+ /* Mode, ID and other information */
+ SilcUInt32 mode; /* User mode in SILC */
+ SilcClientID *id; /* The Client ID */
+ SilcDList attrs; /* Requested Attributes (maybe NULL) */
+ unsigned char *fingerprint; /* Fingerprint of client's public key */
+ SilcUInt32 fingerprint_len; /* Length of the fingerprint */
+
+ /* Private message keys */
+ SilcCipher send_key; /* Private message key for sending */
+ SilcCipher receive_key; /* Private message key for receiving */
+ SilcHmac hmac_send; /* Private mesage key HMAC for sending */
+ SilcHmac hmac_receive; /* Private mesage key HMAC for receiving */
+ unsigned char *key; /* Set only if application provided the
+ key material. NULL if the library
+ generated the key. */
+ SilcUInt32 key_len; /* Key length */
+ SilcClientKeyAgreement ke; /* Current key agreement context or NULL */
+
+ /* SilcClientEntry status information */
+ SilcEntryStatus status; /* Status mask */
+ SilcHashTable channels; /* All channels client has joined */
+ SilcUInt16 resolve_cmd_ident; /* Command identifier when resolving */
+ bool generated; /* TRUE if library generated `key' */
+ bool valid; /* FALSE if this entry is not valid */
+};
+/***/
+
+/****s* silcclient/SilcClientAPI/SilcChannelEntry
+ *
+ * NAME
+ *
+ * typedef struct SilcChannelEntryStruct { ... } *SilcChannelEntry
+ *
+ * DESCRIPTION
+ *
+ * This structure represents a channel in the SILC network. All
+ * channels that the client are aware of or have joined in will be
+ * represented as SilcChannelEntry. The structure includes information
+ * about the channel.
+ *
+ * SOURCE
+ */
+struct SilcChannelEntryStruct {
+ /* General information */
+ char *channel_name; /* Channel name */
+ SilcChannelID *id; /* Channel ID */
+ SilcUInt32 mode; /* Channel mode */
+
+ /* All clients that has joined this channel. The key to the table is the
+ SilcClientEntry and the context is SilcChannelUser context. */
+ SilcHashTable user_list;
+
+ /* Channel keys */
+ SilcCipher channel_key; /* The channel key */
+ unsigned char *key; /* Raw key data */
+ SilcUInt32 key_len; /* Raw key data length */
+ unsigned char iv[SILC_CIPHER_MAX_IV_SIZE]; /* Current IV */
+ SilcHmac hmac; /* Current HMAC */
+
+ /* Channel private keys */
+ SilcDList private_keys; /* List of private keys or NULL */
+ SilcChannelPrivateKey curr_key; /* Current private key */
+
+ /* SilcChannelEntry status information */
+ SilcDList old_channel_keys;
+ SilcDList old_hmacs;
+ SilcUInt16 resolve_cmd_ident; /* Command identifier when
+ resolving this entry */
+};
+/***/
+
+/****s* silcclient/SilcClientAPI/SilcServerEntry
+ *
+ * NAME
+ *
+ * typedef struct SilcServerEntryStruct { ... } *SilcServerEntry
+ *
+ * DESCRIPTION
+ *
+ * This structure represents a server in the SILC network. All servers
+ * that the client is aware of and have for example resolved with
+ * SILC_COMMAND_INFO command have their on SilcServerEntry structure.
+ *
+ * SOURCE
+ */
+struct SilcServerEntryStruct {
+ /* General information */
+ char *server_name; /* Server name */
+ char *server_info; /* Server info */
+ SilcServerID *server_id; /* Server ID */
+ SilcUInt16 resolve_cmd_ident; /* Command identifier when
+ resolving this entry */
+};
+/***/
+