1 /*
2 * libwebsockets - small server side websockets and web server implementation
3 *
4 * Copyright (C) 2010 - 2019 Andy Green <andy@warmcat.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 * IN THE SOFTWARE.
23 */
24
25 /** @file */
26
27 #ifndef LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
28 #define LIBWEBSOCKET_H_3060898B846849FF9F88F5DB59B5950C
29
30 #ifdef __cplusplus
31 #include <cstddef>
32 #include <cstdarg>
33
34 extern "C" {
35 #else
36 #include <stdarg.h>
37 #endif
38
39 #include <string.h>
40 #include <stdlib.h>
41
42 #include "lws_config.h"
43
44 #if defined(LWS_SUPPRESS_DEPRECATED_API_WARNINGS)
45 #define OPENSSL_USE_DEPRECATED
46 #endif
47
48 /* place for one-shot opaque forward references */
49
50 typedef struct lws_context * lws_ctx_t;
51 struct lws_sequencer;
52 struct lws_dsh;
53
54 /*
55 * CARE: everything using cmake defines needs to be below here
56 */
57
58 #define LWS_US_PER_SEC ((lws_usec_t)1000000)
59 #define LWS_MS_PER_SEC ((lws_usec_t)1000)
60 #define LWS_US_PER_MS ((lws_usec_t)1000)
61 #define LWS_NS_PER_US ((lws_usec_t)1000)
62
63 #define LWS_KI (1024)
64 #define LWS_MI (LWS_KI * 1024)
65 #define LWS_GI (LWS_MI * 1024)
66 #define LWS_TI ((uint64_t)LWS_GI * 1024)
67 #define LWS_PI ((uint64_t)LWS_TI * 1024)
68
69 #define LWS_US_TO_MS(x) ((x + (LWS_US_PER_MS / 2)) / LWS_US_PER_MS)
70
71 #if defined(LWS_HAS_INTPTR_T)
72 #include <stdint.h>
73 #define lws_intptr_t intptr_t
74 #else
75 typedef unsigned long long lws_intptr_t;
76 #endif
77
78 #if defined(WIN32) || defined(_WIN32)
79 #ifndef WIN32_LEAN_AND_MEAN
80 #define WIN32_LEAN_AND_MEAN
81 #endif
82
83 #include <winsock2.h>
84 #include <ws2tcpip.h>
85 #include <stddef.h>
86 #include <basetsd.h>
87 #include <io.h>
88 #ifndef _WIN32_WCE
89 #include <fcntl.h>
90 #else
91 #define _O_RDONLY 0x0000
92 #define O_RDONLY _O_RDONLY
93 #endif
94
95 typedef int uid_t;
96 typedef int gid_t;
97 typedef unsigned short sa_family_t;
98 #if !defined(LWS_HAVE_SUSECONDS_T)
99 typedef unsigned int useconds_t;
100 typedef int suseconds_t;
101 #endif
102
103 #define LWS_INLINE __inline
104 #define LWS_VISIBLE
105 #define LWS_WARN_UNUSED_RESULT
106 #define LWS_WARN_DEPRECATED
107 #define LWS_FORMAT(string_index)
108
109 #if !defined(LWS_EXTERN) && defined(LWS_BUILDING_SHARED)
110 #ifdef LWS_DLL
111 #ifdef LWS_INTERNAL
112 #define LWS_EXTERN extern __declspec(dllexport)
113 #else
114 #define LWS_EXTERN extern __declspec(dllimport)
115 #endif
116 #endif
117 #endif
118
119 #if !defined(LWS_INTERNAL) && !defined(LWS_EXTERN)
120 #define LWS_EXTERN
121 #define LWS_VISIBLE
122 #endif
123
124 #if !defined(LWS_EXTERN)
125 #define LWS_EXTERN
126 #endif
127
128 #if defined(__MINGW32__)
129 #define LWS_INVALID_FILE -1
130 #else
131 #define LWS_INVALID_FILE INVALID_HANDLE_VALUE
132 #endif
133 #define LWS_SOCK_INVALID (INVALID_SOCKET)
134 #define LWS_O_RDONLY _O_RDONLY
135 #define LWS_O_WRONLY _O_WRONLY
136 #define LWS_O_CREAT _O_CREAT
137 #define LWS_O_TRUNC _O_TRUNC
138
139 #ifndef __func__
140 #define __func__ __FUNCTION__
141 #endif
142
143 #else /* NOT WIN32 */
144 #include <unistd.h>
145 #if defined(LWS_HAVE_SYS_CAPABILITY_H) && defined(LWS_HAVE_LIBCAP)
146 #include <sys/capability.h>
147 #endif
148
149 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__QNX__) || defined(__OpenBSD__)
150 #include <sys/socket.h>
151 #include <netinet/in.h>
152 #endif
153
154 #define LWS_INLINE inline
155 #define LWS_O_RDONLY O_RDONLY
156 #define LWS_O_WRONLY O_WRONLY
157 #define LWS_O_CREAT O_CREAT
158 #define LWS_O_TRUNC O_TRUNC
159
160 #if !defined(LWS_PLAT_OPTEE) && !defined(OPTEE_TA) && !defined(LWS_PLAT_FREERTOS)
161 #include <poll.h>
162 #include <netdb.h>
163 #define LWS_INVALID_FILE -1
164 #define LWS_SOCK_INVALID (-1)
165 #else
166 #define getdtablesize() (30)
167 #if defined(LWS_PLAT_FREERTOS)
168 #define LWS_INVALID_FILE NULL
169 #define LWS_SOCK_INVALID (-1)
170 #else
171 #define LWS_INVALID_FILE NULL
172 #define LWS_SOCK_INVALID (-1)
173 #endif
174 #endif
175
176 #if defined(__FreeBSD__)
177 #include <sys/signal.h>
178 #endif
179 #if defined(__GNUC__)
180
181 /* warn_unused_result attribute only supported by GCC 3.4 or later */
182 #if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
183 #define LWS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
184 #else
185 #define LWS_WARN_UNUSED_RESULT
186 #endif
187
188 #if defined(LWS_BUILDING_SHARED)
189 /* this is only set when we're building lws itself shared */
190 #define LWS_VISIBLE __attribute__((visibility("default")))
191 #define LWS_EXTERN extern
192
193 #else /* not shared */
194 #if defined(WIN32) || defined(_WIN32) || defined(__MINGW32__)
195 #define LWS_VISIBLE
196 #define LWS_EXTERN extern
197 #else
198 /*
199 * If we explicitly say hidden here, symbols exist as T but
200 * cannot be imported at link-time.
201 */
202 #define LWS_VISIBLE
203 #define LWS_EXTERN
204 #endif
205
206 #endif /* not shared */
207
208 #define LWS_WARN_DEPRECATED __attribute__ ((deprecated))
209 #define LWS_FORMAT(string_index) __attribute__ ((format(printf, string_index, string_index+1)))
210 #else /* not GNUC */
211
212 #define LWS_VISIBLE
213 #define LWS_WARN_UNUSED_RESULT
214 #define LWS_WARN_DEPRECATED
215 #define LWS_FORMAT(string_index)
216 #if !defined(LWS_EXTERN)
217 #define LWS_EXTERN extern
218 #endif
219 #endif
220
221 // __ANDROID__ is not defined for host builds, but this headers are available in
222 // them.
223 #if defined(__ANDROID__) || 1
224 #include <netinet/in.h>
225 #include <unistd.h>
226 #endif
227 #endif
228
229 #ifdef _WIN32
230 #define random rand
231 #else
232 #if !defined(LWS_PLAT_OPTEE)
233 #include <sys/time.h>
234 #include <unistd.h>
235 #endif
236 #endif
237
238 #if defined(LWS_WITH_LIBUV_INTERNAL)
239 #include <uv.h>
240
241 #ifdef LWS_HAVE_UV_VERSION_H
242 #include <uv-version.h>
243 #endif
244
245 #ifdef LWS_HAVE_NEW_UV_VERSION_H
246 #include <uv/version.h>
247 #endif
248 #endif
249
250 #if defined(LWS_WITH_TLS)
251
252 #ifdef USE_WOLFSSL
253 #ifdef USE_OLD_CYASSL
254 #ifdef _WIN32
255 /*
256 * Include user-controlled settings for windows from
257 * <wolfssl-root>/IDE/WIN/user_settings.h
258 */
259 #include <IDE/WIN/user_settings.h>
260 #include <cyassl/ctaocrypt/settings.h>
261 #else
262 #include <cyassl/options.h>
263 #endif
264 #include <cyassl/openssl/ssl.h>
265 #include <cyassl/error-ssl.h>
266
267 #else
268 #ifdef _WIN32
269 /*
270 * Include user-controlled settings for windows from
271 * <wolfssl-root>/IDE/WIN/user_settings.h
272 */
273 #include <IDE/WIN/user_settings.h>
274 #include <wolfssl/wolfcrypt/settings.h>
275 #else
276 #include <wolfssl/options.h>
277 #endif
278 #include <wolfssl/openssl/ssl.h>
279 #include <wolfssl/error-ssl.h>
280 #endif /* not USE_OLD_CYASSL */
281 #else
282 #if defined(LWS_WITH_MBEDTLS)
283 #if defined(LWS_PLAT_FREERTOS)
284 /* this filepath is passed to us but without quotes or <> */
285 #if !defined(LWS_AMAZON_RTOS)
286 /* AMAZON RTOS has its own setting via MTK_MBEDTLS_CONFIG_FILE */
287 #undef MBEDTLS_CONFIG_FILE
288 #define MBEDTLS_CONFIG_FILE <mbedtls/esp_config.h>
289 #endif
290 #endif
291 #if defined(LWS_WITH_TLS)
292 #include <mbedtls/ssl.h>
293 #include <mbedtls/entropy.h>
294 #include <mbedtls/ctr_drbg.h>
295
296 #if !defined(MBEDTLS_PRIVATE)
297 #define MBEDTLS_PRIVATE(_q) _q
298 #endif
299
300 #endif
301 #else
302 #include <openssl/ssl.h>
303 #if !defined(LWS_WITH_MBEDTLS)
304 #include <openssl/err.h>
305 #endif
306 #endif
307 #endif /* not USE_WOLFSSL */
308 #endif
309
310 /*
311 * Helpers for pthread mutex in user code... if lws is built for
312 * multiple service threads, these resolve to pthread mutex
313 * operations. In the case LWS_MAX_SMP is 1 (the default), they
314 * are all NOPs and no pthread type or api is referenced.
315 */
316
317 #if LWS_MAX_SMP > 1
318
319 #include <pthread.h>
320
321 #define lws_pthread_mutex(name) pthread_mutex_t name;
322
323 static LWS_INLINE void
lws_pthread_mutex_init(pthread_mutex_t * lock)324 lws_pthread_mutex_init(pthread_mutex_t *lock)
325 {
326 pthread_mutex_init(lock, NULL);
327 }
328
329 static LWS_INLINE void
lws_pthread_mutex_destroy(pthread_mutex_t * lock)330 lws_pthread_mutex_destroy(pthread_mutex_t *lock)
331 {
332 pthread_mutex_destroy(lock);
333 }
334
335 static LWS_INLINE void
lws_pthread_mutex_lock(pthread_mutex_t * lock)336 lws_pthread_mutex_lock(pthread_mutex_t *lock)
337 {
338 pthread_mutex_lock(lock);
339 }
340
341 static LWS_INLINE void
lws_pthread_mutex_unlock(pthread_mutex_t * lock)342 lws_pthread_mutex_unlock(pthread_mutex_t *lock)
343 {
344 pthread_mutex_unlock(lock);
345 }
346
347 #else
348 #define lws_pthread_mutex(name)
349 #define lws_pthread_mutex_init(_a)
350 #define lws_pthread_mutex_destroy(_a)
351 #define lws_pthread_mutex_lock(_a)
352 #define lws_pthread_mutex_unlock(_a)
353 #endif
354
355
356 #define CONTEXT_PORT_NO_LISTEN -1
357 #define CONTEXT_PORT_NO_LISTEN_SERVER -2
358
359 #include <libwebsockets/lws-logs.h>
360
361
362 #include <stddef.h>
363
364 #ifndef lws_container_of
365 #define lws_container_of(P,T,M) ((T *)((char *)(P) - offsetof(T, M)))
366 #endif
367 #define LWS_ALIGN_TO(x, bou) x += ((bou) - ((x) % (bou))) % (bou)
368
369 struct lws;
370
371 /* api change list for user code to test against */
372
373 #define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_ARG
374
375 /* the struct lws_protocols has the id field present */
376 #define LWS_FEATURE_PROTOCOLS_HAS_ID_FIELD
377
378 /* you can call lws_get_peer_write_allowance */
379 #define LWS_FEATURE_PROTOCOLS_HAS_PEER_WRITE_ALLOWANCE
380
381 /* extra parameter introduced in 917f43ab821 */
382 #define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_LEN
383
384 /* File operations stuff exists */
385 #define LWS_FEATURE_FOPS
386
387
388 #if defined(_WIN32)
389 #if !defined(LWS_WIN32_HANDLE_TYPES)
390 typedef SOCKET lws_sockfd_type;
391 #if defined(__MINGW32__)
392 typedef int lws_filefd_type;
393 #else
394 typedef HANDLE lws_filefd_type;
395 #endif
396 #endif
397
398
399 #define lws_pollfd pollfd
400 #define LWS_POLLHUP (POLLHUP)
401 #define LWS_POLLIN (POLLRDNORM | POLLRDBAND)
402 #define LWS_POLLOUT (POLLWRNORM)
403
404 #else
405
406
407 #if defined(LWS_PLAT_FREERTOS)
408 #include <libwebsockets/lws-freertos.h>
409 #else
410 typedef int lws_sockfd_type;
411 typedef int lws_filefd_type;
412 #endif
413
414 #if defined(LWS_PLAT_OPTEE)
415 #include <time.h>
416 struct timeval {
417 time_t tv_sec;
418 unsigned int tv_usec;
419 };
420 #if defined(LWS_WITH_NETWORK)
421 // #include <poll.h>
422 #define lws_pollfd pollfd
423
424 struct timezone;
425
426 int gettimeofday(struct timeval *tv, struct timezone *tz);
427
428 /* Internet address. */
429 struct in_addr {
430 uint32_t s_addr; /* address in network byte order */
431 };
432
433 typedef unsigned short sa_family_t;
434 typedef unsigned short in_port_t;
435 typedef uint32_t socklen_t;
436
437 #include <libwebsockets/lws-optee.h>
438
439 #if !defined(TEE_SE_READER_NAME_MAX)
440 struct addrinfo {
441 int ai_flags;
442 int ai_family;
443 int ai_socktype;
444 int ai_protocol;
445 socklen_t ai_addrlen;
446 struct sockaddr *ai_addr;
447 char *ai_canonname;
448 struct addrinfo *ai_next;
449 };
450 #endif
451
452 ssize_t recv(int sockfd, void *buf, size_t len, int flags);
453 ssize_t send(int sockfd, const void *buf, size_t len, int flags);
454 ssize_t read(int fd, void *buf, size_t count);
455 int getsockopt(int sockfd, int level, int optname,
456 void *optval, socklen_t *optlen);
457 int setsockopt(int sockfd, int level, int optname,
458 const void *optval, socklen_t optlen);
459 int connect(int sockfd, const struct sockaddr *addr,
460 socklen_t addrlen);
461
462 extern int errno;
463
464 uint16_t ntohs(uint16_t netshort);
465 uint16_t htons(uint16_t hostshort);
466
467 int bind(int sockfd, const struct sockaddr *addr,
468 socklen_t addrlen);
469
470
471 #define MSG_NOSIGNAL 0x4000
472 #define EAGAIN 11
473 #define EINTR 4
474 #define EWOULDBLOCK EAGAIN
475 #define EADDRINUSE 98
476 #define INADDR_ANY 0
477 #define AF_INET 2
478 #define SHUT_WR 1
479 #define AF_UNSPEC 0
480 #define PF_UNSPEC 0
481 #define SOCK_STREAM 1
482 #define SOCK_DGRAM 2
483 # define AI_PASSIVE 0x0001
484 #define IPPROTO_UDP 17
485 #define SOL_SOCKET 1
486 #define SO_SNDBUF 7
487 #define EISCONN 106
488 #define EALREADY 114
489 #define EINPROGRESS 115
490 int shutdown(int sockfd, int how);
491 int close(int fd);
492 int atoi(const char *nptr);
493 long long atoll(const char *nptr);
494
495 int socket(int domain, int type, int protocol);
496 int getaddrinfo(const char *node, const char *service,
497 const struct addrinfo *hints,
498 struct addrinfo **res);
499
500 void freeaddrinfo(struct addrinfo *res);
501
502 #if !defined(TEE_SE_READER_NAME_MAX)
503 struct lws_pollfd
504 {
505 int fd; /* File descriptor to poll. */
506 short int events; /* Types of events poller cares about. */
507 short int revents; /* Types of events that actually occurred. */
508 };
509 #endif
510
511 int poll(struct pollfd *fds, int nfds, int timeout);
512
513 #define LWS_POLLHUP (0x18)
514 #define LWS_POLLIN (1)
515 #define LWS_POLLOUT (4)
516 #else
517 struct lws_pollfd;
518 struct sockaddr_in;
519 #endif
520 #else
521 #define lws_pollfd pollfd
522 #define LWS_POLLHUP (POLLHUP | POLLERR)
523 #define LWS_POLLIN (POLLIN)
524 #define LWS_POLLOUT (POLLOUT)
525 #endif
526 #endif
527
528
529 #if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__)
530 /* ... */
531 #define ssize_t SSIZE_T
532 #endif
533
534 #if defined(WIN32) && defined(LWS_HAVE__STAT32I64)
535 #include <sys/types.h>
536 #include <sys/stat.h>
537 #endif
538
539 #if defined(LWS_HAVE_STDINT_H)
540 #include <stdint.h>
541 #else
542 #if defined(WIN32) || defined(_WIN32)
543 /* !!! >:-[ */
544 typedef __int64 int64_t;
545 typedef unsigned __int64 uint64_t;
546 typedef __int32 int32_t;
547 typedef unsigned __int32 uint32_t;
548 typedef __int16 int16_t;
549 typedef unsigned __int16 uint16_t;
550 typedef unsigned __int8 uint8_t;
551 #else
552 typedef unsigned int uint32_t;
553 typedef unsigned short uint16_t;
554 typedef unsigned char uint8_t;
555 #endif
556 #endif
557
558 typedef int64_t lws_usec_t;
559 typedef unsigned long long lws_filepos_t;
560 typedef long long lws_fileofs_t;
561 typedef uint32_t lws_fop_flags_t;
562
563 #define lws_concat_temp(_t, _l) (_t + sizeof(_t) - _l)
564 #define lws_concat_used(_t, _l) (sizeof(_t) - _l)
565
566 /** struct lws_pollargs - argument structure for all external poll related calls
567 * passed in via 'in' */
568 struct lws_pollargs {
569 lws_sockfd_type fd; /**< applicable socket descriptor */
570 int events; /**< the new event mask */
571 int prev_events; /**< the previous event mask */
572 };
573
574 struct lws_extension; /* needed even with ws exts disabled for create context */
575 struct lws_token_limits;
576 struct lws_protocols;
577 struct lws_context;
578 struct lws_tokens;
579 struct lws_vhost;
580 struct lws;
581
582 #include <libwebsockets/lws-dll2.h>
583 #include <libwebsockets/lws-map.h>
584
585 #include <libwebsockets/lws-fault-injection.h>
586 #include <libwebsockets/lws-timeout-timer.h>
587 #include <libwebsockets/lws-cache-ttl.h>
588 #if defined(LWS_WITH_SYS_SMD)
589 #include <libwebsockets/lws-smd.h>
590 #endif
591 #include <libwebsockets/lws-state.h>
592 #include <libwebsockets/lws-retry.h>
593 #include <libwebsockets/lws-adopt.h>
594 #include <libwebsockets/lws-network-helper.h>
595 #include <libwebsockets/lws-metrics.h>
596 #include <libwebsockets/lws-system.h>
597 #include <libwebsockets/lws-ws-close.h>
598 #include <libwebsockets/lws-callbacks.h>
599 #include <libwebsockets/lws-ws-state.h>
600 #include <libwebsockets/lws-ws-ext.h>
601 #include <libwebsockets/lws-protocols-plugins.h>
602
603 #include <libwebsockets/lws-context-vhost.h>
604
605 #if defined(LWS_WITH_CONMON)
606 #include <libwebsockets/lws-conmon.h>
607 #endif
608
609 #if defined(LWS_ROLE_MQTT)
610 #include <libwebsockets/lws-mqtt.h>
611 #endif
612 #include <libwebsockets/lws-client.h>
613 #include <libwebsockets/lws-http.h>
614 #include <libwebsockets/lws-spa.h>
615 #include <libwebsockets/lws-purify.h>
616 #include <libwebsockets/lws-misc.h>
617 #include <libwebsockets/lws-dsh.h>
618 #include <libwebsockets/lws-service.h>
619 #include <libwebsockets/lws-write.h>
620 #include <libwebsockets/lws-writeable.h>
621 #include <libwebsockets/lws-ring.h>
622 #include <libwebsockets/lws-sha1-base64.h>
623 #include <libwebsockets/lws-x509.h>
624 #include <libwebsockets/lws-cgi.h>
625 #if defined(LWS_WITH_FILE_OPS)
626 #include <libwebsockets/lws-vfs.h>
627 #endif
628 #include <libwebsockets/lws-gencrypto.h>
629
630 #include <libwebsockets/lws-lejp.h>
631 #include <libwebsockets/lws-lecp.h>
632 #include <libwebsockets/lws-cose.h>
633 #include <libwebsockets/lws-struct.h>
634 #include <libwebsockets/lws-threadpool.h>
635 #include <libwebsockets/lws-tokenize.h>
636 #include <libwebsockets/lws-lwsac.h>
637 #include <libwebsockets/lws-fts.h>
638 #include <libwebsockets/lws-diskcache.h>
639 #include <libwebsockets/lws-sequencer.h>
640 #include <libwebsockets/lws-secure-streams.h>
641 #include <libwebsockets/lws-secure-streams-policy.h>
642 #include <libwebsockets/lws-secure-streams-client.h>
643
644 #if !defined(LWS_PLAT_FREERTOS)
645 #include <libwebsockets/abstract/abstract.h>
646
647 #include <libwebsockets/lws-test-sequencer.h>
648 #endif
649 #include <libwebsockets/lws-async-dns.h>
650
651 #if defined(LWS_WITH_TLS)
652
653 #include <libwebsockets/lws-tls-sessions.h>
654
655 #if defined(LWS_WITH_MBEDTLS)
656 #include <mbedtls/md5.h>
657 #include <mbedtls/sha1.h>
658 #include <mbedtls/sha256.h>
659 #include <mbedtls/sha512.h>
660 #endif
661
662 #include <libwebsockets/lws-genhash.h>
663 #include <libwebsockets/lws-genrsa.h>
664 #include <libwebsockets/lws-genaes.h>
665 #include <libwebsockets/lws-genec.h>
666
667 #include <libwebsockets/lws-jwk.h>
668 #include <libwebsockets/lws-jose.h>
669 #include <libwebsockets/lws-jws.h>
670 #include <libwebsockets/lws-jwe.h>
671
672 #endif
673
674 #include <libwebsockets/lws-eventlib-exports.h>
675 #include <libwebsockets/lws-i2c.h>
676 #include <libwebsockets/lws-spi.h>
677 #include <libwebsockets/lws-gpio.h>
678 #include <libwebsockets/lws-bb-i2c.h>
679 #include <libwebsockets/lws-bb-spi.h>
680 #include <libwebsockets/lws-button.h>
681 #include <libwebsockets/lws-led.h>
682 #include <libwebsockets/lws-pwm.h>
683 #include <libwebsockets/lws-display.h>
684 #include <libwebsockets/lws-ssd1306-i2c.h>
685 #include <libwebsockets/lws-ili9341-spi.h>
686 #include <libwebsockets/lws-settings.h>
687 #include <libwebsockets/lws-netdev.h>
688
689 #ifdef __cplusplus
690 }
691 #endif
692
693 #endif
694