*/
-/****h* silccore/SilcCommandAPI
+/****h* silccore/SILC Command Interface
*
* DESCRIPTION
*
*
* NAME
*
- * typedef uint16 SilcCommandStatus;
+ * typedef SilcUInt16 SilcCommandStatus;
*
* DESCRIPTION
*
*
* SOURCE
*/
-typedef uint16 SilcCommandStatus;
+typedef SilcUInt16 SilcCommandStatus;
/* Command Status messages */
#define SILC_STATUS_OK 0
*
* SYNOPSIS
*
- * SilcCommandPayload silc_command_payload_parse(SilcBuffer buffer);
+ * SilcCommandPayload
+ * silc_command_payload_parse(const unsigned char *payload,
+ * SilcUInt32 payload_len);
*
* DESCRIPTION
*
* `buffer' is the raw payload.
*
***/
-SilcCommandPayload silc_command_payload_parse(SilcBuffer buffer);
+SilcCommandPayload silc_command_payload_parse(const unsigned char *payload,
+ SilcUInt32 payload_len);
/****f* silccore/SilcCommandAPI/silc_command_payload_encode
*
* SYNOPSIS
*
* SilcBuffer silc_command_payload_encode(SilcCommand cmd,
- * uint32 argc,
+ * SilcUInt32 argc,
* unsigned char **argv,
- * uint32 *argv_lens,
- * uint32 *argv_types,
- * uint16 ident);
+ * SilcUInt32 *argv_lens,
+ * SilcUInt32 *argv_types,
+ * SilcUInt16 ident);
*
* DESCRIPTION
*
*
***/
SilcBuffer silc_command_payload_encode(SilcCommand cmd,
- uint32 argc,
+ SilcUInt32 argc,
unsigned char **argv,
- uint32 *argv_lens,
- uint32 *argv_types,
- uint16 ident);
+ SilcUInt32 *argv_lens,
+ SilcUInt32 *argv_types,
+ SilcUInt16 ident);
/****f* silccore/SilcCommandAPI/silc_command_payload_encode_payload
*
* SYNOPSIS
*
* SilcBuffer silc_command_payload_encode_va(SilcCommand cmd,
- * uint16 ident,
- * uint32 argc, ...);
+ * SilcUInt16 ident,
+ * SilcUInt32 argc, ...);
*
* DESCRIPTION
*
* Encodes Command payload with variable argument list. The arguments
- * must be: uint32, unsigned char *, unsigned int, ... One
- * {uint32, unsigned char * and unsigned int} forms one argument,
- * thus `argc' in case when sending one {uint32, unsigned char *
- * and uint32} equals one (1) and when sending two of those it
+ * 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,
- uint16 ident,
- uint32 argc, ...);
+ SilcUInt16 ident,
+ SilcUInt32 argc, ...);
/****f* silccore/SilcCommandAPI/silc_command_payload_encode_vap
*
* SYNOPSIS
*
* SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd,
- * uint16 ident,
- * uint32 argc, va_list ap);
+ * SilcUInt16 ident,
+ * SilcUInt32 argc, va_list ap);
*
* DESCRIPTION
*
*
***/
SilcBuffer silc_command_payload_encode_vap(SilcCommand cmd,
- uint16 ident,
- uint32 argc, va_list ap);
+ SilcUInt16 ident,
+ SilcUInt32 argc, va_list ap);
/****f* silccore/SilcCommandAPI/silc_command_reply_payload_encode_va
*
* SilcBuffer
* silc_command_reply_payload_encode_va(SilcCommand cmd,
* SilcCommandStatus status,
- * uint16 ident,
- * uint32 argc, ...);
+ * SilcUInt16 ident,
+ * SilcUInt32 argc, ...);
*
* DESCRIPTION
*
SilcBuffer
silc_command_reply_payload_encode_va(SilcCommand cmd,
SilcCommandStatus status,
- uint16 ident,
- uint32 argc, ...);
+ SilcUInt16 ident,
+ SilcUInt32 argc, ...);
/****f* silccore/SilcCommandAPI/silc_command_reply_payload_encode_vap
*
* SilcBuffer
* silc_command_reply_payload_encode_vap(SilcCommand cmd,
* SilcCommandStatus status,
- * uint16 ident, uint32 argc,
+ * SilcUInt16 ident, SilcUInt32 argc,
* va_list ap);
*
* DESCRIPTION
SilcBuffer
silc_command_reply_payload_encode_vap(SilcCommand cmd,
SilcCommandStatus status,
- uint16 ident, uint32 argc,
+ SilcUInt16 ident, SilcUInt32 argc,
va_list ap);
/****f* silccore/SilcCommandAPI/silc_command_free
*
* SYNOPSIS
*
- * uint16 silc_command_get_ident(SilcCommandPayload payload);
+ * SilcUInt16 silc_command_get_ident(SilcCommandPayload payload);
*
* DESCRIPTION
*
* the same identifier in the command reply.
*
***/
-uint16 silc_command_get_ident(SilcCommandPayload payload);
+SilcUInt16 silc_command_get_ident(SilcCommandPayload payload);
+
+/****f* silccore/SilcCommandAPI/silc_command_get_status
+ *
+ * SYNOPSIS
+ *
+ * SilcCommandStatus silc_command_get_status(SilcCommandPayload payload);
+ *
+ * DESCRIPTION
+ *
+ * Returns the SilcCommandStatus from command reply payload's argument
+ * payload. Status can be returned only from command reply payload.
+ *
+ ***/
+SilcCommandStatus silc_command_get_status(SilcCommandPayload payload);
/****f* silccore/SilcCommandAPI/silc_command_set_ident
*
* SYNOPSIS
*
- * void silc_command_set_ident(SilcCommandPayload payload, uint16 ident);
+ * void silc_command_set_ident(SilcCommandPayload payload,
+ * SilcUInt16 ident);
*
* DESCRIPTION
*
* to set the identifier without encoding new Command Payload.
*
***/
-void silc_command_set_ident(SilcCommandPayload payload, uint16 ident);
+void silc_command_set_ident(SilcCommandPayload payload, SilcUInt16 ident);
/****f* silccore/SilcCommandAPI/silc_command_set_command
*