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>
57 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
70 LWS_VISIBLE LWS_EXTERN
size_t
88 LWS_VISIBLE LWS_EXTERN
size_t
98 LWS_VISIBLE LWS_EXTERN
size_t
112 LWS_VISIBLE LWS_EXTERN
int
132 LWS_VISIBLE LWS_EXTERN
int
153 LWS_VISIBLE LWS_EXTERN
int
155 size_t len,
char *frag_first,
char *frag_fin);
165 LWS_VISIBLE LWS_EXTERN
void
178 LWS_VISIBLE LWS_EXTERN
void
190 #define lws_ptr_diff(head, tail) \
191 ((int)((char *)(head) - (char *)(tail)))
193 #define lws_ptr_diff_size_t(head, tail) \
194 ((size_t)(ssize_t)((char *)(head) - (char *)(tail)))
207 LWS_VISIBLE LWS_EXTERN
int
208 lws_snprintf(
char *str,
size_t size,
const char *format, ...) LWS_FORMAT(3);
220 LWS_VISIBLE LWS_EXTERN
char *
227 #define lws_strnncpy(dest, src, size1, destsize) \
228 lws_strncpy(dest, src, (size_t)(size1 + 1) < (size_t)(destsize) ? \
229 (size_t)(size1 + 1) : (size_t)(destsize))
244 LWS_VISIBLE LWS_EXTERN
const char *
245 lws_nstrstr(
const char *buf,
size_t len,
const char *name,
size_t nl);
269 LWS_VISIBLE LWS_EXTERN
const char *
289 LWS_VISIBLE LWS_EXTERN
int
309 LWS_VISIBLE LWS_EXTERN
int
323 LWS_VISIBLE LWS_EXTERN
void
339 LWS_VISIBLE LWS_EXTERN
int
355 LWS_VISIBLE LWS_EXTERN
int
356 lws_timingsafe_bcmp(
const void *a,
const void *b, uint32_t len);
368 LWS_VISIBLE LWS_EXTERN
size_t
377 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
384 LWS_VISIBLE LWS_EXTERN
const char * LWS_WARN_UNUSED_RESULT
393 LWS_VISIBLE LWS_EXTERN
void *
402 LWS_VISIBLE LWS_EXTERN
int
415 LWS_VISIBLE LWS_EXTERN
void
440 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
460 LWS_VISIBLE LWS_EXTERN
const char *
475 LWS_VISIBLE LWS_EXTERN
void
482 LWS_VISIBLE LWS_EXTERN
unsigned long
488 LWS_VISIBLE LWS_EXTERN lws_usec_t
500 LWS_VISIBLE LWS_EXTERN
struct lws_context * LWS_WARN_UNUSED_RESULT
512 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
524 LWS_VISIBLE LWS_EXTERN
int LWS_WARN_UNUSED_RESULT
534 LWS_VISIBLE LWS_EXTERN
struct lws * LWS_WARN_UNUSED_RESULT
543 LWS_VISIBLE LWS_EXTERN
struct lws * LWS_WARN_UNUSED_RESULT
558 LWS_VISIBLE LWS_EXTERN
void
568 LWS_VISIBLE LWS_EXTERN
const struct lws_udp * LWS_WARN_UNUSED_RESULT
571 LWS_VISIBLE LWS_EXTERN
void *
572 lws_get_opaque_parent_data(
const struct lws *wsi);
574 LWS_VISIBLE LWS_EXTERN
void
575 lws_set_opaque_parent_data(
struct lws *wsi,
void *data);
577 LWS_VISIBLE LWS_EXTERN
void *
578 lws_get_opaque_user_data(
const struct lws *wsi);
580 LWS_VISIBLE LWS_EXTERN
void
581 lws_set_opaque_user_data(
struct lws *wsi,
void *data);
583 LWS_VISIBLE LWS_EXTERN
int
584 lws_get_child_pending_on_writable(
const struct lws *wsi);
586 LWS_VISIBLE LWS_EXTERN
void
587 lws_clear_child_pending_on_writable(
struct lws *wsi);
589 LWS_VISIBLE LWS_EXTERN
int
590 lws_get_close_length(
struct lws *wsi);
592 LWS_VISIBLE LWS_EXTERN
unsigned char *
593 lws_get_close_payload(
struct lws *wsi);
605 LWS_VISIBLE LWS_EXTERN
615 LWS_VISIBLE LWS_EXTERN
void
623 LWS_RXFLOW_REASON_USER_BOOL = (1 << 0),
624 LWS_RXFLOW_REASON_HTTP_RXBUFFER = (1 << 6),
625 LWS_RXFLOW_REASON_H2_PPS_PENDING = (1 << 7),
627 LWS_RXFLOW_REASON_APPLIES = (1 << 14),
628 LWS_RXFLOW_REASON_APPLIES_ENABLE_BIT = (1 << 13),
629 LWS_RXFLOW_REASON_APPLIES_ENABLE = LWS_RXFLOW_REASON_APPLIES |
630 LWS_RXFLOW_REASON_APPLIES_ENABLE_BIT,
631 LWS_RXFLOW_REASON_APPLIES_DISABLE = LWS_RXFLOW_REASON_APPLIES,
632 LWS_RXFLOW_REASON_FLAG_PROCESS_NOW = (1 << 12),
655 LWS_VISIBLE LWS_EXTERN
int
667 LWS_VISIBLE LWS_EXTERN
void
690 LWS_VISIBLE LWS_EXTERN
size_t
693 #if defined(LWS_WITH_DIR)
704 } lws_dir_obj_type_t;
706 struct lws_dir_entry {
708 lws_dir_obj_type_t type;
712 lws_dir_callback_function(
const char *dirpath,
void *user,
713 struct lws_dir_entry *lde);
727 LWS_VISIBLE LWS_EXTERN
int
728 lws_dir(
const char *dirpath,
void *user, lws_dir_callback_function cb);
741 LWS_VISIBLE LWS_EXTERN
int
742 lws_dir_rm_rf_cb(
const char *dirpath,
void *user,
struct lws_dir_entry *lde);
751 typedef int (*lws_dir_glob_cb_t)(
void *data,
const char *path);
753 typedef struct lws_dir_glob {
755 lws_dir_glob_cb_t cb;
773 LWS_VISIBLE LWS_EXTERN
int
774 lws_dir_glob_cb(
const char *dirpath,
void *user,
struct lws_dir_entry *lde);
801 LWS_VISIBLE LWS_EXTERN
int
810 LWS_VISIBLE LWS_EXTERN
int
817 LWS_VISIBLE LWS_EXTERN
int
834 LWS_VISIBLE LWS_EXTERN
int
836 const uint8_t *skid,
size_t skid_len,
837 const uint8_t **prpder,
size_t *prder_len);
849 LWS_VISIBLE LWS_EXTERN
int
862 #if defined(LWS_WITH_TLS) && !defined(LWS_WITH_MBEDTLS)
869 LWS_VISIBLE LWS_EXTERN SSL*
870 lws_get_ssl(
struct lws *wsi);
873 LWS_VISIBLE LWS_EXTERN
void
874 lws_explicit_bzero(
void *p,
size_t len);
906 LWS_VISIBLE LWS_EXTERN
int
910 LWS_VISIBLE LWS_EXTERN
void
911 lws_ser_wu16be(uint8_t *b, uint16_t u);
913 LWS_VISIBLE LWS_EXTERN
void
914 lws_ser_wu32be(uint8_t *b, uint32_t u32);
916 LWS_VISIBLE LWS_EXTERN
void
917 lws_ser_wu64be(uint8_t *b, uint64_t u64);
919 LWS_VISIBLE LWS_EXTERN uint16_t
920 lws_ser_ru16be(
const uint8_t *b);
922 LWS_VISIBLE LWS_EXTERN uint32_t
923 lws_ser_ru32be(
const uint8_t *b);
925 LWS_VISIBLE LWS_EXTERN uint64_t
926 lws_ser_ru64be(
const uint8_t *b);
928 LWS_VISIBLE LWS_EXTERN
int
929 lws_vbi_encode(uint64_t value,
void *buf);
931 LWS_VISIBLE LWS_EXTERN
int
932 lws_vbi_decode(
const void *buf, uint64_t *value,
size_t len);
936 #if defined(LWS_WITH_SPAWN)
939 struct lws_spawn_piped;
942 struct _lws_siginfo_t {
945 typedef struct _lws_siginfo_t siginfo_t;
948 typedef void (*lsp_cb_t)(
void *opaque, lws_usec_t *accounting, siginfo_t *si,
969 struct lws_spawn_piped_info {
971 struct lws_vhost *vh;
972 struct lws *opt_parent;
974 const char *
const *exec_array;
975 const char **env_array;
976 const char *protocol_name;
977 const char *chroot_path;
980 struct lws_spawn_piped **plsp;
986 lws_usec_t timeout_us;
990 const struct lws_role_ops *ops;
992 uint8_t disable_ctrlc;
1016 LWS_VISIBLE LWS_EXTERN
struct lws_spawn_piped *
1017 lws_spawn_piped(
const struct lws_spawn_piped_info *lspi);
1026 LWS_VISIBLE LWS_EXTERN
int
1027 lws_spawn_piped_kill_child_process(
struct lws_spawn_piped *lsp);
1042 LWS_VISIBLE LWS_EXTERN
void
1043 lws_spawn_stdwsi_closed(
struct lws_spawn_piped *lsp,
struct lws *wsi);
1055 LWS_VISIBLE LWS_EXTERN
int
1056 lws_spawn_get_stdfd(
struct lws *wsi);
1061 const char *layers_path;
1062 const char *overlay_path;
1068 #if defined(__linux__)
1069 const char *layers[4];
1106 LWS_VISIBLE LWS_EXTERN
int
1121 LWS_VISIBLE LWS_EXTERN
int
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 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 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 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 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 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 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 void lws_set_wsi_user(struct lws *wsi, void *user)
LWS_VISIBLE LWS_EXTERN size_t lws_buflist_use_segment(struct lws_buflist **head, size_t len)
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 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 int lws_json_simple_strcmp(const char *buf, size_t len, const char *name, const char *comp)
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_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_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_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)
Definition: lws-context-vhost.h:271
Definition: lws-dll2.h:203
Definition: lws-misc.h:1060
Definition: lws-misc.h:876
Definition: lws-protocols-plugins.h:44
Definition: lws-misc.h:852