21 #if !defined(MQTTPACKET_H) 32 typedef void* (*pf)(int,
unsigned char,
char*, size_t);
53 #if defined(__linux__) 55 #if __BYTE_ORDER == __BIG_ENDIAN 69 unsigned int type : 4;
101 unsigned int willQoS : 2;
112 unsigned int willQoS : 2;
139 #if defined(REVERSED) 142 unsigned int reserved : 7;
143 bool sessionPresent : 1;
148 bool sessionPresent : 1;
149 unsigned int reserved : 7;
231 char*
readUTF(
char** pptr,
char* enddata);
232 unsigned char readChar(
char** pptr);
234 void writeInt(
char** pptr,
int anInt);
235 void writeUTF(
char** pptr,
const char*
string);
251 void*
MQTTPacket_ack(
int MQTTVersion,
unsigned char aHeader,
char*
data,
size_t datalen);
int MQTTPacket_decodeBuf(char *buf, unsigned int *value)
int MQTTPacket_encode(char *buf, size_t length)
MQTTProperties properties
int MQTTPacket_VBIlen(int rem_len)
MQTTProperties properties
enum MQTTPropertyCodes value
int MQTTPacket_sends(networkHandles *net, Header header, PacketBuffers *buffers, int MQTTVersion)
void * MQTTPacket_header_only(int MQTTVersion, unsigned char aHeader, char *data, size_t datalen)
int MQTTPacket_send_publish(Publish *pack, int dup, int qos, int retained, networkHandles *net, const char *clientID)
void MQTTPacket_freePublish(Publish *pack)
const char * MQTTPacket_name(int ptype)
void MQTTPacket_freeSuback(Suback *pack)
int MQTTPacket_send(networkHandles *net, Header header, char *buffer, size_t buflen, int free, int MQTTVersion)
static l_noret error(LoadState *S, const char *why)
int readInt4(char **pptr)
MQTTProperties properties
unsigned char readChar(char **pptr)
void writeData(char **pptr, const void *data, int datalen)
void * MQTTPacket_Factory(int MQTTVersion, networkHandles *net, int *error)
char * readUTF(char **pptr, char *enddata)
void writeInt4(char **pptr, int anInt)
void MQTTPacket_free_packet(MQTTPacket *pack)
int MQTTPacket_send_pubrel(int MQTTVersion, int msgid, int dup, networkHandles *net, const char *clientID)
void writeMQTTLenString(char **pptr, MQTTLenString lenstring)
MQTTProperties properties
int MQTTPacket_decode(networkHandles *net, size_t *value)
int MQTTLenStringRead(MQTTLenString *lenstring, char **pptr, char *enddata)
int MQTTPacket_send_disconnect(Clients *client, enum MQTTReasonCodes reason, MQTTProperties *props)
void MQTTPacket_freeUnsuback(Unsuback *pack)
void writeInt(char **pptr, int anInt)
int MQTTPacket_send_pubrec(int MQTTVersion, int msgid, networkHandles *net, const char *clientID)
void * MQTTPacket_ack(int MQTTVersion, unsigned char aHeader, char *data, size_t datalen)
int MQTTPacket_send_pubcomp(int MQTTVersion, int msgid, networkHandles *net, const char *clientID)
int MQTTPacket_send_puback(int MQTTVersion, int msgid, networkHandles *net, const char *clientID)
void writeUTF(char **pptr, const char *string)
MQTTProperties properties
void * MQTTPacket_publish(int MQTTVersion, unsigned char aHeader, char *data, size_t datalen)
void MQTTPacket_freeAck(Ack *pack)
void writeChar(char **pptr, char c)