1
6
7
8
9
10
11
12
13
14
15
17
18
19
20
21
26
27
28
29
30
32
33
34
35
36
37
38
39
40
47
48
50
51
52
54
55
56
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/* ... */
#pragma once
#include <sys/queue.h>
#include <protocomm_security.h>
#include <esp_err.h>
#define PROTOCOMM_NO_SESSION_ID UINT32_MAX
/* ... */
#define REQ_EP (1 << 0)
#define SEC_EP (1 << 1)
#define VER_EP (1 << 2)
/* ... */
typedef struct protocomm_ep {
const char *ep_name;
protocomm_req_handler_t req_handler;
/* ... */
void *priv_data;
uint32_t flag;
SLIST_ENTRY(protocomm_ep) next;
}{ ... } protocomm_ep_t;
/* ... */
struct protocomm {
/* ... */
int (*add_endpoint)(const char *ep_name, protocomm_req_handler_t h, void *priv_data);
/* ... */
int (*remove_endpoint)(const char *ep_name);
/* ... */
const protocomm_security_t *sec;
protocomm_security_handle_t sec_inst;
void *sec_params;
SLIST_HEAD(eptable_t, protocomm_ep) endpoints;
void* priv;
const char* ver;
}{ ... };