25 #if defined(LWS_WITH_SPAWN)
27 #if defined(WIN32) || defined(_WIN32)
30 #include <sys/times.h>
34 #if defined(__OpenBSD__)
35 #include <sys/siginfo.h>
155 size_t len,
char *frag_first,
char *frag_fin);
204 struct lws_ss_handle;
209 struct lws_ss_handle *
h;
210 struct lws_buflist *
bl;
250 #define lws_ptr_diff(head, tail) \
251 ((int)((char *)(head) - (char *)(tail)))
253 #define lws_ptr_diff_size_t(head, tail) \
254 ((size_t)(ssize_t)((char *)(head) - (char *)(tail)))
287 #define lws_strnncpy(dest, src, size1, destsize) \
288 lws_strncpy(dest, src, (size_t)(size1 + 1) < (size_t)(destsize) ? \
289 (size_t)(size1 + 1) : (size_t)(destsize))
305 lws_nstrstr(
const char *buf,
size_t len,
const char *name,
size_t nl);
774 #if defined(LWS_WITH_DIR)
785 } lws_dir_obj_type_t;
787 struct lws_dir_entry {
789 lws_dir_obj_type_t type;
793 lws_dir_callback_function(
const char *dirpath,
void *user,
794 struct lws_dir_entry *lde);
809 lws_dir(
const char *dirpath,
void *user, lws_dir_callback_function cb);
823 lws_dir_rm_rf_cb(
const char *dirpath,
void *user,
struct lws_dir_entry *lde);
832 typedef int (*lws_dir_glob_cb_t)(
void *data,
const char *path);
834 typedef struct lws_dir_glob {
836 lws_dir_glob_cb_t cb;
855 lws_dir_glob_cb(
const char *dirpath,
void *user,
struct lws_dir_entry *lde);
917 const uint8_t *skid,
size_t skid_len,
918 const uint8_t **prpder,
size_t *prder_len);
943 #if defined(LWS_WITH_TLS) && !defined(LWS_WITH_MBEDTLS)
951 lws_get_ssl(
struct lws *wsi);
970 #define lws_assert_fourcc(_a, _b) do { } while (0);
1024 #if defined(LWS_WITH_SPAWN)
1027 struct lws_spawn_piped;
1030 struct _lws_siginfo_t {
1033 typedef struct _lws_siginfo_t siginfo_t;
1036 typedef void (*lsp_cb_t)(
void *opaque,
lws_usec_t *accounting, siginfo_t *si,
1057 struct lws_spawn_piped_info {
1059 struct lws_vhost *vh;
1060 struct lws *opt_parent;
1062 const char *
const *exec_array;
1063 const char **env_array;
1064 const char *protocol_name;
1065 const char *chroot_path;
1068 struct lws_spawn_piped **plsp;
1078 const struct lws_role_ops *ops;
1105 lws_spawn_piped(
const struct lws_spawn_piped_info *lspi);
1115 lws_spawn_piped_kill_child_process(
struct lws_spawn_piped *lsp);
1131 lws_spawn_stdwsi_closed(
struct lws_spawn_piped *lsp,
struct lws *wsi);
1144 lws_spawn_get_stdfd(
struct lws *wsi);
1156 #if defined(__linux__)
1157 const char *layers[4];
1212 #define LWS_MINILEX_FAIL -1
1213 #define LWS_MINILEX_CONTINUE 0
1214 #define LWS_MINILEX_MATCH 1
struct lws_wifi_scan * next
LWS_VISIBLE LWS_EXTERN void * lws_get_opaque_user_data(const struct lws *wsi)
LWS_VISIBLE LWS_EXTERN void lws_cmdline_option_handle_builtin(int argc, const char **argv, struct lws_context_creation_info *info)
LWS_VISIBLE LWS_EXTERN int lws_hex_to_byte_array(const char *h, uint8_t *dest, int max)
LWS_VISIBLE LWS_EXTERN struct lws_context *LWS_WARN_UNUSED_RESULT lws_get_context(const struct lws *wsi)
LWS_VISIBLE const lws_humanize_unit_t humanize_schema_si_bytes[7]
LWS_VISIBLE LWS_EXTERN void lws_buflist_describe(struct lws_buflist **head, void *id, const char *reason)
LWS_VISIBLE LWS_EXTERN int lws_open(const char *__file, int __oflag,...)
LWS_VISIBLE LWS_EXTERN int lws_wsi_tsi(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN uint16_t lws_ser_ru16be(const uint8_t *b)
LWS_VISIBLE LWS_EXTERN const char * lws_nstrstr(const char *buf, size_t len, const char *name, size_t nl)
LWS_VISIBLE LWS_EXTERN lws_usec_t lws_now_usecs(void)
LWS_VISIBLE LWS_EXTERN void lws_explicit_bzero(void *p, size_t len)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_parse_uri(char *p, const char **prot, const char **ads, int *port, const char **path)
LWS_VISIBLE LWS_EXTERN int lws_snprintf(char *str, size_t size, const char *format,...) LWS_FORMAT(3)
LWS_VISIBLE LWS_EXTERN char * lws_strncpy(char *dest, const char *src, size_t size)
LWS_VISIBLE LWS_EXTERN void lws_get_effective_uid_gid(struct lws_context *context, uid_t *uid, gid_t *gid)
LWS_VISIBLE LWS_EXTERN int lws_is_ssl(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN void lws_clear_child_pending_on_writable(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN unsigned long lws_now_secs(void)
LWS_VISIBLE LWS_EXTERN size_t lws_get_random(struct lws_context *context, void *buf, size_t len)
LWS_VISIBLE LWS_EXTERN int lws_buflist_linear_copy(struct lws_buflist **head, size_t ofs, uint8_t *buf, size_t len)
LWS_VISIBLE LWS_EXTERN int lws_is_cgi(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_hex_len_to_byte_array(const char *h, size_t hlen, uint8_t *dest, int max)
LWS_VISIBLE LWS_EXTERN const struct lws_udp *LWS_WARN_UNUSED_RESULT lws_get_udp(const struct lws *wsi)
LWS_VISIBLE LWS_EXTERN void lws_rx_flow_allow_all_protocol(const struct lws_context *context, const struct lws_protocols *protocol)
LWS_VISIBLE LWS_EXTERN size_t lws_buflist_next_segment_len(struct lws_buflist **head, uint8_t **buf)
size_t lws_get_allocated_heap(void)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_get_count_threads(struct lws_context *context)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_get_vhost_listen_port(struct lws_vhost *vhost)
LWS_VISIBLE LWS_EXTERN size_t lws_remaining_packet_payload(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_humanize(char *buf, size_t len, uint64_t value, const lws_humanize_unit_t *schema)
LWS_VISIBLE LWS_EXTERN void lws_set_opaque_user_data(struct lws *wsi, void *data)
#define lws_assert_fourcc(_a, _b)
LWS_VISIBLE LWS_EXTERN uint32_t lws_ser_ru32be(const uint8_t *b)
LWS_VISIBLE LWS_EXTERN const char * lws_cmdline_option(int argc, const char **argv, const char *val)
LWS_VISIBLE LWS_EXTERN size_t lws_buflist_total_len(struct lws_buflist **head)
LWS_VISIBLE LWS_EXTERN struct lws *LWS_WARN_UNUSED_RESULT lws_get_parent(const struct lws *wsi)
LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_flow_feed(lws_flow_t *flow)
LWS_VISIBLE LWS_EXTERN void lws_ser_wu16be(uint8_t *b, uint16_t u)
LWS_VISIBLE LWS_EXTERN void lws_set_wsi_user(struct lws *wsi, void *user)
LWS_VISIBLE LWS_EXTERN lws_stateful_ret_t lws_flow_req(lws_flow_t *flow)
LWS_VISIBLE LWS_EXTERN size_t lws_buflist_use_segment(struct lws_buflist **head, size_t len)
struct lws_flow lws_flow_t
LWS_VISIBLE LWS_EXTERN void * lws_get_opaque_parent_data(const struct lws *wsi)
LWS_VISIBLE const lws_humanize_unit_t humanize_schema_us[8]
LWS_VISIBLE LWS_EXTERN struct lws * lws_get_network_wsi(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_buflist_append_segment(struct lws_buflist **head, const uint8_t *buf, size_t len)
LWS_VISIBLE LWS_EXTERN void * lws_wsi_user(struct lws *wsi)
LWS_VISIBLE const lws_humanize_unit_t humanize_schema_si[7]
LWS_VISIBLE LWS_EXTERN int lws_get_child_pending_on_writable(const struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_get_close_length(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_tls_jit_trust_blob_queury_skid(const void *_blob, size_t blen, const uint8_t *skid, size_t skid_len, const uint8_t **prpder, size_t *prder_len)
LWS_VISIBLE LWS_EXTERN void lws_set_opaque_parent_data(struct lws *wsi, void *data)
LWS_VISIBLE LWS_EXTERN int lws_json_simple_strcmp(const char *buf, size_t len, const char *name, const char *comp)
LWS_VISIBLE LWS_EXTERN unsigned char * lws_get_close_payload(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_vbi_encode(uint64_t value, void *buf)
LWS_VISIBLE LWS_EXTERN uint64_t lws_ser_ru64be(const uint8_t *b)
LWS_VISIBLE LWS_EXTERN int lws_get_tsi(struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_buflist_linear_use(struct lws_buflist **head, uint8_t *buf, size_t len)
LWS_VISIBLE LWS_EXTERN const char *LWS_WARN_UNUSED_RESULT lws_get_library_version(void)
LWS_VISIBLE LWS_EXTERN struct lws *LWS_WARN_UNUSED_RESULT lws_get_child(const struct lws *wsi)
LWS_VISIBLE LWS_EXTERN int lws_vbi_decode(const void *buf, uint64_t *value, size_t len)
LWS_VISIBLE LWS_EXTERN void lws_ser_wu64be(uint8_t *b, uint64_t u64)
LWS_VISIBLE LWS_EXTERN int LWS_WARN_UNUSED_RESULT lws_daemonize(const char *_lock_path)
LWS_VISIBLE LWS_EXTERN const char * lws_json_simple_find(const char *buf, size_t len, const char *name, size_t *alen)
LWS_VISIBLE LWS_EXTERN void lws_hex_from_byte_array(const uint8_t *src, size_t slen, char *dest, size_t len)
LWS_VISIBLE LWS_EXTERN void lws_ser_wu32be(uint8_t *b, uint32_t u32)
LWS_VISIBLE LWS_EXTERN void lws_set_allocator(void *(*realloc)(void *ptr, size_t size, const char *reason))
LWS_VISIBLE LWS_EXTERN int lws_buflist_fragment_use(struct lws_buflist **head, uint8_t *buf, size_t len, char *frag_first, char *frag_fin)
LWS_VISIBLE LWS_EXTERN int lws_rx_flow_control(struct lws *wsi, int enable)
LWS_VISIBLE LWS_EXTERN int lws_timingsafe_bcmp(const void *a, const void *b, uint32_t len)
struct lws_humanize_unit lws_humanize_unit_t
LWS_VISIBLE LWS_EXTERN int lws_hex_random(struct lws_context *context, char *dest, size_t len)
LWS_VISIBLE LWS_EXTERN void lws_buflist_destroy_all_segments(struct lws_buflist **head)
@ LWS_RXFLOW_REASON_APPLIES_DISABLE
@ LWS_RXFLOW_REASON_APPLIES
@ LWS_RXFLOW_REASON_USER_BOOL
@ LWS_RXFLOW_REASON_APPLIES_ENABLE_BIT
@ LWS_RXFLOW_REASON_APPLIES_ENABLE
@ LWS_RXFLOW_REASON_FLAG_PROCESS_NOW
@ LWS_RXFLOW_REASON_HTTP_RXBUFFER
@ LWS_RXFLOW_REASON_H2_PPS_PENDING
@ LWSDLOFLOW_STATE_READ_COMPLETED
@ LWSDLOFLOW_STATE_READ_FAILED
#define LWS_FORMAT(string_index)
#define LWS_WARN_UNUSED_RESULT
LWS_VISIBLE LWS_EXTERN int lws_fsmount_mount(struct lws_fsmount *fsm)
LWS_VISIBLE LWS_EXTERN int lws_fsmount_unmount(struct lws_fsmount *fsm)
LWS_VISIBLE LWS_EXTERN unsigned int lws_sigbits(uintptr_t u)
LWS_VISIBLE LWS_EXTERN int lws_minilex_parse(const uint8_t *lex, int16_t *ps, const uint8_t c, int *match)
const char * overlay_path
LWS_VISIBLE LWS_EXTERN int lws_wol(struct lws_context *ctx, const char *ip_or_NULL, uint8_t *mac_6_bytes)