Kaa client C SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Enumerations
kaatcp_common.h File Reference
#include <platform/defaults.h>

Go to the source code of this file.

Data Structures

struct  kaatcp_connect_t
 
struct  kaatcp_connack_t
 
struct  kaatcp_disconnect_t
 
struct  kaatcp_kaasync_header_t
 
struct  kaatcp_kaasync_t
 

Macros

#define KAATCP_PROTOCOL_NAME_MAX_SIZE   10
 
#define FIRST_BIT   0x80
 
#define MAX_MESSAGE_TYPE_LENGTH   0x0F
 
#define MAX_MESSAGE_LENGTH   0x0FFFFFFF
 
#define PROTOCOL_VERSION   0x01
 
#define KAA_SYNC_HEADER_LENGTH   12
 
#define KAA_SYNC_ZIPPED_BIT   0x02
 
#define KAA_SYNC_ENCRYPTED_BIT   0x04
 
#define KAA_SYNC_REQUEST_BIT   0x01
 
#define KAA_SYNC_SYNC_BIT   0x10
 
#define KAA_SYNC_BOOTSTRAP_BIT   0x20
 
#define KAA_BOOTSTRAP_RSA_PKSC8   0x01
 
#define KAA_BOOTSTRAP_CHANNEL_HTTP   0x01
 
#define KAA_BOOTSTRAP_CHANNEL_HTTPLP   0x02
 
#define KAA_BOOTSTRAP_CHANNEL_KAATCP   0x03
 
#define KAA_CONNECT_FLAGS   0x02
 
#define KAA_CONNECT_HEADER_LENGTH   18
 
#define KAA_CONNECT_KEY_AES_RSA   0x11
 
#define KAA_CONNECT_SIGNATURE_SHA1   0x01
 
#define KAA_TCP_NAME   "Kaatcp"
 
#define KAA_TCP_NAME_LENGTH   6
 
#define KAA_PING_MESSAGE_SIZE   2
 
#define KAA_DISCONNECT_MESSAGE_SIZE   4
 

Enumerations

enum  kaatcp_error_t {
  KAATCP_ERR_NONE = 0, KAATCP_ERR_NOMEM = -1, KAATCP_ERR_BUFFER_NOT_ENOUGH = -2, KAATCP_ERR_BAD_PARAM = -3,
  KAATCP_ERR_INVALID_STATE = -4, KAATCP_ERR_INVALID_PROTOCOL = -5
}
 
enum  kaatcp_message_type_t {
  KAATCP_MESSAGE_UNKNOWN = 0x00, KAATCP_MESSAGE_CONNECT = 0x01, KAATCP_MESSAGE_CONNACK = 0x02, KAATCP_MESSAGE_PINGREQ = 0x0C,
  KAATCP_MESSAGE_PINGRESP = 0x0D, KAATCP_MESSAGE_DISCONNECT = 0x0E, KAATCP_MESSAGE_KAASYNC = 0x0F
}
 
enum  kaatcp_connack_code_t {
  KAATCP_CONNACK_UNKNOWN = 0x00, KAATCP_CONNACK_SUCCESS = 0x01, KAATCP_CONNACK_UNACCEPTABLE_VERSION = 0x02, KAATCP_CONNACK_IDENTIFIER_REJECTED = 0x03,
  KAATCP_CONNACK_SERVER_UNAVAILABLE = 0x04, KAATCP_CONNACK_REFUSE_BAD_CREDENTIALS = 0x05, KAATCP_CONNACK_NOT_AUTHORIZED = 0x06, KAATCP_CONNACK_REFUSE_VERIFICATION_FAILED = 0x10
}
 
enum  kaatcp_disconnect_reason_t { KAATCP_DISCONNECT_NONE = 0x00, KAATCP_DISCONNECT_BAD_REQUEST = 0x01, KAATCP_DISCONNECT_INTERNAL_ERROR = 0x02, KAATCP_DISCONNECT_CREDENTIALS_REVOKED = 0x03 }
 

Macro Definition Documentation

#define FIRST_BIT   0x80
#define KAA_BOOTSTRAP_CHANNEL_HTTP   0x01
#define KAA_BOOTSTRAP_CHANNEL_HTTPLP   0x02
#define KAA_BOOTSTRAP_CHANNEL_KAATCP   0x03
#define KAA_BOOTSTRAP_RSA_PKSC8   0x01
#define KAA_CONNECT_FLAGS   0x02
#define KAA_CONNECT_HEADER_LENGTH   18
#define KAA_CONNECT_KEY_AES_RSA   0x11
#define KAA_CONNECT_SIGNATURE_SHA1   0x01
#define KAA_DISCONNECT_MESSAGE_SIZE   4
#define KAA_PING_MESSAGE_SIZE   2
#define KAA_SYNC_BOOTSTRAP_BIT   0x20
#define KAA_SYNC_ENCRYPTED_BIT   0x04
#define KAA_SYNC_HEADER_LENGTH   12
#define KAA_SYNC_REQUEST_BIT   0x01
#define KAA_SYNC_SYNC_BIT   0x10
#define KAA_SYNC_ZIPPED_BIT   0x02
#define KAA_TCP_NAME   "Kaatcp"
#define KAA_TCP_NAME_LENGTH   6
#define KAATCP_PROTOCOL_NAME_MAX_SIZE   10
#define MAX_MESSAGE_LENGTH   0x0FFFFFFF
#define MAX_MESSAGE_TYPE_LENGTH   0x0F
#define PROTOCOL_VERSION   0x01

Enumeration Type Documentation

Enumerator
KAATCP_CONNACK_UNKNOWN 
KAATCP_CONNACK_SUCCESS 
KAATCP_CONNACK_UNACCEPTABLE_VERSION 
KAATCP_CONNACK_IDENTIFIER_REJECTED 
KAATCP_CONNACK_SERVER_UNAVAILABLE 
KAATCP_CONNACK_REFUSE_BAD_CREDENTIALS 
KAATCP_CONNACK_NOT_AUTHORIZED 
KAATCP_CONNACK_REFUSE_VERIFICATION_FAILED 
Enumerator
KAATCP_DISCONNECT_NONE 
KAATCP_DISCONNECT_BAD_REQUEST 
KAATCP_DISCONNECT_INTERNAL_ERROR 
KAATCP_DISCONNECT_CREDENTIALS_REVOKED 
Enumerator
KAATCP_ERR_NONE 
KAATCP_ERR_NOMEM 
KAATCP_ERR_BUFFER_NOT_ENOUGH 
KAATCP_ERR_BAD_PARAM 
KAATCP_ERR_INVALID_STATE 
KAATCP_ERR_INVALID_PROTOCOL 
Enumerator
KAATCP_MESSAGE_UNKNOWN 
KAATCP_MESSAGE_CONNECT 
KAATCP_MESSAGE_CONNACK 
KAATCP_MESSAGE_PINGREQ 
KAATCP_MESSAGE_PINGRESP 
KAATCP_MESSAGE_DISCONNECT 
KAATCP_MESSAGE_KAASYNC