60 #define LWS_SS_MTU 1540
65 #if defined(STANDALONE)
66 #define lws_context lws_context_standalone
181 size_t len,
int flags);
190 #if defined(LWS_WITH_SECURE_STREAMS_BUFFER_DUMP)
191 typedef void (*lws_ss_buffer_dump_cb)(
void *userobj,
const uint8_t *buf,
192 size_t len,
int done);
206 #if defined(LWS_WITH_SECURE_STREAMS_CPP)
212 #if defined(LWS_WITH_SYS_FAULT_INJECTION)
227 #if defined(LWS_WITH_SECURE_STREAMS_BUFFER_DUMP)
228 lws_ss_buffer_dump_cb dump;
254 #define LWS_SS_USER_TYPEDEF \
256 struct lws_ss_handle *ss; \
259 #define LWS_SS_INFO(_streamtype, _type) \
260 const lws_ss_info_t ssi_##_type = { \
261 .handle_offset = offsetof(_type, ss), \
262 .opaque_user_data_offset = offsetof(_type, opaque_data), \
263 .user_alloc = sizeof(_type), \
264 .streamtype = _streamtype,
266 #define lws_ss_from_user(_u) (_u)->ss
267 #define lws_ss_opaque_from_user(_u) (_u)->opaque_data
268 #define lws_ss_cx_from_user(_u) lws_ss_get_context((_u)->ss)
270 #if defined(LWS_SS_USE_SSPC)
271 #define lws_context_info_defaults(_x, _y) _lws_context_info_defaults(_x, NULL)
273 #define lws_context_info_defaults(_x, _y) _lws_context_info_defaults(_x, _y)
314 void *opaque_user_data,
struct lws_ss_handle **ppss,
315 void *reserved,
const char **ppayload_fmt);
424 #define LWSSS_TIMEOUT_FROM_POLICY 0
510 const void *value,
size_t len);
526 const void *value,
size_t len);
557 const void **value,
size_t *len);
668 #if defined(LWS_WITH_SECURE_STREAMS_AUTH_SIGV4)
683 lws_ss_sigv4_set_aws_key(
struct lws_context* context,
uint8_t idx,
684 const char * keyid,
const char * key);
703 lws_aws_filesystem_credentials_helper(
const char *path,
const char *kid,
704 const char *ak,
char **aws_keyid,
708 #if defined(STANDALONE)
uint8_t sss_protocol_version
int manual_initial_tx_credit
size_t opaque_user_data_offset
LWS_VISIBLE LWS_EXTERN void lws_ss_destroy(struct lws_ss_handle **ppss)
LWS_VISIBLE LWS_EXTERN void lws_ss_change_handlers(struct lws_ss_handle *h, lws_sscb_rx rx, lws_sscb_tx tx, lws_sscb_state state)
LWS_VISIBLE LWS_EXTERN int lws_ss_add_peer_tx_credit(struct lws_ss_handle *h, int32_t add)
void(* lws_sssfec_cb)(struct lws_ss_handle *h, void *arg)
lws_ss_state_return_t(* lws_sscb_state)(void *userobj, void *h_src, lws_ss_constate_t state, lws_ss_tx_ordinal_t ack)
LWS_VISIBLE LWS_EXTERN lws_ss_state_return_t LWS_WARN_UNUSED_RESULT lws_ss_request_tx_len(struct lws_ss_handle *pss, unsigned long len)
LWS_VISIBLE LWS_EXTERN int lws_ss_proxy_create(struct lws_context *context, const char *bind, int port)
struct lws_ss_info lws_ss_info_t
LWS_VISIBLE LWS_EXTERN void lws_ss_start_timeout(struct lws_ss_handle *h, unsigned int timeout_ms)
LWS_VISIBLE LWS_EXTERN lws_ss_state_return_t LWS_WARN_UNUSED_RESULT lws_ss_client_connect(struct lws_ss_handle *h)
LWS_VISIBLE LWS_EXTERN lws_ss_state_return_t LWS_WARN_UNUSED_RESULT lws_ss_request_tx(struct lws_ss_handle *pss)
LWS_VISIBLE LWS_EXTERN struct lws_vhost * lws_ss_get_vhost(struct lws_ss_handle *h)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_ss_create(struct lws_context *context, int tsi, const lws_ss_info_t *ssi, void *opaque_user_data, struct lws_ss_handle **ppss, void *reserved, const char **ppayload_fmt)
LWS_VISIBLE LWS_EXTERN void * lws_ss_to_user_object(struct lws_ss_handle *h)
LWS_VISIBLE LWS_EXTERN int lws_ss_adopt_raw(struct lws_ss_handle *ss, lws_sock_file_fd_type fd)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_ss_alloc_set_metadata(struct lws_ss_handle *h, const char *name, const void *value, size_t len)
LWS_VISIBLE LWS_EXTERN void lws_ss_cancel_timeout(struct lws_ss_handle *h)
enum lws_ss_state_return lws_ss_state_return_t
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_ss_set_metadata(struct lws_ss_handle *h, const char *name, const void *value, size_t len)
LWS_VISIBLE LWS_EXTERN void lws_ss_server_foreach_client(struct lws_ss_handle *h, lws_sssfec_cb cb, void *arg)
LWS_VISIBLE LWS_EXTERN const char * lws_ss_tag(struct lws_ss_handle *h)
LWS_VISIBLE LWS_EXTERN const char * lws_ss_rideshare(struct lws_ss_handle *h)
LWS_VISIBLE LWS_EXTERN struct lws_context * lws_ss_get_context(struct lws_ss_handle *h)
LWS_VISIBLE LWS_EXTERN int lws_ss_get_est_peer_tx_credit(struct lws_ss_handle *h)
uint32_t lws_ss_tx_ordinal_t
lws_ss_state_return_t(* lws_sscb_tx)(void *userobj, lws_ss_tx_ordinal_t ord, uint8_t *buf, size_t *len, int *flags)
LWS_VISIBLE LWS_EXTERN const char * lws_ss_state_name(int state)
lws_ss_state_return_t(* lws_sscb_rx)(void *userobj, const uint8_t *buf, size_t len, int flags)
LWS_VISIBLE LWS_EXTERN void lws_ss_server_ack(struct lws_ss_handle *h, int nack)
LWS_VISIBLE LWS_EXTERN int lws_ss_get_metadata(struct lws_ss_handle *h, const char *name, const void **value, size_t *len)
@ LWSSS_FLAG_RELATED_START
@ LWSSSINFLAGS_REGISTER_SINK
@ LWSSSINFLAGS_ACCEPTED_SINK
@ LWSSSSRET_DISCONNECT_ME
@ LWSSSCS_QOS_NACK_REMOTE
@ LWSSSCS_EVENT_WAIT_CANCELLED
@ LWSSSCS_ALL_RETRIES_FAILED
@ LWSSSCS_UPSTREAM_LINK_RETRY
#define LWS_WARN_UNUSED_RESULT