--- mqtt/inc/Attic/aitmqtt.h 2011/11/21 12:16:11 1.1.1.1.2.6 +++ mqtt/inc/Attic/aitmqtt.h 2011/11/21 12:47:15 1.1.1.1.2.7 @@ -114,7 +114,12 @@ typedef struct { username:1; } __packed mqtthdr_connflgs_t; +typedef struct { + unsigned char reserved; + unsigned char retcode; +} __packed mqtthdr_connack_t; + /* MQTT Message buffer */ typedef struct { @@ -197,6 +202,14 @@ int mqtt_msgCONNECT(mqtt_msg_t * __restrict buf, const const char *csUser, const char *csPass, const char *csWillTopic, const char *csWillMessage, char ClrSess, char WillQOS, char WillRetain); +/* + * mqtt_msgCONNACK() Create CONNACK message + * + * @buf = Message buffer + * @retcode = Return code + * return: -1 error or >-1 message size for send + */ +int mqtt_msgCONNACK(mqtt_msg_t * __restrict buf, u_char retcode); #endif