34 LWS_SYSBLOB_TYPE_AUTH,
35 LWS_SYSBLOB_TYPE_CLIENT_CERT_DER = LWS_SYSBLOB_TYPE_AUTH + 2,
36 LWS_SYSBLOB_TYPE_CLIENT_KEY_DER,
37 LWS_SYSBLOB_TYPE_DEVICE_SERIAL,
38 LWS_SYSBLOB_TYPE_DEVICE_FW_VERSION,
39 LWS_SYSBLOB_TYPE_DEVICE_TYPE,
40 LWS_SYSBLOB_TYPE_NTP_SERVER,
41 LWS_SYSBLOB_TYPE_MQTT_CLIENT_ID,
42 LWS_SYSBLOB_TYPE_MQTT_USERNAME,
43 LWS_SYSBLOB_TYPE_MQTT_PASSWORD,
45 #if defined(LWS_WITH_SECURE_STREAMS_AUTH_SIGV4)
47 LWS_SYSBLOB_TYPE_EXT_AUTH1,
48 LWS_SYSBLOB_TYPE_EXT_AUTH2 = LWS_SYSBLOB_TYPE_EXT_AUTH1 + 2,
49 LWS_SYSBLOB_TYPE_EXT_AUTH3 = LWS_SYSBLOB_TYPE_EXT_AUTH2 + 2,
50 LWS_SYSBLOB_TYPE_EXT_AUTH4 = LWS_SYSBLOB_TYPE_EXT_AUTH3 + 2,
51 LWS_SYSBLOB_TYPE_EXT_AUTH4_1,
54 LWS_SYSBLOB_TYPE_COUNT
55 } lws_system_blob_item_t;
63 typedef struct lws_system_blob lws_system_blob_t;
65 LWS_EXTERN LWS_VISIBLE
void
66 lws_system_blob_direct_set(lws_system_blob_t *b,
const uint8_t *ptr,
size_t len);
68 LWS_EXTERN LWS_VISIBLE
void
69 lws_system_blob_heap_empty(lws_system_blob_t *b);
71 LWS_EXTERN LWS_VISIBLE
int
72 lws_system_blob_heap_append(lws_system_blob_t *b,
const uint8_t *ptr,
size_t len);
74 LWS_EXTERN LWS_VISIBLE
size_t
75 lws_system_blob_get_size(lws_system_blob_t *b);
78 LWS_EXTERN LWS_VISIBLE
int
79 lws_system_blob_get_single_ptr(lws_system_blob_t *b,
const uint8_t **ptr);
81 LWS_EXTERN LWS_VISIBLE
int
82 lws_system_blob_get(lws_system_blob_t *b, uint8_t *ptr,
size_t *len,
size_t ofs);
84 LWS_EXTERN LWS_VISIBLE
void
85 lws_system_blob_destroy(lws_system_blob_t *b);
92 LWS_EXTERN LWS_VISIBLE lws_system_blob_t *
93 lws_system_get_blob(
struct lws_context *context, lws_system_blob_item_t type,
108 LWS_SYSTATE_CONTEXT_CREATED,
109 LWS_SYSTATE_INITIALIZED,
111 LWS_SYSTATE_IFACE_COLDPLUG,
113 LWS_SYSTATE_CPD_PRE_TIME,
120 LWS_SYSTATE_TIME_VALID,
123 LWS_SYSTATE_CPD_POST_TIME,
131 LWS_SYSTATE_POLICY_VALID,
132 LWS_SYSTATE_REGISTERED,
136 LWS_SYSTATE_OPERATIONAL,
138 LWS_SYSTATE_POLICY_INVALID,
142 LWS_SYSTATE_CONTEXT_DESTROYING,
143 } lws_system_states_t;
151 LWS_CPD_CAPTIVE_PORTAL,
155 typedef void (*lws_attach_cb_t)(
struct lws_context *context,
int tsi,
void *opaque);
156 struct lws_attach_item;
158 LWS_EXTERN LWS_VISIBLE
int
159 lws_tls_jit_trust_got_cert_cb(
struct lws_context *cx,
void *got_opaque,
160 const uint8_t *skid,
size_t skid_len,
161 const uint8_t *der,
size_t der_len);
165 int (*set_clock)(lws_usec_t us);
166 int (*
attach)(
struct lws_context *context,
int tsi, lws_attach_cb_t cb,
167 lws_system_states_t state,
void *opaque,
168 struct lws_attach_item **get);
196 size_t skid_len,
void *got_opaque);
209 #if defined(LWS_WITH_SYS_STATE)
219 LWS_EXTERN LWS_VISIBLE lws_state_manager_t *
220 lws_system_get_state_manager(
struct lws_context *context);
226 #define LWSSYSGAUTH_HEX (1 << 0)
237 lws_system_get_ops(
struct lws_context *context);
239 #if defined(LWS_WITH_SYS_STATE)
249 LWS_EXTERN LWS_VISIBLE
struct lws_context *
250 lws_system_context_from_system_mgr(lws_state_manager_t *mgr);
285 LWS_EXTERN LWS_VISIBLE
int
286 __lws_system_attach(
struct lws_context *context,
int tsi, lws_attach_cb_t cb,
287 lws_system_states_t state,
void *opaque,
288 struct lws_attach_item **get);
292 LWSDH_IPV4_SUBNET_MASK = 0,
293 LWSDH_IPV4_BROADCAST,
295 LWSDH_REBINDING_SECS,
301 LWSDH_SA46_DNS_SRV_1,
302 LWSDH_SA46_DNS_SRV_2,
303 LWSDH_SA46_DNS_SRV_3,
304 LWSDH_SA46_DNS_SRV_4,
305 LWSDH_SA46_IPV4_ROUTER,
306 LWSDH_SA46_NTP_SERVER,
307 LWSDH_SA46_DHCP_SERVER,
316 uint32_t nums[_LWSDH_NUMS_COUNT];
334 LWS_EXTERN LWS_VISIBLE
int
335 lws_dhcpc_request(
struct lws_context *c,
const char *i,
int af, dhcpc_cb_t cb,
346 LWS_EXTERN LWS_VISIBLE
int
347 lws_dhcpc_remove(
struct lws_context *context,
const char *iface);
358 LWS_EXTERN LWS_VISIBLE
int
359 lws_dhcpc_status(
struct lws_context *context,
lws_sockaddr46 *sa46);
370 LWS_EXTERN LWS_VISIBLE
int
371 lws_system_cpd_start(
struct lws_context *context);
373 LWS_EXTERN LWS_VISIBLE
void
374 lws_system_cpd_start_defer(
struct lws_context *cx, lws_usec_t defer_us);
386 LWS_EXTERN LWS_VISIBLE
void
387 lws_system_cpd_set(
struct lws_context *context, lws_cpd_result_t result);
398 LWS_EXTERN LWS_VISIBLE lws_cpd_result_t
399 lws_system_cpd_state_get(
struct lws_context *context);
Definition: lws-system.h:312
Definition: lws-system.h:163
int(* metric_report)(lws_metric_pub_t *mdata)
Definition: lws-system.h:190
int(* attach)(struct lws_context *context, int tsi, lws_attach_cb_t cb, lws_system_states_t state, void *opaque, struct lws_attach_item **get)
Definition: lws-system.h:166
int(* jit_trust_query)(struct lws_context *cx, const uint8_t *skid, size_t skid_len, void *got_opaque)
Definition: lws-system.h:195
int(* captive_portal_detect_request)(struct lws_context *context)
Definition: lws-system.h:183
uint32_t wake_latency_us
Definition: lws-system.h:204
Definition: lws-adopt.h:86