/* Init pre-allocated ASN.1 context */
-bool silc_asn1_init(SilcAsn1 asn1)
+SilcBool silc_asn1_init(SilcAsn1 asn1)
{
asn1->stack1 = silc_stack_alloc(768);
if (!asn1->stack1)
/* Dumps the ASN.1 data block into standard output (stdout). */
-bool silc_asn1_dump(SilcAsn1 asn1, SilcBuffer src)
+SilcBool silc_asn1_dump(SilcAsn1 asn1, SilcBuffer src)
{
- bool ret = FALSE;
+ SilcBool ret = FALSE;
SilcBerEncoding renc;
SilcAsn1Tag rtag;
const unsigned char *rdata;
SilcUInt32 rdata_len, len = 0;
- bool rindef;
+ SilcBool rindef;
SILC_LOG_DEBUG(("Dumping ASN.1"));
*
* SYNOPSIS
*
- * bool silc_asn1_init(SilcAsn1 asn1);
+ * SilcBool silc_asn1_init(SilcAsn1 asn1);
*
* DESCRIPTION
*
* error;
*
***/
-bool silc_asn1_init(SilcAsn1 asn1);
+SilcBool silc_asn1_init(SilcAsn1 asn1);
/****f* silcasn1/SilcASN1API/silc_asn1_uninit
*
*
* SYNOPSIS
*
- * bool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...);
+ * SilcBool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...);
*
* DESCRIPTION
*
* string2 [1] OCTET-STRING }
*
***/
-bool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...);
+SilcBool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...);
/****f* silcasn1/SilcASN1API/silc_asn1_decode
*
* SYNOPSIS
*
- * bool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
+ * SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
*
* DESCRIPTION
*
*
* EXAMPLE
*
- * bool bool_val, foo;
+ * SilcBool bool_val, foo;
* unsigned char *string, string2;
* SilcUInt32 string_len, string2_len;
*
* SILC_ASN1_END, SILC_ASN1_END);
*
***/
-bool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
+SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...);
/****f* silcasn1/SilcASN1API/SILC_ASN1_OPTS
*
* SYNOPSIS
*
* Encoding:
- * SILC_ASN1_BOOLEAN(bool)
- * SILC_ASN1_BOOLEAN_T(opts, tag, bool)
+ * SILC_ASN1_BOOLEAN(boolval)
+ * SILC_ASN1_BOOLEAN_T(opts, tag, boolval)
*
* Decoding:
- * SILC_ASN1_BOOLEAN(&bool)
- * SILC_ASN1_BOOLEAN_T(opts, tag, &bool)
+ * SILC_ASN1_BOOLEAN(&boolval)
+ * SILC_ASN1_BOOLEAN_T(opts, tag, &boolval)
*
* DESCRIPTION
*
* Macro used to encode or decode boolean value. Type boolean type
- * is bool.
+ * is SilcBool.
*
* The `opts' is SilcAsn1Options. The `tag' is a tag number.
*
silc_asn1_decoder function. This parses the sequence of types and returns
them as raw BER buffers in an array of SilcBuffers. */
-static bool silc_asn1_decoder_sof(SilcAsn1 asn1, SilcBuffer src)
+static SilcBool silc_asn1_decoder_sof(SilcAsn1 asn1, SilcBuffer src)
{
- bool ret = FALSE;
+ SilcBool ret = FALSE;
SilcList types;
SilcAsn1Tag type;
SilcBuffer *retb;
SilcAsn1Tag rtag;
const unsigned char *rdata;
SilcUInt32 rdata_len, len = 0;
- bool found = FALSE, rindef;
+ SilcBool found = FALSE, rindef;
struct SilcAsn1SofStruct {
SilcAsn1Tag type;
arguments (either very first or first for recursion) for a type.
The `depth' includes the current depth of recursion. */
-static bool
+static SilcBool
silc_asn1_decoder(SilcAsn1 asn1, SilcStack stack1, SilcAsn1Tag type,
SilcAsn1Tag tag, SilcBerClass ber_class,
SilcAsn1Options opts, SilcBuffer src, SilcUInt32 depth,
- bool primitive)
+ SilcBool primitive)
{
unsigned char *ptr = src->data;
SilcAsn1Tag rtype, rtag;
SilcBerClass rclass;
SilcBerEncoding renc;
SilcUInt32 len = 0;
- bool ret, indef, rindef, found = FALSE, choice = FALSE;
+ SilcBool ret, indef, rindef, found = FALSE, choice = FALSE;
const unsigned char *rdata;
SilcUInt32 rdata_len;
int i;
case SILC_ASN1_TAG_BOOLEAN:
{
/* Decode boolean (TRUE/FALSE) value */
- SILC_ASN1_VAD(asn1, opts, bool, val);
+ SILC_ASN1_VAD(asn1, opts, SilcBool, val);
if (rdata_len != 1) {
SILC_LOG_DEBUG(("Malformed boolean value"));
return ret;
}
-bool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...)
+SilcBool silc_asn1_decode(SilcAsn1 asn1, SilcBuffer src, ...)
{
SilcAsn1Tag type, tag;
SilcAsn1Options opts;
SilcBerClass ber_class;
SilcStackFrame frame1, frame2;
SilcStack stack1 = NULL, stack2 = NULL;
- bool ret;
+ SilcBool ret;
if (!asn1)
return FALSE;
is TRUE if this encoder receives one primitive type as argument. If
it is a constructed type it must be FALSE value. */
-static bool
+static SilcBool
silc_asn1_encoder(SilcAsn1 asn1, SilcStack stack1, SilcStack stack2,
SilcAsn1Tag type, SilcAsn1Tag tag, SilcBerClass ber_class,
SilcAsn1Options opts, SilcBuffer dest, SilcUInt32 depth,
- bool primitive)
+ SilcBool primitive)
{
unsigned char *ptr = dest->data;
SilcAsn1Tag rtype, rtag;
SilcAsn1Options ropts;
SilcBerClass rclass;
SilcUInt32 len = 0;
- bool ret = FALSE, indef;
+ SilcBool ret = FALSE, indef;
SilcBufferStruct buf;
SilcStackFrame frame;
return ret;
}
-bool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...)
+SilcBool silc_asn1_encode(SilcAsn1 asn1, SilcBuffer dest, ...)
{
SilcAsn1Tag type, tag;
SilcAsn1Options opts;
SilcBerClass ber_class;
SilcStackFrame frame1, frame2;
SilcStack stack1 = NULL;
- bool ret;
+ SilcBool ret;
if (!asn1)
return FALSE;
const char *silc_asn1_tag_name(SilcAsn1Tag tag);
/* Dumps the ASN.1 data block into standard output (stdout). */
-bool silc_asn1_dump(SilcAsn1 asn1, SilcBuffer src);
+SilcBool silc_asn1_dump(SilcAsn1 asn1, SilcBuffer src);
#endif /* SILC_DIST_INPLACE */
#endif /* SILCASN1_I_H */
function. If the `indefinite' is TRUE then the BER block will not
include the length of the data in the BER block. */
-bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class,
+SilcBool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class,
SilcBerEncoding encoding, SilcUInt32 tag,
const unsigned char *data, SilcUInt32 data_len,
- bool indefinite)
+ SilcBool indefinite)
{
int i = 0, c;
SilcUInt32 tmp;
`identifier_len' is the length of the BER header, and the length
of the entire BER object is `identifier_len' + `data_len'. */
-bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class,
+SilcBool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class,
SilcBerEncoding *encoding, SilcUInt32 *tag,
const unsigned char **data, SilcUInt32 *data_len,
- bool *indefinite, SilcUInt32 *identifier_len)
+ SilcBool *indefinite, SilcUInt32 *identifier_len)
{
int i = 0, c;
SilcUInt32 t;
encoding with silc_ber_encode. */
SilcUInt32 silc_ber_encoded_len(SilcUInt32 tag, SilcUInt32 data_len,
- bool indefinite)
+ SilcBool indefinite)
{
SilcUInt32 len, tmp;
*
* SYNOPSIS
*
- * bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class,
+ * SilcBool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class,
* SilcBerEncoding encoding, SilcUInt32 tag,
* const unsigned char *data, SilcUInt32 data_len,
- * bool indefinite);
+ * SilcBool indefinite);
*
* DESCRIPTION
*
* include the length of the data in the BER block.
*
***/
-bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class,
+SilcBool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class,
SilcBerEncoding encoding, SilcUInt32 tag,
const unsigned char *data, SilcUInt32 data_len,
- bool indefinite);
+ SilcBool indefinite);
/****f* silcasn1/SilcBerAPI/silc_ber_decode
*
* SYNOPSIS
*
- * bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class,
+ * SilcBool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class,
* SilcBerEncoding *encoding, SilcUInt32 *tag,
* const unsigned char **data, SilcUInt32 *data_len,
- * bool *indefinite, SilcUInt32 *identifier_len);
+ * SilcBool *indefinite, SilcUInt32 *identifier_len);
*
* DESCRIPTION
*
* of the entire BER object is `identifier_len' + `data_len'.
*
***/
-bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class,
+SilcBool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class,
SilcBerEncoding *encoding, SilcUInt32 *tag,
const unsigned char **data, SilcUInt32 *data_len,
- bool *indefinite, SilcUInt32 *identifier_len);
+ SilcBool *indefinite, SilcUInt32 *identifier_len);
/****f* silcasn1/SilcBerAPI/silc_ber_encoded_len
*
* SYNOPSIS
*
* SilcUInt32 silc_ber_encoded_len(SilcUInt32 tag, SilcUInt32 data_len,
- * bool indefinite);
+ * SilcBool indefinite);
*
* DESCRIPTION
*
*
***/
SilcUInt32 silc_ber_encoded_len(SilcUInt32 tag, SilcUInt32 data_len,
- bool indefinite);
+ SilcBool indefinite);
#endif /* SILCBER_H */
/*
silc_asn1_encode(asn1, node,
- SILC_ASN1_BOOLEAN(bool),
+ SILC_ASN1_BOOLEAN(SilcBool),
SILC_ASN1_END);
silc_asn1_encode(asn1, dest,
SILC_ASN1_SEQUENCE_T(SILC_ASN1_PRIVATE, 101),
SILC_ASN1_SEQUENCE_T(0, 9),
SILC_ASN1_SEQUENCE,
SILC_ASN1_ANY_T(0, 33, node),
- SILC_ASN1_BOOLEAN_T(0, 4, bool),
- SILC_ASN1_BOOLEAN(bool),
+ SILC_ASN1_BOOLEAN_T(0, 4, boolv),
+ SILC_ASN1_BOOLEAN(SilcBool),
SILC_ASN1_END,
SILC_ASN1_END,
SILC_ASN1_END);
/*
silc_asn1_encode(asn1, node,
- SILC_ASN1_BOOLEAN(bool),
+ SILC_ASN1_BOOLEAN(SilcBool),
SILC_ASN1_END);
silc_asn1_encode(asn1, dest,
SILC_ASN1_SEQUENCE_T(SILC_ASN1_PRIVATE, 101),
SILC_ASN1_SEQUENCE_T(0, 9),
SILC_ASN1_SEQUENCE,
SILC_ASN1_ANY_T(SILC_ASN1_EXPLICIT, 33, node),
- SILC_ASN1_BOOLEAN_T(0, 4, bool),
- SILC_ASN1_BOOLEAN(bool),
+ SILC_ASN1_BOOLEAN_T(0, 4, boolv),
+ SILC_ASN1_BOOLEAN(SilcBool),
SILC_ASN1_END,
SILC_ASN1_END,
SILC_ASN1_END);
{
SilcBufferStruct node, node2;
SilcAsn1 asn1;
- bool success = FALSE;
- bool val = TRUE;
+ SilcBool success = FALSE;
+ SilcBool val = TRUE;
int i;
unsigned char *str;
SilcUInt32 str_len;
SILC_TASK_CALLBACK(silc_client_connect_to_server_final);
SILC_TASK_CALLBACK(silc_client_rekey_final);
-static bool silc_client_packet_parse(SilcPacketParserContext *parser_context,
+static SilcBool silc_client_packet_parse(SilcPacketParserContext *parser_context,
void *context);
static void silc_client_packet_parse_type(SilcClient client,
SilcSocketConnection sock,
SilcPacketContext *packet);
-void silc_client_resolve_auth_method(bool success,
+void silc_client_resolve_auth_method(SilcBool success,
SilcProtocolAuthMeth auth_meth,
const unsigned char *auth_data,
SilcUInt32 auth_data_len, void *context);
the client ready to be run. One must call silc_client_run to run the
client. Returns FALSE if error occured, TRUE otherwise. */
-bool silc_client_init(SilcClient client)
+SilcBool silc_client_init(SilcClient client)
{
SILC_LOG_DEBUG(("Initializing client"));
SilcIDCacheList list;
SilcIDCacheEntry entry;
SilcClientCommandPending *r;
- bool ret;
+ SilcBool ret;
if (silc_idcache_get_all(conn->internal->client_cache, &list)) {
ret = silc_idcache_list_first(list, &entry);
client operation to resolve the authentication method. We will continue
the executiong of the protocol in this function. */
-void silc_client_resolve_auth_method(bool success,
+void silc_client_resolve_auth_method(SilcBool success,
SilcProtocolAuthMeth auth_meth,
const unsigned char *auth_data,
SilcUInt32 auth_data_len, void *context)
int silc_client_packet_send_real(SilcClient client,
SilcSocketConnection sock,
- bool force_send)
+ SilcBool force_send)
{
int ret;
/* Parser callback called by silc_packet_receive_process. Thie merely
registers timeout that will handle the actual parsing when appropriate. */
-static bool silc_client_packet_parse(SilcPacketParserContext *parser_context,
+static SilcBool silc_client_packet_parse(SilcPacketParserContext *parser_context,
void *context)
{
SilcClient client = (SilcClient)context;
SilcHmac hmac,
unsigned char *data,
SilcUInt32 data_len,
- bool force_send)
+ SilcBool force_send)
{
SilcPacketContext packetdata;
const SilcBufferStruct packet;
/* Packet sending routine for application. This is the only routine that
is provided for application to send SILC packets. */
-bool silc_client_send_packet(SilcClient client,
+SilcBool silc_client_send_packet(SilcClient client,
SilcClientConnection conn,
SilcPacketType type,
const unsigned char *data,
static void silc_client_resume_session_cb(SilcClient client,
SilcClientConnection conn,
- bool success,
+ SilcBool success,
void *context)
{
SilcBuffer sidp;
/* Delete one attribute */
-bool silc_client_attribute_del(SilcClient client,
+SilcBool silc_client_attribute_del(SilcClient client,
SilcClientConnection conn,
SilcAttribute attribute,
SilcAttributePayload attr)
{
- bool ret;
+ SilcBool ret;
if (!conn->internal->attrs)
return FALSE;
with the next receiver's key. The `data' is the channel message. If
the `force_send' is TRUE then the packet is sent immediately. */
-bool silc_client_send_channel_message(SilcClient client,
+SilcBool silc_client_send_channel_message(SilcClient client,
SilcClientConnection conn,
SilcChannelEntry channel,
SilcChannelPrivateKey key,
SilcMessageFlags flags,
unsigned char *data,
SilcUInt32 data_len,
- bool force_send)
+ SilcBool force_send)
{
SilcSocketConnection sock;
SilcBuffer payload;
unsigned char *id_string;
int block_len;
SilcChannelUser chu;
- bool ret = FALSE;
+ SilcBool ret = FALSE;
assert(client && conn && channel);
sock = conn->sock;
currently it is not expected that the SKE key material would be used
as channel private key. However, this API allows it. */
-bool silc_client_add_channel_private_key(SilcClient client,
+SilcBool silc_client_add_channel_private_key(SilcClient client,
SilcClientConnection conn,
SilcChannelEntry channel,
const char *name,
after calling this to protect the channel messages. Returns FALSE on
on error, TRUE otherwise. */
-bool silc_client_del_channel_private_keys(SilcClient client,
+SilcBool silc_client_del_channel_private_keys(SilcClient client,
SilcClientConnection conn,
SilcChannelEntry channel)
{
old channel key is used hereafter to protect the channel messages. This
returns FALSE on error, TRUE otherwise. */
-bool silc_client_del_channel_private_key(SilcClient client,
+SilcBool silc_client_del_channel_private_key(SilcClient client,
SilcClientConnection conn,
SilcChannelEntry channel,
SilcChannelPrivateKey key)
void *monitor_context,
const char *local_ip,
SilcUInt32 local_port,
- bool do_not_bind,
+ SilcBool do_not_bind,
SilcClientEntry client_entry,
const char *filepath,
SilcUInt32 *session_id)
unsigned char *send_enc_key;
SilcUInt32 enc_key_len;
int ske_group;
- bool pfs;
+ SilcBool pfs;
SilcUInt32 timeout;
void *context;
} *SilcClientRekey;
/* Session resuming callback */
typedef void (*SilcClientResumeSessionCallback)(SilcClient client,
SilcClientConnection conn,
- bool success,
+ SilcBool success,
void *context);
/* Rekey must be performed at the lastest when this many packets is sent */
SilcHmac hmac,
unsigned char *data,
SilcUInt32 data_len,
- bool force_send);
+ SilcBool force_send);
int silc_client_packet_send_real(SilcClient client,
SilcSocketConnection sock,
- bool force_send);
+ SilcBool force_send);
void silc_client_ftp_free_sessions(SilcClient client,
SilcClientConnection conn);
void silc_client_ftp_session_free(SilcClientFtpSession session);
SilcPacketContext *packet);
SilcBuffer silc_client_get_detach_data(SilcClient client,
SilcClientConnection conn);
-bool silc_client_process_detach_data(SilcClient client,
+SilcBool silc_client_process_detach_data(SilcClient client,
SilcClientConnection conn,
unsigned char **old_id,
SilcUInt16 *old_id_len);
void
silc_client_command_reply_whois_save(SilcClientCommandReplyContext cmd,
SilcStatus status,
- bool notify);
+ SilcBool notify);
#endif
* Received notify about some client we are watching
*/
SilcNotifyType notify = 0;
- bool del_client = FALSE;
+ SilcBool del_client = FALSE;
unsigned char *pk;
SilcUInt32 pk_len;
SilcPublicKey public_key = NULL;
static void
silc_command(SilcClient client, SilcClientConnection conn,
- SilcClientCommandContext cmd_context, bool success,
+ SilcClientCommandContext cmd_context, SilcBool success,
SilcCommand command, SilcStatus status)
{
static void
silc_command_reply(SilcClient client, SilcClientConnection conn,
- SilcCommandPayload cmd_payload, bool success,
+ SilcCommandPayload cmd_payload, SilcBool success,
SilcCommand command, SilcStatus status, ...)
{
silc_client_perform_key_agreement). If TRUE is returned also the
`completion' and `context' arguments must be set by the application. */
-static bool
+static SilcBool
silc_key_agreement(SilcClient client, SilcClientConnection conn,
SilcClientEntry client_entry, const char *hostname,
SilcUInt16 port, SilcKeyAgreementCallback *completion,
message. The `data' is the private message. If the `force_send' is
TRUE the packet is sent immediately. */
-bool silc_client_send_private_message(SilcClient client,
+SilcBool silc_client_send_private_message(SilcClient client,
SilcClientConnection conn,
SilcClientEntry client_entry,
SilcMessageFlags flags,
unsigned char *data,
SilcUInt32 data_len,
- bool force_send)
+ SilcBool force_send)
{
SilcSocketConnection sock;
SilcBuffer buffer;
SilcCipher cipher;
SilcHmac hmac;
int block_len;
- bool ret = FALSE;
+ SilcBool ret = FALSE;
assert(client && conn && client_entry);
sock = conn->sock;
Returns FALSE if the key is already set for the `client_entry', TRUE
otherwise. */
-bool silc_client_add_private_message_key(SilcClient client,
+SilcBool silc_client_add_private_message_key(SilcClient client,
SilcClientConnection conn,
SilcClientEntry client_entry,
const char *cipher,
const char *hmac,
unsigned char *key,
SilcUInt32 key_len,
- bool generate_key,
- bool responder)
+ SilcBool generate_key,
+ SilcBool responder)
{
unsigned char private_key[32];
SilcUInt32 len;
`cipher' and `hmac' SHOULD be provided as it is negotiated also in
the SKE protocol. */
-bool silc_client_add_private_message_key_ske(SilcClient client,
+SilcBool silc_client_add_private_message_key_ske(SilcClient client,
SilcClientConnection conn,
SilcClientEntry client_entry,
const char *cipher,
const char *hmac,
SilcSKEKeyMaterial *key,
- bool responder)
+ SilcBool responder)
{
assert(client && client_entry);
going to be the initiator, if and when, the users set up a static
private message key (not Key Agreement). */
-bool silc_client_send_private_message_key_request(SilcClient client,
+SilcBool silc_client_send_private_message_key_request(SilcClient client,
SilcClientConnection conn,
SilcClientEntry client_entry)
{
after this to protect the private messages with the remote `client_entry'
client. Returns FALSE on error, TRUE otherwise. */
-bool silc_client_del_private_message_key(SilcClient client,
+SilcBool silc_client_del_private_message_key(SilcClient client,
SilcClientConnection conn,
SilcClientEntry client_entry)
{
server. To do that call silc_client_resume_session function.
This returns the old detached session client ID. */
-bool silc_client_process_detach_data(SilcClient client,
+SilcBool silc_client_process_detach_data(SilcClient client,
SilcClientConnection conn,
unsigned char **old_id,
SilcUInt16 *old_id_len)
SilcUInt32 channel_count;
SilcUInt32 *cmd_idents;
SilcUInt32 cmd_idents_count;
- bool success;
+ SilcBool success;
} *SilcClientResumeSession;
/* Generic command reply callback. */
SilcChannelEntry channel;
SilcBuffer tmp;
int i;
- bool ret;
+ SilcBool ret;
SILC_LOG_DEBUG(("Resuming detached session"));
/* Executes a command */
-bool silc_client_command_call(SilcClient client,
+SilcBool silc_client_command_call(SilcClient client,
SilcClientConnection conn,
const char *command_line, ...)
{
SilcBuffer buffer, attrs = NULL;
unsigned char count[4], *tmp = NULL;
int i;
- bool details = FALSE, nick = FALSE;
+ SilcBool details = FALSE, nick = FALSE;
unsigned char *pubkey = NULL;
if (!cmd->conn) {
case 'C':
if (add) {
int k;
- bool chadd = FALSE;
+ SilcBool chadd = FALSE;
SilcPublicKey chpk = NULL;
mode |= SILC_CHANNEL_MODE_CHANNEL_AUTH;
SilcBuffer buffer, idp = NULL, args = NULL;
int type = 0;
const char *pubkey = NULL;
- bool pubkey_add = TRUE;
+ SilcBool pubkey_add = TRUE;
if (!cmd->conn) {
SILC_NOT_CONNECTED(cmd->client, cmd->conn);
command identifier `ident'. Application usually does not need it
and set it to zero value. */
-bool silc_client_command_register(SilcClient client,
+SilcBool silc_client_command_register(SilcClient client,
SilcCommand command,
const char *name,
SilcCommandCb command_function,
`command_function' and command reply function `command_reply_function'.
Returns TRUE if the command was found and unregistered. */
-bool silc_client_command_unregister(SilcClient client,
+SilcBool silc_client_command_unregister(SilcClient client,
SilcCommand command,
SilcCommandCb command_function,
SilcCommandCb command_reply_function,
SilcClientCommandContext silc_client_command_dup(SilcClientCommandContext ctx);
SilcClientCommand silc_client_command_find(SilcClient client,
const char *name);
-bool silc_client_command_register(SilcClient client,
+SilcBool silc_client_command_register(SilcClient client,
SilcCommand command,
const char *name,
SilcCommandCb command_function,
SilcCommandCb command_reply_function,
SilcUInt8 max_args,
SilcUInt16 ident);
-bool silc_client_command_unregister(SilcClient client,
+SilcBool silc_client_command_unregister(SilcClient client,
SilcCommand command,
SilcCommandCb command_function,
SilcCommandCb command_reply_function,
void
silc_client_command_reply_whois_save(SilcClientCommandReplyContext cmd,
SilcStatus status,
- bool notify)
+ SilcBool notify)
{
SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data;
SilcClientID *client_id;
char *realname = NULL;
SilcUInt32 idle = 0, mode = 0;
SilcBufferStruct channels, ch_user_modes;
- bool has_channels = FALSE, has_user_modes = FALSE;
+ SilcBool has_channels = FALSE, has_user_modes = FALSE;
unsigned char *fingerprint;
SilcUInt32 fingerprint_len;
static void
silc_client_command_reply_identify_save(SilcClientCommandReplyContext cmd,
SilcStatus status,
- bool notify)
+ SilcBool notify)
{
SilcClientConnection conn = (SilcClientConnection)cmd->sock->user_data;
SilcClient client = cmd->client;
static int
silc_client_command_reply_users_save(SilcClientCommandReplyContext cmd,
SilcStatus status,
- bool notify,
- bool resolve,
+ SilcBool notify,
+ SilcBool resolve,
SilcGetChannelCallback get_channel,
SilcCommandCb get_clients)
{
int i;
unsigned char **res_argv = NULL;
SilcUInt32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0;
- bool wait_res = FALSE;
+ SilcBool wait_res = FALSE;
SILC_LOG_DEBUG(("Start"));
SilcIDCacheList list = NULL;
SilcClientEntry entry, *clients;
int i = 0;
- bool found = FALSE;
+ SilcBool found = FALSE;
char *nicknamec;
assert(client && conn);
SilcClientConnection conn,
const char *nickname,
const char *format,
- bool query)
+ SilcBool query)
{
SilcIDCacheEntry id_cache;
SilcIDCacheList list = NULL;
SilcBuffer client_id_list = i->client_id_list;
SilcClientEntry *clients = NULL;
SilcUInt32 clients_count = 0;
- bool found = FALSE;
+ SilcBool found = FALSE;
int c;
SILC_LOG_DEBUG(("Start"));
unsigned char **res_argv = NULL;
SilcUInt32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0;
GetClientsByListInternal in;
- bool wait_res = FALSE;
+ SilcBool wait_res = FALSE;
assert(client && conn && client_id_list);
SilcUInt16 idp_len;
SilcClientID *client_id;
SilcClientEntry entry;
- bool ret;
+ SilcBool ret;
/* Get Client ID */
SILC_GET16_MSB(idp_len, client_id_list->data + 2);
GetClientsByChannelInternal i = context;
SilcClientEntry *clients = NULL;
SilcUInt32 clients_count = 0;
- bool found = FALSE;
+ SilcBool found = FALSE;
SilcChannelEntry channel;
SilcHashTableList htl;
SilcChannelUser chu;
unsigned char **res_argv = NULL;
SilcUInt32 *res_argv_lens = NULL, *res_argv_types = NULL, res_argc = 0;
SilcBuffer idp;
- bool wait_res = FALSE;
+ SilcBool wait_res = FALSE;
assert(client && conn && channel);
/* Removes client from the cache by the client entry. */
-bool silc_client_del_client(SilcClient client, SilcClientConnection conn,
+SilcBool silc_client_del_client(SilcClient client, SilcClientConnection conn,
SilcClientEntry client_entry)
{
- bool ret = silc_idcache_del_by_context(conn->internal->client_cache,
+ SilcBool ret = silc_idcache_del_by_context(conn->internal->client_cache,
client_entry);
if (ret) {
/* Removes channel from the cache by the channel entry. */
-bool silc_client_del_channel(SilcClient client, SilcClientConnection conn,
+SilcBool silc_client_del_channel(SilcClient client, SilcClientConnection conn,
SilcChannelEntry channel)
{
- bool ret = silc_idcache_del_by_context(conn->internal->channel_cache,
+ SilcBool ret = silc_idcache_del_by_context(conn->internal->channel_cache,
channel);
SILC_LOG_DEBUG(("Start"));
/* Replaces the channel ID of the `channel' to `new_id'. Returns FALSE
if the ID could not be changed. */
-bool silc_client_replace_channel_id(SilcClient client,
+SilcBool silc_client_replace_channel_id(SilcClient client,
SilcClientConnection conn,
SilcChannelEntry channel,
SilcChannelID *new_id)
/* Removes server from the cache by the server entry. */
-bool silc_client_del_server(SilcClient client, SilcClientConnection conn,
+SilcBool silc_client_del_server(SilcClient client, SilcClientConnection conn,
SilcServerEntry server)
{
- bool ret = silc_idcache_del_by_context(conn->internal->server_cache, server);
+ SilcBool ret = silc_idcache_del_by_context(conn->internal->server_cache, server);
silc_free(server->server_name);
silc_free(server->server_info);
silc_free(server->server_id);
char *cp;
char *newnick = NULL;
int i, off = 0, len;
- bool freebase;
+ SilcBool freebase;
SilcClientEntry *clients;
SilcUInt32 clients_count = 0;
SilcClientEntry unformatted = NULL;
SilcClientConnection conn,
const char *nickname,
const char *format,
- bool query);
+ SilcBool query);
SilcChannelEntry silc_client_add_channel(SilcClient client,
SilcClientConnection conn,
const char *channel_name,
SilcServerEntry server_entry,
const char *server_name,
const char *server_info);
-bool silc_client_replace_channel_id(SilcClient client,
+SilcBool silc_client_replace_channel_id(SilcClient client,
SilcClientConnection conn,
SilcChannelEntry channel,
SilcChannelID *new_id);
void *completion_context;
} *VerifyKeyContext;
-static void silc_client_verify_key_cb(bool success, void *context)
+static void silc_client_verify_key_cb(SilcBool success, void *context)
{
VerifyKeyContext verify = (VerifyKeyContext)context;
SilcHash hash,
SilcHmac hmac,
SilcSKEDiffieHellmanGroup group,
- bool is_responder)
+ SilcBool is_responder)
{
SilcClientConnection conn = (SilcClientConnection)sock->user_data;
const char *cname = silc_cipher_get_name(cipher);
SilcClientRekeyInternalContext *ctx,
SilcSocketConnection sock,
SilcSKEKeyMaterial *keymat,
- bool send)
+ SilcBool send)
{
SilcClientConnection conn = (SilcClientConnection)sock->user_data;
static void
silc_client_protocol_rekey_generate(SilcClient client,
SilcClientRekeyInternalContext *ctx,
- bool send)
+ SilcBool send)
{
SilcClientConnection conn = (SilcClientConnection)ctx->sock->user_data;
SilcSKEKeyMaterial *keymat;
static void
silc_client_protocol_rekey_generate_pfs(SilcClient client,
SilcClientRekeyInternalContext *ctx,
- bool send)
+ SilcBool send)
{
SilcClientConnection conn = (SilcClientConnection)ctx->sock->user_data;
SilcSKEKeyMaterial *keymat;
void *client;
void *context;
SilcSocketConnection sock;
- bool responder; /* TRUE if we are receiving party */
- bool pfs; /* TRUE if PFS is to be used */
+ SilcBool responder; /* TRUE if we are receiving party */
+ SilcBool pfs; /* TRUE if PFS is to be used */
SilcSKE ske; /* Defined if PFS is used */
SilcPacketContext *packet;
} SilcClientRekeyInternalContext;
SilcHash hash,
SilcHmac hmac,
SilcSKEDiffieHellmanGroup group,
- bool is_responder);
+ SilcBool is_responder);
#endif
* argument MUST be set to FALSE when setting the key.
*
***/
-bool
+SilcBool
silc_client_send_private_message_key_request(SilcClient client,
SilcClientConnection conn,
SilcClientEntry client_entry);