client-c  0.8.1
kaatcp_common.h File Reference
+ Include dependency graph for kaatcp_common.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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
}
 
enum  kaatcp_disconnect_reason_t { KAATCP_DISCONNECT_NONE = 0x00, KAATCP_DISCONNECT_BAD_REQUEST = 0x01, KAATCP_DISCONNECT_INTERNAL_ERROR = 0x02 }
 

Macro Definition Documentation

#define FIRST_BIT   0x80

Definition at line 28 of file kaatcp_common.h.

#define KAA_BOOTSTRAP_CHANNEL_HTTP   0x01

Definition at line 41 of file kaatcp_common.h.

#define KAA_BOOTSTRAP_CHANNEL_HTTPLP   0x02

Definition at line 42 of file kaatcp_common.h.

#define KAA_BOOTSTRAP_CHANNEL_KAATCP   0x03

Definition at line 43 of file kaatcp_common.h.

#define KAA_BOOTSTRAP_RSA_PKSC8   0x01

Definition at line 40 of file kaatcp_common.h.

#define KAA_CONNECT_FLAGS   0x02

Definition at line 45 of file kaatcp_common.h.

#define KAA_CONNECT_HEADER_LENGTH   18

Definition at line 46 of file kaatcp_common.h.

#define KAA_CONNECT_KEY_AES_RSA   0x11

Definition at line 48 of file kaatcp_common.h.

#define KAA_CONNECT_SIGNATURE_SHA1   0x01

Definition at line 49 of file kaatcp_common.h.

#define KAA_DISCONNECT_MESSAGE_SIZE   4

Definition at line 55 of file kaatcp_common.h.

#define KAA_PING_MESSAGE_SIZE   2

Definition at line 54 of file kaatcp_common.h.

#define KAA_SYNC_BOOTSTRAP_BIT   0x20

Definition at line 38 of file kaatcp_common.h.

#define KAA_SYNC_ENCRYPTED_BIT   0x04

Definition at line 35 of file kaatcp_common.h.

#define KAA_SYNC_HEADER_LENGTH   12

Definition at line 33 of file kaatcp_common.h.

#define KAA_SYNC_REQUEST_BIT   0x01

Definition at line 36 of file kaatcp_common.h.

#define KAA_SYNC_SYNC_BIT   0x10

Definition at line 37 of file kaatcp_common.h.

#define KAA_SYNC_ZIPPED_BIT   0x02

Definition at line 34 of file kaatcp_common.h.

#define KAA_TCP_NAME   "Kaatcp"

Definition at line 51 of file kaatcp_common.h.

#define KAA_TCP_NAME_LENGTH   6

Definition at line 52 of file kaatcp_common.h.

#define KAATCP_PROTOCOL_NAME_MAX_SIZE   10

Copyright 2014-2016 CyberVision, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 26 of file kaatcp_common.h.

#define MAX_MESSAGE_LENGTH   0x0FFFFFFF

Definition at line 30 of file kaatcp_common.h.

#define MAX_MESSAGE_TYPE_LENGTH   0x0F

Definition at line 29 of file kaatcp_common.h.

#define PROTOCOL_VERSION   0x01

Definition at line 31 of file kaatcp_common.h.

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 

Definition at line 102 of file kaatcp_common.h.

Enumerator
KAATCP_DISCONNECT_NONE 
KAATCP_DISCONNECT_BAD_REQUEST 
KAATCP_DISCONNECT_INTERNAL_ERROR 

Definition at line 116 of file kaatcp_common.h.

Enumerator
KAATCP_ERR_NONE 
KAATCP_ERR_NOMEM 
KAATCP_ERR_BUFFER_NOT_ENOUGH 
KAATCP_ERR_BAD_PARAM 
KAATCP_ERR_INVALID_STATE 
KAATCP_ERR_INVALID_PROTOCOL 

Definition at line 57 of file kaatcp_common.h.

Enumerator
KAATCP_MESSAGE_UNKNOWN 
KAATCP_MESSAGE_CONNECT 
KAATCP_MESSAGE_CONNACK 
KAATCP_MESSAGE_PINGREQ 
KAATCP_MESSAGE_PINGRESP 
KAATCP_MESSAGE_DISCONNECT 
KAATCP_MESSAGE_KAASYNC 

Definition at line 66 of file kaatcp_common.h.