Annotation of mqtt/inc/mqttd.h, revision 1.2.2.12
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:
1.2.2.12! misho 17: struct tagPkt {
! 18: ait_val_t *pkt_data;
! 19:
! 20: SLIST_ENTRY(tagPkt) pkt_node;
! 21: };
! 22:
1.2 misho 23: struct tagSession {
1.2.2.1 misho 24: /* server dispatcher */
25: mqtt_srv_t *sess_srv;
1.2 misho 26:
27: /* client network settings */
28: int sess_sock;
29: u_short sess_ka;
30: /* client send retry in miliseconds, if client not receive message */
31: u_int sess_retry;
32: /* message work buffer */
33: mqtt_msg_t *sess_buf;
34:
35: /* authentication user info */
36: char sess_cid[MAX_CONNID];
37: char sess_user[MAX_CRED];
38: char sess_pass[MAX_CRED];
39: char sess_addr[64];
40:
41: /* connect flags */
42: char sess_clean;
43: struct {
44: char flag;
45: char qos;
46: char retain;
47: char *topic;
48: char *msg;
49: } sess_will;
50:
1.2.2.12! misho 51: /* session subscriptions & send pubs */
1.2.2.6 misho 52: SLIST_HEAD(tStore, tagStore) sess_subscr;
1.2.2.12! misho 53: SLIST_HEAD(tPkt, tagPkt) sess_sndpkt;
1.2.2.6 misho 54:
1.2 misho 55: TAILQ_ENTRY(tagSession) sess_node;
56: };
57: typedef TAILQ_HEAD(, tagSession) sessions_t;
1.2.2.5 misho 58:
1.2 misho 59:
60: extern sessions_t Sessions;
61: extern sched_root_task_t *root;
1.2.2.3 misho 62: extern cfg_root_t cfg;
1.2 misho 63:
64:
1.2.2.9 misho 65: /* function prototypes */
66: void *startSession(sched_task_t *task);
67:
68:
1.2 misho 69: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>