File:  [ELWIX - Embedded LightWeight unIX -] / mqtt / inc / defs.h
Revision 1.1.1.1.2.16: download - view: text, annotated - select for diffs - revision graph
Mon Dec 5 16:55:40 2011 UTC (12 years, 7 months ago) by misho
Branches: mqtt1_0
Diff to: branchpoint 1.1.1.1: preferred, unified
rework read fixed header

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

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