X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcclient%2Fclient.h;h=59bb12b1c73c971d9147c6a4209eebbb393a8d76;hb=3df964f52d094db8ea9e8981fee73ff2a59e365c;hp=0780823abd36ae8c5ba79b6c7bdbcba7a410f33e;hpb=087575e2f4248e52d8db5900f757b847e65d9d91;p=silc.git diff --git a/lib/silcclient/client.h b/lib/silcclient/client.h index 0780823a..59bb12b1 100644 --- a/lib/silcclient/client.h +++ b/lib/silcclient/client.h @@ -1,10 +1,10 @@ /* - client.h + client.h Author: Pekka Riikonen - Copyright (C) 1997 - 2002 Pekka Riikonen + Copyright (C) 1997 - 2006 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,10 @@ #ifndef CLIENT_H #define CLIENT_H +#ifndef SILCCLIENT_H +#error "Do not include this header directly" +#endif + /* Forward declarations */ typedef struct SilcClientStruct *SilcClient; typedef struct SilcClientConnectionStruct *SilcClientConnection; @@ -30,20 +34,33 @@ typedef struct SilcClientFtpSessionStruct *SilcClientFtpSession; typedef struct SilcClientEntryStruct *SilcClientEntry; typedef struct SilcChannelEntryStruct *SilcChannelEntry; typedef struct SilcServerEntryStruct *SilcServerEntry; -typedef struct SilcClientCommandStruct *SilcClientCommand; -typedef struct SilcClientCommandContextStruct *SilcClientCommandContext; typedef struct SilcClientCommandReplyContextStruct *SilcClientCommandReplyContext; typedef struct SilcChannelUserStruct *SilcChannelUser; typedef struct SilcClientInternalStruct *SilcClientInternal; -typedef struct SilcClientConnectionInternalStruct +typedef struct SilcClientConnectionInternalStruct *SilcClientConnectionInternal; typedef struct SilcChannelPrivateKeyStruct *SilcChannelPrivateKey; - -/* Client entry status */ -typedef enum { - SILC_CLIENT_STATUS_NONE = 0x0000, - SILC_CLIENT_STATUS_RESOLVING = 0x0001, -} SilcEntryStatus; -#endif + +/* Internal client entry context */ +typedef struct SilcClientEntryInternalStruct { + 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; /* Valid if application provided the key */ + SilcUInt32 key_len; /* Key data length */ + SilcClientKeyAgreement ke; /* Current key agreement context or NULL */ + + /* Flags */ + unsigned int valid : 1; /* FALSE if this entry is not valid */ + unsigned int resolving : 1; /* TRUE when entry is being resolved */ + unsigned int generated : 1; /* TRUE if library generated `key' */ + unsigned int prv_resp : 1; /* TRUE if private message key indicator + has been received (responder). */ + SilcUInt16 resolve_cmd_ident; /* Command identifier when resolving */ + SilcAtomic8 refcnt; /* Reference counter */ +} SilcClientEntryInternal; + +#endif /* CLIENT_H */