Annotation of mqtt/inc/mqttd.h, revision 1.1.2.6
1.1.2.1 misho 1: #ifndef __MQTTD_H
2: #define __MQTTD_H
3:
4:
1.1.2.4 misho 5: struct tagStore {
6: char st_qos;
7: u_short st_msgid;
8:
9: mqtt_subscr_t st_subscr;
10:
11: SLIST_ENTRY(tagStore) st_node;
12: };
13:
1.1.2.2 misho 14: struct tagSession {
1.1.2.4 misho 15: /* client session thread id */
16: pthread_t sess_tid;
1.1.2.2 misho 17:
1.1.2.4 misho 18: /* client network settings */
19: int sess_sock;
20: u_short sess_ka;
21: /* client send retry in miliseconds, if client not receive message */
22: u_int sess_retry;
23: /* message work buffer */
24: mqtt_msg_t *sess_buf;
25:
26: /* authentication user info */
27: char sess_cid[MAX_CONNID];
28: char sess_user[MAX_CRED];
29: char sess_pass[MAX_CRED];
30: char sess_addr[64];
1.1.2.2 misho 31:
1.1.2.4 misho 32: /* connect flags */
33: char sess_clean;
1.1.2.2 misho 34: struct {
1.1.2.4 misho 35: char flag;
36: char qos;
37: char retain;
38: char *topic;
39: char *msg;
1.1.2.2 misho 40: } sess_will;
41:
1.1.2.4 misho 42: /* Data Storage by QoS class */
1.1.2.6 ! misho 43: SLIST_HEAD(qosStore, tagStore) sess_sndqueue;
1.1.2.4 misho 44:
45: TAILQ_ENTRY(tagSession) sess_node;
1.1.2.2 misho 46: };
47: typedef TAILQ_HEAD(, tagSession) sessions_t;
48:
1.1.2.1 misho 49:
1.1.2.3 misho 50: extern sessions_t Sessions;
1.1.2.4 misho 51: extern sched_root_task_t *root;
52: extern sl_config cfg;
1.1.2.6 ! misho 53: extern pthread_mutex_t mtx_sess, mtx_pub;
1.1.2.3 misho 54:
55:
1.1.2.1 misho 56: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>