File:  [ELWIX - Embedded LightWeight unIX -] / mqtt / inc / defs.h
Revision 1.1.1.1.2.19: download - view: text, annotated - select for diffs - revision graph
Mon Dec 12 09:24:24 2011 UTC (12 years, 6 months ago) by misho
Branches: mqtt1_0
Diff to: branchpoint 1.1.1.1: preferred, unified
start client development

    1: #ifndef __DEFS_H
    2: #define __DEFS_H
    3: 
    4: 
    5: #define STRSIZ			256
    6: #define MAX_CONNID		24
    7: #define MAX_CRED		13
    8: #define MQTTMSG_MAX		65529
    9: #define WILDCARDS		"/#+"
   10: #define MQTT_CONNFLGS_INIT	{ 1, 1, 1, 3, 1, 1, 1 }
   11: 
   12: #define MQTT_DATA_MAX		268435455
   13: #define MQTT_CONN_STR		"MQIsdp"
   14: #define MQTT_PROTO_VER		3
   15: #define MQTT_KEEPALIVE		10
   16: 
   17: #define DEFAULT_RETRY		1
   18: #define DEFAULT_CONFIG		"/etc/mqtt.conf"
   19: #define MQTT_PORT		"1883"
   20: #define MQTT_HOST		"localhost"
   21: #define MQTT_USER		"mqtt"
   22: 
   23: 
   24: #define VERB(x)		if ((x) <= Verbose)
   25: #define FTRACE(x)	VERB((x)) syslog(LOG_DEBUG, "I'm in %s(%d)", __func__, __LINE__);
   26: 
   27: #define LOGERR		{ \
   28: 				mqtt_Errno = errno; \
   29: 				strlcpy(mqtt_Error, strerror(errno), sizeof mqtt_Error); \
   30: 			}
   31: 
   32: 
   33: extern int mqtt_Errno;
   34: extern char mqtt_Error[STRSIZ];
   35: extern struct tagCallbacks call;
   36: 
   37: extern char cliCmd[], *cliStr[];
   38: 
   39: inline void mqtt_SetErr(int eno, char *estr, ...);
   40: inline struct mqtthdr *_mqtt_readHEADER(mqtt_msg_t * __restrict, u_char, int *, int *);
   41: 
   42: extern int Verbose, Kill;
   43: 
   44: extern struct tagCallbacks call;
   45: extern sqlite3 *acc, *pub;
   46: extern FILE *logg;
   47: 
   48: 
   49: #endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>