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
222 #if defined(__ANDROID__)
223 #include <netinet/in.h>
224 #include <unistd.h>
225 #endif
226 #endif
227
228 #ifdef _WIN32
229 #define random rand
230 #else
231 #if !defined(LWS_PLAT_OPTEE)
232 #include <sys/time.h>
233 #include <unistd.h>
234 #endif
235 #endif
236
237 #if defined(LWS_WITH_LIBUV_INTERNAL)
238 #include <uv.h>
239
240 #ifdef LWS_HAVE_UV_VERSION_H
241 #include <uv-version.h>
242 #endif
243
244 #ifdef LWS_HAVE_NEW_UV_VERSION_H
245 #include <uv/version.h>
246 #endif
247 #endif
248
249 #if defined(LWS_WITH_TLS)
250
251 #ifdef USE_WOLFSSL
252 #ifdef USE_OLD_CYASSL
253 #ifdef _WIN32
254 /*
255 * Include user-controlled settings for windows from
256 * <wolfssl-root>/IDE/WIN/user_settings.h
257 */
258 #include <IDE/WIN/user_settings.h>
259 #include <cyassl/ctaocrypt/settings.h>
260 #else
261 #include <cyassl/options.h>
262 #endif
263 #include <cyassl/openssl/ssl.h>
264 #include <cyassl/error-ssl.h>
265
266 #else
267 #ifdef _WIN32
268 /*
269 * Include user-controlled settings for windows from
270 * <wolfssl-root>/IDE/WIN/user_settings.h
271 */
272 #include <IDE/WIN/user_settings.h>
273 #include <wolfssl/wolfcrypt/settings.h>
274 #else
275 #include <wolfssl/options.h>
276 #endif
277 #include <wolfssl/openssl/ssl.h>
278 #include <wolfssl/error-ssl.h>
279 #endif /* not USE_OLD_CYASSL */
280 #else
281 #if defined(LWS_WITH_MBEDTLS)
282 #if defined(LWS_PLAT_FREERTOS)
283 /* this filepath is passed to us but without quotes or <> */
284 #if !defined(LWS_AMAZON_RTOS)
285 /* AMAZON RTOS has its own setting via MTK_MBEDTLS_CONFIG_FILE */
286 #undef MBEDTLS_CONFIG_FILE
287 #define MBEDTLS_CONFIG_FILE <mbedtls/esp_config.h>
288 #endif
289 #endif
290 #if defined(LWS_WITH_TLS)
291 #include <mbedtls/ssl.h>
292 #include <mbedtls/entropy.h>
293 #include <mbedtls/ctr_drbg.h>
294
295 #if !defined(MBEDTLS_PRIVATE)
296 #define MBEDTLS_PRIVATE(_q) _q
297 #endif
298
299 #endif
300 #else
301 #include <openssl/ssl.h>
302 #if !defined(LWS_WITH_MBEDTLS)
303 #include <openssl/err.h>
304 #endif
305 #endif
306 #endif /* not USE_WOLFSSL */
307 #endif
308
309 /*
310 * Helpers for pthread mutex in user code... if lws is built for
311 * multiple service threads, these resolve to pthread mutex
312 * operations. In the case LWS_MAX_SMP is 1 (the default), they
313 * are all NOPs and no pthread type or api is referenced.
314 */
315
316 #if LWS_MAX_SMP > 1
317
318 #include <pthread.h>
319
320 #define lws_pthread_mutex(name) pthread_mutex_t name;
321
322 static LWS_INLINE void
lws_pthread_mutex_init(pthread_mutex_t * lock)323 lws_pthread_mutex_init(pthread_mutex_t *lock)
324 {
325 pthread_mutex_init(lock, NULL);
326 }
327
328 static LWS_INLINE void
lws_pthread_mutex_destroy(pthread_mutex_t * lock)329 lws_pthread_mutex_destroy(pthread_mutex_t *lock)
330 {
331 pthread_mutex_destroy(lock);
332 }
333
334 static LWS_INLINE void
lws_pthread_mutex_lock(pthread_mutex_t * lock)335 lws_pthread_mutex_lock(pthread_mutex_t *lock)
336 {
337 pthread_mutex_lock(lock);
338 }
339
340 static LWS_INLINE void
lws_pthread_mutex_unlock(pthread_mutex_t * lock)341 lws_pthread_mutex_unlock(pthread_mutex_t *lock)
342 {
343 pthread_mutex_unlock(lock);
344 }
345
346 #else
347 #define lws_pthread_mutex(name)
348 #define lws_pthread_mutex_init(_a)
349 #define lws_pthread_mutex_destroy(_a)
350 #define lws_pthread_mutex_lock(_a)
351 #define lws_pthread_mutex_unlock(_a)
352 #endif
353
354
355 #define CONTEXT_PORT_NO_LISTEN -1
356 #define CONTEXT_PORT_NO_LISTEN_SERVER -2
357
358 #include <libwebsockets/lws-logs.h>
359
360
361 #include <stddef.h>
362
363 #ifndef lws_container_of
364 #define lws_container_of(P,T,M) ((T *)((char *)(P) - offsetof(T, M)))
365 #endif
366 #define LWS_ALIGN_TO(x, bou) x += ((bou) - ((x) % (bou))) % (bou)
367
368 struct lws;
369
370 /* api change list for user code to test against */
371
372 #define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_ARG
373
374 /* the struct lws_protocols has the id field present */
375 #define LWS_FEATURE_PROTOCOLS_HAS_ID_FIELD
376
377 /* you can call lws_get_peer_write_allowance */
378 #define LWS_FEATURE_PROTOCOLS_HAS_PEER_WRITE_ALLOWANCE
379
380 /* extra parameter introduced in 917f43ab821 */
381 #define LWS_FEATURE_SERVE_HTTP_FILE_HAS_OTHER_HEADERS_LEN
382
383 /* File operations stuff exists */
384 #define LWS_FEATURE_FOPS
385
386
387 #if defined(_WIN32)
388 #if !defined(LWS_WIN32_HANDLE_TYPES)
389 typedef SOCKET lws_sockfd_type;
390 #if defined(__MINGW32__)
391 typedef int lws_filefd_type;
392 #else
393 typedef HANDLE lws_filefd_type;
394 #endif
395 #endif
396
397
398 #define lws_pollfd pollfd
399 #define LWS_POLLHUP (POLLHUP)
400 #define LWS_POLLIN (POLLRDNORM | POLLRDBAND)
401 #define LWS_POLLOUT (POLLWRNORM)
402
403 #else
404
405
406 #if defined(LWS_PLAT_FREERTOS)
407 #include <libwebsockets/lws-freertos.h>
408 #else
409 typedef int lws_sockfd_type;
410 typedef int lws_filefd_type;
411 #endif
412
413 #if defined(LWS_PLAT_OPTEE)
414 #include <time.h>
415 struct timeval {
416 time_t tv_sec;
417 unsigned int tv_usec;
418 };
419 #if defined(LWS_WITH_NETWORK)
420 // #include <poll.h>
421 #define lws_pollfd pollfd
422
423 struct timezone;
424
425 int gettimeofday(struct timeval *tv, struct timezone *tz);
426
427 /* Internet address. */
428 struct in_addr {
429 uint32_t s_addr; /* address in network byte order */
430 };
431
432 typedef unsigned short sa_family_t;
433 typedef unsigned short in_port_t;
434 typedef uint32_t socklen_t;
435
436 #include <libwebsockets/lws-optee.h>
437
438 #if !defined(TEE_SE_READER_NAME_MAX)
439 struct addrinfo {
440 int ai_flags;
441 int ai_family;
442 int ai_socktype;
443 int ai_protocol;
444 socklen_t ai_addrlen;
445 struct sockaddr *ai_addr;
446 char *ai_canonname;
447 struct addrinfo *ai_next;
448 };
449 #endif
450
451 ssize_t recv(int sockfd, void *buf, size_t len, int flags);
452 ssize_t send(int sockfd, const void *buf, size_t len, int flags);
453 ssize_t read(int fd, void *buf, size_t count);
454 int getsockopt(int sockfd, int level, int optname,
455 void *optval, socklen_t *optlen);
456 int setsockopt(int sockfd, int level, int optname,
457 const void *optval, socklen_t optlen);
458 int connect(int sockfd, const struct sockaddr *addr,
459 socklen_t addrlen);
460
461 extern int errno;
462
463 uint16_t ntohs(uint16_t netshort);
464 uint16_t htons(uint16_t hostshort);
465
466 int bind(int sockfd, const struct sockaddr *addr,
467 socklen_t addrlen);
468
469
470 #define MSG_NOSIGNAL 0x4000
471 #define EAGAIN 11
472 #define EINTR 4
473 #define EWOULDBLOCK EAGAIN
474 #define EADDRINUSE 98
475 #define INADDR_ANY 0
476 #define AF_INET 2
477 #define SHUT_WR 1
478 #define AF_UNSPEC 0
479 #define PF_UNSPEC 0
480 #define SOCK_STREAM 1
481 #define SOCK_DGRAM 2
482 # define AI_PASSIVE 0x0001
483 #define IPPROTO_UDP 17
484 #define SOL_SOCKET 1
485 #define SO_SNDBUF 7
486 #define EISCONN 106
487 #define EALREADY 114
488 #define EINPROGRESS 115
489 int shutdown(int sockfd, int how);
490 int close(int fd);
491 int atoi(const char *nptr);
492 long long atoll(const char *nptr);
493
494 int socket(int domain, int type, int protocol);
495 int getaddrinfo(const char *node, const char *service,
496 const struct addrinfo *hints,
497 struct addrinfo **res);
498
499 void freeaddrinfo(struct addrinfo *res);
500
501 #if !defined(TEE_SE_READER_NAME_MAX)
502 struct lws_pollfd
503 {
504 int fd; /* File descriptor to poll. */
505 short int events; /* Types of events poller cares about. */
506 short int revents; /* Types of events that actually occurred. */
507 };
508 #endif
509
510 int poll(struct pollfd *fds, int nfds, int timeout);
511
512 #define LWS_POLLHUP (0x18)
513 #define LWS_POLLIN (1)
514 #define LWS_POLLOUT (4)
515 #else
516 struct lws_pollfd;
517 struct sockaddr_in;
518 #endif
519 #else
520 #define lws_pollfd pollfd
521 #define LWS_POLLHUP (POLLHUP | POLLERR)
522 #define LWS_POLLIN (POLLIN)
523 #define LWS_POLLOUT (POLLOUT)
524 #endif
525 #endif
526
527
528 #if (defined(WIN32) || defined(_WIN32)) && !defined(__MINGW32__)
529 /* ... */
530 #define ssize_t SSIZE_T
531 #endif
532
533 #if defined(WIN32) && defined(LWS_HAVE__STAT32I64)
534 #include <sys/types.h>
535 #include <sys/stat.h>
536 #endif
537
538 #if defined(LWS_HAVE_STDINT_H)
539 #include <stdint.h>
540 #else
541 #if defined(WIN32) || defined(_WIN32)
542 /* !!! >:-[ */
543 typedef __int64 int64_t;
544 typedef unsigned __int64 uint64_t;
545 typedef __int32 int32_t;
546 typedef unsigned __int32 uint32_t;
547 typedef __int16 int16_t;
548 typedef unsigned __int16 uint16_t;
549 typedef unsigned __int8 uint8_t;
550 #else
551 typedef unsigned int uint32_t;
552 typedef unsigned short uint16_t;
553 typedef unsigned char uint8_t;
554 #endif
555 #endif
556
557 typedef int64_t lws_usec_t;
558 typedef unsigned long long lws_filepos_t;
559 typedef long long lws_fileofs_t;
560 typedef uint32_t lws_fop_flags_t;
561
562 #define lws_concat_temp(_t, _l) (_t + sizeof(_t) - _l)
563 #define lws_concat_used(_t, _l) (sizeof(_t) - _l)
564
565 /** struct lws_pollargs - argument structure for all external poll related calls
566 * passed in via 'in' */
567 struct lws_pollargs {
568 lws_sockfd_type fd; /**< applicable socket descriptor */
569 int events; /**< the new event mask */
570 int prev_events; /**< the previous event mask */
571 };
572
573 struct lws_extension; /* needed even with ws exts disabled for create context */
574 struct lws_token_limits;
575 struct lws_protocols;
576 struct lws_context;
577 struct lws_tokens;
578 struct lws_vhost;
579 struct lws;
580
581 #include <libwebsockets/lws-dll2.h>
582 #include <libwebsockets/lws-map.h>
583
584 #include <libwebsockets/lws-fault-injection.h>
585 #include <libwebsockets/lws-timeout-timer.h>
586 #include <libwebsockets/lws-cache-ttl.h>
587 #if defined(LWS_WITH_SYS_SMD)
588 #include <libwebsockets/lws-smd.h>
589 #endif
590 #include <libwebsockets/lws-state.h>
591 #include <libwebsockets/lws-retry.h>
592 #include <libwebsockets/lws-adopt.h>
593 #include <libwebsockets/lws-network-helper.h>
594 #include <libwebsockets/lws-metrics.h>
595 #include <libwebsockets/lws-system.h>
596 #include <libwebsockets/lws-ws-close.h>
597 #include <libwebsockets/lws-callbacks.h>
598 #include <libwebsockets/lws-ws-state.h>
599 #include <libwebsockets/lws-ws-ext.h>
600 #include <libwebsockets/lws-protocols-plugins.h>
601
602 #include <libwebsockets/lws-context-vhost.h>
603
604 #if defined(LWS_WITH_CONMON)
605 #include <libwebsockets/lws-conmon.h>
606 #endif
607
608 #if defined(LWS_ROLE_MQTT)
609 #include <libwebsockets/lws-mqtt.h>
610 #endif
611 #include <libwebsockets/lws-client.h>
612 #include <libwebsockets/lws-http.h>
613 #include <libwebsockets/lws-spa.h>
614 #include <libwebsockets/lws-purify.h>
615 #include <libwebsockets/lws-misc.h>
616 #include <libwebsockets/lws-dsh.h>
617 #include <libwebsockets/lws-service.h>
618 #include <libwebsockets/lws-write.h>
619 #include <libwebsockets/lws-writeable.h>
620 #include <libwebsockets/lws-ring.h>
621 #include <libwebsockets/lws-sha1-base64.h>
622 #include <libwebsockets/lws-x509.h>
623 #include <libwebsockets/lws-cgi.h>
624 #if defined(LWS_WITH_FILE_OPS)
625 #include <libwebsockets/lws-vfs.h>
626 #endif
627 #include <libwebsockets/lws-gencrypto.h>
628
629 #include <libwebsockets/lws-lejp.h>
630 #include <libwebsockets/lws-lecp.h>
631 #include <libwebsockets/lws-cose.h>
632 #include <libwebsockets/lws-struct.h>
633 #include <libwebsockets/lws-threadpool.h>
634 #include <libwebsockets/lws-tokenize.h>
635 #include <libwebsockets/lws-lwsac.h>
636 #include <libwebsockets/lws-fts.h>
637 #include <libwebsockets/lws-diskcache.h>
638 #include <libwebsockets/lws-sequencer.h>
639 #include <libwebsockets/lws-secure-streams.h>
640 #include <libwebsockets/lws-secure-streams-policy.h>
641 #include <libwebsockets/lws-secure-streams-client.h>
642
643 #if !defined(LWS_PLAT_FREERTOS)
644 #include <libwebsockets/abstract/abstract.h>
645
646 #include <libwebsockets/lws-test-sequencer.h>
647 #endif
648 #include <libwebsockets/lws-async-dns.h>
649
650 #if defined(LWS_WITH_TLS)
651
652 #include <libwebsockets/lws-tls-sessions.h>
653
654 #if defined(LWS_WITH_MBEDTLS)
655 #include <mbedtls/md5.h>
656 #include <mbedtls/sha1.h>
657 #include <mbedtls/sha256.h>
658 #include <mbedtls/sha512.h>
659 #endif
660
661 #include <libwebsockets/lws-genhash.h>
662 #include <libwebsockets/lws-genrsa.h>
663 #include <libwebsockets/lws-genaes.h>
664 #include <libwebsockets/lws-genec.h>
665
666 #include <libwebsockets/lws-jwk.h>
667 #include <libwebsockets/lws-jose.h>
668 #include <libwebsockets/lws-jws.h>
669 #include <libwebsockets/lws-jwe.h>
670
671 #endif
672
673 #include <libwebsockets/lws-eventlib-exports.h>
674 #include <libwebsockets/lws-i2c.h>
675 #include <libwebsockets/lws-spi.h>
676 #include <libwebsockets/lws-gpio.h>
677 #include <libwebsockets/lws-bb-i2c.h>
678 #include <libwebsockets/lws-bb-spi.h>
679 #include <libwebsockets/lws-button.h>
680 #include <libwebsockets/lws-led.h>
681 #include <libwebsockets/lws-pwm.h>
682 #include <libwebsockets/lws-display.h>
683 #include <libwebsockets/lws-ssd1306-i2c.h>
684 #include <libwebsockets/lws-ili9341-spi.h>
685 #include <libwebsockets/lws-settings.h>
686 #include <libwebsockets/lws-netdev.h>
687
688 #ifdef __cplusplus
689 }
690 #endif
691
692 #endif
693