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_system_states_t;
150 LWS_CPD_CAPTIVE_PORTAL,
154 typedef void (*lws_attach_cb_t)(
struct lws_context *context,
int tsi,
void *opaque);
155 struct lws_attach_item;
157 LWS_EXTERN LWS_VISIBLE
int
158 lws_tls_jit_trust_got_cert_cb(
struct lws_context *cx,
void *got_opaque,
159 const uint8_t *skid,
size_t skid_len,
160 const uint8_t *der,
size_t der_len);
164 int (*set_clock)(lws_usec_t us);
165 int (*
attach)(
struct lws_context *context,
int tsi, lws_attach_cb_t cb,
166 lws_system_states_t state,
void *opaque,
167 struct lws_attach_item **get);
195 size_t skid_len,
void *got_opaque);
208 #if defined(LWS_WITH_SYS_STATE)
218 LWS_EXTERN LWS_VISIBLE lws_state_manager_t *
219 lws_system_get_state_manager(
struct lws_context *context);
225 #define LWSSYSGAUTH_HEX (1 << 0)
236 lws_system_get_ops(
struct lws_context *context);
238 #if defined(LWS_WITH_SYS_STATE)
248 LWS_EXTERN LWS_VISIBLE
struct lws_context *
249 lws_system_context_from_system_mgr(lws_state_manager_t *mgr);
284 LWS_EXTERN LWS_VISIBLE
int
285 __lws_system_attach(
struct lws_context *context,
int tsi, lws_attach_cb_t cb,
286 lws_system_states_t state,
void *opaque,
287 struct lws_attach_item **get);
291 LWSDH_IPV4_SUBNET_MASK = 0,
292 LWSDH_IPV4_BROADCAST,
294 LWSDH_REBINDING_SECS,
300 LWSDH_SA46_DNS_SRV_1,
301 LWSDH_SA46_DNS_SRV_2,
302 LWSDH_SA46_DNS_SRV_3,
303 LWSDH_SA46_DNS_SRV_4,
304 LWSDH_SA46_IPV4_ROUTER,
305 LWSDH_SA46_NTP_SERVER,
306 LWSDH_SA46_DHCP_SERVER,
315 uint32_t nums[_LWSDH_NUMS_COUNT];
333 LWS_EXTERN LWS_VISIBLE
int
334 lws_dhcpc_request(
struct lws_context *c,
const char *i,
int af, dhcpc_cb_t cb,
345 LWS_EXTERN LWS_VISIBLE
int
346 lws_dhcpc_remove(
struct lws_context *context,
const char *iface);
357 LWS_EXTERN LWS_VISIBLE
int
358 lws_dhcpc_status(
struct lws_context *context,
lws_sockaddr46 *sa46);
369 LWS_EXTERN LWS_VISIBLE
int
370 lws_system_cpd_start(
struct lws_context *context);
372 LWS_EXTERN LWS_VISIBLE
void
373 lws_system_cpd_start_defer(
struct lws_context *cx, lws_usec_t defer_us);
385 LWS_EXTERN LWS_VISIBLE
void
386 lws_system_cpd_set(
struct lws_context *context, lws_cpd_result_t result);
397 LWS_EXTERN LWS_VISIBLE lws_cpd_result_t
398 lws_system_cpd_state_get(
struct lws_context *context);
Definition: lws-system.h:311
Definition: lws-system.h:162
int(* metric_report)(lws_metric_pub_t *mdata)
Definition: lws-system.h:189
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:165
int(* jit_trust_query)(struct lws_context *cx, const uint8_t *skid, size_t skid_len, void *got_opaque)
Definition: lws-system.h:194
int(* captive_portal_detect_request)(struct lws_context *context)
Definition: lws-system.h:182
uint32_t wake_latency_us
Definition: lws-system.h:203
Definition: lws-adopt.h:86