if (!silc_command_get_status(cmd->payload, NULL, NULL)) { \
if (SILC_STATUS_IS_ERROR(cmd->status)) { \
/* Single error */ \
- COMMAND_REPLY_ERROR; \
+ COMMAND_REPLY_ERROR(cmd->status); \
goto out; \
} \
/* List of errors */ \
- COMMAND_REPLY_ERROR; \
+ COMMAND_REPLY_ERROR(cmd->error); \
if (cmd->status == SILC_STATUS_LIST_END) \
goto out; \
goto err; \
id_data = silc_argument_get_arg_type(cmd->args, 2, &len);
if (!id_data) {
if (notify)
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
return;
}
client_id = silc_id_payload_parse_id(id_data, len, NULL);
if (!client_id) {
if (notify)
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
return;
}
realname = silc_argument_get_arg_type(cmd->args, 5, &len);
if (!nickname || !username || !realname) {
if (notify)
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
return;
}
id_data = silc_argument_get_arg_type(cmd->args, 2, &len);
if (!id_data) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
client_id = silc_id_payload_parse_id(id_data, len, NULL);
if (!client_id) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
username = silc_argument_get_arg_type(cmd->args, 4, &len);
realname = silc_argument_get_arg_type(cmd->args, 5, &len);
if (!nickname || !username) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
id_data = silc_argument_get_arg_type(cmd->args, 2, &len);
if (!id_data) {
if (notify)
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
return;
}
idp = silc_id_payload_parse(id_data, len);
if (!idp) {
if (notify)
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
return;
}
silc_id_dup(server_id, id_type));
if (!server_entry) {
if (notify)
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
return;
}
} else {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot set nickname: %s",
silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (argc < 2 || argc > 3) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot set nickname: bad reply to command");
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
tmp = silc_argument_get_arg_type(cmd->args, 2, &len);
idp = silc_id_payload_parse(tmp, len);
if (!idp) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
silc_client_receive_new_id(cmd->client, cmd->sock, idp);
tmp = silc_argument_get_arg_type(cmd->args, 2, &len);
if (!tmp) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
channel_id = silc_id_payload_parse_id(tmp, len, NULL);
if (!channel_id) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
name = silc_argument_get_arg_type(cmd->args, 3, NULL);
if (!name) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
channel_entry = silc_client_add_channel(cmd->client, conn, name, 0,
channel_id);
if (!channel_entry) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
channel_id = NULL;
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot set topic: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
argc = silc_argument_get_arg_num(cmd->args);
if (argc < 1 || argc > 3) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
channel = silc_client_get_channel_by_id(cmd->client, conn, channel_id);
if (!channel) {
silc_free(channel_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot invite: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
channel = silc_client_get_channel_by_id(cmd->client, conn, channel_id);
if (!channel) {
silc_free(channel_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot kill: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (id_data) {
client_id = silc_id_payload_parse_id(id_data, len, NULL);
if (!client_id) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR, "%s",
silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
id = silc_id_str2id(cmd->packet->src_id, cmd->packet->src_id_len,
cmd->packet->src_id_type);
if (!id || !conn->internal->ping) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (cmd->error != SILC_STATUS_ERR_USER_ON_CHANNEL)
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot join channel: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (argc < 7) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot join channel: Bad reply packet");
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (!tmp) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot join channel: Bad reply packet");
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
channel_name = tmp;
if (!tmp) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot join channel: Bad reply packet");
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
channel_id = silc_id_payload_parse_id(tmp, len, NULL);
if (!channel_id) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (!silc_hmac_alloc(hmac, NULL, &channel->hmac)) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot join channel: Unsupported HMAC `%s'", hmac);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
return;
}
argc = silc_argument_get_arg_num(cmd->args);
if (argc > 3) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (argc == 3) {
motd = silc_argument_get_arg_type(cmd->args, 3, NULL);
if (!motd) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot change mode: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
tmp = silc_argument_get_arg_type(cmd->args, 2, NULL);
if (!tmp) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot change mode: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
channel = silc_client_get_channel_by_id(cmd->client, conn, channel_id);
if (!channel) {
silc_free(channel_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
tmp = silc_argument_get_arg_type(cmd->args, 3, NULL);
if (!tmp) {
silc_free(channel_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot change mode: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
/* Get channel mode */
modev = silc_argument_get_arg_type(cmd->args, 2, NULL);
if (!modev) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
channel = silc_client_get_channel_by_id(cmd->client, conn, channel_id);
if (!channel) {
silc_free(channel_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
id = silc_argument_get_arg_type(cmd->args, 4, &len);
if (!id) {
silc_free(channel_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
client_id = silc_id_payload_parse_id(id, len, NULL);
if (!client_id) {
silc_free(channel_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (!client_entry) {
silc_free(channel_id);
silc_free(client_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Cannot kick: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (tmp) {
channel_id = silc_id_payload_parse_id(tmp, len, NULL);
if (!channel_id) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
/* Get the channel entry */
channel = silc_client_get_channel_by_id(cmd->client, conn, channel_id);
if (!channel) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
}
if (tmp) {
client_id = silc_id_payload_parse_id(tmp, len, NULL);
if (!client_id) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
/* Get client entry */
client_entry = silc_client_get_client_by_id(cmd->client, conn, client_id);
if (!client_entry) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
channel = silc_client_get_channel_by_id(cmd->client, conn, channel_id);
if (!channel) {
silc_free(channel_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
channel = silc_client_get_channel_by_id(cmd->client, conn, channel_id);
if (!channel) {
silc_free(channel_id);
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
cmd->status = cmd->error = SILC_STATUS_ERR_NO_SUCH_CHANNEL;
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
SILC_CLIENT_PENDING_EXEC(cmd, SILC_COMMAND_USERS);
silc_client_command_reply_free(cmd);
return;
/* Get channel ID */
tmp = silc_argument_get_arg_type(cmd->args, 2, &tmp_len);
if (!tmp) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
channel_id = silc_id_payload_parse_id(tmp, tmp_len, NULL);
if (!channel_id) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
/* Get the list count */
tmp = silc_argument_get_arg_type(cmd->args, 3, &tmp_len);
if (!tmp) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
SILC_GET32_MSB(list_count, tmp);
/* Get Client ID list */
tmp = silc_argument_get_arg_type(cmd->args, 4, &tmp_len);
if (!tmp) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
silc_buffer_set(&client_id_list, tmp, tmp_len);
/* Get client mode list */
tmp = silc_argument_get_arg_type(cmd->args, 5, &tmp_len);
if (!tmp) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
silc_buffer_set(&client_mode_list, tmp, tmp_len);
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Query failed: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
} else {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"Query failed: %s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
tmp = silc_argument_get_arg_type(cmd->args, 2, &len);
if (!tmp) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
idp = silc_id_payload_parse(tmp, len);
if (!idp) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
client_id = silc_id_payload_get_id(idp);
client_entry = silc_client_get_client_by_id(cmd->client, conn, client_id);
if (!client_entry) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
server_id = silc_id_payload_get_id(idp);
server_entry = silc_client_get_server_by_id(cmd->client, conn, server_id);
if (!server_entry) {
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(SILC_STATUS_ERR_NOT_ENOUGH_PARAMS);
goto out;
}
cmd->status = cmd->error = SILC_STATUS_ERR_NO_SUCH_CHANNEL;
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
SILC_CLIENT_PENDING_EXEC(cmd, SILC_COMMAND_USERS);
silc_client_command_reply_free(cmd);
return;
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
if (cmd->error != SILC_STATUS_OK) {
SAY(cmd->client, conn, SILC_CLIENT_MESSAGE_ERROR,
"%s", silc_get_status_message(cmd->error));
- COMMAND_REPLY_ERROR;
+ COMMAND_REPLY_ERROR(cmd->error);
goto out;
}
/*
-
+
silccommand.h
-
+
Author: Pekka Riikonen <priikone@silcnet.org>
-
+
Copyright (C) 1997 - 2001 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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/****s* silccore/SilcCommandAPI/SilcCommandPayload
*
* NAME
- *
+ *
* typedef struct SilcCommandPayloadStruct *SilcCommandPayload;
*
* DESCRIPTION
/****d* silccore/SilcCommandAPI/SilcCommandFlags
*
* NAME
- *
+ *
* typedef enum { ... } SilcCommandFlags;
*
* DESCRIPTION
/* Command is available only for server operators */
SILC_CF_OPER = (1L << 4),
- /* Command is available only for SILC (router) operators. If this
+ /* Command is available only for SILC (router) operators. If this
is set SILC_CF_OPER is not necessary to be set. */
SILC_CF_SILC_OPER = (1L << 5),
/****d* silccore/SilcCommandAPI/SilcCommand
*
* NAME
- *
+ *
* typedef SilcUInt8 SilcCommand;
*
* DESCRIPTION
*
* SYNOPSIS
*
- * SilcCommandPayload
+ * SilcCommandPayload
* silc_command_payload_parse(const unsigned char *payload,
* SilcUInt32 payload_len);
*
*
* SYNOPSIS
*
- * SilcBuffer
+ * SilcBuffer
* silc_command_payload_encode_payload(SilcCommandPayload payload);
*
* DESCRIPTION
*
* SYNOPSIS
*
- * SilcBuffer silc_command_payload_encode_va(SilcCommand cmd,
- * SilcUInt16 ident,
+ * SilcBuffer silc_command_payload_encode_va(SilcCommand cmd,
+ * SilcUInt16 ident,
* SilcUInt32 argc, ...);
*
* DESCRIPTION
*
* Encodes Command payload with variable argument list. The arguments
- * must be: SilcUInt32, unsigned char *, unsigned int, ... One
- * {SilcUInt32, unsigned char * and unsigned int} forms one argument,
- * thus `argc' in case when sending one {SilcUInt32, unsigned char *
+ * must be: SilcUInt32, unsigned char *, unsigned int, ... One
+ * {SilcUInt32, unsigned char * and unsigned int} forms one argument,
+ * thus `argc' in case when sending one {SilcUInt32, unsigned char *
* and SilcUInt32} equals one (1) and when sending two of those it
* equals two (2), and so on. This has to be preserved or bad things
* will happen. The variable arguments is: {type, data, data_len}.
*
***/
-SilcBuffer silc_command_payload_encode_va(SilcCommand cmd,
- SilcUInt16 ident,
+SilcBuffer silc_command_payload_encode_va(SilcCommand cmd,
+ SilcUInt16 ident,
SilcUInt32 argc, ...);
/****f* silccore/SilcCommandAPI/silc_command_payload_encode_vap
*
* SYNOPSIS
*
- * SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd,
- * SilcUInt16 ident,
+ * SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd,
+ * SilcUInt16 ident,
* SilcUInt32 argc, va_list ap);
*
* DESCRIPTION
* takes the va_list as argument.
*
***/
-SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd,
- SilcUInt16 ident,
+SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd,
+ SilcUInt16 ident,
SilcUInt32 argc, va_list ap);
/****f* silccore/SilcCommandAPI/silc_command_reply_payload_encode_va
*
* SYNOPSIS
*
- * SilcBuffer
- * silc_command_reply_payload_encode_va(SilcCommand cmd,
+ * SilcBuffer
+ * silc_command_reply_payload_encode_va(SilcCommand cmd,
* SilcStatus status,
* SilcStatus error,
* SilcUInt16 ident,
*
* DESCRIPTION
*
- * Same as silc_command_payload_encode_va except that this is used to
- * encode strictly command reply packets. The `argc' must not count
+ * Same as silc_command_payload_encode_va except that this is used to
+ * encode strictly command reply packets. The `argc' must not count
* `status' and `error' as arguments. The `status' includes the
* command reply status. If single reply will be sent then it includes
* SILC_STATUS_OK if error did not occur. It includes an error value
* replies are sent after the successful replies.
*
***/
-SilcBuffer
-silc_command_reply_payload_encode_va(SilcCommand cmd,
+SilcBuffer
+silc_command_reply_payload_encode_va(SilcCommand cmd,
SilcStatus status,
SilcStatus error,
SilcUInt16 ident,
*
* SYNOPSIS
*
- * SilcBuffer
- * silc_command_reply_payload_encode_vap(SilcCommand cmd,
+ * SilcBuffer
+ * silc_command_reply_payload_encode_vap(SilcCommand cmd,
* SilcStatus status,
* SilcStatus error,
* SilcUInt16 ident, SilcUInt32 argc,
* takes the va_list as argument.
*
***/
-SilcBuffer
-silc_command_reply_payload_encode_vap(SilcCommand cmd,
+SilcBuffer
+silc_command_reply_payload_encode_vap(SilcCommand cmd,
SilcStatus status,
SilcStatus error,
- SilcUInt16 ident, SilcUInt32 argc,
+ SilcUInt16 ident, SilcUInt32 argc,
va_list ap);
/****f* silccore/SilcCommandAPI/silc_command_free
*
* SYNOPSIS
*
- * bool silc_command_get_status(SilcCommandPayload payload,
+ * bool silc_command_get_status(SilcCommandPayload payload,
* SilcStatus *status,
* SilcStatus *error);
*
* which indicates that there will be list of errors.
*
***/
-bool silc_command_get_status(SilcCommandPayload payload,
+bool silc_command_get_status(SilcCommandPayload payload,
SilcStatus *status,
SilcStatus *error);
*
* SYNOPSIS
*
- * void silc_command_set_ident(SilcCommandPayload payload,
+ * void silc_command_set_ident(SilcCommandPayload payload,
* SilcUInt16 ident);
*
* DESCRIPTION
*
* Function to set identifier to already allocated Command Payload. Command
* payloads are frequentlly resent in SILC and thusly this makes it easy
- * to set the identifier without encoding new Command Payload.
+ * to set the identifier without encoding new Command Payload.
*
***/
void silc_command_set_ident(SilcCommandPayload payload, SilcUInt16 ident);
*
* SYNOPSIS
*
- * void silc_command_set_command(SilcCommandPayload payload,
+ * void silc_command_set_command(SilcCommandPayload payload,
* SilcCommand command);
*
* DESCRIPTION