--- libaitmqtt/inc/defs.h 2016/09/14 15:52:36 1.4.2.1 +++ libaitmqtt/inc/defs.h 2022/09/14 14:32:48 1.4.2.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: defs.h,v 1.4.2.1 2016/09/14 15:52:36 misho Exp $ +* $Id: defs.h,v 1.4.2.3 2022/09/14 14:32:48 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2016 +Copyright 2004 - 2022 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -54,6 +54,9 @@ SUCH DAMAGE. #define WILDCARDS "/#+" #define MQTT_CONNFLGS_INIT { 1, 1, 1, 3, 1, 1, 1 } +#define MQTT_DEFAULT_MSGID 0xDEBA + +#define MQTT_PROTO_STR "MQTT" #define MQTT_CONN_STR "MQIsdp" @@ -69,12 +72,20 @@ size_t strlcat(char * __restrict dst, const char * __r size_t strlcpy(char * __restrict dst, const char * __restrict src, size_t siz); #endif +#ifndef __ELWIX +#define e_malloc malloc +#define e_calloc calloc +#define e_realloc realloc +#define e_free free +#define e_strdup strdup +#endif + extern int mqtt_Errno; extern char mqtt_Error[STRSIZ]; void mqtt_SetErr(int, char *, ...); -struct mqtthdr *_mqtt_readHEADER(mqtt_msg_t * __restrict, u_char, int *, int *); +//struct mqtthdr *_mqtt_readHEADER(mqtt_msg_t * __restrict, u_char, int *, int *); int mqtt_wait4data(int, u_short, short);