Annotation of mqtt/inc/mqttd.h, revision 1.2.2.11
1.2 misho 1: #ifndef __MQTTD_H
2: #define __MQTTD_H
3:
4:
1.2.2.7 misho 5: #define API_SERVER_SIDE
6: #include <mqttapi.h>
7:
8:
1.2 misho 9: struct tagStore {
10: u_short st_msgid;
11:
12: mqtt_subscr_t st_subscr;
13:
1.2.2.4 misho 14: SLIST_ENTRY(tagStore) st_node;
1.2 misho 15: };
16:
17: struct tagSession {
1.2.2.1 misho 18: /* server dispatcher */
19: mqtt_srv_t *sess_srv;
1.2 misho 20:
21: /* client network settings */
22: int sess_sock;
23: u_short sess_ka;
24: /* client send retry in miliseconds, if client not receive message */
25: u_int sess_retry;
26: /* message work buffer */
27: mqtt_msg_t *sess_buf;
28:
29: /* authentication user info */
30: char sess_cid[MAX_CONNID];
31: char sess_user[MAX_CRED];
32: char sess_pass[MAX_CRED];
33: char sess_addr[64];
34:
35: /* connect flags */
36: char sess_clean;
37: struct {
38: char flag;
39: char qos;
40: char retain;
41: char *topic;
42: char *msg;
43: } sess_will;
44:
1.2.2.6 misho 45: /* session subscriptions */
46: SLIST_HEAD(tStore, tagStore) sess_subscr;
47:
1.2 misho 48: TAILQ_ENTRY(tagSession) sess_node;
49: };
50: typedef TAILQ_HEAD(, tagSession) sessions_t;
1.2.2.5 misho 51:
1.2 misho 52:
53: extern sessions_t Sessions;
54: extern sched_root_task_t *root;
1.2.2.3 misho 55: extern cfg_root_t cfg;
1.2 misho 56:
57:
1.2.2.9 misho 58: /* function prototypes */
59: void *startSession(sched_task_t *task);
60:
61:
1.2 misho 62: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>