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