25 #define LWS_SMD_MAX_PAYLOAD 384
26 #define LWS_SMD_CLASS_BITFIELD_BYTES 4
28 #define LWS_SMD_STREAMTYPENAME "_lws_smd"
29 #define LWS_SMD_SS_RX_HEADER_LEN 16
31 typedef uint32_t lws_smd_class_t;
41 LWSSMDCL_INTERACTION = (1 << 0),
46 LWSSMDCL_SYSTEM_STATE = (1 << 1),
50 LWSSMDCL_NETWORK = (1 << 2),
55 LWSSMDCL_METRICS = (1 << 3),
61 LWSSMDCL_USER_BASE_BITNUM = 24
85 LWS_VISIBLE LWS_EXTERN
void *
86 lws_smd_msg_alloc(
struct lws_context *ctx, lws_smd_class_t _class,
size_t len);
99 LWS_VISIBLE LWS_EXTERN
void
100 lws_smd_msg_free(
void **payload);
112 LWS_VISIBLE LWS_EXTERN
int
113 lws_smd_msg_send(
struct lws_context *ctx,
void *payload);
136 LWS_VISIBLE LWS_EXTERN
int
137 lws_smd_msg_printf(
struct lws_context *ctx, lws_smd_class_t _class,
138 const char *format, ...) LWS_FORMAT(3);
156 struct lws_ss_handle;
157 LWS_VISIBLE LWS_EXTERN
int
158 lws_smd_ss_msg_printf(const
char *tag, uint8_t *buf,
size_t *len,
159 lws_smd_class_t _class, const
char *format, ...)
179 LWS_VISIBLE LWS_EXTERN
int
180 lws_smd_ss_rx_forward(
void *ss_user, const uint8_t *buf,
size_t len);
182 LWS_VISIBLE LWS_EXTERN
int
183 lws_smd_sspc_rx_forward(
void *ss_user, const uint8_t *buf,
size_t len);
185 typedef
int (*lws_smd_notification_cb_t)(
void *opaque, lws_smd_class_t _class,
186 lws_usec_t timestamp,
void *buf,
189 #define LWSSMDREG_FLAG_PROXIED_SS (1 << 0)
209 LWS_VISIBLE LWS_EXTERN
struct lws_smd_peer *
210 lws_smd_register(
struct lws_context *ctx,
void *opaque,
int flags,
211 lws_smd_class_t _class_filter, lws_smd_notification_cb_t cb);
226 LWS_VISIBLE LWS_EXTERN
void
227 lws_smd_unregister(
struct lws_smd_peer *pr);