Compare commits

...
717 Commits
Author SHA1 Message Date
Sergio R. Caprile b379816178 Merge pull request #2210 from cesanta/devdash
run pack on Win
2023-05-23 11:06:47 -03:00
Sergio R. Caprile e4353255ca run pack on Win 2023-05-23 11:02:24 -03:00
cpq 923f2c7635 Add DHCP settings 2023-05-23 08:43:57 +01:00
cpq a8309ef705 Remove -DSIGPIPE=0 for Windows 2023-05-23 03:50:53 +01:00
cpq bad05485d0 Define SIGPIPE for Win32, fix sleep() for Win32 2023-05-23 03:49:24 +01:00
cpq 38d7799ffa Rename wifi-router -> wifi-router-dashboard 2023-05-23 02:40:45 +01:00
Sergio R. Caprile 6e6696ccd4 Merge pull request #2207 from cesanta/wifi
Add wifi-router example
2023-05-22 19:59:06 -03:00
cpq feb546920e Add wifi-router example 2023-05-22 19:48:34 -03:00
Sergio R. Caprile 81b05b9de4 Merge pull request #2208 from cesanta/fixwbind
fix bind issue in W
2023-05-22 19:46:42 -03:00
Sergio R. Caprile ab10b042be fix bind issue in W 2023-05-22 19:13:48 -03:00
Sergio R. Caprile 45e4b3c423 bump revno up 2023-05-18 12:26:19 -03:00
Sergio R. Caprile 6a5a139e33 Merge pull request #2201 from cesanta/MG_ESC
Update to use MG_ESC()
2023-05-17 14:38:17 -03:00
Sergio R. Caprile 1908d3200e Update to use MG_ESC() 2023-05-17 14:26:45 -03:00
Sergio R. Caprile f4cf40d38f Merge pull request #2200 from cesanta/esc
Add MG_ESC helper macro
2023-05-17 09:41:39 -03:00
cpq 514de84b97 Add MG_ESC helper macro 2023-05-17 11:58:40 +01:00
Sergio R. Caprile 7e7d0bb354 Merge pull request #2199 from cesanta/docinsource
remove stalled doc in header
2023-05-16 18:40:41 -03:00
Sergio R. Caprile e468b90442 remove stalled doc in header 2023-05-16 18:08:48 -03:00
Sergio R. Caprile 926959ab47 Merge pull request #2197 from cesanta/BUGFIX_handle_http_negative_content_length
Added check for negative value for HTTP Content-Length header
2023-05-16 16:11:14 -03:00
Allan Park 4663090a8f Added check for negative value for HTTP Content-Length header 2023-05-16 18:52:33 +03:00
Sergey Lyubka b0868a4d0b Merge pull request #2194 from cesanta/frp
Fix http-reverse-proxy for keep-alive incoming connections
2023-05-16 09:20:21 +01:00
Sergio R. Caprile 9088b00006 Fix keep-alive 2023-05-15 14:11:12 -03:00
Sergio R. Caprile 9c0fe8999d Merge pull request #2193 from cesanta/tuts
link to tutorial
2023-05-12 17:30:52 -03:00
Sergio R. Caprile 901aa5f7c1 link to tutorial 2023-05-12 17:30:06 -03:00
Sergio R. Caprile 3ee28c035b Merge pull request #2191 from cesanta/tuts
link to tutorial
2023-05-12 10:21:42 -03:00
Sergio R. Caprile 1e31b90905 link to tutorial 2023-05-12 10:20:38 -03:00
cpq 48333041f4 Apply SO_EXCLUSIVEADDRUSE and SO_REUSEADDR on windows 2023-05-12 14:08:49 +01:00
cpq 717c9dbe89 On Windows, prefer EXCLADDRINUSE, then REUSEADDR 2023-05-09 11:25:18 +01:00
Sergio R. Caprile fd86eb7aa7 Merge pull request #2184 from cesanta/tuts
link to tutorial
2023-05-08 18:31:50 -03:00
Sergio R. Caprile 9b4b35eff5 link to tutorial 2023-05-08 18:23:35 -03:00
Sergio R. Caprile ac528caf2b Merge pull request #2182 from cesanta/keil
simplify RTOS-related Keil examples
2023-05-05 18:49:27 -03:00
scaprile fbe626e791 simplify RTOS-related Keil examples 2023-05-05 17:41:47 -03:00
Sergio R. Caprile 9ca37d30d8 Merge pull request #2179 from cesanta/tuts
link to tutorials
2023-05-04 19:17:51 -03:00
Sergio R. Caprile 84986898c8 link to tutorials 2023-05-04 19:16:43 -03:00
Sergey Lyubka 5cebce3f4b Merge pull request #2173 from cesanta/arp
Add multicast and local broadcast MAC resolution
2023-04-29 12:01:01 +01:00
Sergey Lyubka bb344b14a8 Merge pull request #2168 from cesanta/udp-listener
Fix UDP listeners in MIP
2023-04-29 12:00:33 +01:00
Sergey Lyubka 20e613b444 Merge pull request #2169 from cesanta/udp-printf
Fix mg_xprint() for UDP in MIP
2023-04-29 11:59:46 +01:00
Sergey Lyubka a0952e0012 Merge pull request #2171 from cesanta/null_fs
Check for calloc() failure in filesystem code
2023-04-29 11:59:03 +01:00
Sergey Lyubka 49e66f809e Merge pull request #2172 from cesanta/null_mip
Check for calloc() failure in MIP
2023-04-29 11:57:25 +01:00
Sergey Lyubka 5152ed8731 Merge pull request #2174 from cesanta/ti-rndis
Add TI RNDIS example
2023-04-29 11:56:29 +01:00
cpq 33811a826f Include TCP/IP API only if enabled 2023-04-29 11:45:28 +01:00
Sergio R. Caprile d33aebfd31 Add TI RNDIS example 2023-04-28 11:23:40 -03:00
Sergio R. Caprile 7d53c52a6b Check for calloc() failure in MIP 2023-04-27 11:34:23 -03:00
Sergio R. Caprile f015a8686e Check for calloc() failure in filesystem code 2023-04-27 11:19:02 -03:00
Sergio R. Caprile ab791d2a2d Add multicast and local broadcast MAC resolution 2023-04-26 19:56:03 -03:00
Sergio R. Caprile a303858da7 Fix mg_xprint() for UDP in MIP 2023-04-26 18:32:54 -03:00
Sergio R. Caprile 4c58c62cfe Fix UDP listeners 2023-04-26 15:09:27 -03:00
Sergey Lyubka 4593332204 Merge pull request #2166 from cesanta/gzip
Fix #1927: respect Accept-Encoding when serving .gz files
2023-04-26 10:01:24 +01:00
cpq 9f5d8c4280 Fix #1927: respect Accept-Encoding when serving .gz files 2023-04-26 09:07:43 +01:00
Sergey Lyubka b0d44bf0ba Merge pull request #2165 from cesanta/mqtt
mqtt fixes
2023-04-25 08:27:01 +01:00
cpq 59b8434e36 mqtt fixes 2023-04-25 07:48:33 +01:00
Sergey Lyubka e6f27cbaf3 Merge pull request #2160 from robertc2000/master
MQTT: support for user properties feature added
2023-04-23 18:33:56 +01:00
robert 6c13df1aff MQTT: support for properties feature added 2023-04-23 16:35:50 +03:00
Sergey Lyubka 44bf059b2f Merge pull request #2158 from cesanta/ipv6
Fix #2089 - allow to bind v4 and v6 sockets on the same port
2023-04-18 08:26:47 +01:00
cpq 9ade464c2e Fix #2089 - allow to bind v4 and v6 sockets on the same port 2023-04-18 08:26:18 +01:00
Sergio R. Caprile aed5d4e05b Merge pull request #2159 from cesanta/testf7ft
Testf7ft
2023-04-17 17:04:31 -03:00
Sergio R. Caprile b57648df14 Update test.yml 2023-04-17 17:02:52 -03:00
Sergio R. Caprile 7bce887077 Relax test time 2023-04-17 16:59:36 -03:00
Sergio R. Caprile cacd9c7f95 Merge pull request #2156 from cesanta/xprintf
Remove %H %V %Q %q modifiers
2023-04-14 14:24:46 -03:00
Sergio R. Caprile cd64bfe84b Remove %H %V %Q %q modifiers 2023-04-14 10:13:22 -03:00
Sergio R. Caprile 52ed68ed24 Merge pull request #2154 from cesanta/keil
Add Keil examples and preliminary test
2023-04-12 10:16:12 -03:00
Sergey Lyubka 20577021a6 Merge pull request #2151 from cesanta/multi-threaded
Fix for some compilers
2023-04-12 10:02:27 +01:00
scaprile 838a2236a1 Add preliminary test 2023-04-11 17:47:38 -03:00
scaprile d03941b792 Add Keil examples 2023-04-11 17:46:28 -03:00
Sergio R. Caprile 92299c3079 Fix for some compilers 2023-04-11 08:41:14 -03:00
cpq d9f05532cd Address #2125: treat negative poll time as infinite wait 2023-04-10 15:04:37 +01:00
Sergio R. Caprile 2fd2dff126 Merge pull request #2138 from cesanta/printh
Add printf.h
2023-04-07 19:53:07 -03:00
Sergio R. Caprile 8e14ad0536 Add printf.h 2023-04-07 19:28:00 -03:00
Sergio R. Caprile 2b325102f3 Merge pull request #2143 from cesanta/dbl
Fix #2104 - %.*f formatting
2023-04-07 12:27:15 -03:00
Sergio R. Caprile 1f2be606fa Fix wildcard usage 2023-04-07 12:21:14 -03:00
cpq 6b29a2a724 Fix #2104 - %.*f formatting 2023-04-07 08:38:28 +01:00
Sergey Lyubka f79edeb053 Merge pull request #2145 from cesanta/cube
Cube
2023-04-07 08:29:54 +01:00
Sergio R. Caprile 84b92096d4 Add STM32CubeIDE examples and test for build 2023-04-06 17:33:45 -03:00
Sergio R. Caprile 70f4814cb1 Merge pull request #2144 from cesanta/test
Test TLS host verif with no CA
2023-03-31 17:04:39 -03:00
Sergio R. Caprile 49579eb2b4 Test host only TLS mode 2023-03-31 17:00:05 -03:00
Sergey Lyubka cc6caeeca9 Merge pull request #2139 from cesanta/freertos-tcp
FreeRTOS+ TCP support
2023-03-30 10:51:52 +01:00
Sergey Lyubka 90af22eba1 Merge pull request #2141 from cesanta/hc1
fix outdated comment
2023-03-30 10:51:25 +01:00
cpq f4b4b41264 Merge branch 'master' of github.com:cesanta/mongoose 2023-03-30 10:50:27 +01:00
cpq 9918b03c11 Enhance MQTT client 2023-03-30 10:49:16 +01:00
Sergio R. Caprile 95f44246bf fix old comment 2023-03-29 11:46:40 -03:00
Sergio R. Caprile b098723f78 Update test.yml 2023-03-27 18:19:48 -03:00
Sergio R. Caprile a819513a92 Remove old example and its breadcrumbs 2023-03-27 18:14:55 -03:00
Sergio R. Caprile 7531b28b4c Add refactored FreeRTOS-Plus-TCP example 2023-03-25 13:07:31 -03:00
Sergio R. Caprile 2b8586d1b7 Merge pull request #2134 from cesanta/freertos-tcp
Fix FreeRTOS-Plus-TCP
2023-03-24 16:42:59 -03:00
Sergio R. Caprile 8167291ffc Fix FreeRTOS-Plus-TCP 2023-03-24 15:28:32 -03:00
Sergio R. Caprile 0dfcf9607a Merge pull request #2132 from cesanta/freertos-tcp
Let FreeRTOS-Plus-TCP build on Keil
2023-03-23 22:02:44 -03:00
Sergio R. Caprile 4827831107 Let FreeRTOS-Plus-TCP build on Keil 2023-03-23 17:13:02 -03:00
Sergio R. Caprile 0ebb6d5d30 Merge pull request #2131 from cesanta/cmsis-rtos
Add arch for CMSIS-RTOS v1 and v2
2023-03-22 11:18:37 -03:00
Sergio R. Caprile f4ed5062f6 Add arch for CMSIS-RTOS v1 and v2 2023-03-21 19:32:56 -03:00
Sergio R. Caprile 434b129746 Merge pull request #2129 from cesanta/frerrno
Remove no longer necessary includes
2023-03-21 14:13:35 -03:00
Sergio R. Caprile 2f5041ac7d Remove no longer necessary includes 2023-03-21 14:08:35 -03:00
Sergio R. Caprile 24f9766b39 Merge pull request #2128 from cesanta/keil
Let lwIP and FreeRTOS build on Keil
2023-03-21 13:58:09 -03:00
Sergio R. Caprile ba872217d7 Let lwIP and FreeRTOS build on Keil 2023-03-21 12:09:00 -03:00
Sergey Lyubka b2ae517dac Merge pull request #2119 from cesanta/armcc
Add MG_ARCH_ARMCC
2023-03-20 22:01:40 +00:00
Sergio R. Caprile 32b52dc0c8 Merge pull request #2121 from cesanta/nomip-collateral
remove references to MIP in examples (comments)
2023-03-15 10:10:46 -03:00
Sergio R. Caprile 33a3fe9bbd remove references to MIP in examples (comments) 2023-03-15 09:43:22 -03:00
Sergio R. Caprile 245dc76503 Add MG_ARCH_ARMCC 2023-03-15 09:39:36 -03:00
Sergio R. Caprile 21dbfd79d8 Merge pull request #2120 from cesanta/chaudocs
Move docs to website
2023-03-14 09:55:52 -03:00
Sergio R. Caprile b9f2250278 Move docs to website 2023-03-14 09:54:29 -03:00
Sergio R. Caprile a0601f1891 Merge pull request #2118 from cesanta/testTM4c
update Makefile
2023-03-10 10:58:51 -03:00
Sergio R. Caprile 70403ee433 update Makefile 2023-03-10 10:45:30 -03:00
Sergio R. Caprile f3cde58c8f Merge pull request #2117 from cesanta/testTM4C
test only TM4C examples that have changes
2023-03-10 10:20:18 -03:00
Sergio R. Caprile 71c267776a Update test.yml 2023-03-10 10:19:39 -03:00
Sergio R. Caprile 359ff94a8c Merge pull request #2116 from cesanta/testTM4c
Test TM4C
2023-03-10 10:01:48 -03:00
Sergio R. Caprile efe1c1492f Merge pull request #2115 from cesanta/scaprile-patch-1
test TM4C
2023-03-10 10:00:28 -03:00
Sergio R. Caprile 2aaaf7c358 test TM4C 2023-03-10 09:59:56 -03:00
Sergio R. Caprile cefaffa0f0 update Makefile 2023-03-10 09:54:26 -03:00
Sergio R. Caprile a22d56dc41 Merge pull request #2114 from cesanta/standex
update
2023-03-10 09:37:36 -03:00
Sergio R. Caprile 51eca94504 update 2023-03-10 09:35:29 -03:00
Sergio R. Caprile 2b6d24d328 Merge pull request #2112 from cesanta/nomip-collateral
MIP_STATE_* -> MG_TCPIP_STATE_*
2023-03-10 09:27:11 -03:00
Sergio R. Caprile 4932025423 Merge pull request #2113 from cesanta/scaprile-patch-1
Update test.yml
2023-03-09 11:44:11 -03:00
Sergio R. Caprile c466abf4d0 Update test.yml 2023-03-09 11:43:32 -03:00
Sergio R. Caprile 2ece3a8b4c MIP_STATE_* -> MG_TCPIP_STATE_* 2023-03-09 11:25:02 -03:00
Sergio R. Caprile 3f760e1875 Merge pull request #2111 from cesanta/standex
standardize Zephyr examples
2023-03-08 17:35:39 -03:00
Sergio R. Caprile 1da134c38c Merge pull request #2110 from cesanta/pico-w5500
Gen MAC from board ID, standardize
2023-03-08 17:30:54 -03:00
Sergio R. Caprile 0bf96e9864 standardize Zephyr examples 2023-03-08 16:41:21 -03:00
Sergio R. Caprile 1f5c19306e Gen MAC from board ID, standardize 2023-03-08 11:51:55 -03:00
Sergio R. Caprile db10b3821c Merge pull request #2109 from cesanta/standex
Standex
2023-03-08 11:50:30 -03:00
Sergio R. Caprile 4245a6d04d update 2023-03-08 11:44:34 -03:00
Sergio R. Caprile 6920c1159b rework serial config 2023-03-07 16:02:02 -03:00
Sergio R. Caprile 3801e1eade Merge pull request #2107 from cesanta/standex
read MAC from flash
2023-03-07 15:59:14 -03:00
Sergio R. Caprile 3e419303a7 read MAC from flash 2023-03-06 17:33:17 -03:00
Sergio R. Caprile 0de1e6a3af Merge pull request #2106 from cesanta/standex
Standardize TM4C FreeRTOS
2023-03-06 16:01:49 -03:00
Sergio R. Caprile 99c415f898 Standardize TM4C FreeRTOS 2023-03-06 15:57:51 -03:00
Sergio R. Caprile f68d83dbf0 Merge pull request #2103 from cesanta/standex
standardize TM4C baremetal
2023-03-02 20:57:41 -03:00
Sergio R. Caprile 6e97905bce standardize TM4C baremetal 2023-03-02 20:44:35 -03:00
Sergio R. Caprile 572a10d5a0 Merge pull request #2100 from cesanta/standex
Update Makefiles and READMEs
2023-03-01 11:30:08 -03:00
Sergio R. Caprile eaa6199de0 Update Makefiles and READMEs 2023-03-01 11:28:24 -03:00
Sergio R. Caprile 70799101e4 Merge pull request #2099 from cesanta/standex
Update symlinks and Makefiles
2023-02-28 18:25:24 -03:00
Sergio R. Caprile 9cc70d0323 Update symlinks and Makefiles 2023-02-28 18:18:26 -03:00
cpq 20c5da6e55 Fix build - NULL pointer check 2023-02-28 17:55:25 +00:00
cpq 4c356bc368 Merge branch 'master' of github.com:cesanta/mongoose 2023-02-28 17:41:37 +00:00
Sergio R. Caprile aeb04deae4 Merge pull request #2098 from cesanta/tstexmac 2023-02-28 14:22:05 -03:00
Sergio R. Caprile 873e4d6547 Update Makefile 2023-02-28 14:18:39 -03:00
Sergio R. Caprile 9ba20304c2 Update test.yml 2023-02-28 14:14:57 -03:00
Sergio R. Caprile 252619b1a0 Merge pull request #2097 from cesanta/tstexwin
Test some examples on Windows
2023-02-28 14:07:10 -03:00
Sergio R. Caprile 38b129de66 Test some examples on Windows
closes #2047
2023-02-28 14:04:02 -03:00
Sergey Lyubka da028d1af9 Merge pull request #2096 from cesanta/fixrmii
Update RMII example, enhance MIP
2023-02-28 08:34:20 +00:00
Sergio R. Caprile bba361016d Update RMII ex, enhance MIP 2023-02-27 18:30:53 -03:00
Sergio R. Caprile c362af1f81 Merge pull request #2095 from cesanta/fixrndis
Fix RNDIS examples
2023-02-27 11:35:05 -03:00
Sergio R. Caprile 520507afd9 unbreak RNDIS examples 2023-02-27 11:28:42 -03:00
Sergio R. Caprile 4e7584167b force check and failures 2023-02-27 10:54:32 -03:00
Sergio R. Caprile 112bd61a25 Merge pull request #2094 from cesanta/fixwf
Update test.yml
2023-02-27 10:23:52 -03:00
Sergio R. Caprile 1df8bc0dfe Update test.yml
Fix embedded matrix workflow not signalling changes and not running
2023-02-27 10:22:52 -03:00
cpq f2076fe309 Add more tests for mg_strstr() 2023-02-26 01:32:03 +00:00
Sergey Lyubka 67dea15bf2 Merge pull request #2076 from cesanta/q
Use mg_queue in mip
2023-02-24 19:57:20 +00:00
cpq 910f19fe55 Use mg_queue in mip 2023-02-24 19:40:31 +00:00
Sergio R. Caprile 290bf0b6d2 Merge pull request #2093 from cesanta/standex
update Makefiles and symlinks
2023-02-24 15:49:35 -03:00
Sergio R. Caprile 4c87a776e6 updated Makefiles and symlinks 2023-02-24 13:46:31 -03:00
Sergio R. Caprile 4436093816 Merge pull request #2092 from cesanta/standex
standardize examples
2023-02-23 19:07:44 -03:00
Sergio R. Caprile b85aa7b084 Merge pull request #2090 from cesanta/tcp
mark we consumed data
2023-02-23 14:38:14 -03:00
Sergio R. Caprile 99e28b639d mark we consumed data 2023-02-23 14:35:26 -03:00
Sergio R. Caprile 9b94b4da26 fix build for Windows
(read from stdin does not work)
2023-02-23 14:04:10 -03:00
Sergio R. Caprile 5b46986628 update Makefiles and symlinks 2023-02-23 11:32:53 -03:00
Sergio R. Caprile d0e5690bfd Merge pull request #2088 from cesanta/standex
update Makefiles and symlinks
2023-02-22 16:58:49 -03:00
Sergio R. Caprile ddbfa06bcc update Makefiles and symlinks 2023-02-22 16:38:21 -03:00
Sergio R. Caprile 2c6fc99c68 Merge pull request #2084 from cesanta/standex
updated Makefiles and symlinks
2023-02-21 17:31:02 -03:00
Sergio R. Caprile d8ad0ac72c updated Makefiles and symlinks 2023-02-21 16:05:25 -03:00
Sergio R. Caprile 9de50d7981 Merge pull request #2083 from cesanta/standex
#2046 #2047
2023-02-21 14:53:04 -03:00
Jean-François SimonandJean-Francois Simon 2c5c46dc48 Fix headers (drivers) (#2081)
Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2023-02-21 16:39:53 +01:00
Jean-François SimonandJean-Francois Simon 6423b4cbb9 rt1020 driver check frame crc/truncated (#2080)
Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2023-02-21 16:27:04 +01:00
Sergio R. Caprile 2566aa725a http-proxy-client Makefile 2023-02-21 12:16:39 -03:00
Sergio R. Caprile eb463bbb2b READMEs, golden update collaterals, etc 2023-02-21 12:07:48 -03:00
Sergio R. Caprile 1a8a559d84 Merge pull request #2079 from cesanta/time
Fix #2075. Add MG_HTTP_DIRLIST_TIME_FMT, remove MG_HTTP_DIRLIST_TIME and MG_HTTP_DIRLIST_TIME_UTC
2023-02-20 20:13:56 -03:00
cpq 57c1d787e3 Fix #2075. Add MG_HTTP_DIRLIST_TIME_FMT, remove MG_HTTP_DIRLIST_TIME and MG_HTTP_DIRLIST_TIME_UTC 2023-02-20 21:25:55 +00:00
Sergey Lyubka 999a32424f Merge pull request #2078 from cesanta/standex
Golden Makefiles
2023-02-20 19:54:02 +00:00
Sergio R. Caprile c2ed20ba23 Golden Makefiles 2023-02-20 16:20:28 -03:00
Sergio R. Caprile 01cbb37359 Merge pull request #2077 from cesanta/standex
huge response
2023-02-20 16:17:15 -03:00
Sergio R. Caprile 3e205e9536 huge response 2023-02-20 16:15:30 -03:00
Sergio R. Caprile b29d6b4478 _sbrk in TI 2023-02-17 11:11:31 -03:00
Sergey Lyubka b9424e4c21 Merge pull request #2073 from cesanta/sbrk
Fix _sbrk()
2023-02-17 14:00:32 +00:00
Sergio R. Caprile 87fe912d8d Merge pull request #2074 from cesanta/standex
Standardize examples and make them Windows friendly
2023-02-17 10:59:55 -03:00
Sergio R. Caprile 59343c2f82 http-client 2023-02-17 10:57:54 -03:00
Sergio R. Caprile 700fc64383 update devdash README 2023-02-17 10:40:53 -03:00
Sergio R. Caprile ca256b9949 Win friendly #2047 2023-02-17 10:40:53 -03:00
cpq 68750f3455 Expand on integration steps 2023-02-17 10:49:05 +00:00
cpq 906fc417c8 Expand on crossplatform ability 2023-02-17 10:46:45 +00:00
cpq ac203c56df Expand on crossplatform ability 2023-02-17 10:46:16 +00:00
cpq 734ad45f1c Expand on crossplatform ability 2023-02-17 10:44:55 +00:00
cpq 4a1f2e0dd3 Fix mg_fs_posix.st() for Windows symlinks using ftell 2023-02-17 10:36:06 +00:00
cpq 24e3514640 Fix mg_fs_posix.st() for Windows symlinks 2023-02-17 10:20:33 +00:00
Sergio R. Caprile dadb05e022 Add heap limit 2023-02-16 15:17:19 -03:00
cpq ca3dfb3c07 Docs notes 2023-02-16 16:41:26 +00:00
cpq cf452942fa More windows-friendly makefile for rp2040/pico-w5500 2023-02-16 14:23:52 +00:00
Sergey Lyubka 28ee40bebe Merge pull request #2067 from cesanta/pico
Use RNG in examples/pico-w5500
2023-02-16 08:01:11 +00:00
cpq 6267752a2a Use RNG in examples/pico-w5500 2023-02-16 07:53:11 +00:00
Sergey Lyubka 2ece24e077 Merge pull request #2066 from cesanta/queue
Refactor queue
2023-02-15 22:33:07 +00:00
Sergio R. Caprile 59013e62d3 Merge pull request #2072 from cesanta/standex
Standardize examples
2023-02-15 18:07:54 -03:00
Sergio R. Caprile 824763aae9 standardize 2023-02-15 18:04:48 -03:00
Sergey Lyubka a8c5b04feb Merge pull request #2070 from cesanta/fixcl
Fix content-length header in mg_http_reply()
2023-02-15 19:22:03 +00:00
Sergey Lyubka 64f069ec24 Merge pull request #2043 from cesanta/randomize
Seed fallback clib PRNG with some entropy
2023-02-15 19:20:50 +00:00
cpq 515e438d4f Refactor queue 2023-02-15 18:53:44 +00:00
Sergio R. Caprile 9ec064f9d9 symlinks 2023-02-15 15:22:46 -03:00
Sergio R. Caprile 60c6b04a01 Add mg_srand() and seed with some entropy 2023-02-15 14:29:02 -03:00
Sergio R. Caprile 9deaa81a72 Merge pull request #2071 from cesanta/standex
captive-dns
2023-02-15 14:27:15 -03:00
Sergio R. Caprile ae703db6ee captive-dns 2023-02-15 14:22:48 -03:00
Sergio R. Caprile 267f54bc0e Fix content-length header in mg_http_reply() 2023-02-15 11:28:14 -03:00
cpq 8aa26fb2cd Fix fuzzer workflow 2023-02-15 14:25:04 +00:00
cpq e7667f2537 Merge branch 'master' of github.com:cesanta/mongoose 2023-02-14 15:12:59 +00:00
cpq bac15d2ecf Fix #2063 - a typo 2023-02-14 15:12:51 +00:00
Sergio R. Caprile ae27e07903 Merge pull request #2068 from cesanta/stm32-rndis
Standardize STM32 RNDIS examples
2023-02-14 12:10:55 -03:00
Sergio R. Caprile 605dfa7366 Standardize STM32 RNDIS examples 2023-02-13 18:40:09 -03:00
Sergio R. Caprile 85db19e33f Merge pull request #2064 from cesanta/renaming-stm32
simplify names
2023-02-13 17:00:40 -03:00
Sergio R. Caprile 052bc6b356 Merge pull request #2065 from cesanta/scaprile-patch-1
Update test.yml
2023-02-13 16:59:09 -03:00
Sergio R. Caprile 24985e2bca Update test.yml 2023-02-13 16:58:33 -03:00
Sergio R. Caprile 8e3eb8b3d2 simplify names 2023-02-13 16:54:26 -03:00
Sergio R. Caprile 2be44dbd94 Merge pull request #2061 from cesanta/efe4f
Update and standardize F4 FreeRTOS
2023-02-13 11:08:31 -03:00
Sergio R. Caprile 7c6b26faa2 Merge pull request #2062 from cesanta/scaprile-patch-2
Update test.yml
2023-02-13 11:07:41 -03:00
Sergio R. Caprile cfc42512ed Update test.yml 2023-02-13 11:07:16 -03:00
Sergio R. Caprile 50f5834296 Update and standardize F4 FreeRTOS 2023-02-13 10:53:59 -03:00
Jean-François SimonandJean-Francois Simon 07e91bb73a Fix build mip -> mg_tcpip (#2060)
Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2023-02-13 12:02:57 +01:00
Sergey Lyubka 3c547eeed8 Merge pull request #2059 from cesanta/test
Serialize HW tests
2023-02-13 08:16:57 +00:00
cpq 6f011fce3b Serialize HW tests 2023-02-13 03:10:09 +00:00
cpq 5aebed95a4 Fix VC98 build 2023-02-12 10:41:51 +00:00
Sergey Lyubka 8321f9f6e9 Merge pull request #2034 from cesanta/queue
Add struct mg_queue and API, change examples/multi-threaded, add tests
2023-02-12 10:04:13 +00:00
cpq bf9d69ab56 Add struct mg_queue and API, change examples/multi-threaded, add tests 2023-02-11 13:24:26 +00:00
Sergio R. Caprile faaff57d2b update Makefile 2023-02-10 21:24:42 -03:00
Sergio R. Caprile 40667ef1c1 Update Makefile 2023-02-10 20:52:55 -03:00
Sergio R. Caprile 04b4e3298b Merge pull request #2056 from cesanta/f7f
Make example as README says
2023-02-10 20:30:06 -03:00
Sergio R. Caprile 43cbd3a61e Merge pull request #2058 from cesanta/scaprile-patch-1
make F7 FreeRTOS testable
2023-02-10 20:24:04 -03:00
Sergio R. Caprile bfb091f2f4 make F7 FreeRTOS testable 2023-02-10 20:23:39 -03:00
Sergio R. Caprile 4974303e6b Make example as README says 2023-02-10 20:06:25 -03:00
Sergio R. Caprile 664bb0a663 Merge pull request #2055 from cesanta/makefiles
minor updates
2023-02-10 19:45:09 -03:00
Sergio R. Caprile 491596d03d minor updates 2023-02-10 19:41:27 -03:00
Sergio R. Caprile 75538be235 Merge pull request #2054 from cesanta/efe4
Standardize F4 baremetal
2023-02-10 17:28:05 -03:00
Sergio R. Caprile 1cb99ea2fc Standardize F4 baremetal 2023-02-10 15:53:55 -03:00
Sergey Lyubka c0f4bde5fc Merge pull request #2051 from cesanta/fmt
Split mg_*printf* functions into src/printf.c/h
2023-02-10 16:52:34 +00:00
cpq a4430dd49d Split mg_*printf* functions into src/printf.c/h 2023-02-10 15:47:23 +00:00
Jean-François SimonandJean-Francois Simon b513d40bd6 add coverage ws.c (#2050)
Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2023-02-10 15:51:44 +01:00
cpq fbaaf89a21 Update screenshot 2023-02-09 22:47:48 +00:00
cpq 7625a0154e Using webp for screenshots 2023-02-09 22:41:49 +00:00
cpq 396ee803b2 Remove -c core.symlinks arg from the clone command 2023-02-09 20:06:53 +00:00
cpq 5a42319a07 Add readme rule 2023-02-09 20:04:59 +00:00
cpq 61b9820f78 Update READMEs 2023-02-09 20:04:07 +00:00
Sergio R. Caprile a383a45269 Merge pull request #2044 from cesanta/eph1
Fix ifp->eport init
2023-02-09 16:41:25 -03:00
Sergio R. Caprile 7bd4869ae6 Merge pull request #2048 from cesanta/rules
Add a rule on symlink
2023-02-09 16:12:23 -03:00
cpq 49a6559453 Add a rule on symlink 2023-02-09 19:00:10 +00:00
cpq 2e16a10720 Fix ifp->eport init 2023-02-09 18:39:14 +00:00
Sergey Lyubka cd973b50ff Merge pull request #2042 from cesanta/eph
Use linux ephemeral range (start from 32768). More TCP debug
2023-02-09 17:40:49 +00:00
cpq b6fc67fff2 Use linux ephemeral range (start from 32768). More TCP debug 2023-02-09 15:20:08 +00:00
Jean-François Simon 12f00d785d mg_tcpip_imxrt1020 (#2033)
MG_TCPIP driver for NXP i.MX RT1020
2023-02-09 15:31:59 +01:00
Jean-François Simon de1ff6ed49 Add test to mqtt (#2041)
Test coverage mqtt
2023-02-09 15:05:55 +01:00
Sergio R. Caprile d0a6cbe5dd Merge pull request #2038 from cesanta/h7
Use CMSIS for H7
2023-02-09 09:18:09 -03:00
cpq 35924ce550 Use CMSIS for H7 2023-02-09 11:08:22 +00:00
Jean-François Simon ad1d8cbedd Add test to mqtt (#2040)
coverage: mqtt
2023-02-09 11:36:08 +01:00
Sergey Lyubka 6294ce59f7 Merge pull request #2035 from cesanta/rndismass
Add mass-storage disk with an index file
2023-02-08 15:58:18 +00:00
Sergio R. Caprile d445ff40c2 Add mass-storage disk with an index file 2023-02-08 12:38:11 -03:00
Sergey Lyubka c6010c3ab4 Merge pull request #2031 from cesanta/sym
Note about symlinks
2023-02-08 12:56:16 +00:00
Sergio R. Caprile 9da80d7b7d Merge pull request #2032 from cesanta/move
Move mip/ -> src/tcpip/, rename mip_ -> mg_tcpip_
2023-02-08 09:49:06 -03:00
cpq 2c62e58dbd Move mip/ -> src/tcpip/, rename mip_ -> mg_tcpip_ 2023-02-07 21:35:37 +00:00
Sergio R. Caprile efc54375dd Merge pull request #2028 from cesanta/mip
Kill ARP cache, kill qprofile
2023-02-07 15:42:20 -03:00
cpq 0c3946033b Note about symlinks 2023-02-07 15:42:17 +00:00
cpq 9dc86aa77d Kill ARP cache, kill qprofile 2023-02-07 14:26:03 +00:00
Sergey Lyubka 0cbe320a5f Merge pull request #2029 from cesanta/rules
Add examples/readme with rules
2023-02-07 13:41:37 +00:00
cpq 1c749a5310 Add filter for cifuzz 2023-02-07 12:17:46 +00:00
cpq a647a69791 Add examples/readme with rules 2023-02-07 12:15:50 +00:00
Sergey Lyubka 12db089c73 Merge pull request #2027 from cesanta/mip
Introduce sysinit.c, better debug log, more verbose Makefile
2023-02-06 22:38:33 +00:00
cpq f5ff7cfcf1 Introduce sysinit.c, better debug log, more verbose Makefile 2023-02-06 21:26:14 +00:00
Sergey Lyubka 2ddf71ec46 Merge pull request #2024 from cesanta/cmsis
Use CMSIS headers for f429 and f746 baremetal examples
2023-02-06 19:16:24 +00:00
Sergio R. Caprile 9017374292 Merge pull request #2025 from cesanta/ga
Tune GA checker
2023-02-06 14:28:26 -03:00
cpq 633f50cf5b Tune GA checker 2023-02-06 15:18:40 +00:00
cpq 1993e9c65b Use CMSIS headers for f429 and f746 baremetal examples 2023-02-06 15:00:09 +00:00
Sergio R. Caprile 8edc8610dc Merge pull request #2023 from cesanta/push
Reduce the number of redundant test runs. Disable SNTP test on macos …
2023-02-06 11:25:33 -03:00
Sergey Lyubka 6700b373cd Merge pull request #2022 from cesanta/win
Adopt Makefile for Windows. Update examples readme section
2023-02-06 14:21:56 +00:00
cpq 8d824799a0 Reduce the number of redundant test runs. Disable SNTP test on macos - it is flaky 2023-02-05 01:11:22 +00:00
cpq dc86c62d8b Adopt Makefile for Windows. Update examples readme section 2023-02-04 14:15:53 +00:00
Sergio R. Caprile 4ae4ff72e3 Merge pull request #2020 from cesanta/h743zi
Add STM32H743ZI driver and example
2023-02-03 18:33:46 -03:00
Sergio R. Caprile 958eebb16c Add STM32H743ZI driver and example 2023-02-03 18:04:29 -03:00
Sergio R. Caprile 43e48d2ba6 Merge pull request #2017 from cesanta/mipneat
qprofile related fixes
2023-02-02 17:34:28 -03:00
Sergio R. Caprile b6d8099c74 small tweaks
fix qprofile with latest changes

minor tweaks and qpfrofile related fixes
2023-02-02 17:09:27 -03:00
Sergio R. Caprile 25bac7c5ce Merge pull request #2016 from cesanta/percentia
Docs update, remove %I and %A extensions
2023-02-02 16:33:18 -03:00
Sergio R. Caprile 5d7a080e39 Remove %I and %A 2023-02-02 16:28:24 -03:00
Sergio R. Caprile b2a76dba98 Merge pull request #2014 from cesanta/halfnofast
Add support for 10M and half-duplex in STM32 and TM4C drivers
2023-02-02 13:30:35 -03:00
cpq 15ad69c8cb Add How to build examples section 2023-02-02 15:34:27 +00:00
Sergio R. Caprile e3ca006265 Add support for 10M and half-duplex in STM32 and TM4C drivers 2023-02-02 12:02:44 -03:00
cpq 961cc13948 Nits: fix DNS resolution message. Add Makefile comment for testing targets 2023-02-02 10:33:00 +00:00
Sergio R. Caprile 50da233258 Merge pull request #2011 from cesanta/test-f746
Update test.yml
2023-02-01 20:14:24 -03:00
Sergio R. Caprile 15ad58b5cc Merge pull request #2010 from cesanta/f429-debug-uart
Use UART_DEBUG
2023-02-01 19:53:53 -03:00
Sergio R. Caprile 61a27ff430 Update test.yml
closes #1999
( mods in #2009 )
2023-02-01 19:49:14 -03:00
Sergio R. Caprile befdb0a708 Merge pull request #2009 from cesanta/test-f746
Mods to be testable
2023-02-01 19:39:53 -03:00
Sergio R. Caprile 06b79600ac Use UART_DEBUG 2023-02-01 19:37:35 -03:00
Sergio R. Caprile b9e633ad06 Mods to be testable 2023-02-01 19:26:47 -03:00
Sergio R. Caprile 736a78faed Merge pull request #2007 from cesanta/rl
Better error handling for RL NET
2023-02-01 18:23:13 -03:00
cpq d76e69f9a7 Use UART_DEBUG 2023-02-01 21:08:24 +00:00
cpq 1612e1d142 Better error handling for RL NET 2023-02-01 13:59:47 +00:00
Sergio R. Caprile 56a33fd4c5 Merge pull request #2003 from cesanta/mip-percentia
Do not use %I %A in MIP
2023-02-01 09:15:15 -03:00
Sergio R. Caprile 1ca3244868 Merge pull request #2005 from cesanta/nosymlink
Remove symlinks in pico example
2023-01-31 15:40:37 -03:00
Sergio R. Caprile 8f358f09b8 Remove symlinks in pico example 2023-01-31 15:34:15 -03:00
Sergio R. Caprile d903de6526 Merge pull request #2004 from cesanta/nodupfiles
Remove dups in Zephyr dirs
2023-01-31 15:14:10 -03:00
Sergio R. Caprile c41ade2983 Remove dups in Zephyr dirs 2023-01-31 14:51:48 -03:00
Sergio R. Caprile 99dbbc7f39 Do not use %I %A in MIP 2023-01-31 14:37:00 -03:00
Sergio R. Caprile 4dd51cc889 Merge pull request #2002 from cesanta/print_mac
Add mg_print_mac()
2023-01-31 13:49:42 -03:00
Sergio R. Caprile 54c651f7e2 Add mg_print_mac() 2023-01-31 13:31:46 -03:00
Sergio R. Caprile d1c9d7ffdc Merge pull request #2000 from cesanta/tls
Add TLS to pico-w5500 baremetal example
2023-01-30 18:37:00 -03:00
cpq 052b40680d Add TLS to pico-w5500 baremetal example 2023-01-30 21:30:10 +00:00
Sergio R. Caprile b0d2519192 Merge pull request #2001 from cesanta/examples-percentia
do not use %I in examples
2023-01-30 18:21:18 -03:00
Sergio R. Caprile 997da11cc5 do not use %I 2023-01-30 17:13:38 -03:00
Sergio R. Caprile 476232ea22 Merge pull request #1995 from cesanta/mg_print_ip
Add mg_print_ip, mg_print_ip_port helper functions
2023-01-30 16:57:45 -03:00
Sergey Lyubka 4c83f4e2de Merge pull request #1987 from hakabahitoyo/bugfix-openssl-tls-sni
Bugfix OpenSSL TLS SNI
2023-01-30 11:43:43 +00:00
cpq 4bf39e18d9 Add mg_print_ip, mg_print_ip_port helper functions 2023-01-29 14:30:06 +00:00
cpq edfa533a4d Correct the description 2023-01-27 22:45:35 +00:00
cpq 28262145ab Better upload flow 2023-01-27 22:16:24 +00:00
cpq 51136ce982 Merge branch 'master' of github.com:cesanta/mongoose 2023-01-27 09:36:24 +00:00
cpq 84893ec582 Small usability nits 2023-01-27 09:36:16 +00:00
Sergio R. Caprile 4236405b90 Ready to release 2023-01-24 13:30:45 -03:00
Sergio R. Caprile 292c66e25c Merge pull request #1992 from cesanta/revert-1920-patch-1
Revert "Update comment for the path of rest API"
2023-01-24 11:42:18 -03:00
Sergio R. Caprile 5aa6c15c76 Revert "Update comment for the path of rest API" 2023-01-24 11:41:51 -03:00
Sergio R. Caprile 1f89dc47cb Merge pull request #1991 from cesanta/revert-1797-fix-typo
Revert "Fix typo in documentation"
2023-01-24 11:36:51 -03:00
Sergio R. Caprile 31393128c8 Revert "Fix typo in documentation" 2023-01-24 11:35:26 -03:00
Sergio R. Caprile 232a18425a Merge pull request #1990 from cesanta/revert-1705-master
Revert "fix the doc error: htts to https"
2023-01-24 11:33:02 -03:00
Sergio R. Caprile 88e2eb2a49 Revert "fix the doc error: htts to https" 2023-01-24 11:31:25 -03:00
Sergey Lyubka e635d5f748 Merge pull request #1986 from cesanta/w5
Add examples/rp2040/pico-w5500 to hwtest
2023-01-23 12:32:14 +00:00
Sergey Lyubka 08a23cdb2f Merge pull request #1988 from cesanta/h743
Add nucleo-h743zi-baremetal boilerplate, with HW test
2023-01-23 12:31:55 +00:00
cpq 1ead940623 Add nucleo-h743zi-baremetal boilerplate, with HW test 2023-01-22 11:48:56 +00:00
Hakaba Hitoyo 382362668e bugfix openssl tls sni 2023-01-22 14:27:44 +09:00
cpq 987f8bc949 Prep for msc 2023-01-21 13:42:25 +00:00
cpq 6f096333d3 make clean: invoke docker only when there is something to clean 2023-01-21 07:44:50 +00:00
cpq 5a25111b20 Add examples/rp2040/pico-w5500 to hwtest 2023-01-21 02:21:20 +00:00
Sergio R. Caprile c7cb16cafa Merge pull request #1984 from cesanta/ti-nodocker
Get rid of Docker (TI), part 2: FreeRTOS
2023-01-20 18:47:55 -03:00
Sergio R. Caprile a746a698b6 Merge pull request #1983 from cesanta/stm32-nodocker
Get rid of Docker, part 2: FreeRTOS
2023-01-20 18:47:27 -03:00
Sergio R. Caprile 9a7f7255ff Get rid of Docker, part 2: FreeRTOS 2023-01-20 18:20:19 -03:00
Sergio R. Caprile d3df6b8f4f Get rid of Docker (TI), part 2: FreeRTOS 2023-01-20 18:19:29 -03:00
Sergio R. Caprile fcffd17b11 Merge pull request #1982 from cesanta/freertos
Fix FreeRTOS arch includes on newlib platforms
2023-01-20 18:16:55 -03:00
Sergio R. Caprile 7fc6be9f39 Fix FreeRTOS arch includes on newlib platforms 2023-01-20 18:09:21 -03:00
Sergio R. Caprile 7362744ff8 Merge pull request #1981 from cesanta/stm32uarts
Fix UART1,2 clocking in all other examples
2023-01-20 18:00:46 -03:00
Sergio R. Caprile f4d058155a Fix UART1,2 clocking in all other examples 2023-01-20 17:49:57 -03:00
Sergio R. Caprile b04612e80d Merge pull request #1975 from cesanta/hwtest
Cleanup, adopt for HW test
2023-01-20 16:26:05 -03:00
Sergio R. Caprile 5f00e4d34d Merge pull request #1980 from cesanta/ti-nodocker
Get rid of Docker (TI), part 1
2023-01-20 16:21:45 -03:00
cpq e967feb091 Cleanup, adopt for HW test 2023-01-20 18:46:19 +00:00
Sergio R. Caprile 0445b18bb9 Merge pull request #1977 from cesanta/reallyclean
Apply a deeper cleanser
2023-01-20 15:36:51 -03:00
Sergio R. Caprile 99f1f749cf Apply a deeper cleanser 2023-01-20 15:27:37 -03:00
Sergio R. Caprile f4d16f1c47 Get rid of Docker (TI), part 1 2023-01-20 15:06:03 -03:00
Sergio R. Caprile 68071d6caf Merge pull request #1976 from cesanta/stm32-nodocker
Get rid of Docker, part 1
2023-01-20 14:14:07 -03:00
Sergio R. Caprile 44975da7db Get rid of Docker, part 1 2023-01-20 12:42:38 -03:00
Sergio R. Caprile e4566518b2 Merge pull request #1978 from cesanta/test-nosprintf
Make MacOS happy by getting rid of sprintf()
2023-01-20 12:41:09 -03:00
novlean c038cb5b96 Merge pull request #1979 from cesanta/novlean-patch-1
2023
2023-01-20 15:31:07 +00:00
novlean d7eb3db60b 2023 2023-01-20 15:28:16 +00:00
Sergio R. Caprile 44e781d7da Make MacOS happy be getting rid of sprintf() 2023-01-20 11:54:56 -03:00
Sergio R. Caprile 0951d58c8f Merge pull request #1974 from cesanta/stm32uarts
Fix AF in UART1,2
2023-01-19 16:31:55 -03:00
Sergio R. Caprile 37c0ed0b49 Fix AF in UART1,2 2023-01-19 15:28:51 -03:00
cpq 556bf7b888 Fix uart_init(), use correct AF for UART1/UART2 2023-01-19 10:31:26 +00:00
Sergey Lyubka 280be2eaea Merge pull request #1968 from cesanta/ackstream
Don't retrigger ACK timer
2023-01-18 08:52:12 +00:00
Sergio R. Caprile 13f9357f8e Merge pull request #1970 from cesanta/test-pico-rndis
Update test.yml
2023-01-17 15:19:45 -03:00
Sergio R. Caprile 56e015db0e Enable test for pico-rndis-dashboard 2023-01-17 14:58:05 -03:00
Sergio R. Caprile 1068fbf079 Merge pull request #1969 from cesanta/pico-dash
Simplify build
2023-01-17 13:59:54 -03:00
Sergio R. Caprile 45f7afb3e1 Simplify build 2023-01-17 13:54:22 -03:00
Sergio R. Caprile 0d3fc2b656 Don't retrigger ACK timer 2023-01-16 20:16:59 -03:00
Sergio R. Caprile 2dc66b2e3b Merge pull request #1966 from cesanta/test-pico-rmii
Update test.yml
2023-01-16 16:48:10 -03:00
Sergio R. Caprile 0b9129d8f5 Update test.yml 2023-01-16 15:36:50 -03:00
cpq 82d702fedc mg_url_encode() 0-terminate the destination 2023-01-16 15:05:04 +00:00
Sergey Lyubka 197be75677 Merge pull request #1960 from cesanta/keepalive
TCP keepalives
2023-01-16 10:40:28 +00:00
cpq 3f9aff1b10 Update uart logs with Ethernet status 2023-01-15 12:03:40 +00:00
Sergey Lyubka f5ed50fa88 Merge pull request #1959 from cesanta/handle-rst
Handle TCP RST
2023-01-14 00:16:40 +00:00
Sergio R. Caprile 645b52602f Update main.c 2023-01-13 15:08:00 -03:00
Sergio R. Caprile 27a8e60e9a TCP keepalives 2023-01-12 15:58:25 -03:00
Sergio R. Caprile 201ffa108b Handle TCP RST 2023-01-11 17:33:37 -03:00
Sergey Lyubka 1661bd6691 Merge pull request #1955 from cesanta/picormii
Add RMII example for RP2040
2023-01-11 10:40:10 +00:00
Sergio R. Caprile d431f4bbc5 Merge pull request #1957 from cesanta/pico-w5500
updated to ARCH_RP2040
2023-01-10 11:21:23 -03:00
Sergio R. Caprile 2b8e92a70d updated to ARCH_RP2040 2023-01-10 10:54:27 -03:00
Sergey Lyubka d70ab3cfa8 Merge pull request #1944 from cesanta/devdash
Add reduced functionality version
2023-01-10 12:31:03 +00:00
Sergey Lyubka 9402c6ad28 Merge pull request #1956 from cesanta/lbl
Rename struct mg_connection::label -> data. Make its size configurable
2023-01-10 08:34:22 +00:00
cpq da5e8e9778 Rename struct mg_connection::label -> data. Make its size configurable 2023-01-10 08:19:49 +00:00
Sergio R. Caprile feedfdf810 Update main.c 2023-01-09 14:31:04 -03:00
Sergio R. Caprile 6db0a502bf Add RMII example 2023-01-09 11:16:01 -03:00
Sergey Lyubka f07957d45e Merge pull request #1952 from cesanta/mipqueue
Rename mip_rxcb to mip_qwrite, add mip_qread and enforce rx() for drivers
2023-01-08 06:47:38 +00:00
cpq 3d75d71767 Do not show response handler in the rpc.list result 2023-01-08 06:38:08 +00:00
Sergio R. Caprile b259bdeddd Rename mip_rxcb to mip_qwrite, add mip_qread and enforce rx() for drivers 2023-01-03 19:33:26 -03:00
Sergey Lyubka 042465387f Merge pull request #1950 from cesanta/picodash
Add Pico dashboard
2023-01-02 20:14:34 +00:00
Sergio R. Caprile d09e4d648c Add Pico dashboard 2023-01-02 16:49:15 -03:00
Sergio R. Caprile 754910ad5f Merge pull request #1947 from cesanta/pico
Moved pico-w example
2023-01-02 15:48:24 -03:00
Sergio R. Caprile 977e080215 Update test.yml 2023-01-02 15:29:21 -03:00
Sergio R. Caprile a9ac947c96 Merge pull request #1949 from cesanta/scaprile-patch-1
Update test.yml
2023-01-02 15:23:15 -03:00
Sergio R. Caprile 28e6ef1d63 Update test.yml 2023-01-02 15:22:24 -03:00
Sergio R. Caprile b0f273157d Fix Makefile 2023-01-02 15:16:50 -03:00
Sergio R. Caprile 49add531c4 Moved pico-w example 2023-01-02 15:12:07 -03:00
cpq 8a1d2a5dca Install gcc-arm-none-eabi for examples 2023-01-02 17:53:55 +00:00
Sergey Lyubka 31c5883f5f Merge pull request #1946 from cesanta/rp2040-w5500
Add pico-w5500 example
2023-01-02 16:48:43 +00:00
Sergey Lyubka c625fbb43d Merge branch 'master' into rp2040-w5500 2023-01-02 16:48:34 +00:00
cpq 0f474e8d2a Add pico-w5500 example 2023-01-02 16:36:55 +00:00
Sergey Lyubka 73813a8383 Merge pull request #1943 from cesanta/add-test-for-RNDIS-examples
Update tests
2022-12-28 02:47:56 +00:00
Sergio R. Caprile d8fb110b56 Update test.yml 2022-12-27 20:34:10 -03:00
Sergio R. Caprile 77e62626a9 Add RNDIS examples to tests, remove "stm32/nucleo*" examples from "examples" test group 2022-12-27 20:27:08 -03:00
Sergio R. Caprile 24ee83f13d Update test.yml 2022-12-27 18:31:39 -03:00
Sergio R. Caprile 6791a36d85 Add reduced functionality version 2022-12-27 18:12:55 -03:00
Sergio R. Caprile c6a5a64e64 Update test.yml 2022-12-26 10:51:44 -03:00
Sergey Lyubka 311062dc41 Merge pull request #1938 from cesanta/F746rndis
Add RNDIS example for F7
2022-12-24 15:10:00 +00:00
Sergio R. Caprile 391ce1f009 Merge pull request #1939 from cesanta/tireadme
Added link to tutorial
2022-12-23 19:47:14 -03:00
Sergio R. Caprile 9f6d99352a Added link to tutorial 2022-12-23 19:45:57 -03:00
Sergio R. Caprile 02b1d6260a Add RNDIS example for F7 2022-12-23 19:28:33 -03:00
Sergio R. Caprile e8ade14259 Merge pull request #1937 from cesanta/tm4cdriverdata
Rename driver data structure
2022-12-23 16:27:42 -03:00
Sergio R. Caprile f0804dfed4 Merge pull request #1936 from cesanta/stm32driverdata
Rename driver data structure
2022-12-23 15:57:19 -03:00
Sergio R. Caprile f506344ada Rename driver data structure 2022-12-23 15:56:46 -03:00
Sergio R. Caprile ddca518cca Rename driver data structure 2022-12-23 15:45:30 -03:00
cpq 21d3678fa7 Add more on logging 2022-12-21 11:31:14 +00:00
cpq 3dd8d7d8e5 Add diagrams 2022-12-21 11:18:50 +00:00
Sergio R. Caprile 92aa538a84 Merge pull request #1934 from cesanta/myheart
Unbreak
2022-12-20 19:39:22 -03:00
Sergio R. Caprile 557a5583e8 Unbreak 2022-12-20 19:38:20 -03:00
Sergio R. Caprile b00ddff7dd Merge pull request #1933 from cesanta/fixmqttserver
Fix MQTT server example
2022-12-20 16:08:56 -03:00
Sergio R. Caprile cc3b311ab0 Fix MQTT server example 2022-12-20 16:06:46 -03:00
cpq 6cedca5d76 Remove DS_Store 2022-12-19 14:40:17 +00:00
Sergey Lyubka d82452e00f Merge pull request #1929 from cesanta/usb
Add TinyUSB example
2022-12-19 14:33:11 +00:00
cpq 57a5c0ba38 Add TinyUSB example 2022-12-19 14:31:54 +00:00
Sergio R. Caprile 28c8519e5b Merge pull request #1924 from cesanta/scaprile-patch-1
Update README.md
2022-12-15 10:31:37 -03:00
Sergio R. Caprile cfcb7191ea Update README.md 2022-12-15 09:52:19 -03:00
Sergey Lyubka 6921227ec8 Merge pull request #1915 from jfsimon1981/miptap
Mip tests and tuntap example to compile on OpenBSD natively.
2022-12-13 16:42:09 +00:00
Sergey Lyubka 1c9991ee83 Merge pull request #1916 from cesanta/stm32
Minor tweaks in STM32 examples
2022-12-13 16:40:38 +00:00
Sergey Lyubka fd475fcfff Merge pull request #1917 from cesanta/tm4c
Correct stack initialization
2022-12-13 16:40:10 +00:00
Sergio R. Caprile f47f995e90 Merge pull request #1921 from cesanta/scaprile-patch-1
Update test.yml
2022-12-13 13:02:11 -03:00
Sergio R. Caprile d93e943326 Update test.yml 2022-12-13 12:51:43 -03:00
Sergio R. Caprile 7ca9f2d5cd Merge pull request #1920 from jojo2massol/patch-1
Update comment for the path of rest API
2022-12-13 12:39:28 -03:00
jojo2massol ff1d45a008 Update comment for the path of rest API
rest api is available at `/rest` and not `/api/rest`
2022-12-13 15:33:51 +01:00
Sergio R. Caprile 53f0a72362 Merge pull request #1919 from cesanta/doc1918
Update README.md
2022-12-10 20:14:30 -03:00
Sergio R. Caprile 3a47242219 Update README.md
Closes #1918
2022-12-10 20:12:58 -03:00
Jean-Francois Simon 5556568feb Mip tests and tuntap example to compile on OpenBSD natively.
(updated for c++ build)

Fix typo
2022-12-09 18:48:05 +00:00
Sergio R. Caprile 6011a15cd4 Correct stack initialization 2022-12-09 15:47:23 -03:00
Sergio R. Caprile 2c014778d9 Minor tweaks in STM32 examples
Fix comments in newer mip initialization (main.c)
Correct stack initialization (boot.c)
Remove SCC clock enable when not needed (mcu.h)
2022-12-09 15:20:51 -03:00
Sergey Lyubka 0b2712f52f Merge pull request #1911 from cesanta/gwarp
Ask for gw mac when needed and not known
2022-12-09 11:51:40 +00:00
Sergey Lyubka 69f1acd823 Merge pull request #1912 from cesanta/nodupack
Avoid duplicated ACKs
2022-12-09 11:50:30 +00:00
cpq c0f15d50d6 Squash cppcheck warn 2022-12-09 09:29:34 +00:00
Sergio R. Caprile 1d3fe51e8b Avoid duplicated ACKs 2022-12-08 18:59:18 -03:00
Sergio R. Caprile d364d50c05 Improve MIP resiliency 2022-12-08 17:17:05 -03:00
Sergey Lyubka 615d324b11 Merge pull request #1906 from jfsimon1981/armfix
Fix arm and armhf test builds and unit_test runtime.
2022-12-07 18:31:29 +00:00
Jean-Francois Simon eb36b6755f Fix arm and armhf test builds and unit_test runtime.
Generalized with the correct define (comment from SC).
2022-12-07 17:09:13 +00:00
Sergey Lyubka 40c28d3b21 Merge pull request #1905 from cesanta/percentA
Use %I in mip.c
2022-12-07 07:22:10 +00:00
Sergio R. Caprile e726282023 Merge pull request #1908 from cesanta/tm4creadme
Add README
2022-12-06 17:10:19 -03:00
Sergio R. Caprile 327f734e4f Add README 2022-12-06 17:09:15 -03:00
Sergio R. Caprile b361f64d4f Merge pull request #1907 from cesanta/tests
Update test.yml
2022-12-06 16:25:47 -03:00
Sergio R. Caprile b38d215b3d Update test.yml 2022-12-06 15:53:18 -03:00
Sergio R. Caprile 99aa498bc4 Use %I in mip.c
Add %A to print hw address and use it in mip.c
Fix some debug data
2022-12-06 13:44:31 -03:00
Sergio R. Caprile f14798dec9 Merge pull request #1904 from cesanta/tm4cdriver
Improve TM4C driver
2022-12-06 11:08:44 -03:00
Sergio R. Caprile 65873f3dee Improve TM4C driver
- Fix clock guessing
- Frames are now read in order, and only host owned descriptors are checked
- Read as many frames as possible (but don't loop forever)
- Discard bad frames
- Fixed incorrect handling of RU bit and exit out of suspended condition
- If a frame arrives while processing, it will now generate a new interrupt (formerly it would wait for another frame to arrive as we reset the flag on exit)
2022-12-06 10:45:41 -03:00
Sergio R. Caprile fc98c88358 Merge pull request #1903 from cesanta/freemgstrdupdoc
Update README.md
2022-12-05 16:30:24 -03:00
Sergio R. Caprile 7c0440c148 Update README.md 2022-12-05 16:24:28 -03:00
Sergio R. Caprile ad051269ed Merge pull request #1899 from cesanta/castREADME
Update README.md
2022-12-04 19:17:23 -03:00
Sergio R. Caprile 497d8f25a1 Update README.md 2022-12-04 19:16:34 -03:00
Sergey Lyubka eb142f26f2 Merge pull request #1897 from cesanta/i
Fix #1888: add %I *printf specifier for IP address. Remove mg_ntoa, m…
2022-12-03 14:39:47 +00:00
cpq b01989f041 Fix #1888: add %I *printf specifier for IP address. Remove mg_ntoa, mg_straddr 2022-12-03 14:27:07 +00:00
Sergey Lyubka 84d89e80cd Merge pull request #1896 from cesanta/stm32driver
Improve STM32 driver
2022-12-03 09:40:38 +00:00
Sergio R. Caprile d059d2cda4 Improve STM32 driver 2022-12-02 19:47:29 -03:00
jfsimon1981 751413f050 MIP tuntap with dhcp added, enabled gitactions (#1890)
Enable DHCP with MIP tests.
Separate sources for high and low level stack tests.
Fixed assertion.
Added dhcpd.conf file.
2022-12-02 17:40:46 +01:00
Sergey Lyubka ce5e28554f Merge pull request #1891 from cesanta/baremetalREADMEs
Add links to tool installation in MIP hw examples
2022-12-02 07:12:46 +00:00
Sergio R. Caprile 860be3f96c Add links to tool installation in MIP hw examples 2022-12-01 17:23:16 -03:00
Sergey Lyubka 89fb3a3d6e Merge pull request #1889 from cesanta/mippoll
MG_EV_POLL generation on MIP
2022-12-01 07:25:19 +00:00
Sergio R. Caprile 474a07564c Make test NOT fail 2022-11-30 18:16:13 -03:00
Sergio R. Caprile 59b69a3b3b Add test for MG_EV_POLL generation 2022-11-30 12:13:45 -03:00
Sergey Lyubka 2553392e42 Merge pull request #1885 from cesanta/tm4c-freertos-mip
Add FreeRTOS + MIP example on TM4C
2022-11-29 15:17:48 +00:00
cpq fcd6901558 Fix broken mip_test 2022-11-29 14:55:36 +00:00
Sergio R. Caprile 716ffbb945 Add FreeRTOS + MIP tutorial on TM4C 2022-11-29 11:16:43 -03:00
Sergey Lyubka cd4b9aeafe Merge pull request #1884 from cesanta/macfilter
Fix MAC address filtering on STM32 and TM4C
2022-11-29 14:05:11 +00:00
Sergey Lyubka 5d712b6f54 Merge pull request #1886 from jfsimon1981/master
Release MIP tests using tuntap
2022-11-29 11:24:52 +00:00
Jean-Francois Simon 754c68fccc Release MIP tests using tuntap 2022-11-29 11:20:22 +01:00
Sergio R. Caprile 858f4da0d1 Fix MAC address filtering on STM32 and TM4C 2022-11-28 10:16:10 -03:00
Sergey Lyubka 90910a7a4f Merge pull request #1883 from cesanta/arpbcast
Fix sending ARP request for IP broadcasts
2022-11-26 11:58:16 +00:00
Sergey Lyubka cd218b59f9 Merge pull request #1882 from cesanta/f746zg-frertos-mip
Add FreeRTOS + MIP example on F746
2022-11-26 11:57:43 +00:00
Sergio R. Caprile 9625c49c95 Fix sending ARP request for IP broadcasts 2022-11-25 17:42:35 -03:00
Sergio R. Caprile 2dfed10d2e Add FreeRTOS + MIP example on F746 2022-11-25 16:57:35 -03:00
cpq a74d3737dc Fix mip-pcap 2022-11-25 14:23:59 +00:00
cpq 6c82a34aa0 Remove unused code 2022-11-25 10:00:04 +00:00
cpq 320d5656ac Remove unused code 2022-11-25 10:00:04 +00:00
Sergio R. Caprile a4a5778001 Merge pull request #1879 from cesanta/freestdlib
Add stdlib.h to includes in FreeRTOS arch
2022-11-24 10:34:24 -03:00
Sergio R. Caprile a80a003865 Add stdlib.h to includes in FreeRTOS arch 2022-11-24 10:15:03 -03:00
cpq 4607e46c6f Disable mip_test on macos 2022-11-24 07:21:55 +00:00
cpq 0aa3e2e49c Enable macos test 2022-11-24 07:02:17 +00:00
Sergio R. Caprile 595bb36956 Merge pull request #1878 from cesanta/Makefile
be able to flash target
2022-11-23 17:09:05 -03:00
Sergio R. Caprile afdf7e6df3 actually be able to flash target 2022-11-23 16:13:37 -03:00
Sergey Lyubka 3e1c7d7ef2 Merge pull request #1874 from cesanta/makefix
Fix wildcard in Makefile
2022-11-23 10:16:11 +00:00
cpq 7ce7c3deb7 Fix mingw build 2022-11-22 09:50:35 +00:00
Sergio R. Caprile c9b390ec60 Fix wildcard in Makefile 2022-11-21 16:57:15 -03:00
Sergey Lyubka cc2b826356 Merge pull request #1865 from jfsimon1981/master
Implemented MIP stack http_fetch()
2022-11-21 18:35:14 +00:00
Jean-Francois Simon 0b2c493731 Merge branch 'master' of https://github.com/jfsimon1981/mongoose 2022-11-21 15:33:42 +01:00
Jean-Francois Simon 0d7bbc51e7 Implemented MIP stack http_fetch()
This approach used tuntap driver for Linux/Unices
2022-11-21 15:32:45 +01:00
Sergey Lyubka db81c30d24 Merge pull request #1871 from cesanta/straddr
Fix mg_straddr() stack overwrite
2022-11-21 07:00:23 +00:00
cpq 41ea8de0d6 Mark request close for HTTP redirects 2022-11-20 12:18:15 +00:00
Sergio R. Caprile c4b5b37568 Fix mg_straddr() stack overwrite 2022-11-19 19:44:52 -03:00
Sergio R. Caprile 76e6b23a4f Update README.md 2022-11-18 18:06:48 -03:00
Sergio R. Caprile 283e295a98 Merge pull request #1869 from cesanta/miptap
Add missing include
2022-11-18 12:28:59 -03:00
Sergio R. Caprile 606009afb0 Add missing include
linux/if uses struct sockaddr that is defined in sys/socket.h. This breaks building on some systems. It went unnoticed as it was hidden by mongoose.h being included first
2022-11-18 10:51:58 -03:00
Sergey Lyubka da303b8b4f Merge pull request #1858 from cesanta/LAA
change MIP MAC to LAA
2022-11-18 10:41:12 +00:00
Sergey Lyubka d4048661ae Merge pull request #1857 from cesanta/scaprile-patch-1
Update issue_template.md
2022-11-18 10:39:34 +00:00
Sergey Lyubka 47853547ca Merge pull request #1856 from cesanta/zephyr-tests
Zephyr tests
2022-11-18 10:39:13 +00:00
Jean-Francois Simon 6ae9188af4 Implemented MIP stack http_fetch()
This approach used tuntap driver for Linux/Unices
2022-11-16 18:26:49 +01:00
jfsimon1981 d958ec2ac8 Revert "mip_test.c http fetch (#1851)" (#1864)
This reverts commit 07aac8e6e9.
2022-11-16 18:02:23 +01:00
jfsimon1981andJean-Francois Simon 07aac8e6e9 mip_test.c http fetch (#1851)
* Update mip_test.c

* Adding mip_free() function.

* Adding mip_free() function.

* Added MIP free.

* Fixed C++ builds.

* Proper C/C++ struct initialization.

* Squashed commit of the following:

commit 7ba68dd20d
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Wed Nov 16 16:19:50 2022 +0100

    Proper C/C++ struct initialization.

commit aeab3ef7ac
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 17:09:29 2022 +0100

    Fixed C++ builds.

commit 2afd529107
Merge: 14710b81 f8445a4c
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Tue Nov 15 11:33:56 2022 +0100

    Merge branch 'cesanta:master' into master

commit 14710b81e4
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:07:15 2022 +0100

    Added MIP free.

commit 6393cd149d
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:06:44 2022 +0100

    Adding mip_free() function.

commit feee81b733
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:05:55 2022 +0100

    Adding mip_free() function.

commit f8445a4c85
Merge: a39b7ddb 71f5be01
Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
Date:   Fri Nov 11 20:42:38 2022 -0300

    Merge pull request #1853 from cesanta/tibaremetaltest

    Update test.yml

commit 71f5be011b
Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
Date:   Fri Nov 11 20:15:01 2022 -0300

    Update test.yml

commit b53d3cf032
Merge: 7a71038a a39b7ddb
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Fri Nov 11 16:10:53 2022 +0100

    Merge branch 'cesanta:master' into master

commit 7a71038a27
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Fri Nov 11 16:09:22 2022 +0100

    Update mip_test.c

commit a39b7ddbac
Author: cpq <valenok@gmail.com>
Date:   Fri Nov 11 15:03:48 2022 +0000

    Fix fuzzer use-after-poison READ 1

* Squashed commit of the following:

commit 192ae56ece
Merge: 7b0509c8 7ba68dd2
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Wed Nov 16 17:44:03 2022 +0100

    Merge branch 'master' of https://github.com/jfsimon1981/mongoose

commit 7b0509c878
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Wed Nov 16 17:43:33 2022 +0100

    Squashed commit of the following:

    commit 7ba68dd20d
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Wed Nov 16 16:19:50 2022 +0100

        Proper C/C++ struct initialization.

    commit aeab3ef7ac
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Tue Nov 15 17:09:29 2022 +0100

        Fixed C++ builds.

    commit 2afd529107
    Merge: 14710b81 f8445a4c
    Author: jfsimon1981 <jfsimon1981@gmail.com>
    Date:   Tue Nov 15 11:33:56 2022 +0100

        Merge branch 'cesanta:master' into master

    commit 14710b81e4
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Tue Nov 15 11:07:15 2022 +0100

        Added MIP free.

    commit 6393cd149d
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Tue Nov 15 11:06:44 2022 +0100

        Adding mip_free() function.

    commit feee81b733
    Author: Jean-Francois Simon <jfsimon@startmail.com>
    Date:   Tue Nov 15 11:05:55 2022 +0100

        Adding mip_free() function.

    commit f8445a4c85
    Merge: a39b7ddb 71f5be01
    Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
    Date:   Fri Nov 11 20:42:38 2022 -0300

        Merge pull request #1853 from cesanta/tibaremetaltest

        Update test.yml

    commit 71f5be011b
    Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
    Date:   Fri Nov 11 20:15:01 2022 -0300

        Update test.yml

    commit b53d3cf032
    Merge: 7a71038a a39b7ddb
    Author: jfsimon1981 <jfsimon1981@gmail.com>
    Date:   Fri Nov 11 16:10:53 2022 +0100

        Merge branch 'cesanta:master' into master

    commit 7a71038a27
    Author: jfsimon1981 <jfsimon1981@gmail.com>
    Date:   Fri Nov 11 16:09:22 2022 +0100

        Update mip_test.c

    commit a39b7ddbac
    Author: cpq <valenok@gmail.com>
    Date:   Fri Nov 11 15:03:48 2022 +0000

        Fix fuzzer use-after-poison READ 1

commit 7ba68dd20d
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Wed Nov 16 16:19:50 2022 +0100

    Proper C/C++ struct initialization.

commit aeab3ef7ac
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 17:09:29 2022 +0100

    Fixed C++ builds.

commit 2afd529107
Merge: 14710b81 f8445a4c
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Tue Nov 15 11:33:56 2022 +0100

    Merge branch 'cesanta:master' into master

commit 14710b81e4
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:07:15 2022 +0100

    Added MIP free.

commit 6393cd149d
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:06:44 2022 +0100

    Adding mip_free() function.

commit feee81b733
Author: Jean-Francois Simon <jfsimon@startmail.com>
Date:   Tue Nov 15 11:05:55 2022 +0100

    Adding mip_free() function.

commit f8445a4c85
Merge: a39b7ddb 71f5be01
Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
Date:   Fri Nov 11 20:42:38 2022 -0300

    Merge pull request #1853 from cesanta/tibaremetaltest

    Update test.yml

commit 71f5be011b
Author: Sergio R. Caprile <scaprile@users.noreply.github.com>
Date:   Fri Nov 11 20:15:01 2022 -0300

    Update test.yml

commit b53d3cf032
Merge: 7a71038a a39b7ddb
Author: jfsimon1981 <jfsimon1981@gmail.com>
Date:   Fri Nov 11 16:10:53 2022 +0100

    Merge branch 'cesanta:master' into master

commit a39b7ddbac
Author: cpq <valenok@gmail.com>
Date:   Fri Nov 11 15:03:48 2022 +0000

    Fix fuzzer use-after-poison READ 1

Co-authored-by: Jean-Francois Simon <jfsimon@startmail.com>
2022-11-16 17:55:27 +01:00
Sergio R. Caprile 9a341c9032 change MIP MAC to LAA 2022-11-15 14:56:51 -03:00
Sergio R. Caprile 21e8b08ed9 Reduce Zephyr test time 2022-11-14 18:06:00 -03:00
Sergio R. Caprile c41d477adc Update issue_template.md 2022-11-14 14:58:36 -03:00
Sergio R. Caprile f8445a4c85 Merge pull request #1853 from cesanta/tibaremetaltest
Update test.yml
2022-11-11 20:42:38 -03:00
Sergio R. Caprile 71f5be011b Update test.yml 2022-11-11 20:15:01 -03:00
cpq a39b7ddbac Fix fuzzer use-after-poison READ 1 2022-11-11 15:03:48 +00:00
Sergio R. Caprile cab5c822c5 Merge pull request #1850 from cesanta/miplocal
Fix incorrect local network address detection
2022-11-11 11:58:29 -03:00
Sergey Lyubka 4056bd3c2d Merge pull request #1847 from cesanta/xiao
Fix arduino-xiao build and add GA test
2022-11-11 14:53:40 +00:00
Sergio R. Caprile a985ae9c0a Fix incorrect local network address detection 2022-11-11 11:18:47 -03:00
cpq 804a3bf380 Fix #1801 - report ipv4 accepted address for ipv4 listeners 2022-11-11 14:01:17 +00:00
Sergey Lyubka a8bef96463 Merge pull request #1844 from cesanta/tm4c129x
Add TM4C129x driver
2022-11-11 13:15:35 +00:00
Sergey Lyubka 5e43a3f695 Merge pull request #1846 from cesanta/ektm4c129x
Add EK-TM4C1294XL example
2022-11-11 13:15:20 +00:00
cpq 8e46e05e1b Fix arduino-xiao build and add GA test 2022-11-11 10:04:47 +00:00
Sergio R. Caprile ec0e27dbb4 Add EK-TM4C1294XL example 2022-11-10 21:14:30 -03:00
Sergio R. Caprile 3f55d93b41 Merge pull request #1845 from cesanta/mip-tap
Unbreak
2022-11-10 15:01:10 -03:00
Sergio R. Caprile 5418a8c28a Unbreak
userdata was changed to a pointer to a socket, but tx() was not updated

My Linux system does not like mongoose.h at the end...
2022-11-10 15:00:43 -03:00
Sergio R. Caprile e180192379 Add TM4C129x driver 2022-11-10 14:41:41 -03:00
cpq f498d69b7d Fix examples/stm32/nucleo-f429zi-freertos-mip 2022-11-10 03:01:10 +00:00
Sergio R. Caprile dfae1b3f70 Merge pull request #1843 from cesanta/mip
Expose mip guts
2022-11-09 17:40:46 -03:00
Sergio R. Caprile a9ebb55f95 Merge pull request #1842 from cesanta/ft
Add nucleo-f429zi-freertos-mip example
2022-11-09 16:28:33 -03:00
cpq abfac8aa40 Expose mip guts 2022-11-09 19:25:40 +00:00
cpq 78956ccf83 Add nucleo-f429zi-freertos-mip example 2022-11-09 18:25:11 +00:00
Sergey Lyubka eed25f23f6 Merge pull request #1839 from cesanta/stm32uart
Fix wrong reference to prescaler
2022-11-09 09:24:24 +00:00
Sergey Lyubka 134ce56f80 Merge pull request #1841 from cesanta/small
Endianness test
2022-11-09 09:23:04 +00:00
cpq 28a4778187 Endianness test 2022-11-09 09:20:15 +00:00
Sergio R. Caprile c654c2e5e8 Fix wrong reference to prescaler 2022-11-08 11:23:10 -03:00
Sergey Lyubka e580d4e637 Merge pull request #1837 from cesanta/arch
Create MG_ARCH_FREERTOS, MG_ENABLE_LWIP, MG_ENABLE_FREERTOS_TCP. Remo…
2022-11-08 00:13:28 +00:00
cpq 2192914cbb Create MG_ARCH_FREERTOS, MG_ENABLE_LWIP, MG_ENABLE_FREERTOS_TCP. Remove MG_ARCH_FREERTOS_TCP, MG_ARCH_RTX_LWIP 2022-11-07 23:58:58 +00:00
Sergio R. Caprile ca6dee1777 Merge pull request #1836 from cesanta/dewarning
Remove some warnings
2022-11-07 15:29:33 -03:00
Sergio R. Caprile 6f3bdc5dca Remove some warnings 2022-11-07 15:23:47 -03:00
Sergey Lyubka 095cdcd69e Merge pull request #1834 from cesanta/sock
Generalize socket constants
2022-11-05 13:11:57 +00:00
cpq f022633f29 Generalize socket constants 2022-11-05 12:33:49 +00:00
Sergey Lyubka 1f85fcc9b0 Merge pull request #1831 from cesanta/mqtt
Accept zero-length payload messages
2022-11-03 16:46:56 +00:00
Sergio R. Caprile a3ede75842 Accept zero-length payload messages 2022-11-03 11:26:08 -03:00
cpq 0defce37f0 Pull mongoose_custom.h 2022-11-03 12:59:55 +00:00
Sergey Lyubka 4355b39b1e Merge pull request #1830 from cesanta/mip
ARP lookup hosts in the same net. Use up-to-date code in zephyr dash …
2022-11-03 12:35:17 +00:00
cpq efec738c89 ARP lookup hosts in the same net. Use up-to-date code in zephyr dash example 2022-11-03 08:06:17 +00:00
Sergey Lyubka 10c09a361b Merge pull request #1829 from cesanta/cr
CR incorrectly set in STM32 driver
2022-11-02 23:18:20 +00:00
Sergio R. Caprile e3d1a69223 CR incorrectly set in STM32 driver 2022-11-02 19:25:05 -03:00
Sergey Lyubka 4b82253ae9 Merge pull request #1826 from cesanta/custom
mongoose_custom.h not pulled in when MG_ARCH=MG_ARCH_CUSTOM
2022-11-02 12:05:59 +00:00
Sergio R. Caprile 47a12c30ca mongoose_custom.h not pulled in when MG_ARCH=MG_ARCH_CUSTOM 2022-11-01 21:01:33 -03:00
cpq 613655767b Housekeeping at the end of c->label 2022-11-01 21:01:03 +00:00
Sergey Lyubka 1182027f1c Merge pull request #1823 from cesanta/ti-rtos
Fix TI-RTOS port
2022-10-30 09:41:48 +00:00
Sergio R. Caprile e9421d557a Fix TI-RTOS port
Sockets were not being put in non-blocking mode as the setsockopt() call wasn't using SOL_SOCKET
Do not include errno.h but serrno.h, otherwise error codes are mangled... NDK functions use serrno, errno belongs to the compiler
UDP sockets require binding to receive responses
select() does not return write-ready on connect if the amount of bytes to write is below the "low-water mark". This parameter defaults to 2048, there was some code apparently setting this otherwise, with no success. Reworked the code to set this water mark at half the buffer size by just using plain getsockopt/setsockopt calls.

For the record:
	TI typedef's void * SOCKET for internal use, INVALID_SOCKET is cast to (void *). Their BSD compatible socket interface expects and returns int; while Mongoose uses SOCKET... this generates lots of warnings 169 and 515, disabled in the examples
2022-10-28 18:55:10 -03:00
cpq bbc0c0df94 Unbreak test 2022-10-28 15:35:40 +01:00
Sergio R. Caprile 610e32714c Merge pull request #1822 from cesanta/hello
Add mg_hello()
2022-10-28 09:48:43 -03:00
cpq 7ab81d3805 Add mg_hello() 2022-10-28 10:57:06 +01:00
Sergey Lyubka 9a1e41e1fa Merge pull request #1821 from cesanta/docs
Augment WS documentation
2022-10-27 23:09:47 +01:00
Sergio R. Caprile ae71d12f06 Augment WS documentation 2022-10-27 12:03:16 -03:00
cpq c25234df83 Better MIP description 2022-10-27 08:12:22 +01:00
Sergey Lyubka 03284ba046 Merge pull request #1810 from cesanta/zephyresp
Support Zephyr on ESP32
2022-10-25 17:22:47 +01:00
Sergey Lyubka 5fa433ecca Merge pull request #1814 from cesanta/ti-rtos
Improve TI-RTOS timing support
2022-10-25 17:07:33 +01:00
Sergio R. Caprile ac2a4c700a Merge pull request #1818 from cesanta/ti
Allow flash and cloning without build
2022-10-25 10:55:46 -03:00
Sergio R. Caprile eeb7b00f60 Allow flash and cloning without build 2022-10-25 10:41:53 -03:00
Sergio R. Caprile c8c540b453 Improve TI-RTOS timing support 2022-10-24 11:48:54 -03:00
Sergio R. Caprile a0585f75f7 Support Zephyr on ESP32 2022-10-21 11:44:09 -03:00
Sergey Lyubka 637af1d392 Merge pull request #1809 from cesanta/picow
Make pico-w device-dashboard example fully functional
2022-10-20 18:24:38 +01:00
Sergio R. Caprile fe6c31acc1 Make pico-w device-dashboard example fully functional 2022-10-20 11:57:00 -03:00
Sergio R. Caprile 04cfcf751e Merge pull request #1805 from cesanta/invsock
Fix unintended socket close on systems with valid fd=0 descriptor numbering
2022-10-20 11:04:03 -03:00
Sergio R. Caprile 51c51d49ad Fix unintended socket close on systems with valid fd=0 descriptor numbering 2022-10-20 10:34:26 -03:00
cpq 4271aa5b1f Update matrix example name 2022-10-19 09:24:19 +01:00
cpq 17ada1c894 Fix #1803 - conditional for SSL_set1_host(). In unit test, disable time.windows.com, use google and apple SNTP servers 2022-10-19 09:06:47 +01:00
cpq 2e14d125ba Fuzzer nits 2022-10-18 15:21:59 +01:00
cpq ce8fa4c24b Echo WS CLOSE payload back 2022-10-18 14:31:47 +01:00
Sergey Lyubka cfe2e83e6b Merge pull request #1798 from Yeicor/patch-1
Remove mg_hexdump from deliver_chunked_chunks
2022-10-17 07:14:24 +01:00
Yeicor b17c62618d Remove mg_hexdump from deliver_chunked_chunks 2022-10-16 21:11:00 +02:00
Sergey Lyubka 6b162a1193 Merge pull request #1796 from cesanta/rpicow
Dettach git clone and fix clean
2022-10-16 16:59:19 +01:00
Sergey Lyubka 6653530b63 Merge pull request #1797 from strager/fix-typo
Fix typo in documentation
2022-10-16 16:58:20 +01:00
cpq aacae6444e Fix stack overflow in fuzzer - too big on-stack array 2022-10-15 17:18:31 +01:00
Matthew "strager" Glazar b91fe12258 Fix typo in documentation 2022-10-14 18:27:06 -07:00
Sergio R. Caprile ae7ca00e69 Dettach git clone and fix clean
The user has to clone the repo, then edit the Makefile to change WiFi credentials. Running make build does both and the tests go flawlessly
The user can run make to clone the repo, then change credentials and run make build, it will skip cloning if the repo is already there

In some systems the compiled files are not owned by the user as Docker runs as root, so we first invoke clean in the cloned repo (which erases the compiled files), and then remove the cloned repo that the user owns and can rm.
2022-10-14 12:09:39 -03:00
Sergio R. Caprile 0103f1f080 Merge pull request #1795 from cesanta/z
Use board nucleo_f429zi
2022-10-14 08:54:20 -03:00
cpq e8d29d54d6 Use board nucleo_f429zi 2022-10-14 11:39:00 +01:00
Sergey Lyubka 092f2ce0b3 Merge pull request #1794 from cesanta/addMissingTests
Update test.yml
2022-10-11 07:37:53 +01:00
Sergio R. Caprile d89233276b Update test.yml 2022-10-10 17:16:42 -03:00
Sergio R. Caprile 7d797187e8 Merge pull request #1793 from cesanta/device-dashboard
fix paths in Makefile (like other examples)
2022-10-10 17:01:43 -03:00
Sergio R. Caprile 6edcc72364 fix paths in Makefile 2022-10-10 16:51:07 -03:00
Sergey Lyubka 250dfc1377 Merge pull request #1790 from cesanta/zephyr-device-dashboard
Add device-dashboard example on Zephyr
2022-10-10 15:59:08 +01:00
Sergey Lyubka 45489c1c87 Merge pull request #1789 from zudwalex/picow
Add Pico-W example
2022-10-10 15:58:53 +01:00
Sergey Lyubka 09b250f189 Merge pull request #1787 from cesanta/zephyr
Update Zephyr examples
2022-10-10 15:58:39 +01:00
cpq a84465ddba Use MG_SOCK_LISTEN_BACKLOG_SIZE -> 128 for FreeRTOS-TCP 2022-10-10 13:41:07 +01:00
Sergey Lyubka 3b95671442 Merge pull request #1791 from zahar517/fix-json-rpc-example
Fix json-rpc-over-ws example
2022-10-10 10:35:29 +01:00
zahar517 52e66077a7 Fix json-rpc-over-ws example 2022-10-08 14:39:01 +03:00
Sergio R. Caprile 84bf4d21a3 Add device-dashboard example on Zephyr 2022-10-07 11:52:31 -03:00
Alex Alashkin 04cfc510d0 Add Pico-W example 2022-10-07 09:11:35 +03:00
Sergio R. Caprile d846e67ec1 Update Zephyr examples 2022-10-06 17:30:27 -03:00
Sergio R. Caprile 9c60a1bc10 Merge pull request #1788 from cesanta/mod-tests4zephyr
Update test.yml
2022-10-06 17:11:30 -03:00
Sergio R. Caprile f06ac52a43 Update test.yml 2022-10-06 16:55:13 -03:00
Sergio R. Caprile 9e5fd43a2d Update test.yml 2022-10-06 16:46:26 -03:00
Sergio R. Caprile 8d50e7dc82 Update test.yml 2022-10-06 16:32:33 -03:00
cpq 1e6b7bd2a6 Fix broken link 2022-10-05 11:49:06 +01:00
Sergey Lyubka 8346be7a81 Merge pull request #1783 from cesanta/zephyr
Update to latest Zephyr and their Docker repo
2022-10-05 11:41:55 +01:00
Sergey Lyubka 9dc5683fc2 Merge pull request #1785 from cesanta/device-dashboard
rename time() to ourtime()
2022-10-05 11:40:08 +01:00
Sergio R. Caprile e7cb82175a rename time() to ourtime() 2022-10-04 19:27:38 -03:00
Sergio R. Caprile 1ef0aa14c0 Update to latest Zephyr and their Docker repo 2022-10-04 17:24:13 -03:00
cpq 0b3f6d6aab Use CC for fuzzer, not CXX 2022-09-30 11:44:50 +01:00
Sergey Lyubka 0beef1d770 Merge pull request #1781 from jameshilliard/update-spdx
Update GPL license identifier
2022-09-29 20:29:07 +01:00
James Hilliard b944db30fd Update GPL license identifier
GPL-2.0 was deprecated in favor of GPL-2.0-only.

GPL-2.0+ was deprecated in favor of GPL-2.0-or-later.

See: https://spdx.org/licenses/
2022-09-29 15:18:10 -04:00
cpq 6cf3a3feaf Fix fuzzer 2022-09-29 19:31:52 +01:00
cpq 9680b8ccb3 Fix overflow in rx_icmp 2022-09-29 16:53:11 +01:00
cpq a88a11c243 Fix TX overflow in rx_icmp() 2022-09-29 11:13:40 +01:00
Sergey Lyubka 7ff76f69a1 Merge pull request #1777 from jameshilliard/disable-big-endian
Disable broken 32 bit tests and enable 32 bit little endian tests.
2022-09-29 07:33:15 +01:00
James Hilliard c2e4e6d221 Disable broken 32 bit tests and enable 32 bit little endian tests.
It appears there's a bunch of endian specific failing 32 bit tests.
2022-09-28 22:18:08 -06:00
Sergey Lyubka 60edc456a9 Merge pull request #1774 from cesanta/smtp-client
Fix wrong ca.pem path +
2022-09-28 21:58:20 +01:00
Sergey Lyubka 625f804130 Merge pull request #1776 from jameshilliard/32-bit-bigendian
Also test on 32 bit big endian ppc
2022-09-28 21:56:37 +01:00
Sergey Lyubka 7100aaedec Merge pull request #1775 from cesanta/endian
Fix endianness issues in unit test
2022-09-28 21:55:46 +01:00
James Hilliard c867dbc7b2 Also test on 32 bit big endian ppc 2022-09-28 16:02:32 -04:00
cpq 88097f1829 Fix endianness issues in unit test 2022-09-28 20:22:09 +01:00
Sergio R. Caprile 7cf4834336 Fix wrong ca.pem path
Remove extra EHLO before AUTH (there were two)
2022-09-28 16:05:29 -03:00
Sergey Lyubka b5355307a3 Merge pull request #1767 from jameshilliard/bigendian-tests
Test on big endian CPU architectures
2022-09-28 08:08:38 +01:00
James Hilliard 76f693e5d7 Test on big endian CPU architectures 2022-09-26 05:16:49 -04:00
Sergey Lyubka fb3b0ca6e3 Merge pull request #1765 from jameshilliard/rpc-add-calloc-null
Fix null pointer dereference in mg_rpc_add()
2022-09-25 23:22:57 +01:00
James Hilliard 3c71977e2e Fix null pointer dereference in mg_rpc_add()
Fixes #1736
2022-09-25 14:08:58 -04:00
cpq 5574a2663a Close connection on 3 keep-alive misses 2022-09-25 17:35:14 +01:00
cpq 41960b4212 Optimize fuzzer 2022-09-25 11:58:28 +01:00
Sergey Lyubka 6a500b8d40 Merge pull request #1764 from cesanta/fuzz
Optimize fuzzer
2022-09-25 10:31:21 +01:00
Sergey Lyubka dcede59379 Merge pull request #1743 from cesanta/stm32-nucleo-f746z
Stm32 nucleo f746z
2022-09-25 10:22:52 +01:00
Sergey Lyubka 695153c527 Merge pull request #1762 from gdawg/ssdp-example-fix-dupe-responses
Fix SSDP example for second and subsequent responses
2022-09-25 10:20:55 +01:00
cpq c409cca20e Optimize fuzzer 2022-09-25 10:19:17 +01:00
Sergey Lyubka a5a9204f83 Merge pull request #1754 from cesanta/iobuf_init
issue #1734, avoid passing null ptr to memmove
2022-09-24 07:18:42 +01:00
Andrew Griffiths 25d42ad345 Fix SSDP example for second and subsequent responses 2022-09-24 14:14:26 +10:00
Sergio R. Caprile f70a407611 issue #1734, avoid passing null ptr to memmove 2022-09-23 19:34:36 -03:00
Sergio R. Caprile 89f2e66c80 Merge pull request #1752 from cesanta/asan
Activate asan for mip_test
2022-09-23 09:45:18 -03:00
Sergio R. Caprile 4562be52d4 Merge pull request #1753 from cesanta/mg_vprintf
Get rid of va_copy
2022-09-23 09:30:09 -03:00
cpq ebd931f7af Get rid of va_copy 2022-09-23 08:59:02 +01:00
cpq 6a47ff6422 Activate asan for mip_test 2022-09-23 08:35:59 +01:00
cpq 1237185bb4 MIP: atomic -> volatile. Add lease time 2022-09-22 17:16:52 +01:00
Sergio R. Caprile d7fe819699 Merge pull request #1751 from cesanta/stm32-nucleo-f746zg
Add new example as per the tutorial
2022-09-22 12:00:15 -03:00
Sergio R. Caprile 770ffd1483 Add new example as per the tutorial 2022-09-22 11:32:52 -03:00
Sergio R. Caprile 9373e77636 Update Makefile as per the tutorial, enhance it 2022-09-22 11:01:40 -03:00
cpq cb5034548d Fix oob read in rx_dhcp() 2022-09-22 13:42:17 +01:00
Sergey Lyubka f9ad870ff0 Merge pull request #1750 from cesanta/make
Optimize makefile
2022-09-22 13:26:57 +01:00
cpq b538bc3871 Optimize makefile 2022-09-22 12:55:45 +01:00
Sergey Lyubka e5b0528aca Merge pull request #1742 from cesanta/mip-fuzz
Fuzzing MIP
2022-09-21 21:15:50 +01:00
cpq a12bd2271e Fuzzing MIP 2022-09-21 20:29:49 +01:00
Sergey Lyubka 15c5858732 Merge pull request #1746 from cesanta/dtoa
Fix issue #1733
2022-09-21 17:48:06 +01:00
Sergio R. Caprile dd4227f444 Fix issue #1733 2022-09-21 11:38:39 -03:00
Sergey Lyubka fe8a7d8db9 Merge pull request #1748 from cesanta/va_end
Fix issue #1735
2022-09-21 09:43:47 +01:00
Sergey Lyubka ec79ca71b2 Merge pull request #1747 from cesanta/timer_add
Fix issue #1737
2022-09-21 07:16:27 +01:00
Sergio R. Caprile 7a1544e76a Fix issue #1735 2022-09-20 14:26:06 -03:00
Sergio R. Caprile 27ffc23664 Fix issue #1737 2022-09-20 13:54:17 -03:00
Sergio R. Caprile 8ef8ee91e9 Merge pull request #1745 from cesanta/tls-hs
Update README.md with TLS_HS event
2022-09-20 10:53:27 -03:00
Sergio R. Caprile 571625f0c3 Update README.md 2022-09-20 10:52:45 -03:00
Sergio R. Caprile fc2d6eb6bb Merge pull request #1744 from cesanta/smtp
Add smtp client example
2022-09-20 10:38:16 -03:00
cpq 48800504be Add smtp client example 2022-09-20 11:34:22 +01:00
Sergey Lyubka f94a019733 Merge pull request #1741 from cesanta/tls
Fix mbedtls MG_IO_WAIT case
2022-09-19 14:06:31 +01:00
cpq 535d8b9e02 Fix mbedtls MG_IO_WAIT case 2022-09-19 13:38:59 +01:00
Sergey Lyubka 161d44ee04 Merge pull request #1730 from cesanta/stm32-nucleo-f429z
Update Makefile as per the tutorial
2022-09-13 21:46:41 +01:00
Sergey Lyubka 7ea155b943 Merge pull request #1729 from cesanta/mip-tap
Add example to use TAP interface on Linux
2022-09-13 21:46:06 +01:00
Sergio R. Caprile 30acef2452 Merge pull request #1727 from cesanta/mdc
Pass MDC clock divider explicitly rather than guess
2022-09-12 20:43:00 -03:00
cpq 82b50fd3a5 Pass MDC clock divider explicitly rather than guess 2022-09-12 23:57:04 +01:00
Sergio R. Caprile 9e5503dd04 Update Makefile as per the tutorial 2022-09-12 17:29:47 -03:00
Sergio R. Caprile 2ec2ed62c8 Add example to use TAP interface on Linux 2022-09-12 10:52:23 -03:00
cpq 274c11c3ec Update README 2022-09-11 13:42:59 +01:00
cpq 76c4bb556f Update README 2022-09-11 11:23:58 +01:00
cpq 40f484cc54 Update README 2022-09-11 11:20:53 +01:00
cpq 85b701b8c2 Formatting 2022-09-10 21:49:20 +01:00
Sergey Lyubka 7e875ba89d Merge pull request #1726 from cesanta/qp
Add MAC addr filtering to stm32 driver. Record free space in q profiler
2022-09-10 18:19:36 +01:00
cpq c718d7999f Add MAC addr filtering to stm32 driver. Record free space in q profiler 2022-09-10 16:38:03 +01:00
Sergey Lyubka d1472992da Merge pull request #1725 from cesanta/qprofile
Add irq and drop counters to qprofiler
2022-09-09 20:19:19 +01:00
Sergio R. Caprile 995f90aa49 Add irq and drop counters to qprofiler 2022-09-09 14:47:46 -03:00
Sergio R. Caprile a4c27618b4 Update README.md 2022-09-09 14:10:48 -03:00
Sergio R. Caprile 05019529f1 Merge pull request #1724 from cesanta/mgread
Pass long *bytes_read to MG_EV_READ
2022-09-09 14:09:50 -03:00
Sergio R. Caprile 1b5ab3261c Merge pull request #1722 from cesanta/mip-tls
Add mbedtls support to MIP
2022-09-09 14:09:19 -03:00
Sergey Lyubka 6033555ac0 Merge pull request #1723 from cesanta/pcap
Added Linux howto
2022-09-09 17:43:53 +01:00
cpq fd4e1975a3 Pass long *bytes_read to MG_EV_READ 2022-09-09 17:09:18 +01:00
cpq 124ac12150 Add mbedtls support to MIP 2022-09-09 15:53:42 +01:00
Sergio R. Caprile 8c1ffa3f5d Added Linux howto 2022-09-09 10:42:46 -03:00
cpq f76a7e36e8 Corrected MacOS setup diagram 2022-09-08 12:11:01 +01:00
cpq 6484c4bc8b Updated description 2022-09-08 12:09:30 +01:00
cpq bba2421ba9 Corrected MacOS setup diagram 2022-09-08 11:36:01 +01:00
cpq 3c69c7feaf Add MacOS setup diagram 2022-09-08 11:28:16 +01:00
cpq 45b2ffe1af Use DMG_HTTP_DIRLIST_TIME 2022-09-08 11:02:32 +01:00
cpq a57c0f4700 Fix #1712 - JSON parsing for keys with arrays 2022-09-08 10:59:23 +01:00
Sergey Lyubka c33116166f Merge pull request #1720 from cesanta/qprofile
Add rudimentary queue profiler
2022-09-08 10:37:01 +01:00
Sergey Lyubka 50a2063e45 Merge pull request #1713 from behnejad/master
display file modify date in "%Y/%m/%d %H:%M:%S".
2022-09-08 08:55:22 +01:00
cpq cd30cf2d6c Fix #1710 - free MIP in mg_mgr_free() 2022-09-08 08:53:54 +01:00
cpq 419126652e Merge branch 'master' of github.com:cesanta/mongoose 2022-09-08 08:50:51 +01:00
cpq 06ab83dca6 Implement keep-alive, 45 sec interval. Correct ACK piggyback 2022-09-08 08:50:42 +01:00
Sergio R. Caprile 313fddf722 Add rudimentary queue profiler
ETH IRQ and mip_poll() can both write to the queue, so if a memcpy() is interrupted we might see some weird records.
2022-09-07 17:14:03 -03:00
Sergey Lyubka f4def36ccb Merge pull request #1717 from cesanta/fixmipq
Fix MIP Q
2022-09-07 20:59:12 +01:00
Sergey Lyubka 4be8f2ba93 Merge pull request #1719 from cesanta/testq
Make mip_test fail with current queue algo
2022-09-07 20:58:29 +01:00
cpq 881b282604 Implement ack timer 2022-09-07 20:48:23 +01:00
Sergio R. Caprile 9675bfe07d Fix MIP Q 2022-09-07 14:59:58 -03:00
Sergio R. Caprile 443351e95a Make mip_test fail with current queue algo 2022-09-07 14:46:36 -03:00
Behnejad d4cd1c61ee fixing defines. 2022-09-07 22:08:50 +04:30
cpq 75892cb523 Add %f to src/fmt.c 2022-09-07 15:09:52 +01:00
Sergey Lyubka 63e0041644 Merge pull request #1715 from davidhozic/feature/1714
Bug Fix #1714
2022-09-07 15:03:51 +01:00
Sergey Lyubka 70e2d8dd4e Merge pull request #1716 from cesanta/pcap
Make mip-pcap work on Mac
2022-09-07 13:36:14 +01:00
cpq b2624f6055 Make mip-pcap work on Mac 2022-09-07 13:36:00 +01:00
David Hozic 0bb8144677 Bug Fix #1714 2022-09-07 13:35:32 +02:00
Behnejad ad50447ec6 display file modify date in "%Y/%m/%d %H:%M:%S".
adding compile time option to display file modification date as "%Y/%m/%d %H:%M:%S" in http directory indexing.
2022-09-07 09:04:15 +04:30
Sergey Lyubka 84de7437c6 Merge pull request #1711 from cesanta/ethrxsz
Fix Ethernet buffer size
2022-09-06 22:29:23 +01:00
Sergio R. Caprile 419dd50255 Fix Ethernet buffer size
1500 bytes is payload size, which is OK for tx. On the rx side, a full 802.1Q-tagged frame size is 1522 bytes, without the 4-byte CRC = 1518 bytes (1514 for non-VLAN-tagged frames).
2022-09-06 16:53:26 -03:00
Sergio R. Caprile 9dea02e578 Merge pull request #1708 from cesanta/ack
Add mip test
2022-09-05 12:11:24 -03:00
cpq 1c181e091e Add mip test 2022-09-05 15:56:03 +01:00
Sergio R. Caprile 32782bab0e Merge pull request #1706 from cesanta/mg_timer_expired
Introduce mg_timer_expired(). Adopt DHCP and link status to use it
2022-09-05 11:45:53 -03:00
cpq 330783cb5a Corrected clean and examples targets 2022-09-05 14:14:50 +01:00
Sergio R. Caprile 504b004e01 Merge pull request #1707 from cesanta/comments
Use single-line comments
2022-09-05 09:05:28 -03:00
cpq edb861da70 docs 2022-09-05 12:29:06 +01:00
cpq 64ad15895f Small nit in minimal HTTP server example 2022-09-05 12:26:43 +01:00
cpq 44b4944334 Use single-line comments 2022-09-03 09:49:41 +01:00
cpq f9272d0959 Introduce mg_timer_expired(). Adopt DHCP and link status to use it 2022-09-03 09:45:19 +01:00
Sergey Lyubka a113e344a1 Merge pull request #1704 from cesanta/acknow
Re-enable sending ACKs until proper mechanism is in place
2022-09-03 07:46:43 +01:00
Sergey Lyubka 2d80f03f01 Merge pull request #1705 from lionsoul2014/master
fix the doc error: htts to https
2022-09-03 07:44:01 +01:00
lion 542fe9f029 fix the doc error: htts to https 2022-09-03 10:51:09 +08:00
Sergio R. Caprile a1992f5910 Re-enable sending ACKs until proper mechanism is in place 2022-09-02 20:48:30 -03:00
Sergey Lyubka 45a057b0c6 Merge pull request #1703 from cesanta/stm32driver
Extend explanation for MDC clock
2022-09-02 20:02:05 +01:00
Sergio R. Caprile 4a1a26e8b7 Extend explanation for MDC clock 2022-09-02 15:03:46 -03:00
Sergey Lyubka db35e6a427 Merge pull request #1702 from cesanta/stm32driver
Add CR setup, set MDC based on HCLK
2022-09-02 18:46:31 +01:00
Sergio R. Caprile 7358ed25a5 Add CR setup, set MDC based on HCLK 2022-09-02 14:02:02 -03:00
cpq 0d385c29a3 More JSON tests 2022-09-02 16:23:39 +01:00
Sergey Lyubka 51076e68c8 Merge pull request #1701 from cesanta/enableFPU
Enable FPU
2022-09-02 15:46:00 +01:00
Sergio R. Caprile 3270f1252b Enable FPU 2022-09-02 11:18:11 -03:00
Sergey Lyubka d8ee105e1e Merge pull request #1699 from cesanta/scb
Fix SCB address for scb struct
2022-09-02 14:09:08 +01:00
cpq 567fccd7ee Refactor W5500 driver, add arduino w5500 example 2022-09-02 12:58:54 +01:00
cpq f7f7319698 Refactor W5500 driver, add arduino w5500 example 2022-09-02 12:58:54 +01:00
Sergio R. Caprile 62a6b61fc9 Fix SCB address for scb struct 2022-09-01 17:14:31 -03:00
Sergey Lyubka 1a87d9fa77 Merge pull request #1698 from oakfire/master
Fix mg_json_get for the array element result not as expected.
2022-09-01 09:14:10 +01:00
oakfire 8131e30002 Fix mg_json_get for the array element result not as expected. 2022-09-01 15:02:17 +08:00
cpq 83c76bdafc Make mongoose_custom.h a local include, for Arduino builds 2022-08-31 18:20:34 +01:00
cpq cf1566e116 Add more comments in json code 2022-08-31 17:59:04 +01:00
Sergey Lyubka 5d2c977029 Merge pull request #1697 from oakfire/master
fix: #1696  mg_json_get() bugs.
2022-08-31 17:55:12 +01:00
cpq 823c0ef5fb Add enc28j60 driver skeleton 2022-08-31 08:54:33 +01:00
cpq aefc588e6e Unbreak win98 build 2022-08-31 08:53:22 +01:00
cpq 1949439d69 Adopt mip changes 2022-08-31 08:44:05 +01:00
cpq c131b8daf1 struct mip_ipcfg -> struct mip_cfg 2022-08-31 08:41:16 +01:00
cpq 8a61969c8f Add struct mip_spi for SPI drivers, and skeleton for enc28j60 driver 2022-08-31 08:35:06 +01:00
Sergey Lyubka 3cf85770c7 Merge pull request #1694 from cesanta/nucleo-f746zg-baremetal
Group clock setup dependencies
2022-08-30 12:25:41 +01:00
Sergey Lyubka 310b339f0d Merge pull request #1691 from cesanta/docs
Moved packed filesystem section out of the docs
2022-08-30 12:24:30 +01:00
Sergey Lyubka 229b7810df Merge pull request #1695 from cesanta/nucleo-f429zi-baremetal
Add baremetal example on Nucleo-F429ZI
2022-08-30 12:24:15 +01:00
oakfire a686beb9a7 fix: #1696 mg_json_get() bugs. 2022-08-30 14:22:58 +08:00
Sergio R. Caprile 42c1bee8ea Add baremetal example on Nucleo-F429ZI 2022-08-29 19:20:20 -03:00
Sergio R. Caprile c289556775 Group clock setup dependencies 2022-08-29 14:36:40 -03:00
Sergio R. Caprile 941d2f2a3e Moved packed filesystem section out of the docs (relevant parts into the tutorial) 2022-08-29 10:43:29 -03:00
1607 changed files with 658297 additions and 82498 deletions

No files matched your search

+1
View File
@@ -10,3 +10,4 @@
- Compiler/IDE and SDK: ZZZ version _X.Y_ - Compiler/IDE and SDK: ZZZ version _X.Y_
- Target hardware/board: _?_ - Target hardware/board: _?_
- Connectivity chip/module: _?_ - Connectivity chip/module: _?_
- Target RTOS/OS (if applicable): _?_
+11 -2
View File
@@ -1,17 +1,26 @@
name: CIFuzz name: CIFuzz
on: [pull_request] on:
pull_request:
paths:
- "mongoose.c"
- "mongoose.h"
jobs: jobs:
Fuzzing: Fuzzing:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src/' ; then echo GO=1 >> $GITHUB_ENV ; fi
- name: Build Fuzzers - name: Build Fuzzers
id: build id: build
if: ${{ env.GO == 1 }}
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with: with:
oss-fuzz-project-name: 'mongoose' oss-fuzz-project-name: 'mongoose'
dry-run: false dry-run: false
language: c++ language: c++
- name: Run Fuzzers - name: Run Fuzzers
if: ${{ env.GO == 1 }}
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with: with:
oss-fuzz-project-name: 'mongoose' oss-fuzz-project-name: 'mongoose'
@@ -20,7 +29,7 @@ jobs:
language: c++ language: c++
- name: Upload Crash - name: Upload Crash
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
if: failure() && steps.build.outcome == 'success' if: env.GO == 1 && failure() && steps.build.outcome == 'success'
with: with:
name: artifacts name: artifacts
path: ./out/artifacts path: ./out/artifacts
+244 -91
View File
@@ -1,128 +1,281 @@
name: build name: build
on: [push, pull_request] on:
push:
paths:
- "**Makefile"
- "**.c"
- "**.h"
env:
IPV6: 0
jobs: jobs:
linux: linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
cc: [gcc, clang] cc: [gcc, clang, g++, clang++]
target: [test, test++, valgrind] target: [test, mip_test]
ssl: [MBEDTLS, OPENSSL] ssl: [MBEDTLS, OPENSSL]
name: linux ${{ matrix.target }} CC=${{ matrix.cc }} SSL=${{ matrix.ssl }} name: linux ${{ matrix.target }} CC=${{ matrix.cc }} SSL=${{ matrix.ssl }}
env: env:
IPV6: 0
CC: ${{ matrix.cc }} CC: ${{ matrix.cc }}
SSL: ${{ matrix.ssl }} SSL: ${{ matrix.ssl }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install packages with: { fetch-depth: 2 }
run: sudo apt-get update ; sudo apt-get install libmbedtls-dev valgrind - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- name: test - if: ${{ env.GO == 1 }}
run: make ${{ matrix.target }} run: ./test/setup_ga_network.sh && sudo apt -y update ; sudo apt -y install libmbedtls-dev && make ${{ matrix.target }}
- name: unamalgamated s390:
run: make unamalgamated
examples:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: sudo apt-get install libmbedtls-dev libpcap-dev with: { fetch-depth: 2 }
- run: make clean examples - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- run: make clean test IPV6=0 MG_ENABLE_POLL=1 - if: ${{ env.GO == 1 }}
macos: run: sudo apt -y update ; sudo apt -y install qemu binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make s390
runs-on: macos-latest armhf:
runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install jq mbedtls openssl with: { fetch-depth: 2 }
- run: make test++ upload-coverage IPV6=0 ASAN_OPTIONS= - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- run: make test SSL=OPENSSL IPV6=0 ASAN_OPTIONS= OPENSSL=`echo /usr/local/Cellar/openssl*/*` - if: ${{ env.GO == 1 }}
- run: make mg_prefix run: sudo apt -y update ; sudo apt -y install qemu binfmt-support qemu-user-static && docker run --rm --privileged multiarch/qemu-user-static --reset -p yes && make armhf
linux2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update ; sudo apt -y install libmbedtls-dev valgrind
- if: ${{ env.GO == 1 }}
run: make unamalgamated && make valgrind && make mg_prefix
macos:
runs-on: macos-latest
env: { HOMEBREW_NO_AUTO_UPDATE: 1 }
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: brew install jq mbedtls openssl
- if: ${{ env.GO == 1 }}
run: make test upload-coverage TFLAGS=-DNO_SNTP_CHECK SSL=OPENSSL ASAN_OPTIONS= OPENSSL=`echo /usr/local/Cellar/openssl*/*`
- if: ${{ env.GO == 1 }}
run: make test SSL=MBEDTLS TFLAGS=-DNO_SNTP_CHECK ASAN_OPTIONS= MBEDTLS=`echo /usr/local/Cellar/mbedtls*/*`
- if: ${{ env.GO == 1 }}
run: make mg_prefix
windows: windows:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: make vc98 with: { fetch-depth: 2 }
- run: make vc17 - run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- run: make vc22 - if: ${{ env.GO == 1 }}
- run: make mingw run: make vc98 vc17 vc22 mingw mingw++
- run: make mingw++ arduino-xiao:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^examples/arduino|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: make arduino-xiao
arm: arm:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: make arm - run: make arm
riscv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make riscv
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: sudo apt -y install libmbedtls-dev libpcap-dev
- run: make clean examples
- run: make clean test MG_ENABLE_POLL=1
examples_win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
# - uses: egor-tensin/setup-mingw@v2
# with:
# platform: x64
- name: test they build
run: make examples_win
shell: cmd
- name: test they clean
run: make clean_examples_win
shell: cmd
examples_mac:
runs-on: macos-latest
env: { HOMEBREW_NO_AUTO_UPDATE: 1 }
steps:
- uses: actions/checkout@v3
- run: make examples_mac
- run: make clean_examples_mac
test_f7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh "^src|examples/stm32/nucleo-f7" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f746zg-baremetal test VCON_API_KEY=${{secrets.VCON_API_KEY}}
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f746zg-freertos test VCON_API_KEY=${{secrets.VCON_API_KEY}}
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f746zg-freertos-tcp test VCON_API_KEY=${{secrets.VCON_API_KEY}}
test_f4:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh "^src|examples/stm32/nucleo-f4" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f429zi-baremetal test VCON_API_KEY=${{secrets.VCON_API_KEY}}
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-f429zi-freertos test VCON_API_KEY=${{secrets.VCON_API_KEY}}
test_h7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 3 }
- run: if ./test/match_changed_files.sh "^src|examples/stm32/nucleo-h7" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/stm32/nucleo-h743zi-baremetal test VCON_API_KEY=${{secrets.VCON_API_KEY}}
test_tm4c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh "^src|examples/ti/ek-tm4c" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- run: echo GO=0 > $GITHUB_ENV ; if ./test/match_changed_files.sh "^src|examples/ti/ek-tm4c1294xl-baremetal" ; then echo GO=1 > $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: make -C examples/ti/ek-tm4c1294xl-baremetal test VCON_API_KEY=${{secrets.VCON_API_KEY}}
- run: echo GO=0 > $GITHUB_ENV ; if ./test/match_changed_files.sh "^src|examples/ti/ek-tm4c1294xl-freertos" ; then echo GO=1 > $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: make -C examples/ti/ek-tm4c1294xl-freertos test VCON_API_KEY=${{secrets.VCON_API_KEY}}
test_pico_w5500:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh "^src|examples/rp2040/pico-w5500" ; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/rp2040/pico-w5500 test VCON_API_KEY=${{secrets.VCON_API_KEY}}
matrix_examples: matrix_examples:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
example: example:
- name: esp32/device-dashboard - path: esp32/device-dashboard
path: esp32/device-dashboard - path: esp32/uart-bridge
- name: esp8266 - path: esp8266/http-client-server
path: esp8266 - path: stm32/nucleo-h743zi-baremetal
- name: stm32-freertos-tcp - path: stm32/stm32-nucleo-f746z
path: stm32/stm32-freertos-tcp - path: stm32/stm32-nucleo-f746zg
- name: stm32-nucleo-f746z - path: stm32/stm32-nucleo-f429z
path: stm32/stm32-nucleo-f746z - path: stm32/stm32-nucleo-h743z
- name: stm32-nucleo-f429z - path: stm32/nucleo-f429zi-baremetal
path: stm32/stm32-nucleo-f429z - path: stm32/nucleo-f429zi-freertos
- name: stm32-nucleo-h743z - path: stm32/nucleo-f429zi-rndis
path: stm32/stm32-nucleo-h743z - path: stm32/nucleo-f746zg-baremetal
- name: stm32-nucleo-f746zg-baremetal - path: stm32/nucleo-f746zg-freertos
path: stm32/nucleo-f746zg-baremetal - path: stm32/nucleo-f746zg-freertos-tcp
- name: nxp-mimxrt1020-azurertos - path: stm32/nucleo-f746zg-rndis
path: nxp/nxp-mimxrt1020-azurertos - path: nxp/nxp-mimxrt1020-azurertos
- name: nxp-frdmk66f-freertos - path: nxp/nxp-frdmk66f-freertos
path: nxp/nxp-frdmk66f-freertos - path: nxp/nxp-lpcxpresso54s018m-freertos
- name: nxp-lpcxpresso54s018m-freertos - path: nxp/nxp-mimxrt1020-freertos
path: nxp/nxp-lpcxpresso54s018m-freertos - path: nxp/nxp-evkbimxrt1050-lwip-freertos
- name: nxp-mimxrt1020-freertos - path: nxp/nxp-evkmimxrt1020-lwip-freertos
path: nxp/nxp-mimxrt1020-freertos - path: nxp/nxp-evkmimxrt1024-lwip-freertos
- name: nxp-evkbimxrt1050-lwip-freertos - path: nxp/nxp-evkmimxrt1060-lwip-freertos
path: nxp/nxp-evkbimxrt1050-lwip-freertos - path: nxp/nxp-evkmimxrt1064-lwip-freertos
- name: nxp-evkmimxrt1020-lwip-freertos - path: nxp/nxp-evkmimxrt1160-cm7-lwip-freertos
path: nxp/nxp-evkmimxrt1020-lwip-freertos - path: nxp/nxp-evkmimxrt1170-cm7-lwip-freertos
- name: nxp-evkmimxrt1024-lwip-freertos - path: nxp/nxp-frdmk64f-lwip-freertos
path: nxp/nxp-evkmimxrt1024-lwip-freertos - path: nxp/nxp-frdmk66f-lwip-freertos
- name: nxp-evkmimxrt1060-lwip-freertos - path: nxp/nxp-lpcxpresso54018-lwip-freertos
path: nxp/nxp-evkmimxrt1060-lwip-freertos - path: nxp/nxp-lpcxpresso54608-lwip-freertos
- name: nxp-evkmimxrt1064-lwip-freertos - path: nxp/nxp-lpcxpresso54618-lwip-freertos
path: nxp/nxp-evkmimxrt1064-lwip-freertos - path: nxp/nxp-lpcxpresso54628-lwip-freertos
- name: nxp-evkmimxrt1160-cm7-lwip-freertos - path: nxp/nxp-twrk65f180m-lwip-freertos
path: nxp/nxp-evkmimxrt1160-cm7-lwip-freertos - path: nxp/nxp-twrkv58f220m-lwip-freertos
- name: nxp-evkmimxrt1170-cm7-lwip-freertos - path: infineon/infineon-xmc4700_4800-lwip-rtx-rtos
path: nxp/nxp-evkmimxrt1170-cm7-lwip-freertos - path: ti/ti-ek-tm4c1294xl-http-server
- name: nxp-frdmk64f-lwip-freertos - path: ti/ek-tm4c1294xl-baremetal
path: nxp/nxp-frdmk64f-lwip-freertos - path: ti/ek-tm4c1294xl-freertos
- name: nxp-frdmk66f-lwip-freertos - path: rp2040/pico-rmii
path: nxp/nxp-frdmk66f-lwip-freertos - path: rp2040/pico-rndis-dashboard
- name: nxp-lpcxpresso54018-lwip-freertos - path: rp2040/pico-w
path: nxp/nxp-lpcxpresso54018-lwip-freertos - path: rp2040/pico-w5500
- name: nxp-lpcxpresso54608-lwip-freertos name: ${{ matrix.example.path }}
path: nxp/nxp-lpcxpresso54608-lwip-freertos
- name: nxp-lpcxpresso54618-lwip-freertos
path: nxp/nxp-lpcxpresso54618-lwip-freertos
- name: nxp-lpcxpresso54628-lwip-freertos
path: nxp/nxp-lpcxpresso54628-lwip-freertos
- name: nxp-twrk65f180m-lwip-freertos
path: nxp/nxp-twrk65f180m-lwip-freertos
- name: nxp-twrkv58f220m-lwip-freertos
path: nxp/nxp-twrkv58f220m-lwip-freertos
- name: infineon-xmc4700_4800-lwip-rtx-rtos
path: infineon/infineon-xmc4700_4800-lwip-rtx-rtos
- name: ti
path: ti/ti-ek-tm4c1294xl-http-server
- name: nucleo_f746zg-zephyr-http-client
path: zephyr/http-client
- name: nucleo_f746zg-zephyr-http-server
path: zephyr/http-server
- name: nucleo_f746zg-zephyr-mqtt-aws-client
path: zephyr/mqtt-aws-client
- name: nucleo_f746zg-zephyr-websocket-server
path: zephyr/websocket-server
name: ${{ matrix.example.name }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: ${{ matrix.example.name }} with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src|^examples/${{ matrix.example.path }}'; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: sudo apt -y update ; sudo apt -y install gcc-arm-none-eabi
- if: ${{ env.GO == 1 }}
run: make -C examples/${{ matrix.example.path }} build run: make -C examples/${{ matrix.example.path }} build
cube_examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src|examples/stm32/nucleo-*-cube-*'; then echo GO=1 >> $GITHUB_ENV ; fi
- if: ${{ env.GO == 1 }}
run: cd test/cube && make
zephyr_examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: { fetch-depth: 2 }
- run: if ./test/match_changed_files.sh '^src/.*.[ch]|^examples/zephyr'; then sudo apt -y update ; sudo apt -y install gcc-arm-none-eabi ; fi
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr init
- name: minify manifest
if: ${{ env.GO == 1 }}
uses: mikefarah/yq@master
with:
cmd: yq -i eval '(.manifest.defaults, .manifest.remotes, .manifest.projects[] | select(.name == "cmsis" or .name == "hal_stm32" or .name == "mbedtls" or .name == "mcuboot" or .name == "picolibc" | del(.null) ), .manifest.self) as $i ireduce({};setpath($i | path; $i)) | del(.manifest.projects.[].null) | del(..|select(length==0))' examples/zephyr/zephyrproject/zephyr/west.yml
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr update
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/device-dashboard build
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/http-client build
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/http-server build
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/mqtt-aws-client build
- if: ${{ env.GO == 1 }}
run: make -C examples/zephyr/websocket-server build
+1 -1
View File
@@ -1,5 +1,5 @@
Copyright (c) 2004-2013 Sergey Lyubka Copyright (c) 2004-2013 Sergey Lyubka
Copyright (c) 2013-2021 Cesanta Software Limited Copyright (c) 2013-2023 Cesanta Software Limited
All rights reserved All rights reserved
This software is dual-licensed: you can redistribute it and/or modify This software is dual-licensed: you can redistribute it and/or modify
+99 -57
View File
@@ -1,50 +1,83 @@
SRCS = mongoose.c test/unit_test.c test/packed_fs.c SRCS = mongoose.c test/unit_test.c test/packed_fs.c
HDRS = $(wildcard src/*.h) $(wildcard mip/*.h) HDRS = $(wildcard src/*.h) $(wildcard src/tcpip/*.h)
DEFS ?= -DMG_MAX_HTTP_HEADERS=7 -DMG_ENABLE_LINES -DMG_ENABLE_PACKED_FS=1 -DMG_ENABLE_SSI=1 DEFS ?= -DMG_MAX_HTTP_HEADERS=7 -DMG_ENABLE_LINES -DMG_ENABLE_PACKED_FS=1 -DMG_ENABLE_SSI=1 -DMG_ENABLE_ASSERT=1
C_WARN ?= -Wmissing-prototypes -Wstrict-prototypes WARN ?= -pedantic -W -Wall -Werror -Wshadow -Wdouble-promotion -fno-common -Wconversion -Wundef
WARN ?= -pedantic -W -Wall -Werror -Wshadow -Wdouble-promotion -fno-common -Wconversion -Wundef $(C_WARN)
OPTS ?= -O3 -g3 OPTS ?= -O3 -g3
VALGRIND_OPTS ?= -O0 -g3
INCS ?= -Isrc -I. INCS ?= -Isrc -I.
SSL ?= MBEDTLS SSL ?=
CWD ?= $(realpath $(CURDIR)) CWD ?= $(realpath $(CURDIR))
ENV ?= -e Tmp=. -e WINEDEBUG=-all ENV ?= -e Tmp=. -e WINEDEBUG=-all
DOCKER ?= docker run --platform linux/amd64 --rm $(ENV) -v $(CWD):$(CWD) -w $(CWD) DOCKER ?= docker run --platform linux/amd64 --rm $(ENV) -v $(CWD):$(CWD) -w $(CWD)
VCFLAGS = /nologo /W3 /O2 /MD /I. $(DEFS) $(TFLAGS) VCFLAGS = /nologo /W3 /O2 /MD /I. $(DEFS) $(TFLAGS)
IPV6 ?= 1 IPV6 ?= 1
ASAN ?= -fsanitize=address,undefined -fno-sanitize-recover=all ASAN ?= -fsanitize=address,undefined,alignment -fno-sanitize-recover=all -fno-omit-frame-pointer -fno-common
ASAN_OPTIONS ?= detect_leaks=1 ASAN_OPTIONS ?= detect_leaks=1
EXAMPLES := $(dir $(wildcard examples/*/Makefile)) examples/stm32/nucleo-f746zg-baremetal EXAMPLES := $(dir $(wildcard examples/*/Makefile))
EXAMPLES_MAC := $(filter-out examples/mip-pcap/ examples/mip-tap/, $(EXAMPLES))
EXAMPLES_WIN := $(dir $(wildcard examples/device-dashboard/Makefile) $(wildcard examples/file-*/Makefile) $(wildcard examples/http-*/Makefile) $(wildcard examples/mqtt-*/Makefile) $(wildcard examples/websocket-*/Makefile) $(wildcard examples/webui-*/Makefile))
EXAMPLES_EMBEDDED := $(filter-out $(wildcard examples/zephyr/*/), $(dir $(wildcard examples/*/*/Makefile)))
PREFIX ?= /usr/local PREFIX ?= /usr/local
VERSION ?= $(shell cut -d'"' -f2 src/version.h) VERSION ?= $(shell cut -d'"' -f2 src/version.h)
COMMON_CFLAGS ?= $(WARN) $(INCS) $(DEFS) -DMG_ENABLE_IPV6=$(IPV6) $(TFLAGS) COMMON_CFLAGS ?= $(C_WARN) $(WARN) $(INCS) $(DEFS) -DMG_ENABLE_IPV6=$(IPV6) $(TFLAGS) -pthread
CFLAGS ?= $(OPTS) $(ASAN) $(COMMON_CFLAGS) CFLAGS ?= $(OPTS) $(ASAN) $(COMMON_CFLAGS)
VALGRIND_CFLAGS ?= $(VALGRIND_OPTS) $(COMMON_CFLAGS) VALGRIND_CFLAGS ?= $(OPTS) $(COMMON_CFLAGS)
VALGRIND_RUN ?= valgrind --tool=memcheck --gen-suppressions=all --leak-check=full --show-leak-kinds=all --leak-resolution=high --track-origins=yes --error-exitcode=1 --exit-on-first-error=yes VALGRIND_RUN ?= valgrind --tool=memcheck --gen-suppressions=all --leak-check=full --show-leak-kinds=all --leak-resolution=high --track-origins=yes --error-exitcode=1 --exit-on-first-error=yes --fair-sched=yes
.PHONY: examples test valgrind .PHONY: clean_examples examples mip_test test valgrind
ifeq "$(findstring ++,$(CC))" ""
# $(CC) does not end with ++, i.e. we're using C. Apply C flags
C_WARN ?= -Wmissing-prototypes -Wstrict-prototypes
else
# $(CC) ends with ++, i.e. we're using C++. Apply C++ flags
C_WARN ?= -Wno-deprecated
endif
ifeq "$(SSL)" "MBEDTLS" ifeq "$(SSL)" "MBEDTLS"
MBEDTLS ?= /usr/local MBEDTLS ?= /usr/local
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS)/include -I/usr/include CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS)/include -I/usr/include
LDFLAGS ?= -L$(MBEDTLS)/lib -lmbedtls -lmbedcrypto -lmbedx509 LDFLAGS ?= -L$(MBEDTLS)/lib -lmbedtls -lmbedcrypto -lmbedx509
endif endif
ifeq "$(SSL)" "OPENSSL" ifeq "$(SSL)" "OPENSSL"
OPENSSL ?= /usr/local OPENSSL ?= /usr/local
CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL)/include CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL)/include
LDFLAGS ?= -L$(OPENSSL)/lib -lssl -lcrypto LDFLAGS ?= -L$(OPENSSL)/lib -lssl -lcrypto
endif endif
all: mg_prefix unamalgamated unpacked test test++ arm examples vc98 vc17 vc22 mingw mingw++ linux linux++ fuzz all:
$(MAKE) -C examples/http-server
tall: mg_prefix unamalgamated test mip_test arm examples vc98 vc17 vc22 mingw mingw++ fuzz
mip_test: test/mip_test.c mongoose.c mongoose.h Makefile mip_tap_test
$(CC) test/mip_test.c $(INCS) $(WARN) $(OPTS) $(C_WARN) $(ASAN) -o $@
ASAN_OPTIONS=$(ASAN_OPTIONS) $(RUN) ./$@
mip_tap_test: test/mip_tap_test.c mongoose.c mongoose.h Makefile
$(CC) test/mip_tap_test.c $(INCS) $(WARN) $(OPTS) $(C_WARN) $(ASAN) -o $@
ASAN_OPTIONS=$(ASAN_OPTIONS) $(RUN) ./$@
examples: examples:
@for X in $(EXAMPLES); do test -f $$X/Makefile || continue; $(MAKE) -C $$X example || exit 1; done @for X in $(EXAMPLES); do test -f $$X/Makefile || continue; $(MAKE) -C $$X example || exit 1; done
clean_examples:
for X in $(EXAMPLES); do test -f $$X/Makefile || continue; $(MAKE) -C $$X clean || exit 1; done
examples_mac:
for X in $(EXAMPLES_MAC); do test -f $$X/Makefile || continue; $(MAKE) -C $$X example || exit 1; done
clean_examples_mac:
for X in $(EXAMPLES_MAC); do test -f $$X/Makefile || continue; $(MAKE) -C $$X clean || exit 1; done
examples_win:
$(foreach X, $(EXAMPLES_WIN), $(MAKE) -C $(X) example &)
clean_examples_win:
$(foreach X, $(EXAMPLES_WIN), $(MAKE) -C $(X) clean &)
test/packed_fs.c: Makefile src/ssi.h test/fuzz.c test/data/a.txt test/packed_fs.c: Makefile src/ssi.h test/fuzz.c test/data/a.txt
$(CC) $(CFLAGS) test/pack.c -o pack $(CC) $(CFLAGS) test/pack.c -o pack
$(RUN) ./pack Makefile src/ssi.h test/fuzz.c test/data/a.txt test/data/range.txt > $@ $(RUN) ./pack Makefile src/ssi.h test/fuzz.c test/data/a.txt test/data/range.txt > $@
DIR ?= test/data/ DIR ?= test/data
OUT ?= fs_packed.c OUT ?= packed_fs.c
mkfs: mkfs:
$(CC) $(CFLAGS) test/pack.c -o pack $(CC) $(CFLAGS) test/pack.c -o pack
$(RUN) ./pack -s $(DIR) `find $(DIR) -type f` > $(OUT) $(RUN) ./pack -s $(DIR) `find $(DIR) -type f` > $(OUT)
@@ -52,12 +85,7 @@ mkfs:
# Check that all external (exported) symbols have "mg_" prefix # Check that all external (exported) symbols have "mg_" prefix
mg_prefix: mongoose.c mongoose.h mg_prefix: mongoose.c mongoose.h
$(CC) mongoose.c $(CFLAGS) -c -o /tmp/x.o && nm /tmp/x.o | grep ' T' | grep -v 'mg_' ; test $$? = 1 $(CC) mongoose.c $(CFLAGS) -c -o /tmp/x.o && nm /tmp/x.o | grep ' T ' | grep -v 'mg_' ; test $$? = 1
# C++ build
test++: test
test++: CC = g++
test++: C_WARN = -std=c++2a -Wno-vla -Wno-shadow -Wno-missing-field-initializers -Wno-deprecated
musl: test musl: test
musl: ASAN = musl: ASAN =
@@ -69,20 +97,18 @@ musl: RUN = $(DOCKER) mdashnet/cc1
unamalgamated: $(HDRS) Makefile test/packed_fs.c unamalgamated: $(HDRS) Makefile test/packed_fs.c
$(CC) src/*.c test/packed_fs.c test/unit_test.c $(CFLAGS) $(LDFLAGS) -g -o unit_test $(CC) src/*.c test/packed_fs.c test/unit_test.c $(CFLAGS) $(LDFLAGS) -g -o unit_test
unpacked: fuzz: ASAN = -fsanitize=fuzzer,signed-integer-overflow,address,undefined
$(CC) -I. mongoose.c test/unit_test.c -o $@ fuzz: mongoose.c mongoose.h Makefile test/fuzz.c
$(CC) test/fuzz.c $(OPTS) $(WARN) $(INCS) $(TFLAGS) $(ASAN) -o fuzzer
fuzzer: mongoose.c mongoose.h Makefile test/fuzz.c
clang++ mongoose.c test/fuzz.c $(WARN) $(INCS) $(TFLAGS) -DMG_ENABLE_LINES -fsanitize=fuzzer,signed-integer-overflow,address -Wno-deprecated -Wno-vla-extension -o $@
fuzz: fuzzer
$(RUN) ./fuzzer $(RUN) ./fuzzer
unit_test: Makefile mongoose.h $(SRCS) FUZZDATA ?= /tmp/fuzzdata
$(CC) $(SRCS) $(CFLAGS) $(LDFLAGS) -g -o unit_test fuzz2: mongoose.c mongoose.h Makefile test/fuzz.c
$(CC) test/fuzz.c -DMAIN $(OPTS) $(WARN) $(ASAN) $(INCS) -o fuzzer
$(RUN) ./fuzzer $(FUZZDATA)
# make CC=/usr/local/opt/llvm\@8/bin/clang ASAN_OPTIONS=detect_leaks=1 test: Makefile mongoose.h $(SRCS)
test: unit_test $(CC) $(SRCS) $(CFLAGS) $(LDFLAGS) -o unit_test
ASAN_OPTIONS=$(ASAN_OPTIONS) $(RUN) ./unit_test ASAN_OPTIONS=$(ASAN_OPTIONS) $(RUN) ./unit_test
coverage: CFLAGS += -coverage coverage: CFLAGS += -coverage
@@ -93,20 +119,27 @@ coverage: test
upload-coverage: coverage upload-coverage: coverage
curl -s https://codecov.io/bash | /bin/bash curl -s https://codecov.io/bash | /bin/bash
valgrind_unit_test: Makefile mongoose.h $(SRCS) valgrind: Makefile mongoose.h mongoose.c
$(CC) $(SRCS) $(VALGRIND_CFLAGS) $(LDFLAGS) -g -o valgrind_unit_test $(CC) $(SRCS) $(VALGRIND_CFLAGS) $(LDFLAGS) -g -o unit_test
$(VALGRIND_RUN) ./unit_test
valgrind: valgrind_unit_test armhf: ASAN=
$(VALGRIND_RUN) ./valgrind_unit_test armhf: IPV6=0
armhf: CC = $(DOCKER) mdashnet/armhf cc
armhf: RUN = $(DOCKER) mdashnet/armhf
armhf: test
infer: s390: ASAN=
infer run -- cc test/unit_test.c -c -W -Wall -Werror -Isrc -I. -O2 -DMG_ENABLE_MBEDTLS=1 -DMG_ENABLE_LINES -I/usr/local/Cellar/mbedtls/2.23.0/include -DMG_ENABLE_IPV6=1 -g -o /dev/null s390: IPV6=0
s390: CC = $(DOCKER) mdashnet/s390 cc
s390: RUN = $(DOCKER) mdashnet/s390
s390: test
arm: DEFS += -DMG_ENABLE_FILE=0 -DMG_ENABLE_MIP=1 -DMG_ARCH=MG_ARCH_NEWLIB arm: DEFS += -DMG_ENABLE_FILE=0 -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_NEWLIB
arm: mongoose.h $(SRCS) arm: mongoose.h $(SRCS)
$(DOCKER) mdashnet/armgcc arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb $(SRCS) $(OPTS) $(WARN) $(INCS) $(DEFS) $(TFLAGS) -o unit_test -nostartfiles --specs nosys.specs -e 0 $(DOCKER) mdashnet/armgcc arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb $(SRCS) $(OPTS) $(WARN) $(INCS) $(DEFS) $(TFLAGS) -o unit_test -nostartfiles --specs nosys.specs -e 0
riscv: DEFS += -DMG_ENABLE_FILE=0 -DMG_ENABLE_MIP=1 -DMG_ARCH=MG_ARCH_NEWLIB riscv: DEFS += -DMG_ENABLE_FILE=0 -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_NEWLIB
riscv: mongoose.h $(SRCS) riscv: mongoose.h $(SRCS)
$(DOCKER) mdashnet/riscv riscv-none-elf-gcc -march=rv32imc -mabi=ilp32 $(SRCS) $(OPTS) $(WARN) $(INCS) $(DEFS) $(TFLAGS) -o unit_test $(DOCKER) mdashnet/riscv riscv-none-elf-gcc -march=rv32imc -mabi=ilp32 $(SRCS) $(OPTS) $(WARN) $(INCS) $(DEFS) $(TFLAGS) -o unit_test
@@ -114,12 +147,10 @@ vc98: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/vc98 wine cl $(SRCS) $(VCFLAGS) ws2_32.lib /Fe$@.exe $(DOCKER) mdashnet/vc98 wine cl $(SRCS) $(VCFLAGS) ws2_32.lib /Fe$@.exe
$(DOCKER) mdashnet/vc98 wine $@.exe $(DOCKER) mdashnet/vc98 wine $@.exe
# vc17: DEFS += -DMG_ENABLE_IPV6=1
vc17: Makefile mongoose.h $(SRCS) vc17: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/vc17 wine64 cl $(SRCS) $(VCFLAGS) ws2_32.lib /Fe$@.exe $(DOCKER) mdashnet/vc17 wine64 cl $(SRCS) $(VCFLAGS) ws2_32.lib /Fe$@.exe
$(DOCKER) mdashnet/vc17 wine64 $@.exe $(DOCKER) mdashnet/vc17 wine64 $@.exe
# vc22: DEFS += -DMG_ENABLE_IPV6=$(IPV6)
vc22: Makefile mongoose.h $(SRCS) vc22: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/vc22 wine64 cl $(SRCS) $(VCFLAGS) ws2_32.lib /Fe$@.exe $(DOCKER) mdashnet/vc22 wine64 cl $(SRCS) $(VCFLAGS) ws2_32.lib /Fe$@.exe
$(DOCKER) mdashnet/vc22 wine64 $@.exe $(DOCKER) mdashnet/vc22 wine64 $@.exe
@@ -128,18 +159,24 @@ mingw: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/mingw x86_64-w64-mingw32-gcc $(SRCS) -W -Wall -Werror -I. $(DEFS) -lwsock32 -o $@.exe $(DOCKER) mdashnet/mingw x86_64-w64-mingw32-gcc $(SRCS) -W -Wall -Werror -I. $(DEFS) -lwsock32 -o $@.exe
$(DOCKER) mdashnet/mingw wine64 $@.exe $(DOCKER) mdashnet/mingw wine64 $@.exe
arduino: ENV = -v $(CWD)/arduino:/root
arduino:
curl -sL http://downloads.arduino.cc/arduino-1.8.19-linux64.tar.xz | unxz | tar -xf -
mv arduino-* $@
$(DOCKER) mdashnet/cc2 ./arduino/arduino --pref "boardsmanager.additional.urls=https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json" --save-prefs
$(DOCKER) mdashnet/cc2 ./arduino/arduino --pref "compiler.warning_level=all" --save-prefs
$(DOCKER) mdashnet/cc2 ./arduino/arduino --install-boards Seeeduino:samd
arduino-xiao: ENV = -v $(CWD)/arduino:/root
arduino-xiao: arduino
rm -rf tmp; mkdir tmp
cp examples/arduino/w5500/w5500.ino tmp/tmp.ino
cp mongoose.c mongoose.h examples/arduino/w5500/mongoose_custom.h tmp/
$(DOCKER) mdashnet/cc2 ./arduino/arduino --verbose --verify --board Seeeduino:samd:seeed_XIAO_m0 tmp/tmp.ino
mingw++: Makefile mongoose.h $(SRCS) mingw++: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/mingw x86_64-w64-mingw32-g++ $(SRCS) -W -Wall -Werror -I. $(DEFS) -lwsock32 -o $@.exe $(DOCKER) mdashnet/mingw x86_64-w64-mingw32-g++ $(SRCS) -W -Wall -Werror -I. $(DEFS) -lwsock32 -o $@.exe
linux: IPV6=0
linux: Makefile mongoose.h $(SRCS)
$(DOCKER) mdashnet/cc2 gcc $(SRCS) $(CFLAGS) $(LDFLAGS) -o unit_test_gcc
$(DOCKER) mdashnet/cc2 ./unit_test_gcc
linux++: CC = g++
linux++: WARN += -Wno-missing-field-initializers
linux++: linux
linux-libs: CFLAGS += -fPIC linux-libs: CFLAGS += -fPIC
linux-libs: mongoose.o linux-libs: mongoose.o
$(CC) mongoose.o $(LDFLAGS) -shared -o libmongoose.so.$(VERSION) $(CC) mongoose.o $(LDFLAGS) -shared -o libmongoose.so.$(VERSION)
@@ -153,12 +190,17 @@ install: linux-libs
uninstall: uninstall:
rm -rf $(DESTDIR)$(PREFIX)/lib/libmongoose.a $(DESTDIR)$(PREFIX)/lib/libmongoose.so.$(VERSION) $(DESTDIR)$(PREFIX)/include/mongoose.h $(DESTDIR)$(PREFIX)/lib/libmongoose.so rm -rf $(DESTDIR)$(PREFIX)/lib/libmongoose.a $(DESTDIR)$(PREFIX)/lib/libmongoose.so.$(VERSION) $(DESTDIR)$(PREFIX)/include/mongoose.h $(DESTDIR)$(PREFIX)/lib/libmongoose.so
mongoose.c: Makefile $(wildcard src/*) $(wildcard mip/*.c) mongoose.c: Makefile $(wildcard src/*.c) $(wildcard src/tcpip/*.c)
(cat src/license.h; echo; echo '#include "mongoose.h"' ; (for F in src/*.c mip/*.c ; do echo; echo '#ifdef MG_ENABLE_LINES'; echo "#line 1 \"$$F\""; echo '#endif'; cat $$F | sed -e 's,#include ".*,,'; done))> $@ (cat src/license.h; echo; echo '#include "mongoose.h"' ; (for F in src/*.c src/tcpip/*.c ; do echo; echo '#ifdef MG_ENABLE_LINES'; echo "#line 1 \"$$F\""; echo '#endif'; cat $$F | sed -e 's,#include ".*,,'; done))> $@
mongoose.h: $(HDRS) Makefile mongoose.h: $(HDRS) Makefile
(cat src/license.h; echo; echo '#ifndef MONGOOSE_H'; echo '#define MONGOOSE_H'; echo; cat src/version.h ; echo; echo '#ifdef __cplusplus'; echo 'extern "C" {'; echo '#endif'; cat src/arch.h src/arch_*.h src/config.h src/str.h src/fmt.h src/log.h src/timer.h src/fs.h src/util.h src/url.h src/iobuf.h src/base64.h src/md5.h src/sha1.h src/event.h src/net.h src/http.h src/ssi.h src/tls.h src/tls_mbed.h src/tls_openssl.h src/ws.h src/sntp.h src/mqtt.h src/dns.h src/json.h src/rpc.h mip/mip.h | sed -e 's,#include ".*,,' -e 's,^#pragma once,,'; echo; echo '#ifdef __cplusplus'; echo '}'; echo '#endif'; echo '#endif // MONGOOSE_H')> $@ (cat src/license.h; echo; echo '#ifndef MONGOOSE_H'; echo '#define MONGOOSE_H'; echo; cat src/version.h ; echo; echo '#ifdef __cplusplus'; echo 'extern "C" {'; echo '#endif'; cat src/arch.h src/arch_*.h src/net_*.h src/config.h src/str.h src/queue.h src/fmt.h src/printf.h src/log.h src/timer.h src/fs.h src/util.h src/url.h src/iobuf.h src/base64.h src/md5.h src/sha1.h src/event.h src/net.h src/http.h src/ssi.h src/tls.h src/tls_mbed.h src/tls_openssl.h src/ws.h src/sntp.h src/mqtt.h src/dns.h src/json.h src/rpc.h src/tcpip/tcpip.h src/tcpip/driver_*.h | sed -e '/keep/! s,#include ".*,,' -e 's,^#pragma once,,'; echo; echo '#ifdef __cplusplus'; echo '}'; echo '#endif'; echo '#endif // MONGOOSE_H')> $@
clean: clean_examples clean_embedded
rm -rf $(PROG) *.exe *.o *.dSYM *_test* ut fuzzer *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb slow-unit* _CL_* infer-out data.txt crash-* test/packed_fs.c pack arduino tmp
#find examples -maxdepth 3 -name zephyr -prune -o -name Makefile -print | xargs dirname | xargs -n1 make clean -C
clean_embedded:
for X in $(EXAMPLES_EMBEDDED); do test -f $$X/Makefile || continue; $(MAKE) -C $$X clean || exit 1; done
clean:
rm -rf $(PROG) *.exe *.o *.dSYM unit_test* valgrind_unit_test* ut fuzzer *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb slow-unit* _CL_* infer-out data.txt crash-* test/packed_fs.c pack unpacked
@for X in $(EXAMPLES); do $(MAKE) -C $$X clean; done
+15 -6
View File
@@ -5,24 +5,33 @@
[![Code Coverage](https://codecov.io/gh/cesanta/mongoose/branch/master/graph/badge.svg)](https://codecov.io/gh/cesanta/mongoose) [![Code Coverage](https://codecov.io/gh/cesanta/mongoose/branch/master/graph/badge.svg)](https://codecov.io/gh/cesanta/mongoose)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/mongoose.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:mongoose) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/mongoose.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:mongoose)
Mongoose is a networking library for C/C++. It implements event-driven Mongoose is a network library for C/C++.
It implements event-driven
non-blocking APIs for TCP, UDP, HTTP, WebSocket, MQTT. It is designed for non-blocking APIs for TCP, UDP, HTTP, WebSocket, MQTT. It is designed for
connecting devices and bringing them online. On the market since 2004, used by connecting devices and bringing them online. On the market since 2004, used by
vast number of open source and commercial products - it even runs on the vast number of open source and commercial products - it even runs on the
International Space Station! Mongoose makes embedded network programming fast, International Space Station! Mongoose makes embedded network programming fast,
robust, and easy. Features include: robust, and easy. Features include:
- Cross-platform: works on Linux/UNIX, MacOS, Windows, Android, FreeRTOS, etc. - Cross-platform:
- Supported embedded architectures: ESP32, NRF52, STM32, NXP, and more - works on Linux/UNIX, MacOS, Windows, Android
- works on STM32, NXP, ESP32, NRF52, TI, Microchip, and other
- write code once - and it'll work everywhere
- ideal for the unification of the network infrastructure code across company
- Built-in protocols: plain TCP/UDP, HTTP, MQTT, Websocket - Built-in protocols: plain TCP/UDP, HTTP, MQTT, Websocket
- SSL/TLS support: mbedTLS, OpenSSL or custom (via API) - SSL/TLS support: mbedTLS, OpenSSL or custom (via API)
- Asynchronous DNS resolver - Asynchronous DNS resolver
- Tiny static and run-time footprint - Tiny static and run-time footprint
- Source code is both ISO C and ISO C++ compliant - Source code is both ISO C and ISO C++ compliant
- Very easy to integrate: just copy `mongoose.c` and `mongoose.h` files to your source tree. See
[exact steps](https://mongoose.ws/documentation/#2-minute-integration-guide)
- Works with any network stack with socket API, like LwIP or FreeRTOS-Plus-TCP - Works with any network stack with socket API, like LwIP or FreeRTOS-Plus-TCP
- Very easy to integrate: just copy `mongoose.c` and `mongoose.h` files to your build tree - Provides a built-in TCP/IP stack with drivers for bare metal or RTOS systems
- Detailed [documentation](https://mongoose.ws/documentation/) and - A complete Web device dashboard
[tutorials](https://mongoose.ws/tutorials/) [bare metal example on Nucleo-F429ZI](examples/stm32/nucleo-f429zi-baremetal)
is only 6 files
- For comparison, a CubeIDE generated HTTP example is 400+ files
- Detailed [user guide, API reference and tons of tutorials](https://mongoose.ws/documentation/) available
# Commercial use # Commercial use
-4188
View File
File diff suppressed because it is too large. Load diff
-97
View File
@@ -1,97 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1034 239" style="enable-background:new 0 0 1034 239;" xml:space="preserve">
<style type="text/css">
.st0{fill:#576174;}
.st1{fill:#FFFFFF;}
.st2{font-family:'Courier-Bold';}
.st3{font-size:16.7604px;}
.st4{fill:#00983A;}
.st5{fill:none;stroke:#45CFFF;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st6{fill:#45CFFF;}
.st7{fill:none;stroke:#A000FF;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st8{fill:#A000FF;}
.st9{fill:none;stroke:#FFDE00;stroke-width:2.793;stroke-linecap:round;stroke-linejoin:round;}
.st10{fill:#FFDE00;}
.st11{fill:none;stroke:#EA5B0C;stroke-width:2.793;stroke-linecap:round;stroke-linejoin:round;}
.st12{fill:#EA5B0C;}
</style>
<g>
<path class="st0" d="M485.3,224.22H8.5c-4.7,0-8.5-3.8-8.5-8.5V27.22c0-4.7,3.8-8.5,8.5-8.5h476.8c4.7,0,8.5,3.8,8.5,8.5v188.5
C493.8,220.32,490,224.22,485.3,224.22z"/>
<g>
<g>
<g>
<text transform="matrix(1 0 0 1 21.294 60.1267)" class="st1 st2 st3">struct mg_str k,v,s = mg_str(”a=333, b=777”);</text>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 21.294 136.2499)" class="st1 st2 st3">mg_commalist(&amp;s, &amp;k, &amp;v); </text>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 21.294 197.1485)" class="st1 st2 st3">mg_commalist(&amp;s, &amp;k, &amp;v); </text>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 291.5096 140.18)" class="st4 st2 st3">// 1st call</text>
<text transform="matrix(1 0 0 1 291.5096 199.8101)" class="st4 st2 st3">// 2nd call</text>
</g>
</g>
</g>
<g>
<polyline class="st5" points="336.4,64.52 336.4,68.52 317.8,68.52 317.8,64.52 "/>
<g>
<path class="st5" d="M122.3,59.62"/>
<g>
<polyline class="st5" points="327.5,76.82 327.6,94.02 203.3,94.02 203.3,116.12 "/>
<path class="st6" d="M331,77.62c0,1.8-1.4,3.2-3.2,3.3c-1.8,0.1-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C329.5,74.42,331,75.92,331,77.62z"/>
</g>
</g>
<path class="st6" d="M203.2,114.92c-1.8,0-3.2,1.3-3.3,3s1.4,3,3.2,3s3.2-1.3,3.3-3l0,0C206.5,116.32,205,114.92,203.2,114.92z"/>
</g>
<g>
<polyline class="st7" points="407.4,64.52 407.4,68.52 388.8,68.52 388.8,64.52 "/>
<g>
<path class="st5" d="M193.4,59.62"/>
<g>
<polyline class="st7" points="398.6,76.82 398.6,149.02 203.4,149.02 203.4,177.12 "/>
<path class="st8" d="M402,77.62c0,1.8-1.4,3.2-3.2,3.3c-1.8,0.1-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C400.6,74.42,402,75.92,402,77.62z"/>
</g>
</g>
<path class="st8" d="M203.2,175.42c-1.8,0-3.2,1.3-3.3,3s1.4,3,3.2,3s3.2-1.3,3.3-3l0,0C206.5,176.82,205,175.42,203.2,175.42z"/>
</g>
<g>
<polyline class="st9" points="440.8,64.52 440.8,68.52 414.2,68.52 414.2,64.52 "/>
<g>
<path class="st5" d="M218.8,59.62"/>
<g>
<polyline class="st9" points="428,76.82 428,163.02 245.7,163.02 245.7,176.12 "/>
<path class="st10" d="M431.4,77.62c0,1.8-1.4,3.2-3.2,3.3c-1.8,0.1-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C430,74.42,431.4,75.92,431.4,77.62z"/>
</g>
</g>
<path class="st10" d="M245.4,175.42c-1.8,0-3.2,1.3-3.3,3s1.4,3,3.2,3s3.2-1.3,3.3-3l0,0C248.7,176.82,247.2,175.42,245.4,175.42z
"/>
</g>
<g>
<polyline class="st11" points="372.8,64.52 372.8,68.52 343.2,68.52 343.2,64.52 "/>
<g>
<path class="st5" d="M164.7,59.62"/>
<g>
<polyline class="st11" points="358.3,76.62 358.3,104.82 245.7,105.02 245.7,116.12 "/>
<path class="st12" d="M361.4,77.62c0,1.8-1.4,3.2-3.2,3.3c-1.8,0.1-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C359.9,74.42,361.4,75.92,361.4,77.62z"/>
</g>
</g>
<path class="st12" d="M245.7,114.92c-1.8,0-3.2,1.3-3.3,3s1.4,3,3.2,3s3.2-1.3,3.3-3l0,0C248.9,116.32,247.4,114.92,245.7,114.92z
"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

-48
View File
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1034 158.07" style="enable-background:new 0 0 1034 158.07;" xml:space="preserve">
<style type="text/css">
.st0{fill:#67748A;}
.st1{fill:#FFFFFF;}
.st2{font-family:'Courier-Bold';}
.st3{font-size:16.7604px;}
.st4{fill:none;stroke:#45CFFF;stroke-width:2.793;stroke-linecap:round;stroke-linejoin:round;}
.st5{fill:#45CFFF;}
.st6{font-family:'Arial-BoldMT';}
</style>
<g>
<path class="st0" d="M516.7,39.8v56.33c0,4.17-3.8,7.54-8.5,7.54H14.6H8.5c-4.7,0-8.5-3.37-8.5-7.54V39.8c0-4.17,3.8-7.54,8.5-7.54
h499.7C512.9,32.26,516.7,35.63,516.7,39.8z"/>
<text transform="matrix(1 0 0 1 51.0379 69.3318)" class="st1 st2 st3">GET /test \n\nGET /test \n\nGET test \n\n</text>
<g>
<polyline class="st4" points="189.5,76.47 189.5,80.47 51.8,80.47 51.8,76.47 "/>
<polyline class="st4" points="331.3,76.47 331.3,80.47 195.6,80.47 195.6,76.47 "/>
<polyline class="st4" points="462.7,76.47 462.7,80.47 336.9,80.47 336.9,76.47 "/>
</g>
<g>
<text transform="matrix(1 0 0 1 78.8909 148.8896)" class="st5 st6 st3">1st request</text>
<g>
<line class="st4" x1="120.2" y1="93.57" x2="120.3" y2="129.57"/>
<path class="st5" d="M117.1,92.57c0-1.8,1.4-3.2,3.2-3.3c1.8,0,3.2,1.4,3.3,3.2c0,1.8-1.4,3.2-3.2,3.3l0,0
C118.5,95.77,117.1,94.37,117.1,92.57z"/>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 217.3594 148.8891)" class="st5 st6 st3">2nd request </text>
<g>
<line class="st4" x1="263.8" y1="93.57" x2="263.9" y2="129.57"/>
<path class="st5" d="M260.7,92.57c0-1.8,1.4-3.2,3.2-3.3c1.8,0,3.2,1.4,3.3,3.2c0,1.8-1.4,3.2-3.2,3.3l0,0
C262.1,95.77,260.7,94.37,260.7,92.57z"/>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 354.7297 148.8896)" class="st5 st6 st3">3rd request </text>
<g>
<line class="st4" x1="399.4" y1="93.57" x2="399.4" y2="129.57"/>
<path class="st5" d="M396.2,92.57c0-1.8,1.4-3.2,3.2-3.3c1.8,0,3.2,1.4,3.3,3.2c0,1.8-1.4,3.2-3.2,3.3l0,0
C397.7,95.77,396.2,94.37,396.2,92.57z"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

-113
View File
@@ -1,113 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1035.4 429.9" style="enable-background:new 0 0 1035.4 429.9;" xml:space="preserve">
<style type="text/css">
.st0{fill:#576174;}
.st1{fill:#67748A;}
.st2{fill:none;stroke:#87005B;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st3{fill:#87005B;}
.st4{fill:#FFFFFF;}
.st5{font-family:'Courier-Bold';}
.st6{font-size:16.7604px;}
.st7{fill:none;stroke:#EA5B0C;stroke-width:2.793;stroke-linecap:round;stroke-linejoin:round;}
.st8{fill:#EA5B0C;}
.st9{fill:none;stroke:#CA70FF;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st10{fill:#CA70FF;}
.st11{fill:none;stroke:#FFDE00;stroke-width:2.793;stroke-linecap:round;stroke-linejoin:round;}
.st12{fill:#FFDE00;}
.st13{fill:none;stroke:#00CF4F;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st14{fill:#00CF4F;}
.st15{fill:none;stroke:#45CFFF;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st16{fill:none;stroke:#EA5B0C;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st17{font-family:'Arial-BoldMT';}
.st18{font-size:24px;}
.st19{fill:#45CFFF;}
</style>
<g>
<path class="st0" d="M755.8,391.8H8.5c-4.7,0-8.5-3.8-8.5-8.5v-153c0-4.7,3.8-8.5,8.5-8.5h747.3c4.7,0,8.5,3.8,8.5,8.5v153
C764.3,388,760.5,391.8,755.8,391.8z"/>
<path class="st1" d="M996.9,261.5h-427c-4.7,0-8.5-3.8-8.5-8.5V81.2c0-4.7,3.8-8.5,8.5-8.5h427c4.7,0,8.5,3.8,8.5,8.5V253
C1005.4,257.7,1001.5,261.5,996.9,261.5z"/>
<g>
<polyline class="st2" points="598.1,238.2 598.1,242.3 787.7,242.3 787.7,238.2 "/>
<g>
<line class="st2" x1="689.3" y1="342.2" x2="276.4" y2="343.3"/>
<g>
<line class="st2" x1="689.4" y1="253.3" x2="689.4" y2="342.1"/>
<path class="st3" d="M689.4,249.3c1.8,0,3.2,1.4,3.3,3.2c0,1.8-1.4,3.2-3.2,3.3c-1.8,0-3.2-1.4-3.3-3.2l0,0
C686.1,250.7,687.6,249.3,689.4,249.3z"/>
</g>
</g>
<path class="st3" d="M274.2,340.4c1.8,0,3.2,1.4,3.3,3.2s-1.4,3.2-3.2,3.3c-1.8,0-3.2-1.4-3.3-3.2l0,0
C270.9,341.8,272.4,340.4,274.2,340.4z"/>
</g>
<text transform="matrix(1 0 0 1 26.0923 262.5192)" class="st4 st5 st6">struct mg_http_message {</text>
<text transform="matrix(1 0 0 1 45.542 286.2874)" class="st4 st5 st6">struct mg_str method; uri, query, proto; </text>
<text transform="matrix(1 0 0 1 45.542 306.3874)" class="st4 st5 st6">struct mg_http_header headers[MG_MAX_HTTP_HEADERS];</text>
<text transform="matrix(1 0 0 1 45.542 326.4874)" class="st4 st5 st6">struct mg_str body;</text>
<text transform="matrix(1 0 0 1 45.542 346.5874)" class="st4 st5 st6">struct mg_str message; </text>
<g>
<g>
<polyline class="st7" points="621.1,89.6 621.1,78.6 215.4,79.7 215.3,269.4 "/>
<path class="st8" d="M624.3,90.6c0,1.8-1.4,3.2-3.2,3.3c-1.8,0-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C622.8,87.4,624.3,88.8,624.3,90.6z"/>
</g>
<path class="st8" d="M212.3,269.4c0-1.8,1.4-3.2,3.2-3.3c1.8,0,3.2,1.4,3.3,3.2c0,1.8-1.4,3.2-3.2,3.3l0,0
C213.7,272.6,212.3,271.2,212.3,269.4z"/>
</g>
<g>
<polyline class="st9" points="597.2,183.6 593.1,183.6 593.1,127.8 597.2,127.8 "/>
<g>
<polyline class="st9" points="582.4,156.2 575.2,156.2 575,302.8 563.4,302.8 "/>
<path class="st10" d="M586.1,156.2c0-1.8-1.4-3.2-3.2-3.3c-1.8,0-3.2,1.4-3.3,3.2c0,1.8,1.4,3.2,3.2,3.3l0,0
C584.7,159.4,586.1,158,586.1,156.2z"/>
<path class="st10" d="M564.2,303c0-1.8-1.4-3.2-3.2-3.3c-1.8,0-3.2,1.4-3.3,3.2s1.4,3.2,3.2,3.3l0,0
C562.7,306.2,564.2,304.7,564.2,303z"/>
</g>
</g>
<text transform="matrix(1 0 0 1 601.1215 118.1291)" class="st4 st5 st6">POST /foo/bar/baz?aa=b&amp;cc=ddd HTTP/1.1</text>
<text transform="matrix(1 0 0 1 601.1215 138.2291)" class="st4 st5 st6">Content-Type: application/json</text>
<text transform="matrix(1 0 0 1 601.1215 158.3291)" class="st4 st5 st6">Content-Length: 19</text>
<text transform="matrix(1 0 0 1 601.1215 178.4291)" class="st4 st5 st6">Host: reqbin.com</text>
<g>
<g>
<g>
<polyline class="st11" points="712.3,90.6 712.4,67.6 277.8,67.6 279.7,269.3 "/>
<path class="st12" d="M715.6,90.8c0,1.8-1.4,3.2-3.2,3.3c-1.8,0-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C714.1,87.6,715.6,89.1,715.6,90.8z"/>
</g>
<path class="st12" d="M276.5,269.4c0-1.8,1.4-3.2,3.2-3.3s3.2,1.4,3.3,3.2s-1.4,3.2-3.2,3.3l0,0
C278,272.6,276.5,271.2,276.5,269.4z"/>
</g>
<polyline class="st11" points="771.5,104.3 771.5,100.3 652.7,100.3 652.7,104.3 "/>
</g>
<g>
<g>
<g>
<polyline class="st13" points="836.3,90.6 836.3,56.6 342.8,56.6 344.7,268.3 "/>
<path class="st14" d="M839.5,90.6c0,1.8-1.4,3.2-3.2,3.3c-1.8,0-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C838,87.4,839.5,88.9,839.5,90.6z"/>
</g>
<path class="st14" d="M341.4,269.3c0-1.8,1.4-3.2,3.2-3.3c1.8,0,3.2,1.4,3.3,3.2c0,1.8-1.4,3.2-3.2,3.3l0,0
C342.9,272.5,341.4,271.1,341.4,269.3z"/>
</g>
<polyline class="st15" points="981.4,104.2 981.4,100.2 902.6,100.2 902.6,104.2 "/>
</g>
<text transform="matrix(1 0 0 1 596.891 232.3658)" class="st4 st5 st6">{&quot;success&quot;: &quot;true&quot;}</text>
<polyline class="st16" points="643.1,104.4 643.1,100.4 599.3,100.4 599.3,104.4 "/>
<text transform="matrix(1 0 0 1 9.5506 207.5157)" class="st17 st18">Source Code</text>
<text transform="matrix(1 0 0 1 797.0799 32.3923)" class="st17 st18">HTTP message</text>
<text transform="matrix(1 0 0 1 26.0924 359.209)" class="st4 st5 st6">};</text>
<polyline class="st13" points="894.2,104.2 894.2,100.2 774.4,100.2 774.4,104.2 "/>
<g>
<g>
<polyline class="st15" points="941.3,90.6 941.3,45.6 412.8,45.6 414.7,268.3 "/>
<path class="st19" d="M944.5,90.6c0,1.8-1.4,3.2-3.2,3.3c-1.8,0-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C943,87.4,944.5,88.9,944.5,90.6z"/>
</g>
<path class="st19" d="M411.4,269.3c0-1.8,1.4-3.2,3.2-3.3c1.8,0,3.2,1.4,3.3,3.2c0,1.8-1.4,3.2-3.2,3.3l0,0
C412.9,272.5,411.4,271.1,411.4,269.3z"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.0 KiB

-109
View File
@@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1034 663.54" style="enable-background:new 0 0 1034 663.54;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;stroke:#45CFFF;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st1{fill:#45CFFF;}
.st2{fill:#576174;}
.st3{fill:#FFFFFF;}
.st4{font-family:'Courier-Bold';}
.st5{font-size:16.7604px;}
.st6{font-family:'Arial-BoldMT';}
.st7{font-size:24px;}
.st8{fill:#67748A;}
.st9{fill:#8B9CBA;}
.st10{fill:none;stroke:#00CF4F;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st11{fill:#00CF4F;}
.st12{fill:none;stroke:#EA5B0C;stroke-width:2.793;stroke-linecap:round;stroke-linejoin:round;}
.st13{fill:#EA5B0C;}
.st14{fill:#414857;}
</style>
<g>
<g>
<polyline class="st0" points="498.5,624.21 498.5,628.21 447.9,628.21 447.9,624.21 "/>
<g>
<path class="st0" d="M491.8,844.81"/>
<g>
<path class="st1" d="M473.8,636.11c-1.8,0-3.2,1.4-3.3,3.2c0,1.8,1.4,3.2,3.2,3.3c1.8,0,3.2-1.4,3.3-3.2l0,0
C477.1,637.61,475.6,636.11,473.8,636.11z"/>
</g>
</g>
<path class="st1" d="M296.7,852.71c-1.8,0-3.2,1.3-3.3,3c0,1.7,1.4,3,3.2,3c1.8,0,3.2-1.3,3.3-3l0,0
C299.9,854.01,298.5,852.71,296.7,852.71z"/>
</g>
<g>
<path class="st2" d="M584.6,199.01H8.5c-4.7,0-8.5-3.8-8.5-8.5V60.71c0-4.7,3.8-8.5,8.5-8.5h576.1c4.7,0,8.5,3.8,8.5,8.5v129.8
C593.1,195.21,589.3,199.01,584.6,199.01z"/>
<g>
<g>
<g>
<text transform="matrix(1 0 0 1 28.7 90.8107)" class="st3 st4 st5">struct mg_http_part part;</text>
<text transform="matrix(1 0 0 1 28.7 110.9108)" class="st3 st4 st5">size_t pos = 0;</text>
<text transform="matrix(1 0 0 1 28.7 151.1107)" class="st3 st4 st5">pos = mg_http_next_multipart(&amp;hm-&gt;body, pos, &amp;part);</text>
<text transform="matrix(1 0 0 1 28.7 171.3107)" class="st3 st4 st5">pos = mg_http_next_multipart(&amp;hm-&gt;body, pos, &amp;part);</text>
</g>
</g>
</g>
<text transform="matrix(1 0 0 1 1.3738 40.559)" class="st6 st7">Source Code</text>
</g>
<g>
<g>
<path class="st8" d="M685.5,646.41H8.5c-4.7,0-8.5-3.8-8.5-8.5v-362.9c0-4.7,3.8-8.5,8.5-8.5h677c4.7,0,8.5,3.8,8.5,8.5v362.9
C694,642.61,690.2,646.41,685.5,646.41z"/>
</g>
<path class="st9" d="M640.2,629.41H26.3c-4.7,0-8.5-3.8-8.5-8.5v-106.5c0-4.7,3.8-8.5,8.5-8.5h613.9c4.7,0,8.5,3.8,8.5,8.5v106.5
C648.7,625.61,644.8,629.41,640.2,629.41z"/>
<path class="st9" d="M644,490.91H30.1c-4.7,0-8.5-3.8-8.5-8.5v-106.5c0-4.7,3.8-8.5,8.5-8.5H644c4.7,0,8.5,3.8,8.5,8.5v106.5
C652.5,487.11,648.7,490.91,644,490.91z"/>
<g>
<text transform="matrix(1 0 0 1 0.0299 253.0343)" class="st6 st7">HTTP message</text>
</g>
<g>
<text transform="matrix(1 0 0 1 28.7 302.8107)" class="st3 st4 st5">POST /upload HTTP/1.1 </text>
<text transform="matrix(1 0 0 1 28.7 322.9107)" class="st3 st4 st5">Content-Type: multipart/form-data; boundary=&quot;--xyz&quot;</text>
<text transform="matrix(1 0 0 1 28.7 363.1107)" class="st3 st4 st5">--xyz</text>
<text transform="matrix(1 0 0 1 28.7 383.3107)" class="st3 st4 st5">Content-Disposition: form-data; name=&quot;foo&quot;; filename=&quot;a.txt&quot;</text>
<text transform="matrix(1 0 0 1 28.7 403.4107)" class="st3 st4 st5">Content-Type: text/plain</text>
<text transform="matrix(1 0 0 1 28.7 443.6107)" class="st3 st4 st5">hello world</text>
<text transform="matrix(1 0 0 1 28.7 483.8107)" class="st3 st4 st5">--xyz---</text>
<text transform="matrix(1 0 0 1 28.7 524.0107)" class="st3 st4 st5">Content-Disposition: form-data; name=&quot;bar&quot;; filename=&quot;b.txt&quot;</text>
<text transform="matrix(1 0 0 1 28.7 544.2108)" class="st3 st4 st5">Content-Type: text/plain</text>
<text transform="matrix(1 0 0 1 28.7 584.4108)" class="st3 st4 st5">hello world again</text>
<text transform="matrix(1 0 0 1 28.7 624.6107)" class="st3 st4 st5">--xyz--</text>
</g>
</g>
<g>
<g>
<polyline class="st10" points="569.5,162.51 574.5,162.51 574.5,176.11 569.5,176.11 "/>
<g>
<path class="st0" d="M726.8,392.91"/>
<g>
<polyline class="st10" points="587.3,169.71 726.7,169.71 726.6,569.31 684.3,569.31 "/>
<path class="st11" d="M585,166.41c-1.8,0-3.2,1.4-3.3,3.2c0,1.8,1.4,3.2,3.2,3.3c1.8,0,3.2-1.4,3.3-3.2l0,0
C588.2,167.91,586.8,166.41,585,166.41z"/>
</g>
</g>
<path class="st11" d="M685,566.31c-1.7,0-3,1.3-3,3s1.3,3,3,3s3-1.3,3-3l0,0C688,567.61,686.6,566.31,685,566.31z"/>
</g>
<polyline class="st10" points="657.9,501.61 673.9,501.61 673.9,634.21 657.9,634.21 "/>
</g>
<g>
<g>
<polyline class="st12" points="569.5,143.21 574.5,143.21 574.5,156.81 569.5,156.81 "/>
<g>
<path class="st0" d="M726.8,254.61"/>
<g>
<polyline class="st12" points="587.3,150.41 710.7,150.41 710.6,431.01 684.3,431.01 "/>
<path class="st13" d="M585,147.11c-1.8,0-3.2,1.4-3.3,3.2s1.4,3.2,3.2,3.3c1.8,0,3.2-1.4,3.3-3.2l0,0
C588.2,148.61,586.8,147.11,585,147.11z"/>
</g>
</g>
<path class="st13" d="M685,428.01c-1.7,0-3,1.3-3,3s1.3,3,3,3s3-1.3,3-3l0,0C688,429.31,686.6,428.01,685,428.01z"/>
</g>
<polyline class="st12" points="657.9,363.31 673.9,363.31 673.9,495.91 657.9,495.91 "/>
</g>
<text transform="matrix(1 0 0 1 537.9671 462.1467)" class="st14 st6 st7">Part 1</text>
<text transform="matrix(1 0 0 1 537.9671 600.4373)" class="st14 st6 st7">Part 2</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 5.5 KiB

-94
View File
@@ -1,94 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1034 480.6" style="enable-background:new 0 0 1034 480.6;" xml:space="preserve">
<style type="text/css">
.st0{fill:#67748A;}
.st1{fill:#8B9CBA;}
.st2{fill:#FFFFFF;}
.st3{font-family:'Courier-Bold';}
.st4{font-size:16.7604px;}
.st5{fill:#414857;}
.st6{font-family:'Arial-BoldMT';}
.st7{font-size:30px;}
.st8{font-size:24px;}
.st9{fill:#576174;}
.st10{fill:none;stroke:#45CFFF;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st11{fill:#45CFFF;}
.st12{fill:none;stroke:#EA5B0C;stroke-width:2.793;stroke-linecap:round;stroke-linejoin:round;}
.st13{fill:#EA5B0C;}
.st14{fill:none;stroke:#EA5B0C;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st15{fill:none;stroke:#FFDE00;stroke-width:2.793;stroke-linecap:round;stroke-linejoin:round;}
.st16{fill:#FFDE00;}
</style>
<g>
<g>
<path class="st0" d="M908.4,454.9H272c-4.7,0-8.5-3.8-8.5-8.5V216c0-4.7,3.8-8.5,8.5-8.5h636.4c4.7,0,8.5,3.8,8.5,8.5v230.4
C916.9,451.1,913.1,454.9,908.4,454.9z"/>
<g>
<path class="st1" d="M898.6,430.8H284.7c-4.7,0-8.5-3.8-8.5-8.5V315.9c0-4.7,3.8-8.5,8.5-8.5h613.9c4.7,0,8.5,3.8,8.5,8.5v106.5
C907.1,427,903.3,430.8,898.6,430.8z"/>
<text transform="matrix(1 0 0 1 295.3688 243.086)" class="st2 st3 st4">POST /upload HTTP/1.1 </text>
<text transform="matrix(1 0 0 1 295.3688 263.186)" class="st2 st3 st4">Content-Type: multipart/form-data: boundary=&quot;--xyz&quot;</text>
<text transform="matrix(1 0 0 1 295.3688 303.386)" class="st2 st3 st4">--xyz</text>
<text transform="matrix(1 0 0 1 295.3688 323.586)" class="st2 st3 st4">Content-Disposition: form-data; name=&quot;foo&quot;; filename=&quot;a.txt&quot;</text>
<text transform="matrix(1 0 0 1 295.3688 343.686)" class="st2 st3 st4">Content-Type: text/plain</text>
<text transform="matrix(1 0 0 1 295.3688 383.886)" class="st2 st3 st4">hello world</text>
<text transform="matrix(1 0 0 1 295.3688 424.086)" class="st2 st3 st4">--xyz---</text>
</g>
</g>
<text transform="matrix(1 0 0 1 739.2766 414.2906)" class="st5 st6 st7">HTTP part</text>
<text transform="matrix(1 0 0 1 739.2764 193.4305)" class="st6 st8">HTTP message</text>
<path class="st9" d="M304.9,198H8.5c-4.7,0-8.5-3.8-8.5-8.5V64.8c0-4.7,3.8-8.5,8.5-8.5H305c4.7,0,8.5,3.8,8.5,8.5v124.7
C313.4,194.2,309.6,198,304.9,198z"/>
<g>
<g>
<text transform="matrix(1 0 0 1 25.2409 91.1617)" class="st2 st3 st4">struct mg_http_part {</text>
<text transform="matrix(1 0 0 1 47.0734 113.7079)" class="st2 st3 st4">struct mg_str name;</text>
<text transform="matrix(1 0 0 1 47.0734 133.8079)" class="st2 st3 st4">strucy mg_str filename;</text>
<text transform="matrix(1 0 0 1 47.0734 153.9079)" class="st2 st3 st4">struct mg_str body;</text>
</g>
</g>
<g>
<polyline class="st10" points="237.4,159 237.4,163 185.8,163 185.8,159 "/>
<g>
<polyline class="st10" points="211.7,348.3 349.5,348.4 349.5,355.6 "/>
<g>
<line class="st10" x1="211.6" y1="174.4" x2="211.6" y2="348.1"/>
<path class="st11" d="M211.6,170.3c-1.8,0-3.2,1.4-3.3,3.2c0,1.8,1.4,3.2,3.2,3.3c1.8,0,3.2-1.4,3.3-3.2l0,0
C214.8,171.8,213.4,170.3,211.6,170.3z"/>
</g>
</g>
<path class="st11" d="M349.6,353.6c-1.8,0-3.2,1.4-3.3,3.2s1.4,3.2,3.2,3.3c1.8,0,3.2-1.4,3.3-3.2l0,0
C352.8,355.1,351.4,353.6,349.6,353.6z"/>
<polyline class="st10" points="237.4,159 237.4,163 185.8,163 185.8,159 "/>
<polyline class="st10" points="407.3,371.1 407.3,367.1 293.3,367.1 293.3,371.1 "/>
</g>
<g>
<g>
<g>
<polyline class="st12" points="693.7,291.6 693.7,277.7 280.7,278.8 280.5,109.4 248.3,109.4 "/>
<path class="st13" d="M696.9,293.6c0,1.8-1.4,3.2-3.2,3.3c-1.8,0-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C695.4,290.4,696.9,291.9,696.9,293.6z"/>
</g>
<path class="st13" d="M243.9,109.5c0-1.8,1.4-3.2,3.2-3.3c1.8,0,3.2,1.4,3.3,3.2c0,1.8-1.4,3.2-3.2,3.3l0,0
C245.3,112.7,243.9,111.3,243.9,109.5z"/>
</g>
<polyline class="st14" points="707.6,309.2 707.6,305.2 679.9,305.2 679.9,309.2 "/>
</g>
<text transform="matrix(1 0 0 1 0.8627 37.8099)" class="st6 st8">Source Code</text>
<text transform="matrix(1 0 0 1 25.2408 177.7241)" class="st2 st3 st4">};</text>
<g>
<g>
<g>
<polyline class="st15" points="863.8,291.5 863.7,218.6 329.7,218.7 329.6,130.3 298.4,130.3 "/>
<path class="st16" d="M867.1,293.6c0,1.8-1.4,3.2-3.2,3.3c-1.8,0-3.2-1.4-3.3-3.2c0-1.8,1.4-3.2,3.2-3.3l0,0
C865.6,290.3,867.1,291.8,867.1,293.6z"/>
</g>
<path class="st16" d="M293,130.1c0-1.8,1.4-3.2,3.2-3.3c1.8,0,3.2,1.4,3.3,3.2c0,1.8-1.4,3.2-3.2,3.3l0,0
C294.4,133.3,293,131.9,293,130.1z"/>
</g>
<polyline class="st15" points="888.7,309.1 888.7,305.1 838.9,305.1 838.9,309.1 "/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.9 KiB

-84
View File
@@ -1,84 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1034 331.2" style="enable-background:new 0 0 1034 331.2;" xml:space="preserve">
<style type="text/css">
.st0{fill:#576174;}
.st1{fill:#67748A;}
.st2{fill:#FFFFFF;}
.st3{font-family:'Courier-Bold';}
.st4{font-size:16.7604px;}
.st5{font-family:'Arial-BoldMT';}
.st6{font-size:24px;}
.st7{fill:none;stroke:#45CFFF;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st8{fill:#45CFFF;}
.st9{fill:none;stroke:#EA5B0C;stroke-width:2.793;stroke-linecap:round;stroke-linejoin:round;}
.st10{fill:#EA5B0C;}
.st11{fill:none;stroke:#EA5B0C;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st12{fill:none;stroke:#00CF4F;stroke-width:2.7934;stroke-linecap:round;stroke-linejoin:round;}
.st13{fill:#00CF4F;}
</style>
<g>
<path class="st0" d="M541.43,184.2H8.53c-4.7,0-8.5-3.8-8.5-8.5V54.8c0-4.7,3.8-8.5,8.5-8.5h532.9c4.7,0,8.5,3.8,8.5,8.5v120.9
C549.93,180.4,546.13,184.2,541.43,184.2z"/>
<g>
<path class="st1" d="M829.23,315.5h-370c-4.7,0-8.5-3.8-8.5-8.5V157c0-4.7,3.8-8.5,8.5-8.5h370c4.7,0,8.5,3.8,8.5,8.5v150
C837.83,311.7,833.93,315.5,829.23,315.5z"/>
<g>
<text transform="matrix(1 0 0 1 490.6096 184.0905)" class="st2 st3 st4">HTTP/1.1 200 OK</text>
<text transform="matrix(1 0 0 1 490.6096 204.1905)" class="st2 st3 st4">Content-Length; 13</text>
<text transform="matrix(1 0 0 1 490.6096 224.2905)" class="st2 st3 st4">X-Header-1: additional value 1</text>
<text transform="matrix(1 0 0 1 490.6096 244.3905)" class="st2 st3 st4">X-Header-2: additional value 2</text>
<text transform="matrix(1 0 0 1 490.8657 293.1559)" class="st2 st3 st4">Hello, world!</text>
</g>
</g>
<text transform="matrix(1 0 0 1 660.5036 137.3383)" class="st5 st6">HTTP message</text>
<g>
<g>
<text transform="matrix(1 0 0 1 20.7331 85.1617)" class="st2 st3 st4">mg_http_reply(c, 200</text>
<text transform="matrix(1 0 0 1 159.5657 113.7079)" class="st2 st3 st4">&quot;X-Header-1: additional value 1\r\n&quot;</text>
<text transform="matrix(1 0 0 1 159.5657 133.8079)" class="st2 st3 st4">&quot;X-Header-2: additional value 2\r\n&quot;,</text>
<text transform="matrix(1 0 0 1 159.5657 153.9079)" class="st2 st3 st4">&quot;Hello, %s!&quot;, &quot;world&quot;);</text>
</g>
</g>
<g>
<polyline class="st7" points="362.93,159 362.93,163 167.33,163 167.33,159 "/>
<g>
<polyline class="st7" points="265.93,256.6 552.13,256.7 552.13,264.4 "/>
<g>
<line class="st7" x1="265.83" y1="174.4" x2="265.83" y2="256.6"/>
<path class="st8" d="M265.83,170.3c-1.8,0-3.2,1.4-3.3,3.2c0,1.8,1.4,3.2,3.2,3.3c1.8,0,3.2-1.4,3.3-3.2l0,0
C269.03,171.8,267.53,170.3,265.83,170.3z"/>
</g>
</g>
<path class="st8" d="M552.23,261.6c-1.8,0-3.2,1.4-3.3,3.2c0,1.8,1.4,3.2,3.2,3.3c1.8,0,3.2-1.4,3.3-3.2l0,0
C555.43,263.1,554.03,261.6,552.23,261.6z"/>
</g>
<g>
<g>
<g>
<polyline class="st9" points="206.33,53.6 206.43,37.6 596.43,38.7 596.53,161.3 "/>
<path class="st10" d="M203.23,54.6c0,1.8,1.4,3.2,3.2,3.3c1.8,0,3.2-1.4,3.3-3.2c0-1.8-1.4-3.2-3.2-3.3l0,0
C204.63,51.4,203.23,52.8,203.23,54.6z"/>
</g>
<path class="st10" d="M599.83,164c0-1.8-1.4-3.2-3.2-3.3c-1.8,0-3.2,1.4-3.3,3.2c0,1.8,1.4,3.2,3.2,3.3l0,0
C598.33,167.2,599.83,165.8,599.83,164z"/>
</g>
<polyline class="st11" points="192.43,69.2 192.43,65.2 220.23,65.2 220.23,69.2 "/>
</g>
<text transform="matrix(1 0 0 1 -1.917133e-04 35.0037)" class="st5 st6">Source Code</text>
<g>
<polyline class="st12" points="160.13,135.9 156.03,135.9 156.03,100.1 160.13,100.1 "/>
<g>
<line class="st12" x1="123.93" y1="231" x2="469.73" y2="231"/>
<polyline class="st12" points="144.73,117.2 123.83,117.2 123.73,230.8 "/>
<path class="st13" d="M147.83,117.2c0-1.8-1.4-3.2-3.2-3.3c-1.8,0-3.2,1.4-3.3,3.2c0,1.8,1.4,3.2,3.2,3.3l0,0
C146.33,120.4,147.83,119,147.83,117.2z"/>
<path class="st13" d="M474.83,230.8c0-1.8-1.4-3.2-3.2-3.3c-1.8,0-3.2,1.4-3.3,3.2c0,1.8,1.4,3.2,3.2,3.3l0,0
C473.43,234,474.83,232.5,474.83,230.8z"/>
</g>
</g>
<polyline class="st7" points="489.03,279.6 489.03,275.6 620.63,275.6 620.63,279.6 "/>
<polyline class="st12" points="487.63,248.3 483.63,248.3 483.63,211.5 487.63,211.5 "/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

-124
View File
@@ -1,124 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 869.6 185.67" style="enable-background:new 0 0 869.6 185.67;" xml:space="preserve">
<style type="text/css">
.st0{font-family:'Arial-BoldMT';}
.st1{font-size:24px;}
.st2{opacity:0.2;fill:#00983A;enable-background:new ;}
.st3{fill:none;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st4{fill:#00983A;}
.st5{fill:none;stroke:#576174;stroke-miterlimit:10;}
.st6{fill:#F2F3F3;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st7{fill:none;stroke:#576174;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st8{font-family:'Courier-Bold';}
.st9{font-size:16.7604px;}
.st10{fill:none;stroke:#00983A;stroke-linecap:round;stroke-linejoin:round;}
.st11{fill:#576174;}
.st12{font-family:'Courier';}
.st13{fill:none;}
.st14{fill:#7A8387;}
</style>
<g>
<text transform="matrix(1 0 0 1 1.0956 32.4549)" class="st0 st1">Memory</text>
<polyline class="st2" points="424.58,115.4 219.88,115.4 219.88,90.7 424.58,90.7 "/>
<g>
<g>
<g>
<polyline class="st3" points="458.98,115.4 218.98,115.4 218.98,90.7 458.98,90.7 "/>
<polyline class="st4" points="219.18,115.1 2.98,115.1 2.98,91.3 219.18,91.3 "/>
<line class="st3" x1="2.98" y1="69.2" x2="2.98" y2="130.4"/>
<line class="st5" x1="219.78" y1="69.2" x2="219.78" y2="130.4"/>
<line class="st5" x1="425.28" y1="69.2" x2="425.28" y2="130.4"/>
<path class="st6" d="M458.98,115.4"/>
<path class="st7" d="M33.98,114.6"/>
<path class="st7" d="M33.98,90.9"/>
<path class="st7" d="M2.98,90.7h216.8v24.9l-216.8-0.2C2.98,115.4,3.18,90.7,2.98,90.7z"/>
<line class="st3" x1="425.18" y1="90.8" x2="425.18" y2="115.3"/>
<path class="st6" d="M251.98,115.6"/>
<path class="st6" d="M251.98,91.9"/>
</g>
<g>
<text transform="matrix(1 0 0 1 -2.290726e-04 175.3858)" class="st4 st8 st9">buf</text>
</g>
<g>
<g>
<line class="st10" x1="2.68" y1="158.2" x2="2.68" y2="137.2"/>
<g>
<polygon class="st4" points="0.28,137.6 5.08,137.6 2.68,135.1 "/>
</g>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 214.6515 175.3858)" class="st4 st8 st9">len</text>
</g>
</g>
<g>
<g>
<line class="st10" x1="219.78" y1="158.2" x2="219.78" y2="137.2"/>
<g>
<polygon class="st4" points="217.38,137.6 222.18,137.6 219.78,135.1 "/>
</g>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 421.6186 175.3858)" class="st4 st8 st9">size</text>
</g>
</g>
<g>
<g>
<line class="st10" x1="425.38" y1="158.2" x2="425.38" y2="137.2"/>
<g>
<polygon class="st4" points="422.98,137.6 427.78,137.6 425.38,135.1 "/>
</g>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 93.1143 69.4458)" class="st11 st12 st9">data</text>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 273.8231 69.4458)" class="st11 st12 st9">free space</text>
</g>
</g>
<g>
<g>
<line class="st5" x1="132.98" y1="76.3" x2="13.98" y2="76.3"/>
<g>
<polygon class="st11" points="14.28,78.7 14.28,73.8 11.88,76.3 "/>
</g>
</g>
</g>
<g>
<line class="st13" x1="123.88" y1="76.3" x2="210.88" y2="76.3"/>
<g>
<line class="st5" x1="123.88" y1="76.3" x2="208.78" y2="76.3"/>
<g>
<polygon class="st11" points="208.48,73.8 208.48,78.7 210.88,76.3 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st5" x1="320.38" y1="76.3" x2="414.28" y2="76.3"/>
<g>
<polygon class="st14" points="413.98,73.8 413.98,78.7 416.38,76.3 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st5" x1="322.28" y1="76.3" x2="233.28" y2="76.3"/>
<g>
<polygon class="st14" points="233.68,78.7 233.68,73.8 231.18,76.3 "/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.1 KiB

-52
View File
@@ -1,52 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 869 124.66" style="enable-background:new 0 0 869 124.66;" xml:space="preserve">
<style type="text/css">
.st0{fill:#F2F3F3;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st1{fill:none;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st2{fill:#00983A;}
.st3{font-family:'Courier-Bold';}
.st4{font-size:16.7604px;}
.st5{fill:none;stroke:#00983A;stroke-linecap:round;stroke-linejoin:round;}
.st6{fill:#7A8387;}
</style>
<g>
<g>
<g>
<polyline class="st0" points="830.92,78.4 5.52,78.4 5.52,53.7 830.92,53.6 "/>
<line class="st1" x1="5.52" y1="32.2" x2="5.52" y2="93.4"/>
<path class="st0" d="M830.92,78.4"/>
<line class="st1" x1="36.52" y1="53.9" x2="36.52" y2="77.6"/>
<line class="st1" x1="68.92" y1="53.9" x2="68.92" y2="77.6"/>
<line class="st1" x1="101.42" y1="53.9" x2="101.42" y2="77.6"/>
<line class="st1" x1="133.72" y1="53.9" x2="133.72" y2="77.6"/>
<line class="st1" x1="166.22" y1="53.9" x2="166.22" y2="77.6"/>
<line class="st1" x1="198.52" y1="54.6" x2="198.52" y2="78.3"/>
<line class="st1" x1="230.92" y1="54.6" x2="230.92" y2="78.3"/>
</g>
<g>
<text transform="matrix(1 0 0 1 59.1908 40.8585)" class="st2 st3 st4">buf=NULL, len=0, size=0 </text>
</g>
<g>
<text transform="matrix(1 0 0 1 -1.811981e-04 109.9024)" class="st2 st3 st4">0</text>
</g>
<g>
<g>
<g>
<line class="st5" x1="46.72" y1="37.7" x2="17.72" y2="37.7"/>
<g>
<polygon class="st2" points="18.12,40.1 18.12,35.2 15.62,37.7 "/>
</g>
</g>
</g>
</g>
<g>
<path class="st6" d="M511.52,66.4c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6s0.7-1.6,1.6-1.6S511.52,65.5,511.52,66.4z"/>
<path class="st6" d="M525.32,66.4c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6s0.7-1.6,1.6-1.6S525.32,65.5,525.32,66.4z"/>
<path class="st6" d="M539.02,66.4c0,0.9-0.7,1.6-1.6,1.6c-0.9,0-1.6-0.7-1.6-1.6s0.7-1.6,1.6-1.6S539.02,65.5,539.02,66.4z"/>
<path class="st6" d="M552.82,66.4c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6s0.7-1.6,1.6-1.6S552.82,65.5,552.82,66.4z"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

-185
View File
@@ -1,185 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 869.6 127.5" style="enable-background:new 0 0 869.6 127.5;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.2;fill:#00983A;enable-background:new ;}
.st1{fill:#F2F3F3;}
.st2{fill:none;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st3{fill:#00983A;}
.st4{fill:#F2F3F3;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st5{fill:none;stroke:#576174;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st6{fill:none;stroke:#576174;stroke-width:1.2;stroke-linecap:square;stroke-linejoin:round;}
.st7{font-family:'Courier-Bold';}
.st8{font-size:16.7604px;}
.st9{fill:none;stroke:#00983A;stroke-linecap:round;stroke-linejoin:round;}
.st10{fill:#7A8387;}
.st11{fill:#576174;}
.st12{fill:none;stroke:#576174;stroke-linecap:round;stroke-linejoin:round;}
.st13{fill:none;stroke:#7A8387;stroke-linecap:round;stroke-linejoin:round;}
.st14{fill:#333A45;}
</style>
<g>
<g>
<polyline class="st0" points="577.2,72.8 282.4,72.8 282.4,48 577.2,48 "/>
<g>
<g>
<g>
<polyline class="st1" points="122.6,72.8 5.9,72.8 5.9,48 122.6,48 "/>
<polyline class="st2" points="831.51,72.8 5.5,72.8 5.5,48 831.51,48 "/>
<polyline class="st3" points="282.7,72.5 122.5,72.5 122.5,47.7 282.7,47.7 "/>
<line class="st2" x1="122.5" y1="26.6" x2="122.5" y2="87.8"/>
<line class="st2" x1="283.3" y1="26.6" x2="283.3" y2="87.8"/>
<line class="st2" x1="576.8" y1="26.6" x2="576.8" y2="87.8"/>
<path class="st4" d="M831.51,72.8"/>
<line class="st5" x1="153.5" y1="48.3" x2="153.5" y2="72"/>
<line class="st2" x1="36.5" y1="48.3" x2="36.5" y2="72"/>
<line class="st2" x1="67.6" y1="48.3" x2="67.6" y2="72"/>
<line class="st5" x1="186" y1="48.3" x2="186" y2="72"/>
<line class="st5" x1="218.4" y1="48.3" x2="218.4" y2="72"/>
<line class="st5" x1="250.9" y1="48.3" x2="250.9" y2="72"/>
<line class="st2" x1="315.9" y1="48.3" x2="315.9" y2="72"/>
<line class="st2" x1="348.4" y1="48.3" x2="348.4" y2="72"/>
<line class="st2" x1="381.2" y1="48.3" x2="381.2" y2="72"/>
<line class="st2" x1="413.8" y1="48.3" x2="413.8" y2="72"/>
<line class="st2" x1="446.3" y1="48.3" x2="446.3" y2="72"/>
<line class="st2" x1="478.9" y1="48.3" x2="478.9" y2="72"/>
<line class="st5" x1="511.51" y1="48.3" x2="511.51" y2="72"/>
<line class="st2" x1="511.51" y1="48.3" x2="511.51" y2="72"/>
<line class="st5" x1="544.01" y1="48.3" x2="544.01" y2="72"/>
<line class="st2" x1="544.1" y1="48.3" x2="544.1" y2="72"/>
<line class="st6" x1="283.3" y1="73" x2="122.5" y2="72.8"/>
<line class="st6" x1="122.5" y1="48" x2="283.3" y2="48.1"/>
<path class="st4" d="M385.5,73"/>
<path class="st4" d="M385.5,49.3"/>
</g>
<g>
<text transform="matrix(1 0 0 1 127.5176 105.8013)" class="st3 st7 st8">buf</text>
</g>
<g>
<g>
<line class="st9" x1="122.2" y1="105.6" x2="122.2" y2="94.6"/>
<g>
<polygon class="st3" points="119.8,94.9 124.6,94.9 122.2,92.5 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 286.6495 105.8008)" class="st3 st7 st8">len=5</text>
</g>
<g>
<g>
<line class="st9" x1="283.3" y1="105.6" x2="283.3" y2="94.6"/>
<g>
<polygon class="st3" points="280.9,94.9 285.8,94.9 283.3,92.5 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 581.4624 105.8013)" class="st3 st7 st8">size=16</text>
</g>
<g>
<g>
<line class="st9" x1="576.9" y1="105.6" x2="576.9" y2="94.6"/>
<g>
<polygon class="st3" points="574.51,94.9 579.4,94.9 576.9,92.5 "/>
</g>
</g>
</g>
<g>
<path class="st10" d="M687.51,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S687.51,59.9,687.51,60.7z"/>
<path class="st10" d="M701.2,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S701.2,59.9,701.2,60.7z"/>
<path class="st10" d="M714.9,60.7c0,0.9-0.7,1.6-1.6,1.6c-0.9,0-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6
C714.2,59.1,714.9,59.9,714.9,60.7z"/>
<path class="st10" d="M728.7,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6
C728.01,59.1,728.7,59.9,728.7,60.7z"/>
</g>
<g>
<path class="st10" d="M82.8,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S82.8,59.9,82.8,60.7z"/>
<path class="st10" d="M96.5,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6C95.8,59.1,96.5,59.9,96.5,60.7
z"/>
<path class="st10" d="M110.2,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S110.2,59.9,110.2,60.7z"/>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 180.6541 26.8123)" class="st11 st7 st8">data</text>
</g>
<g>
<text transform="matrix(1 0 0 1 387.363 26.8123)" class="st10 st7 st8">free space</text>
</g>
<g>
<g>
<line class="st12" x1="272.2" y1="33.6" x2="133.5" y2="33.6"/>
<g>
<polygon class="st11" points="271.9,36.2 273.5,33.6 271.9,31.1 271.8,31.1 271.8,36.2 "/>
</g>
<g>
<polygon class="st11" points="133.8,36.1 133.8,31.2 131.4,33.6 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st13" x1="563.7" y1="33.6" x2="295.9" y2="33.6"/>
<g>
<polygon class="st10" points="563.4,36.1 563.4,31.2 565.8,33.6 "/>
</g>
<g>
<polygon class="st10" points="296.2,36.1 296.2,31.2 293.7,33.6 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 615.4679 25.1898)" class="st10 st7 st8">non-allocated space</text>
</g>
<g>
<g>
<line class="st13" x1="593.7" y1="33.6" x2="829.7" y2="33.6"/>
<g>
<polygon class="st10" points="829.4,31.2 829.4,36.1 831.8,33.6 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st13" x1="678.7" y1="33.6" x2="589.7" y2="33.6"/>
<g>
<polygon class="st10" points="590.01,36.1 590.01,31.2 587.6,33.6 "/>
</g>
</g>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 133.1212 64.9593)" class="st14 st7 st8">h</text>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 165.1564 64.9593)" class="st14 st7 st8">e</text>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 196.8744 64.9593)" class="st14 st7 st8">l</text>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 229.8611 64.9593)" class="st14 st7 st8">l</text>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 262.2135 64.9593)" class="st14 st7 st8">o</text>
</g>
</g>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 1.811981e-04 105.8011)" class="st3 st7 st8">0</text>
</g>
<line class="st2" x1="5.5" y1="26.4" x2="5.5" y2="87.6"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.1 KiB

-347
View File
@@ -1,347 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 869.6 247.73" style="enable-background:new 0 0 869.6 247.73;" xml:space="preserve">
<style type="text/css">
.st0{opacity:0.2;fill:#00983A;enable-background:new ;}
.st1{fill:#00983A;}
.st2{fill:#FF80A4;}
.st3{fill:#F2F3F3;}
.st4{fill:none;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st5{fill:#F2F3F3;stroke:#7A8387;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st6{fill:none;stroke:#576174;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
.st7{fill:none;stroke:#576174;stroke-width:1.2;stroke-linejoin:round;}
.st8{fill:none;stroke:#576174;stroke-width:1.2;stroke-linecap:square;stroke-linejoin:round;}
.st9{font-family:'Courier-Bold';}
.st10{font-size:16.7604px;}
.st11{fill:none;stroke:#00983A;stroke-linecap:round;stroke-linejoin:round;}
.st12{fill:#7A8387;}
.st13{fill:#576174;}
.st14{fill:none;stroke:#576174;stroke-linecap:round;stroke-linejoin:round;}
.st15{fill:none;stroke:#7A8387;stroke-linecap:round;stroke-linejoin:round;}
.st16{fill:#333A45;}
</style>
<g>
<g>
<polyline class="st0" points="577.2,72.8 282.4,72.8 282.4,48 577.2,48 "/>
<g>
<g>
<g>
<rect x="250.9" y="47.7" class="st1" width="32.4" height="24.8"/>
<rect x="153.5" y="47.7" class="st2" width="97.3" height="24.8"/>
<polyline class="st3" points="122.6,72.8 5.9,72.8 5.9,48 122.6,48 "/>
<polyline class="st4" points="831.51,72.8 5.5,72.8 5.5,48 831.51,48 "/>
<rect x="122.5" y="47.7" class="st1" width="31" height="24.8"/>
<line class="st4" x1="122.5" y1="26.6" x2="122.5" y2="87.8"/>
<line class="st4" x1="576.8" y1="26.6" x2="576.8" y2="87.8"/>
<path class="st5" d="M831.51,72.8"/>
<line class="st6" x1="153.5" y1="48.3" x2="153.5" y2="72"/>
<line class="st4" x1="36.5" y1="48.3" x2="36.5" y2="72"/>
<line class="st4" x1="67.6" y1="48.3" x2="67.6" y2="72"/>
<line class="st6" x1="186" y1="48.3" x2="186" y2="72"/>
<line class="st6" x1="218.4" y1="48.3" x2="218.4" y2="72"/>
<line class="st7" x1="250.9" y1="73" x2="250.81" y2="47.7"/>
<line class="st4" x1="315.9" y1="48.3" x2="315.9" y2="72"/>
<line class="st4" x1="348.4" y1="48.3" x2="348.4" y2="72"/>
<line class="st4" x1="381.2" y1="48.3" x2="381.2" y2="72"/>
<line class="st4" x1="413.8" y1="48.3" x2="413.8" y2="72"/>
<line class="st4" x1="446.3" y1="48.3" x2="446.3" y2="72"/>
<line class="st4" x1="478.9" y1="48.3" x2="478.9" y2="72"/>
<line class="st6" x1="511.51" y1="48.3" x2="511.51" y2="72"/>
<line class="st4" x1="511.51" y1="48.3" x2="511.51" y2="72"/>
<line class="st6" x1="544.01" y1="48.3" x2="544.01" y2="72"/>
<line class="st4" x1="544.1" y1="48.3" x2="544.1" y2="72"/>
<line class="st8" x1="283.3" y1="73" x2="122.5" y2="72.8"/>
<line class="st8" x1="122.5" y1="48" x2="283.3" y2="48.1"/>
<path class="st5" d="M385.5,73"/>
<path class="st5" d="M385.5,49.3"/>
<line class="st4" x1="283.3" y1="26.6" x2="283.3" y2="87.8"/>
</g>
<g>
<text transform="matrix(1 0 0 1 127.5176 105.8013)" class="st1 st9 st10">buf</text>
</g>
<g>
<g>
<line class="st11" x1="122.2" y1="105.6" x2="122.2" y2="94.6"/>
<g>
<polygon class="st1" points="119.8,94.9 124.6,94.9 122.2,92.5 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 286.6495 105.8008)" class="st1 st9 st10">len=5</text>
</g>
<g>
<g>
<line class="st11" x1="283.3" y1="105.6" x2="283.3" y2="94.6"/>
<g>
<polygon class="st1" points="280.9,94.9 285.8,94.9 283.3,92.5 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 581.4624 105.8013)" class="st1 st9 st10">size=16</text>
</g>
<g>
<g>
<line class="st11" x1="576.9" y1="105.6" x2="576.9" y2="94.6"/>
<g>
<polygon class="st1" points="574.51,94.9 579.4,94.9 576.9,92.5 "/>
</g>
</g>
</g>
<g>
<path class="st12" d="M687.51,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S687.51,59.9,687.51,60.7z"/>
<path class="st12" d="M701.2,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S701.2,59.9,701.2,60.7z"/>
<path class="st12" d="M714.9,60.7c0,0.9-0.7,1.6-1.6,1.6c-0.9,0-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6
C714.2,59.1,714.9,59.9,714.9,60.7z"/>
<path class="st12" d="M728.7,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6
C728.01,59.1,728.7,59.9,728.7,60.7z"/>
</g>
<g>
<path class="st12" d="M82.8,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S82.8,59.9,82.8,60.7z"/>
<path class="st12" d="M96.5,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6C95.8,59.1,96.5,59.9,96.5,60.7
z"/>
<path class="st12" d="M110.2,60.7c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S110.2,59.9,110.2,60.7z"/>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 180.6541 26.8123)" class="st13 st9 st10">data</text>
</g>
<g>
<text transform="matrix(1 0 0 1 387.363 26.8123)" class="st12 st9 st10">free space</text>
</g>
<g>
<g>
<line class="st14" x1="272.2" y1="33.6" x2="133.5" y2="33.6"/>
<g>
<polygon class="st13" points="271.9,36.2 273.5,33.6 271.9,31.1 271.8,31.1 271.8,36.2 "/>
</g>
<g>
<polygon class="st13" points="133.8,36.1 133.8,31.2 131.4,33.6 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st15" x1="563.7" y1="33.6" x2="295.9" y2="33.6"/>
<g>
<polygon class="st12" points="563.4,36.1 563.4,31.2 565.8,33.6 "/>
</g>
<g>
<polygon class="st12" points="296.2,36.1 296.2,31.2 293.7,33.6 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 615.4679 25.1898)" class="st12 st9 st10">non-allocated space</text>
</g>
<g>
<g>
<line class="st15" x1="593.7" y1="33.6" x2="829.7" y2="33.6"/>
<g>
<polygon class="st12" points="829.4,31.2 829.4,36.1 831.8,33.6 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st15" x1="678.7" y1="33.6" x2="589.7" y2="33.6"/>
<g>
<polygon class="st12" points="590.01,36.1 590.01,31.2 587.6,33.6 "/>
</g>
</g>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 133.1212 64.9593)" class="st16 st9 st10">h</text>
</g>
</g>
<g>
<g>
<g>
<text transform="matrix(1 0 0 1 165.1564 64.9593)" class="st16 st9 st10">e</text>
</g>
</g>
</g>
<g>
<g>
<g>
<text transform="matrix(1 0 0 1 196.8744 64.9593)" class="st16 st9 st10">l</text>
</g>
</g>
</g>
<g>
<g>
<g>
<text transform="matrix(1 0 0 1 229.8611 64.9593)" class="st16 st9 st10">l</text>
</g>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 262.2135 64.9593)" class="st16 st9 st10">o</text>
</g>
</g>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 1.811981e-04 105.8011)" class="st1 st9 st10">0</text>
</g>
<line class="st4" x1="5.5" y1="26.4" x2="5.5" y2="87.6"/>
</g>
<g>
<g>
<polyline class="st0" points="577.2,207.99 186.3,207.99 186.3,183.19 577.2,183.19 "/>
<g>
<g>
<g>
<polyline class="st3" points="122.6,207.99 5.9,207.99 5.9,183.19 122.6,183.19 "/>
<polyline class="st4" points="831.51,207.99 5.5,207.99 5.5,183.19 831.51,183.19 "/>
<polyline class="st1" points="186.3,207.69 122.5,207.69 122.5,182.89 186.3,182.89 "/>
<line class="st4" x1="122.5" y1="161.79" x2="122.5" y2="222.99"/>
<line class="st4" x1="186" y1="161.79" x2="186" y2="222.99"/>
<line class="st4" x1="576.8" y1="161.79" x2="576.8" y2="222.99"/>
<path class="st5" d="M831.51,207.99"/>
<line class="st6" x1="153.5" y1="183.49" x2="153.5" y2="207.19"/>
<line class="st4" x1="36.5" y1="183.49" x2="36.5" y2="207.19"/>
<line class="st4" x1="67.6" y1="183.49" x2="67.6" y2="207.19"/>
<line class="st6" x1="186" y1="183.49" x2="186" y2="207.99"/>
<line class="st4" x1="218.4" y1="183.49" x2="218.4" y2="207.19"/>
<line class="st4" x1="250.9" y1="183.49" x2="250.9" y2="207.19"/>
<line class="st4" x1="283.3" y1="183.49" x2="283.3" y2="207.19"/>
<line class="st4" x1="315.9" y1="183.49" x2="315.9" y2="207.19"/>
<line class="st4" x1="348.4" y1="183.49" x2="348.4" y2="207.19"/>
<line class="st4" x1="381.2" y1="183.49" x2="381.2" y2="207.19"/>
<line class="st4" x1="413.8" y1="183.49" x2="413.8" y2="207.19"/>
<line class="st4" x1="446.3" y1="183.49" x2="446.3" y2="207.19"/>
<line class="st4" x1="478.9" y1="183.49" x2="478.9" y2="207.19"/>
<line class="st6" x1="511.51" y1="183.49" x2="511.51" y2="207.19"/>
<line class="st4" x1="511.51" y1="183.49" x2="511.51" y2="207.19"/>
<line class="st6" x1="544.01" y1="183.49" x2="544.01" y2="207.19"/>
<line class="st4" x1="544.1" y1="183.49" x2="544.1" y2="207.19"/>
<line class="st8" x1="186" y1="208.19" x2="122.5" y2="207.99"/>
<line class="st8" x1="122.5" y1="183.19" x2="186" y2="183.29"/>
<path class="st5" d="M385.5,208.19"/>
<path class="st5" d="M385.5,184.49"/>
</g>
<g>
<text transform="matrix(1 0 0 1 127.5176 240.9952)" class="st1 st9 st10">buf</text>
</g>
<g>
<g>
<line class="st11" x1="122.2" y1="240.79" x2="122.2" y2="229.79"/>
<g>
<polygon class="st1" points="119.8,230.09 124.6,230.09 122.2,227.69 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 189.2273 240.9947)" class="st1 st9 st10">len=2</text>
</g>
<g>
<g>
<line class="st11" x1="185.88" y1="240.79" x2="185.88" y2="229.79"/>
<g>
<polygon class="st1" points="183.48,230.09 188.38,230.09 185.88,227.69 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 581.4624 240.9952)" class="st1 st9 st10">size=16</text>
</g>
<g>
<g>
<line class="st11" x1="576.9" y1="240.79" x2="576.9" y2="229.79"/>
<g>
<polygon class="st1" points="574.51,230.09 579.4,230.09 576.9,227.69 "/>
</g>
</g>
</g>
<g>
<path class="st12" d="M687.51,195.89c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6
S687.51,195.09,687.51,195.89z"/>
<path class="st12" d="M701.2,195.89c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S701.2,195.09,701.2,195.89z
"/>
<path class="st12" d="M714.9,195.89c0,0.9-0.7,1.6-1.6,1.6c-0.9,0-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6
S714.9,195.09,714.9,195.89z"/>
<path class="st12" d="M728.7,195.89c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6
C728.01,194.29,728.7,195.09,728.7,195.89z"/>
</g>
<g>
<path class="st12" d="M82.8,195.89c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S82.8,195.09,82.8,195.89z"/>
<path class="st12" d="M96.5,195.89c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6
C95.8,194.29,96.5,195.09,96.5,195.89z"/>
<path class="st12" d="M110.2,195.89c0,0.9-0.7,1.6-1.6,1.6s-1.6-0.7-1.6-1.6c0-0.9,0.7-1.6,1.6-1.6S110.2,195.09,110.2,195.89z
"/>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 133.6541 162.0062)" class="st13 st9 st10">data</text>
</g>
<g>
<text transform="matrix(1 0 0 1 327.363 162.0062)" class="st12 st9 st10">free space</text>
</g>
<g>
<g>
<line class="st14" x1="175.2" y1="168.79" x2="133.5" y2="168.79"/>
<g>
<polygon class="st13" points="174.9,171.39 176.5,168.79 174.9,166.29 174.8,166.29 174.8,171.39 "/>
</g>
<g>
<polygon class="st13" points="133.8,171.29 133.8,166.39 131.4,168.79 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st15" x1="563.7" y1="168.79" x2="197.49" y2="168.79"/>
<g>
<polygon class="st12" points="563.4,171.29 563.4,166.39 565.8,168.79 "/>
</g>
<g>
<polygon class="st12" points="197.79,171.29 197.79,166.39 195.29,168.79 "/>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 615.4679 160.3837)" class="st12 st9 st10">non-allocated space</text>
</g>
<g>
<g>
<line class="st15" x1="593.7" y1="168.79" x2="829.7" y2="168.79"/>
<g>
<polygon class="st12" points="829.4,166.39 829.4,171.29 831.8,168.79 "/>
</g>
</g>
</g>
<g>
<g>
<line class="st15" x1="678.7" y1="168.79" x2="589.7" y2="168.79"/>
<g>
<polygon class="st12" points="590.01,171.29 590.01,166.39 587.6,168.79 "/>
</g>
</g>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 133.1212 200.1532)" class="st16 st9 st10">h</text>
</g>
</g>
<g>
<g>
<text transform="matrix(1 0 0 1 165.1565 200.1532)" class="st16 st9 st10">o</text>
</g>
</g>
</g>
</g>
</g>
<g>
<text transform="matrix(1 0 0 1 1.811981e-04 240.995)" class="st1 st9 st10">0</text>
</g>
<line class="st4" x1="5.5" y1="161.59" x2="5.5" y2="222.79"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

-384
View File
@@ -1,384 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 858.5 424.3" style="enable-background:new 0 0 858.5 424.3;" xml:space="preserve">
<style type="text/css">
.st0{fill:#9E9B83;}
.st1{fill:#9E8900;}
.st2{font-family:Arial;font-weight:bold;}
.st3{font-size:11px;}
.st4{display:none;fill:#576174;}
.st5{fill:#1F5F75;}
.st6{clip-path:url(#SVGID_3_);fill:#FFFFFF;fill-opacity:0.1;}
.st7{fill:#277691;}
.st8{fill:#FFFFFF;}
.st9{font-family:Arial;font-weight:bold;}
.st10{fill:#004219;}
.st11{clip-path:url(#SVGID_6_);fill:#FFFFFF;fill-opacity:0.1;}
.st12{fill:#005721;}
.st13{fill:url(#SVGID_7_);}
.st14{clip-path:url(#XMLID_13_);fill:#FFFFFF;fill-opacity:0.1;}
.st15{fill:#752E06;}
.st16{fill:#963B08;}
.st17{fill:#59008F;}
.st18{clip-path:url(#XMLID_15_);fill:#FFFFFF;fill-opacity:0.1;}
.st19{fill:#7300B8;}
.st20{fill:#FFDE00;}
.st21{fill:#576174;}
.st22{font-size:13px;}
.st23{fill:#8A8C8E;}
.st24{font-size:12px;}
.st25{opacity:0.69;}
.st26{fill:#B3B1B3;}
.st27{clip-path:url(#XMLID_17_);fill:#FFFFFF;fill-opacity:0.1;}
.st28{fill:#919091;}
.st29{fill:#BFBEBF;}
.st30{fill:#454445;}
.st31{font-size:9px;}
.st32{clip-path:url(#XMLID_19_);fill:#FFFFFF;fill-opacity:0.1;}
.st33{fill:#8695B3;}
.st34{fill:url(#SVGID_8_);}
.st35{font-size:18px;}
.st36{clip-path:url(#XMLID_20_);fill:#610041;fill-opacity:0.1;}
.st37{fill:#610041;}
.st38{clip-path:url(#XMLID_22_);fill:url(#SVGID_9_);fill-opacity:0.1;}
.st39{fill:none;stroke:#86005B;stroke-width:0.5;stroke-linecap:round;stroke-miterlimit:10;}
.st40{fill:none;stroke:#86005B;stroke-width:0.75;stroke-linecap:round;stroke-miterlimit:10;}
.st41{fill:url(#SVGID_10_);}
.st42{fill:url(#SVGID_11_);}
.st43{fill:#610042;}
.st44{fill:url(#SVGID_12_);}
</style>
<g>
<g>
<path class="st0" d="M457.9,111.2l0.1,87.3c0,1.4-1.1,2.6-2.5,2.6h-76.3c-4.4-0.2-7.3-3.9-7.3-5.3l4.7-101.8
c0-1.4,0.8-7.4,2.2-7.4l54-0.1L457.9,111.2z"/>
</g>
<g>
<text transform="matrix(1 0 0 1 383.2604 149.9447)" class="st1 st2 st3">packed_fs.c</text>
</g>
</g>
<rect x="84" y="25" class="st4" width="727.7" height="429.8"/>
<g>
<g>
<path class="st5" d="M207.5,104.6v87.4c0,1.4-1.1,2.6-2.5,2.6h-78.3c-1.4,0-2.5-1.1-2.5-2.6V84.5c0-1.4,1.1-2.5,2.5-2.5h58
L207.5,104.6z"/>
<g>
<defs>
<path id="SVGID_1_" d="M205.5,102.6v87.4c0,1.4-1.1,2.6-2.5,2.6h-78.3c-1.4,0-2.5-1.1-2.5-2.6v-57.5V82.5c0-1.4,1.1-2.5,2.5-2.5
h58L205.5,102.6z"/>
</defs>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="122.1091" y1="136.2824" x2="205.5191" y2="136.2824">
<stop offset="0" style="stop-color:#45CFFF"/>
<stop offset="1" style="stop-color:#85DDFA"/>
</linearGradient>
<use xlink:href="#SVGID_1_" style="overflow:visible;fill:url(#SVGID_2_);"/>
<clipPath id="SVGID_3_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<path class="st6" d="M121.4,101.4c9.4,0.7,36.6,1.5,53.2,14.7c25,20,31.2,47.1,31.2,47.1l0.4,35.3l-84.8,0.2V101.4z"/>
</g>
<path class="st5" d="M205.9,104.4l-20.6,0c-1.4,0-2.6-1.2-2.6-2.6l0-21.8l22.9,22.7L205.9,104.4z"/>
<path class="st7" d="M205.7,102.8h-20.5c-1.4,0-2.5-1.1-2.5-2.5V79.9l0,0l22.9,22.7L205.7,102.8z"/>
<g>
<text transform="matrix(1 0 0 1 129.0689 92.8531)" class="st8 st9 st3">filex.y</text>
</g>
</g>
<g>
<path class="st10" d="M191.4,121.6V209c0,1.4-1.1,2.6-2.5,2.6h-78.3c-1.4,0-2.5-1.1-2.5-2.6V101.4c0-1.4,1.1-2.5,2.5-2.5h58
L191.4,121.6z"/>
<g>
<defs>
<path id="SVGID_4_" d="M189.4,119.6V207c0,1.4-1.1,2.6-2.5,2.6h-78.3c-1.4,0-2.5-1.1-2.5-2.6v-57.5V99.4c0-1.4,1.1-2.5,2.5-2.5
h58L189.4,119.6z"/>
</defs>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="106.0386" y1="153.2384" x2="189.4486" y2="153.2384">
<stop offset="0" style="stop-color:#00983A"/>
<stop offset="1" style="stop-color:#3A985D"/>
</linearGradient>
<use xlink:href="#SVGID_4_" style="overflow:visible;fill:url(#SVGID_5_);"/>
<clipPath id="SVGID_6_">
<use xlink:href="#SVGID_4_" style="overflow:visible;"/>
</clipPath>
<path class="st11" d="M105.3,118.3c9.4,0.7,36.6,1.5,53.2,14.7c25,20,31.2,47.1,31.2,47.1l0.4,35.3l-84.8,0.2V118.3z"/>
</g>
<path class="st10" d="M189.8,121.3l-20.6,0c-1.4,0-2.6-1.2-2.6-2.6l0-21.8l22.9,22.7L189.8,121.3z"/>
<path class="st12" d="M189.6,119.7h-20.5c-1.4,0-2.5-1.1-2.5-2.5V96.9l0,0l22.9,22.7L189.6,119.7z"/>
<g>
<text transform="matrix(1 0 0 1 113.9984 109.809)" class="st8 st9 st3">main.js</text>
</g>
</g>
<g>
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="93.2369" y1="173.2516" x2="176.6469" y2="173.2516">
<stop offset="0" style="stop-color:#EA5B0C"/>
<stop offset="1" style="stop-color:#EA671E"/>
</linearGradient>
<path class="st13" d="M176.6,139.6V227c0,1.4-1.1,2.6-2.5,2.6H95.8c-1.4,0-2.5-1.1-2.5-2.6V119.5c0-1.4,1.1-2.5,2.5-2.5h58
L176.6,139.6z"/>
<g>
<defs>
<path id="XMLID_2_" d="M174.6,137.6V225c0,1.4-1.1,2.6-2.5,2.6H93.8c-1.4,0-2.5-1.1-2.5-2.6v-57.5v-50.1c0-1.4,1.1-2.5,2.5-2.5
h58L174.6,137.6z"/>
</defs>
<linearGradient id="XMLID_12_" gradientUnits="userSpaceOnUse" x1="91.2369" y1="171.2516" x2="174.6469" y2="171.2516">
<stop offset="0" style="stop-color:#EA5B0C"/>
<stop offset="1" style="stop-color:#EA7B3D"/>
</linearGradient>
<use xlink:href="#XMLID_2_" style="overflow:visible;fill:url(#XMLID_12_);"/>
<clipPath id="XMLID_13_">
<use xlink:href="#XMLID_2_" style="overflow:visible;"/>
</clipPath>
<path class="st14" d="M90.5,136.3c9.4,0.7,36.6,1.5,53.2,14.7c25,20,31.2,47.1,31.2,47.1l0.4,35.3l-84.8,0.2V136.3z"/>
</g>
<path class="st15" d="M175,139.3l-20.6,0c-1.4,0-2.6-1.2-2.6-2.6l0-21.8l22.9,22.7L175,139.3z"/>
<path class="st16" d="M174.8,137.7h-20.5c-1.4,0-2.5-1.1-2.5-2.5v-20.3l0,0l22.9,22.7L174.8,137.7z"/>
<g>
<text transform="matrix(1 0 0 1 97.1967 127.8222)" class="st8 st9 st3">style.css</text>
</g>
</g>
<g>
<path class="st17" d="M164.6,157.7v87.4c0,1.4-1.1,2.6-2.5,2.6H83.8c-1.4,0-2.5-1.1-2.5-2.6V137.5c0-1.4,1.1-2.5,2.5-2.5h58
L164.6,157.7z"/>
<g>
<defs>
<path id="XMLID_1_" d="M162.6,155.7v87.4c0,1.4-1.1,2.6-2.5,2.6H81.8c-1.4,0-2.5-1.1-2.5-2.6v-57.5v-50.1c0-1.4,1.1-2.5,2.5-2.5
h58L162.6,155.7z"/>
</defs>
<linearGradient id="XMLID_14_" gradientUnits="userSpaceOnUse" x1="79.2009" y1="189.3131" x2="162.6108" y2="189.3131">
<stop offset="0" style="stop-color:#A000FF"/>
<stop offset="1" style="stop-color:#C96EFF"/>
</linearGradient>
<use xlink:href="#XMLID_1_" style="overflow:visible;fill:url(#XMLID_14_);"/>
<clipPath id="XMLID_15_">
<use xlink:href="#XMLID_1_" style="overflow:visible;"/>
</clipPath>
<path class="st18" d="M78.5,154.4c9.4,0.7,36.6,1.5,53.2,14.7c25,20,31.2,47.1,31.2,47.1l0.4,35.3l-84.8,0.2V154.4z"/>
</g>
<path class="st17" d="M163,157.4l-20.6,0c-1.4,0-2.6-1.2-2.6-2.6l0-21.8l22.9,22.7L163,157.4z"/>
<path class="st19" d="M162.8,155.8h-20.5c-1.4,0-2.5-1.1-2.5-2.5V133l0,0l22.9,22.7L162.8,155.8z"/>
<g>
<text transform="matrix(1 0 0 1 83.1607 145.8838)" class="st8 st9 st3">index.html</text>
</g>
</g>
</g>
<g>
<g>
<path class="st20" d="M455.2,108.2v87.4c0,1.4-1.1,2.6-2.5,2.6h-78.3c-1.4,0-2.5-1.1-2.5-2.6V88.1c0-1.4,1.1-2.5,2.5-2.5h58
L455.2,108.2z"/>
<path class="st0" d="M455.3,110.3l-18.4,0c-1.4,0-2.5-1.1-2.5-2.5V87.5l0,0l20.9,20.7L455.3,110.3z"/>
<polygon class="st0" points="435.2,109.7 432.9,107.3 436.3,106.9 "/>
<path class="st1" d="M455.4,108.3h-20.5c-1.4,0-2.5-1.1-2.5-2.5V85.5l0,0l22.9,22.7L455.4,108.3z"/>
</g>
<g>
<text transform="matrix(1 0 0 1 379.2604 144.9447)" class="st21 st9 st22">packed_fs.c</text>
</g>
</g>
<g>
<polygon class="st23" points="483.6,195.4 397.3,195.4 394.3,193.4 397.3,162.8 481.5,159.7 483.6,162.8 "/>
<rect x="394.3" y="159.8" class="st21" width="87.3" height="33.7"/>
<g>
<g>
<text transform="matrix(1 0 0 1 400.0845 171.7588)" class="st8 st9 st24">mg_unpack()</text>
</g>
<g>
<text transform="matrix(1 0 0 1 400.0845 186.935)" class="st8 st9 st24">mg_unlist()</text>
</g>
</g>
</g>
<g class="st25">
<g>
<path class="st26" d="M467.7,256.6V344c0,1.4-1.1,2.6-2.5,2.6h-78.3c-1.4,0-2.5-1.1-2.5-2.6V236.4c0-1.4,1.1-2.5,2.5-2.5h58
L467.7,256.6z"/>
<g>
<defs>
<path id="XMLID_9_" d="M465.7,254.6V342c0,1.4-1.1,2.6-2.5,2.6h-78.3c-1.4,0-2.5-1.1-2.5-2.6v-57.5v-50.1c0-1.4,1.1-2.5,2.5-2.5
h58L465.7,254.6z"/>
</defs>
<linearGradient id="XMLID_16_" gradientUnits="userSpaceOnUse" x1="382.3115" y1="288.2073" x2="465.7215" y2="288.2073">
<stop offset="0" style="stop-color:#D6D4D6"/>
<stop offset="1" style="stop-color:#FFFDFE"/>
</linearGradient>
<use xlink:href="#XMLID_9_" style="overflow:visible;fill:url(#XMLID_16_);"/>
<clipPath id="XMLID_17_">
<use xlink:href="#XMLID_9_" style="overflow:visible;"/>
</clipPath>
<path class="st27" d="M381.6,253.3c9.4,0.7,36.6,1.5,53.2,14.7c25,20,31.2,47.1,31.2,47.1l0.4,35.3l-84.8,0.2V253.3z"/>
</g>
<path class="st28" d="M466.1,256.3l-20.6,0c-1.4,0-2.6-1.2-2.6-2.6l0-21.8l22.9,22.7L466.1,256.3z"/>
<path class="st29" d="M465.9,254.7h-20.5c-1.4,0-2.5-1.1-2.5-2.5v-20.3l0,0l22.9,22.7L465.9,254.7z"/>
<text transform="matrix(1 0 0 1 386.2713 244.7779)" class="st30 st9 st31">mongoose.c</text>
</g>
<g>
<path class="st26" d="M455.7,276.6v87.4c0,1.4-1.1,2.6-2.5,2.6h-78.3c-1.4,0-2.5-1.1-2.5-2.6V256.5c0-1.4,1.1-2.5,2.5-2.5h58
L455.7,276.6z"/>
<g>
<defs>
<path id="XMLID_8_" d="M453.7,274.6v87.4c0,1.4-1.1,2.6-2.5,2.6h-78.3c-1.4,0-2.5-1.1-2.5-2.6v-57.5v-50.1
c0-1.4,1.1-2.5,2.5-2.5h58L453.7,274.6z"/>
</defs>
<linearGradient id="XMLID_18_" gradientUnits="userSpaceOnUse" x1="370.2755" y1="308.2689" x2="453.6855" y2="308.2689">
<stop offset="0" style="stop-color:#D6D4D6"/>
<stop offset="1" style="stop-color:#FFFDFE"/>
</linearGradient>
<use xlink:href="#XMLID_8_" style="overflow:visible;fill:url(#XMLID_18_);"/>
<clipPath id="XMLID_19_">
<use xlink:href="#XMLID_8_" style="overflow:visible;"/>
</clipPath>
<path class="st32" d="M369.6,273.3c9.4,0.7,36.6,1.5,53.2,14.7c25,20,31.2,47.1,31.2,47.1l0.4,35.3l-84.8,0.2V273.3z"/>
<use xlink:href="#XMLID_8_" style="overflow:visible;fill:none;stroke:#FFFDFE;stroke-width:0.25;stroke-miterlimit:10;"/>
</g>
<path class="st28" d="M454,276.4l-20.6,0c-1.4,0-2.6-1.2-2.6-2.6l0-21.8l22.9,22.7L454,276.4z"/>
<path class="st29" d="M453.8,274.8h-20.5c-1.4,0-2.5-1.1-2.5-2.5v-20.3l0,0l22.9,22.7L453.8,274.8z"/>
<text transform="matrix(1 0 0 1 379.2353 264.8395)" class="st30 st9 st31">app.c</text>
</g>
</g>
<g>
<polygon class="st33" points="342.3,123.3 351.1,141.7 342.3,160.7 234.8,160.9 234.8,122.6 "/>
<path class="st23" d="M347.4,145.4"/>
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="233.6667" y1="139.4088" x2="350.0318" y2="139.4088">
<stop offset="0" style="stop-color:#C1D5FF"/>
<stop offset="0.1995" style="stop-color:#BACDF6"/>
<stop offset="0.6001" style="stop-color:#B0C3EA"/>
<stop offset="1" style="stop-color:#ADC0E6"/>
</linearGradient>
<polygon class="st34" points="341.2,120.9 350,139.3 341.2,158.3 233.7,158.5 233.7,120.3 "/>
<text transform="matrix(1 0 0 1 262.9869 146.2633)" class="st8 st9 st35">PACK</text>
<polygon class="st33" points="234.8,160.9 233.7,158.5 238,158.7 "/>
</g>
<g>
<path class="st23" d="M634.9,144.6L634.9,144.6z"/>
</g>
<g>
<polygon class="st33" points="619.6,139.3 619.6,139.3 618.7,137.4 618.7,137.4 "/>
<path class="st23" d="M623.1,168.2L623.1,168.2z"/>
</g>
<g>
<polygon class="st33" points="619.6,288.1 618.7,290 618.7,290 619.6,288.1 "/>
<path class="st23" d="M623.1,259.2L623.1,259.2z"/>
</g>
<g>
<path class="st23" d="M617,282L617,282z"/>
</g>
<g>
<g>
<g>
<defs>
<path id="XMLID_10_" d="M722.7,276.5h-71.2c-11.6,0-21.1-9.4-21.1-21.1v-71.2c0-11.6,9.4-21.1,21.1-21.1h71.2
c11.6,0,21.1,9.4,21.1,21.1v71.2C743.8,267,734.4,276.5,722.7,276.5z"/>
</defs>
<use xlink:href="#XMLID_10_" style="overflow:visible;fill:#610041;"/>
<clipPath id="XMLID_20_">
<use xlink:href="#XMLID_10_" style="overflow:visible;"/>
</clipPath>
<path class="st36" d="M754.3,172.5c-2.7,8-17.3,30.9-65.8,30.8c-24.5,0-48.4-7.4-65.7-24.7l-12.1-12l69.3-64.6L754.3,172.5z"/>
</g>
<polygon class="st37" points="637.6,271.2 632.5,266.1 640.3,269.4 "/>
<polygon class="st37" points="738.3,169.9 734.6,166.2 736.4,171 "/>
<g>
<defs>
<path id="XMLID_5_" d="M719.7,273.5h-71.2c-11.6,0-21.1-9.4-21.1-21.1v-71.2c0-11.6,9.4-21.1,21.1-21.1h71.2
c11.6,0,21.1,9.4,21.1,21.1v71.2C740.8,264,731.4,273.5,719.7,273.5z"/>
</defs>
<radialGradient id="XMLID_21_" cx="684.119" cy="216.7761" r="56.6929" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#8B005D;stop-opacity:0.7"/>
<stop offset="1" style="stop-color:#8B005D"/>
</radialGradient>
<use xlink:href="#XMLID_5_" style="overflow:visible;fill:url(#XMLID_21_);"/>
<clipPath id="XMLID_22_">
<use xlink:href="#XMLID_5_" style="overflow:visible;"/>
</clipPath>
<radialGradient id="SVGID_9_" cx="678.486" cy="148.5836" r="90.2195" gradientUnits="userSpaceOnUse">
<stop offset="0" style="stop-color:#8B005D"/>
<stop offset="1" style="stop-color:#FFFFFF"/>
</radialGradient>
<path class="st38" d="M750.3,168.5c-2.7,8-17.3,30.9-65.8,30.8c-24.5,0-48.4-7.4-65.7-24.7l-12.1-12L676,97.9L750.3,168.5z"/>
</g>
<g>
<g>
<g>
<g>
<text transform="matrix(1 0 0 1 646.3768 216.49)" class="st8 st9 st35">APP.EXE</text>
</g>
</g>
</g>
</g>
</g>
<g>
<g>
<g>
<path class="st8" d="M732,240.1c-0.3-1.4-0.8-2.7-1.4-3.9l1.7-2.3c-0.3-0.5-0.6-0.9-1-1.4c-0.3-0.5-0.7-0.9-1.1-1.3l-2.7,1
c-1-1-2.2-1.8-3.4-2.4l0-2.9c-1-0.4-2.1-0.8-3.2-1l-1.5,2.4c-1.4-0.2-2.8-0.2-4.1,0l-1.7-2.4c-1.1,0.2-2.1,0.6-3.1,1.1l0.2,2.9
c-0.6,0.3-1.2,0.7-1.7,1.1c-0.6,0.4-1.1,0.9-1.5,1.4l-2.7-0.9l-1.9,2.7l1.8,2.3c-0.6,1.3-1,2.6-1.1,4l-2.7,0.9
c-0.1,1.1,0,2.2,0.1,3.3l2.8,0.8c0.3,1.3,0.8,2.7,1.4,3.9l-1.7,2.3c0.3,0.5,0.6,0.9,1,1.4c0.3,0.4,0.7,0.9,1.1,1.3l2.7-1
c1,1,2.2,1.8,3.4,2.4l0,2.9c1,0.4,2.1,0.8,3.2,1l1.5-2.4c1.4,0.2,2.8,0.2,4.1,0l1.7,2.4c1.1-0.3,2.1-0.6,3.1-1.1l-0.2-2.9
c0.6-0.3,1.2-0.7,1.7-1.1c0.6-0.4,1.1-0.9,1.5-1.4l2.8,0.9c0.7-0.8,1.3-1.8,1.9-2.7L731,249c0.6-1.3,1-2.6,1.1-4l2.7-0.9
c0.1-1.1,0-2.2-0.1-3.3L732,240.1z M724,251c-4.6,3.5-11.1,2.6-14.6-2c-3.5-4.6-2.6-11.1,2-14.6s11.1-2.6,14.6,2
C729.5,241,728.6,247.5,724,251z"/>
</g>
</g>
<g>
<g>
<path class="st8" d="M700.5,249.3c-0.2-0.8-0.5-1.6-0.8-2.4l1-1.4c-0.2-0.3-0.4-0.6-0.6-0.8c-0.2-0.3-0.4-0.5-0.7-0.8l-1.6,0.6
c-0.6-0.6-1.3-1.1-2.1-1.4l0-1.7c-0.6-0.3-1.3-0.5-1.9-0.6l-0.9,1.4c-0.8-0.1-1.7-0.1-2.5,0l-1-1.4c-0.6,0.1-1.3,0.4-1.9,0.6
l0.1,1.7c-0.4,0.2-0.7,0.4-1,0.7c-0.3,0.3-0.6,0.5-0.9,0.8l-1.6-0.6l-1.1,1.6l1.1,1.4c-0.3,0.8-0.6,1.6-0.7,2.4l-1.6,0.5
c0,0.7,0,1.3,0.1,2l1.7,0.5c0.2,0.8,0.4,1.6,0.9,2.4l-1,1.4c0.2,0.3,0.4,0.6,0.6,0.8c0.2,0.3,0.4,0.5,0.7,0.8l1.6-0.6
c0.6,0.6,1.3,1.1,2.1,1.4l0,1.7c0.6,0.3,1.3,0.5,1.9,0.6l0.9-1.4c0.8,0.1,1.7,0.1,2.5,0l1,1.4c0.6-0.2,1.3-0.4,1.9-0.6l-0.1-1.7
c0.4-0.2,0.7-0.4,1-0.7c0.3-0.3,0.6-0.5,0.9-0.8l1.6,0.6c0.4-0.5,0.8-1.1,1.1-1.6l-1.1-1.4c0.3-0.8,0.6-1.6,0.7-2.4l1.6-0.5
c0-0.7,0-1.3-0.1-2L700.5,249.3z M694.5,254.2c-1.8,1.4-4.5,1-5.9-0.8c-1.4-1.8-1-4.5,0.8-5.9c1.8-1.4,4.5-1,5.9,0.8
C696.8,250.2,696.4,252.8,694.5,254.2z"/>
</g>
</g>
<path class="st39" d="M708.9,234.5"/>
<path class="st39" d="M706.7,237.9"/>
<path class="st40" d="M705.7,242.7c0-1.7,0.4-3.4,1-4.9"/>
<path class="st40" d="M708.9,234.5c2.2-2.4,5.3-3.8,8.8-3.8"/>
<path class="st40" d="M687.4,247.3c1.1-1.4,2.7-2.2,4.6-2.2"/>
<path class="st39" d="M686.4,249.5"/>
<path class="st40" d="M686.2,250.9c0-0.5,0.1-1,0.2-1.4"/>
<path class="st39" d="M686.7,253.2"/>
</g>
</g>
<g>
<path class="st33" d="M611.7,174.2l-23,3.3l-13.1-9.6c-6.3-4.6-13.9-7.1-21.7-7l-55.5,0.1l-1.1-2.4h1.1l64.2-0.2h0.1l3.9,0h0.1
l3.2,2.4l19.2,14l0.2,0.2l23.4-3.3L611.7,174.2z"/>
<path class="st23" d="M595.9,145.5L595.9,145.5z"/>
<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="497.2089" y1="147.636" x2="612.739" y2="147.636">
<stop offset="0" style="stop-color:#C1D5FF"/>
<stop offset="0.1995" style="stop-color:#BACDF6"/>
<stop offset="0.6001" style="stop-color:#B0C3EA"/>
<stop offset="1" style="stop-color:#ADC0E6"/>
</linearGradient>
<path class="st41" d="M612.7,171.7l-3,0.4l-20.3,2.8l-0.2-0.1l-13.6-9.9l0,0c-3.7-2.7-8.7-4.4-12.9-5.4c-2.9-0.7-6-1-9-1l-35.5,0.1
l-19.8,0.1h-1.1v-38.3l13.5,0.2l4,0l42.6,0.2l7.9,0c7,0,14,1.6,20.2,4.9c0,0,0,0,0,0c0.8,0.5,1.6,0.9,2.4,1.5l7.5,5.6l0.1,0.1l0,0
l15.4,11.3v0l0.1,3.2L612.7,171.7z"/>
<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="597.6228" y1="138.4046" x2="598.5728" y2="138.4046">
<stop offset="0" style="stop-color:#C1D5FF"/>
<stop offset="0.1995" style="stop-color:#BACDF6"/>
<stop offset="0.6001" style="stop-color:#B0C3EA"/>
<stop offset="1" style="stop-color:#ADC0E6"/>
</linearGradient>
<polygon class="st42" points="598.6,139.3 598.6,139.4 597.6,137.4 597.7,137.5 "/>
<text transform="matrix(1 0 0 1 513.7678 146.3103)" class="st8 st9 st35">BUILD</text>
</g>
<g>
<path class="st33" d="M612.7,258.8l-0.1,2.2l-1.8-0.2l-20.3-2.8l-0.2,0.1l-13.6,9.9l0-0.1c-3.7,2.7-8.7,4.4-12.9,5.4
c-2.9,0.7-6,1-9,1l-35.5-0.1l-19.8-0.1h-1.1v35.4l-1.1,0.4l1.1,2.4l13.5-0.2l4,0l42.6-0.2l7.9-0.1c7,0,14-1.6,20.2-4.9c0,0,0,0,0,0
c0.8-0.5,1.6-0.9,2.4-1.5l7.5-5.6l0.1-0.1l0,0l15.4-11.3l1-0.9l1.9-26.7L612.7,258.8z"/>
<path class="st43" d="M593.5,272.5"/>
<g>
<path class="st23" d="M598.5,285L598.5,285z"/>
<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="497.2089" y1="451.0054" x2="612.739" y2="451.0054" gradientTransform="matrix(1 0 0 -1 0 733.8616)">
<stop offset="0" style="stop-color:#C1D5FF"/>
<stop offset="0.1995" style="stop-color:#BACDF6"/>
<stop offset="0.6001" style="stop-color:#B0C3EA"/>
<stop offset="1" style="stop-color:#ADC0E6"/>
</linearGradient>
<path class="st44" d="M612.7,258.8l-3-0.4l-20.3-2.8l-0.2,0.1l-13.6,9.9l0,0c-3.7,2.7-8.7,4.4-12.9,5.4c-2.9,0.7-6,1-9,1
l-35.5-0.1l-19.8-0.1h-1.1v38.3l13.5-0.2l4,0l42.6-0.2l7.9,0c7,0,14-1.6,20.2-4.9c0,0,0,0,0,0c0.8-0.5,1.6-0.9,2.4-1.5l7.5-5.6
l0.1-0.1l0,0l15.4-11.3v0l0.1-3.2L612.7,258.8z"/>
<text transform="matrix(1 0 0 1 513.7682 298.0848)" class="st8 st9 st35">BUILD</text>
</g>
</g>
<path class="st33" d="M619.9,149.1"/>
</svg>

Before

Width:  |  Height:  |  Size: 18 KiB

+24
View File
@@ -0,0 +1,24 @@
# Mongoose Network Library Examples
In order to build and run any of the existing examples, please follow:
https://mongoose.ws/documentation/#how-to-build-and-run-examples
## Contributing
Rules for creating a new example:
- Makefile golden reference for desktop/server example: [http-server](http-server)
- Makefile golden reference for the embedded example:
[stm32/nucleo-f746zg-baremetal](stm32/nucleo-f746zg-baremetal)
- An example must build on Windows, Mac and Ubuntu Linux systems
- Assume that user installed tools according to https://mongoose.ws/tutorials/tools/
- Makefile must not include any other make files
- Use `CFLAGS` for system-specific compilation options
- Use `CFLAGS_MONGOOSE` for mongoose-specific compilation options
- Use `$(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA)` to compile
- If external repository is required, download it on demand using git
shallow clone. See embedded example golden reference
- Keep Makefile as short as possible, but verbose to understand it easily
- Symlink files when required, like `mongoose.c`, `ca.pem`, etc. Make no copies
- Example's README.md should contain only the title and the link to mongoose.ws
tutorial page
+1
View File
@@ -0,0 +1 @@
../../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../../mongoose.h
+14
View File
@@ -0,0 +1,14 @@
#pragma once
#include "Arduino.h"
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <time.h>
#define MG_ARCH MG_ARCH_CUSTOM
#define MG_ENABLE_SOCKET 0
#define MG_ENABLE_TCPIP 1
#define mkdir(a, b) (-1)
//#define MG_ENABLE_LOG 0
+49
View File
@@ -0,0 +1,49 @@
#include <SPI.h>
#include "mongoose.h"
#define SS_PIN 3 // Slave select pin
struct mg_mgr mgr; // Mongoose event manager
struct mg_tcpip_spi spi = {
NULL, // SPI data
[](void *) { digitalWrite(SS_PIN, LOW); }, // begin transation
[](void *) { digitalWrite(SS_PIN, HIGH); }, // end transaction
[](void *, uint8_t c) { return SPI.transfer(c); }, // execute transaction
};
struct mg_tcpip_if mif = {.mac = {2, 0, 1, 2, 3, 5}}; // network interface
void setup() {
Serial.begin(115200);
pinMode(SS_PIN, OUTPUT);
SPI.begin();
// Set logging function to a serial print
mg_log_set_fn([](char ch, void *) { Serial.print(ch); }, NULL);
mg_mgr_init(&mgr);
delay(3000);
MG_INFO(("Starting TCP/IP stack..."));
mif.driver = &mg_tcpip_driver_w5500;
mif.driver_data = &spi;
mg_tcpip_init(&mgr, &mif);
// Start a 5 sec timer, print status message periodically
mg_timer_add(
&mgr, 5000, MG_TIMER_REPEAT,
[](void *) {
MG_INFO(("ethernet: %s", mg_tcpip_driver_w5500.up(&mif) ? "up" : "down"));
},
NULL);
// Setup HTTP listener. Respond "ok" on any HTTP request
mg_http_listen(
&mgr, "http://0.0.0.0",
[](struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_HTTP_MSG) mg_http_reply(c, 200, "", "ok\n");
},
&mgr);
}
void loop() {
mg_mgr_poll(&mgr, 1);
}
+22 -8
View File
@@ -1,11 +1,25 @@
PROG ?= example PROG ?= example # Program we are building
CFLAGS ?= -DMG_IO_SIZE=8192 -DMG_ENABLE_LINES DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
all: $(PROG) # Mongoose build options. See https://mongoose.ws/documentation/#build-options
$(DEBUGGER) ./$(PROG) $(ARGS) CFLAGS_MONGOOSE += -DMG_IO_SIZE=8192 -DMG_ENABLE_LINES
$(PROG): main.c ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
$(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) -o $(PROG) main.c PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
endif
clean: all: $(PROG) # Default target. Build and run program
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb $(RUN) ./$(PROG) $(ARGS)
$(PROG): $(SOURCES) # Build program from sources
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM
+1 -1
View File
@@ -1 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/captive-dns-portal/ See detailed tutorial at https://mongoose.ws/tutorials/captive-dns-server/
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+38 -31
View File
@@ -1,40 +1,47 @@
PROG ?= example PROG ?= example # Program we are building
SOURCES ?= ../../mongoose.c main.c net.c packed_fs.c PACK ?= ./pack # Packing executable
CFLAGS ?= -I../.. -DMG_ENABLE_PACKED_FS=1 -DMG_ENABLE_LINES=1 $(EXTRA) DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c net.c packed_fs.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_ENABLE_PACKED_FS=1
FILES_TO_EMBED ?= $(wildcard web_root/*) FILES_TO_EMBED ?= $(wildcard web_root/*)
ROOT ?= $(realpath $(CURDIR)/../../..)
DOCKER ?= docker run --rm -e Tmp=. -e WINEDEBUG=-all -v $(ROOT):$(ROOT) -w $(CURDIR)
VC98 ?= $(DOCKER) mdashnet/vc98 wine
MINGW ?= $(DOCKER) mdashnet/mingw
ifeq "$(SSL)" "MBEDTLS" ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS)/include -L$(MBEDTLS)/lib -lmbedtls -lmbedcrypto -lmbedx509 PROG ?= example.exe # Use .exe suffix for the binary
PACK = pack.exe # Packing executable
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
MAKE += WINDOWS=1 CC=$(CC)
endif endif
ifeq "$(SSL)" "OPENSSL" all: $(PROG) # Default target. Build and run program
CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL)/include -L$(OPENSSL)/lib -lssl -lcrypto $(RUN) ./$(PROG) $(ARGS)
# Before embedding files, gzip them to save space
packed_fs.c: $(FILES_TO_EMBED) Makefile
$(CC) ../../test/pack.c -o $(PACK)
ifeq ($(OS),Windows_NT)
$(PACK) $(FILES_TO_EMBED) > $@
else
rm -rf tmp/web_root && mkdir tmp && cp -r web_root tmp/
find tmp -type f | xargs -n1 gzip
cd tmp && ../pack `find web_root -type f` > ../$@
endif endif
all: $(PROG) $(PROG): $(SOURCES) # Build program from sources
$(RUN) ./$(PROG) $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
$(PROG): $(SOURCES) $(FILES_TO_EMBED) clean: # Cleanup. Delete built program and all build artifacts
$(CC) ../../test/pack.c -o pack $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM pack tmp mbedtls
./pack $(FILES_TO_EMBED) > packed_fs.c
$(CC) -W -Wall -Wextra -O0 -g3 $(CFLAGS) -o $(PROG) $(SOURCES)
# see https://mongoose.ws/tutorials/tls/#how-to-build for TLS build options
mingw: $(SOURCES) $(FILES_TO_EMBED) mbedtls: # Pull and build mbedTLS library
$(MINGW) i686-w64-mingw32-gcc $(CFLAGS) ../../test/pack.c -o pack.exe git clone --depth 1 -b v2.28.2 https://github.com/mbed-tls/mbedtls $@
$(MINGW) wine cmd /c 'pack.exe $(FILES_TO_EMBED) > packed_fs.c' $(MAKE) -C mbedtls/library
$(MINGW) i686-w64-mingw32-gcc $(CFLAGS) $(SOURCES) -lws2_32 -o $(PROG).exe
$(MINGW) wine $(PROG).exe
vc98: $(SOURCES) $(FILES_TO_EMBED)
$(VC98) cl.exe /nologo $(CFLAGS) ../../test/pack.c /Fepack.exe
$(VC98) cmd /c 'pack.exe $(FILES_TO_EMBED) > packed_fs.c'
$(VC98) cl.exe /nologo /O2 $(CFLAGS) $(SOURCES) /Fe$(PROG).exe
$(VC98) $(PROG).exe
clean:
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb log.txt pack
+11 -9
View File
@@ -9,19 +9,21 @@ following features:
- Web UI is fully embedded into the server/firmware binary, and does not - Web UI is fully embedded into the server/firmware binary, and does not
need a filesystem to serve it. UI is resilient to FS problems need a filesystem to serve it. UI is resilient to FS problems
- Administrators can change server settings - Administrators can change server settings
- All changes are propagates to all connected clients - All changes are propagated to all connected clients
- A device is connected to the external MQTT server - The device is connected to the external MQTT server
- Logged in clients can send/receive messages to a device which get - Logged in clients can send/receive messages via MQTT
forwarded to MQTT
# Screenshots ## Screenshots
This is a login screen that prompts for user/password This is a login screen that prompts for user/password
![](screenshots/login.png) ![](screenshots/login.webp)
# Main dashboard ## Main dashboard
A main dashboard page shows and interactive MQTT console The main dashboard page shows the interactive MQTT console
![](screenshots/dashboard.png) ![](screenshots/dashboard.webp)
See a detailed tutorial at https://mongoose.ws/tutorials/device-dashboard/
+7 -1
View File
@@ -2,7 +2,9 @@
// All rights reserved // All rights reserved
#include "mongoose.h" #include "mongoose.h"
const char *s_listening_url = "http://0.0.0.0:8000"; const char *s_listening_url = "http://0.0.0.0:8000";
const char *s_listening_surl = "https://0.0.0.0:8443";
void device_dashboard_fn(struct mg_connection *, int, void *, void *); void device_dashboard_fn(struct mg_connection *, int, void *, void *);
@@ -10,8 +12,12 @@ int main(void) {
struct mg_mgr mgr; struct mg_mgr mgr;
mg_log_set(MG_LL_DEBUG); // Set debug log level mg_log_set(MG_LL_DEBUG); // Set debug log level
mg_mgr_init(&mgr); mg_mgr_init(&mgr);
mg_http_listen(&mgr, s_listening_url, device_dashboard_fn, &mgr); mg_http_listen(&mgr, s_listening_url, device_dashboard_fn, NULL);
MG_INFO(("Listening on %s", s_listening_url)); MG_INFO(("Listening on %s", s_listening_url));
#if MG_ENABLE_MBEDTLS || MG_ENABLE_OPENSSL
mg_http_listen(&mgr, s_listening_surl, device_dashboard_fn, "");
MG_INFO(("Listening on %s", s_listening_surl));
#endif
while (mgr.conns != NULL) mg_mgr_poll(&mgr, 500); while (mgr.conns != NULL) mg_mgr_poll(&mgr, 500);
mg_mgr_free(&mgr); mg_mgr_free(&mgr);
return 0; return 0;
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+95 -28
View File
@@ -3,15 +3,43 @@
#include "mongoose.h" #include "mongoose.h"
#if !defined(MQTT_SERVER)
#if MG_ENABLE_MBEDTLS || MG_ENABLE_OPENSSL
#define MQTT_SERVER "mqtts://broker.hivemq.com:8883"
#else
#define MQTT_SERVER "mqtt://broker.hivemq.com:1883" #define MQTT_SERVER "mqtt://broker.hivemq.com:1883"
#endif
#endif
#define MQTT_PUBLISH_TOPIC "mg/my_device" #define MQTT_PUBLISH_TOPIC "mg/my_device"
#define MQTT_SUBSCRIBE_TOPIC "mg/#" #define MQTT_SUBSCRIBE_TOPIC "mg/#"
static time_t s_boot_timestamp = 0; // Updated by SNTP // Certificate generation procedure:
static struct mg_connection *s_sntp_conn = NULL; // SNTP connection // openssl ecparam -name prime256v1 -genkey -noout -out key.pem
// openssl req -new -key key.pem -x509 -nodes -days 3650 -out cert.pem
static const char *s_ssl_cert =
"-----BEGIN CERTIFICATE-----\n"
"MIIBCTCBsAIJAK9wbIDkHnAoMAoGCCqGSM49BAMCMA0xCzAJBgNVBAYTAklFMB4X\n"
"DTIzMDEyOTIxMjEzOFoXDTMzMDEyNjIxMjEzOFowDTELMAkGA1UEBhMCSUUwWTAT\n"
"BgcqhkjOPQIBBggqhkjOPQMBBwNCAARzSQS5OHd17lUeNI+6kp9WYu0cxuEIi/JT\n"
"jphbCmdJD1cUvhmzM9/phvJT9ka10Z9toZhgnBq0o0xfTQ4jC1vwMAoGCCqGSM49\n"
"BAMCA0gAMEUCIQCe0T2E0GOiVe9KwvIEPeX1J1J0T7TNacgR0Ya33HV9VgIgNvdn\n"
"aEWiBp1xshs4iz6WbpxrS1IHucrqkZuJLfNZGZI=\n"
"-----END CERTIFICATE-----\n";
// Define system time() static const char *s_ssl_key =
time_t time(time_t *tp) { "-----BEGIN EC PRIVATE KEY-----\n"
"MHcCAQEEICBz3HOkQLPBDtdknqC7k1PNsWj6HfhyNB5MenfjmqiooAoGCCqGSM49\n"
"AwEHoUQDQgAEc0kEuTh3de5VHjSPupKfVmLtHMbhCIvyU46YWwpnSQ9XFL4ZszPf\n"
"6YbyU/ZGtdGfbaGYYJwatKNMX00OIwtb8A==\n"
"-----END EC PRIVATE KEY-----\n";
static time_t s_boot_timestamp = 0; // Updated by SNTP
#ifndef DISABLE_ROUTING
static struct mg_connection *s_sntp_conn = NULL; // SNTP connection
#endif
// Define a system time alternative
time_t ourtime(time_t *tp) {
time_t t = s_boot_timestamp + (time_t) (mg_millis() / 1000); time_t t = s_boot_timestamp + (time_t) (mg_millis() / 1000);
if (tp != NULL) *tp = t; if (tp != NULL) *tp = t;
return t; return t;
@@ -76,7 +104,7 @@ static struct user *getuser(struct mg_http_message *hm) {
static void send_notification(struct mg_mgr *mgr, const char *fmt, ...) { static void send_notification(struct mg_mgr *mgr, const char *fmt, ...) {
struct mg_connection *c; struct mg_connection *c;
for (c = mgr->conns; c != NULL; c = c->next) { for (c = mgr->conns; c != NULL; c = c->next) {
if (c->label[0] == 'W') { if (c->data[0] == 'W') {
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
mg_ws_vprintf(c, WEBSOCKET_OP_TEXT, fmt, &ap); mg_ws_vprintf(c, WEBSOCKET_OP_TEXT, fmt, &ap);
@@ -87,11 +115,14 @@ static void send_notification(struct mg_mgr *mgr, const char *fmt, ...) {
// Send simulated metrics data to the dashboard, for chart rendering // Send simulated metrics data to the dashboard, for chart rendering
static void timer_metrics_fn(void *param) { static void timer_metrics_fn(void *param) {
send_notification(param, "{%Q:%Q,%Q:[%lu, %d]}", "name", "metrics", "data", send_notification(param, "{%m:%m,%m:[%lu, %d]}", MG_ESC("name"),
(unsigned long) time(NULL), MG_ESC("metrics"), MG_ESC("data"),
(unsigned long) ourtime(NULL),
10 + (int) ((double) rand() * 10 / RAND_MAX)); 10 + (int) ((double) rand() * 10 / RAND_MAX));
} }
#ifndef DISABLE_ROUTING
// MQTT event handler function // MQTT event handler function
static void mqtt_fn(struct mg_connection *c, int ev, void *ev_data, void *fnd) { static void mqtt_fn(struct mg_connection *c, int ev, void *ev_data, void *fnd) {
if (ev == MG_EV_CONNECT && mg_url_is_ssl(s_config.url)) { if (ev == MG_EV_CONNECT && mg_url_is_ssl(s_config.url)) {
@@ -101,22 +132,31 @@ static void mqtt_fn(struct mg_connection *c, int ev, void *ev_data, void *fnd) {
} else if (ev == MG_EV_MQTT_OPEN) { } else if (ev == MG_EV_MQTT_OPEN) {
s_connected = true; s_connected = true;
c->is_hexdumping = 1; c->is_hexdumping = 1;
mg_mqtt_sub(s_mqtt, mg_str(s_config.sub), 2); struct mg_mqtt_opts sub_opts;
send_notification(c->mgr, "{%Q:%Q,%Q:null}", "name", "config", "data"); memset(&sub_opts, 0, sizeof(sub_opts));
sub_opts.topic = mg_str(s_config.sub);
sub_opts.qos = 2;
mg_mqtt_sub(s_mqtt, &sub_opts);
send_notification(c->mgr, "{%m:%m,%m:null}", MG_ESC("name"),
MG_ESC("config"), MG_ESC("data"));
MG_INFO(("MQTT connected, server %s", MQTT_SERVER));
} else if (ev == MG_EV_MQTT_MSG) { } else if (ev == MG_EV_MQTT_MSG) {
struct mg_mqtt_message *mm = ev_data; struct mg_mqtt_message *mm = ev_data;
send_notification(c->mgr, "{%Q:%Q,%Q:{%Q: %.*Q, %Q: %.*Q, %Q: %d}}", "name", send_notification(
"message", "data", "topic", (int) mm->topic.len, c->mgr, "{%m:%m,%m:{%m: %m, %m: %m, %m: %d}}", MG_ESC("name"),
mm->topic.ptr, "data", (int) mm->data.len, mm->data.ptr, MG_ESC("message"), MG_ESC("data"), MG_ESC("topic"), mg_print_esc,
"qos", (int) mm->qos); (int) mm->topic.len, mm->topic.ptr, MG_ESC("data"), mg_print_esc,
(int) mm->data.len, mm->data.ptr, MG_ESC("qos"), (int) mm->qos);
} else if (ev == MG_EV_MQTT_CMD) { } else if (ev == MG_EV_MQTT_CMD) {
struct mg_mqtt_message *mm = (struct mg_mqtt_message *) ev_data; struct mg_mqtt_message *mm = (struct mg_mqtt_message *) ev_data;
MG_DEBUG(("cmd %d qos %d", mm->cmd, mm->qos)); MG_DEBUG(("%lu cmd %d qos %d", c->id, mm->cmd, mm->qos));
} else if (ev == MG_EV_CLOSE) { } else if (ev == MG_EV_CLOSE) {
s_mqtt = NULL; s_mqtt = NULL;
if (s_connected) { if (s_connected) {
s_connected = false; s_connected = false;
send_notification(c->mgr, "{%Q:%Q,%Q:null}", "name", "config", "data"); send_notification(c->mgr, "{%m:%m,%m:null}", MG_ESC("name"),
MG_ESC("config"), MG_ESC("data"));
} }
} }
(void) fnd; (void) fnd;
@@ -126,7 +166,8 @@ static void mqtt_fn(struct mg_connection *c, int ev, void *ev_data, void *fnd) {
static void timer_mqtt_fn(void *param) { static void timer_mqtt_fn(void *param) {
struct mg_mgr *mgr = (struct mg_mgr *) param; struct mg_mgr *mgr = (struct mg_mgr *) param;
if (s_mqtt == NULL) { if (s_mqtt == NULL) {
struct mg_mqtt_opts opts = {0}; struct mg_mqtt_opts opts;
memset(&opts, 0, sizeof(opts));
s_mqtt = mg_mqtt_connect(mgr, s_config.url, &opts, mqtt_fn, NULL); s_mqtt = mg_mqtt_connect(mgr, s_config.url, &opts, mqtt_fn, NULL);
} }
} }
@@ -136,7 +177,6 @@ static void timer_mqtt_fn(void *param) {
static void sfn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { static void sfn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_SNTP_TIME) { if (ev == MG_EV_SNTP_TIME) {
uint64_t t = *(uint64_t *) ev_data; uint64_t t = *(uint64_t *) ev_data;
MG_INFO(("%lu SNTP: %lld ms from epoch", c->id, t));
s_boot_timestamp = (time_t) ((t - mg_millis()) / 1000); s_boot_timestamp = (time_t) ((t - mg_millis()) / 1000);
c->is_closing = 1; c->is_closing = 1;
} else if (ev == MG_EV_CLOSE) { } else if (ev == MG_EV_CLOSE) {
@@ -152,16 +192,23 @@ static void timer_sntp_fn(void *param) { // SNTP timer function. Sync up time
} }
} }
#endif
// HTTP request handler function // HTTP request handler function
void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data, void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data,
void *fn_data) { void *fn_data) {
if (ev == MG_EV_OPEN && c->is_listening) { if (ev == MG_EV_OPEN && c->is_listening) {
mg_timer_add(c->mgr, 1000, MG_TIMER_REPEAT, timer_metrics_fn, c->mgr); mg_timer_add(c->mgr, 1000, MG_TIMER_REPEAT, timer_metrics_fn, c->mgr);
#ifndef DISABLE_ROUTING
mg_timer_add(c->mgr, 1000, MG_TIMER_REPEAT, timer_mqtt_fn, c->mgr); mg_timer_add(c->mgr, 1000, MG_TIMER_REPEAT, timer_mqtt_fn, c->mgr);
mg_timer_add(c->mgr, 1000, MG_TIMER_REPEAT, timer_sntp_fn, c->mgr); mg_timer_add(c->mgr, 1000, MG_TIMER_REPEAT, timer_sntp_fn, c->mgr);
#endif
s_config.url = strdup(MQTT_SERVER); s_config.url = strdup(MQTT_SERVER);
s_config.pub = strdup(MQTT_PUBLISH_TOPIC); s_config.pub = strdup(MQTT_PUBLISH_TOPIC);
s_config.sub = strdup(MQTT_SUBSCRIBE_TOPIC); s_config.sub = strdup(MQTT_SUBSCRIBE_TOPIC);
} else if (ev == MG_EV_ACCEPT && fn_data != NULL) {
struct mg_tls_opts opts = {.cert = s_ssl_cert, .certkey = s_ssl_key};
mg_tls_init(c, &opts);
} else if (ev == MG_EV_HTTP_MSG) { } else if (ev == MG_EV_HTTP_MSG) {
struct mg_http_message *hm = (struct mg_http_message *) ev_data; struct mg_http_message *hm = (struct mg_http_message *) ev_data;
struct user *u = getuser(hm); struct user *u = getuser(hm);
@@ -169,13 +216,24 @@ void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data,
// u ? u->name : "NULL")); // u ? u->name : "NULL"));
if (mg_http_match_uri(hm, "/api/hi")) { if (mg_http_match_uri(hm, "/api/hi")) {
mg_http_reply(c, 200, "", "hi\n"); // Testing endpoint mg_http_reply(c, 200, "", "hi\n"); // Testing endpoint
} else if (mg_http_match_uri(hm, "/api/debug")) {
int level = mg_json_get_long(hm->body, "$.level", MG_LL_DEBUG);
mg_log_set(level);
mg_http_reply(c, 200, "", "Debug level set to %d\n", level);
} else if (u == NULL && mg_http_match_uri(hm, "/api/#")) { } else if (u == NULL && mg_http_match_uri(hm, "/api/#")) {
// All URIs starting with /api/ must be authenticated // All URIs starting with /api/ must be authenticated
mg_http_reply(c, 403, "", "Denied\n"); mg_http_reply(c, 403, "", "Denied\n");
} else if (mg_http_match_uri(hm, "/api/config/get")) { } else if (mg_http_match_uri(hm, "/api/config/get")) {
mg_http_reply(c, 200, NULL, "{%Q:%Q,%Q:%Q,%Q:%Q,%Q:%s}\n", "url", #ifdef DISABLE_ROUTING
s_config.url, "pub", s_config.pub, "sub", s_config.sub, mg_http_reply(c, 200, NULL, "{%m:%m,%m:%m,%m:%m}\n", MG_ESC("url"),
"connected", s_connected ? "true" : "false"); MG_ESC(s_config.url), MG_ESC("pub"), MG_ESC(s_config.pub),
MG_ESC("sub"), MG_ESC(s_config.sub));
#else
mg_http_reply(c, 200, NULL, "{%m:%m,%m:%m,%m:%m,%m:%s}\n", MG_ESC("url"),
MG_ESC(s_config.url), MG_ESC("pub"), MG_ESC(s_config.pub),
MG_ESC("sub"), MG_ESC(s_config.sub), MG_ESC("connected"),
s_connected ? "true" : "false");
#endif
} else if (mg_http_match_uri(hm, "/api/config/set")) { } else if (mg_http_match_uri(hm, "/api/config/set")) {
// Admins only // Admins only
if (strcmp(u->name, "admin") == 0) { if (strcmp(u->name, "admin") == 0) {
@@ -183,7 +241,8 @@ void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data,
update_config(&hm->body, "pub", &s_config.pub); update_config(&hm->body, "pub", &s_config.pub);
update_config(&hm->body, "sub", &s_config.sub); update_config(&hm->body, "sub", &s_config.sub);
if (s_mqtt) s_mqtt->is_closing = 1; // Ask to disconnect from MQTT if (s_mqtt) s_mqtt->is_closing = 1; // Ask to disconnect from MQTT
send_notification(fn_data, "{%Q:%Q,%Q:null}", "name", "config", "data"); send_notification(c->mgr, "{%m:%m,%m:null}", MG_ESC("name"),
MG_ESC("config"), MG_ESC("data"));
mg_http_reply(c, 200, "", "ok\n"); mg_http_reply(c, 200, "", "ok\n");
} else { } else {
mg_http_reply(c, 403, "", "Denied\n"); mg_http_reply(c, 403, "", "Denied\n");
@@ -192,17 +251,24 @@ void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data,
char buf[256]; char buf[256];
if (s_connected && if (s_connected &&
mg_http_get_var(&hm->body, "message", buf, sizeof(buf)) > 0) { mg_http_get_var(&hm->body, "message", buf, sizeof(buf)) > 0) {
mg_mqtt_pub(s_mqtt, mg_str(s_config.pub), mg_str(buf), 1, false); struct mg_mqtt_opts pub_opts;
memset(&pub_opts, 0, sizeof(pub_opts));
pub_opts.topic = mg_str(s_config.pub);
pub_opts.message = mg_str(buf);
pub_opts.qos = 2, pub_opts.retain = false;
mg_mqtt_pub(s_mqtt, &pub_opts);
} }
mg_http_reply(c, 200, "", "ok\n"); mg_http_reply(c, 200, "", "ok\n");
} else if (mg_http_match_uri(hm, "/api/watch")) { } else if (mg_http_match_uri(hm, "/api/watch")) {
c->label[0] = 'W'; // Mark ourselves as a event listener c->data[0] = 'W'; // Mark ourselves as a event listener
mg_ws_upgrade(c, hm, NULL); mg_ws_upgrade(c, hm, NULL);
} else if (mg_http_match_uri(hm, "/api/login")) { } else if (mg_http_match_uri(hm, "/api/login")) {
mg_http_reply(c, 200, NULL, "{%Q:%Q,%Q:%Q}\n", "user", u->name, "token", mg_http_reply(c, 200, NULL, "{%m:%m,%m:%m}\n", MG_ESC("user"),
u->token); MG_ESC(u->name), MG_ESC("token"), MG_ESC(u->token));
} else { } else {
struct mg_http_serve_opts opts = {0}; struct mg_http_serve_opts opts;
memset(&opts, 0, sizeof(opts));
#if 1 #if 1
opts.root_dir = "/web_root"; opts.root_dir = "/web_root";
opts.fs = &mg_fs_packed; opts.fs = &mg_fs_packed;
@@ -211,7 +277,8 @@ void device_dashboard_fn(struct mg_connection *c, int ev, void *ev_data,
#endif #endif
mg_http_serve_dir(c, ev_data, &opts); mg_http_serve_dir(c, ev_data, &opts);
} }
MG_DEBUG(("%.*s %.*s -> %.*s", (int) hm->method.len, hm->method.ptr, MG_DEBUG(("%lu %.*s %.*s -> %.*s", c->id, (int) hm->method.len,
(int) hm->uri.len, hm->uri.ptr, (int) 3, &c->send.buf[9])); hm->method.ptr, (int) hm->uri.len, hm->uri.ptr, (int) 3,
&c->send.buf[9]));
} }
} }
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

+14 -7
View File
@@ -1,6 +1,8 @@
'use strict'; 'use strict';
import {Component, h, html, render, useEffect, useState, useRef} from './preact.min.js'; import {Component, h, html, render, useEffect, useState, useRef} from './preact.min.js';
var devaddr = "address:port";
const MaxMetricsDataPoints = 50; const MaxMetricsDataPoints = 50;
// This simple publish/subscribe is used to pass notifications that were // This simple publish/subscribe is used to pass notifications that were
@@ -53,14 +55,14 @@ const Hero = props => html`
using <code>curl</code> command-line utility: using <code>curl</code> command-line utility:
</p> </p>
<div><code>curl -u admin:pass0 localhost:8000/api/config/get</code> </div> <div><code>curl -u admin:pass0 ${devaddr}/api/config/get</code> </div>
<div><code>curl -u admin:pass0 localhost:8000/api/config/set -d 'pub=mg/topic'</code> </div> <div><code>curl -u admin:pass0 ${devaddr}/api/config/set -d 'pub=mg/topic'</code> </div>
<div><code>curl -u admin:pass0 localhost:8000/api/message/send -d 'message=hello'</code> </div> <div><code>curl -u admin:pass0 ${devaddr}/api/message/send -d 'message=hello'</code> </div>
<p> <p>
The device can send notifications to this dashboard at anytime. Notifications The device can send notifications to this dashboard at anytime. Notifications
are sent over WebSocket at URI <code>/api/watch</code> as JSON strings: <code>{"name": "..", "data": ...}</code> are sent over WebSocket at URI <code>/api/watch</code> as JSON strings: <code>{"name": "..", "data": ...}</code>
<div>Try <code>wscat --auth user1:pass1 --connect ws://localhost:8000/api/watch</code></div> <div>Try <code>wscat --auth user1:pass1 --connect ws://${devaddr}/api/watch</code></div>
</p> </p>
</div> </div>
</div>`; </div>`;
@@ -186,7 +188,8 @@ const Messages = function(props) {
method: 'post', method: 'post',
body: `message=${encodeURIComponent(txt)}` body: `message=${encodeURIComponent(txt)}`
}).then(r => setTxt('')); }).then(r => setTxt(''));
const connstatus = props.config.connected ? 'connected' : 'disconnected'; const routing = "connected" in props.config;
const connstatus = !routing ? 'This device has no MQTT functionality' : props.config.connected ? 'connected' : 'disconnected';
return html` return html`
<div class="section"> <div class="section">
<h3 style="background: #30c040; color: #fff; padding: 0.4em;">MQTT messages</h3> <h3 style="background: #30c040; color: #fff; padding: 0.4em;">MQTT messages</h3>
@@ -199,7 +202,7 @@ const Messages = function(props) {
<div style="margin: 0.5em 0; display: flex"> <div style="margin: 0.5em 0; display: flex">
<span class="addon nowrap">Publish message:</span> <span class="addon nowrap">Publish message:</span>
<input placeholder="type and press enter..." style="flex: 1 100%;" <input placeholder="type and press enter..." style="flex: 1 100%;"
value=${txt} onchange=${sendmessage} value=${txt} onchange=${sendmessage} disabled=${!routing}
oninput=${ev => setTxt(ev.target.value)} /> oninput=${ev => setTxt(ev.target.value)} />
</div> </div>
<div class="msg"> <div class="msg">
@@ -341,7 +344,11 @@ const App = function(props) {
const login = function(u) { const login = function(u) {
document.cookie = `access_token=${u.token}; Secure, HttpOnly; SameSite=Lax; path=/; max-age=3600`; document.cookie = `access_token=${u.token}; Secure, HttpOnly; SameSite=Lax; path=/; max-age=3600`;
setUser(u.user); setUser(u.user);
watch(); if (location.search.substring(1) == 'nows') {
// If query string is ?nows, then do not connect to websocket. For debug.
} else {
watch(); // Connect to websocket, receive constant graph updates
}
return getconfig(); return getconfig();
}; };
+27 -27
View File
@@ -1,38 +1,38 @@
PROG ?= example PROG ?= example # Program we are building
SOURCES ?= ../../mongoose.c main.c packed_fs.c DELETE = rm -rf # Command to remove files
CFLAGS ?= -I../.. -DMG_ENABLE_PACKED_FS=1 -DMG_ENABLE_LINES=1 $(EXTRA) OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c packed_fs.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
PACK = ./pack # Utility to pack files into a packed filesystem
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_ENABLE_PACKED_FS=1
FILES_TO_EMBED ?= $(wildcard web_root/*) FILES_TO_EMBED ?= $(wildcard web_root/*)
ROOT ?= $(realpath $(CURDIR)/../../..)
DOCKER ?= docker run --rm -e Tmp=. -e WINEDEBUG=-all -v $(ROOT):$(ROOT) -w $(CURDIR)
VC98 ?= $(DOCKER) mdashnet/vc98 wine
MINGW ?= $(DOCKER) mdashnet/mingw
all: $(PROG) ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
$(RUN) ./$(PROG) PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
PACK = pack.exe
endif
$(PROG): $(SOURCES) $(FILES_TO_EMBED) all: $(PROG) # Default target. Build and run program
$(CC) ../../test/pack.c -o pack $(RUN) ./$(PROG) $(ARGS)
./pack $(FILES_TO_EMBED) > packed_fs.c
$(CC) -W -Wall -Wextra -O0 -g3 $(CFLAGS) -o $(PROG) $(SOURCES)
$(PROG): $(SOURCES) $(FILES_TO_EMBED) # Build program from sources
$(CC) ../../test/pack.c -o $(PACK)
$(PACK) $(FILES_TO_EMBED) > packed_fs.c
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
mingw: $(SOURCES) $(FILES_TO_EMBED) clean: # Cleanup. Delete built program and all build artifacts
$(MINGW) i686-w64-mingw32-gcc $(CFLAGS) ../../test/pack.c -o pack.exe $(DELETE) $(PROG) *.dSYM $(PACK)
$(MINGW) wine cmd /c 'pack.exe $(FILES_TO_EMBED) > packed_fs.c'
$(MINGW) i686-w64-mingw32-gcc $(CFLAGS) $(SOURCES) -lws2_32 -o $(PROG).exe
$(MINGW) wine $(PROG).exe
vc98: $(SOURCES) $(FILES_TO_EMBED)
$(VC98) cl.exe /nologo $(CFLAGS) ../../test/pack.c /Fepack.exe
$(VC98) cmd /c 'pack.exe $(FILES_TO_EMBED) > packed_fs.c'
$(VC98) cl.exe /nologo /O2 $(CFLAGS) $(SOURCES) /Fe$(PROG).exe
$(VC98) $(PROG).exe
clean:
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb log.txt pack
.PHONY: compress expand gzipped plain all .PHONY: compress expand gzipped plain all
# See tutorial at https://mongoose.ws/tutorials/embedded-filesystem/#build-and-try
gzipped: compress gzipped: compress
$(MAKE) all $(MAKE) all
+1
View File
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/embedded-filesystem/
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+694 -49
View File
@@ -3,51 +3,552 @@
#include <time.h> #include <time.h>
static const unsigned char v1[] = { static const unsigned char v1[] = {
60, 33, 68, 79, 67, 84, 89, 80, 69, 32, 104, 116, // <!DOCTYPE ht 31, 139, 8, 8, 219, 27, 244, 98, 0, 3, 112, 114, // .......b..pr
109, 108, 62, 10, 60, 104, 116, 109, 108, 32, 108, 97, // ml>.<html la 101, 97, 99, 116, 46, 109, 105, 110, 46, 106, 115, 0, // eact.min.js.
110, 103, 61, 34, 101, 110, 34, 62, 10, 32, 32, 60, // ng="en">. < 157, 91, 123, 119, 219, 182, 146, 255, 127, 63, 69, 164, // .[{w.....?E.
104, 101, 97, 100, 62, 10, 32, 32, 32, 32, 60, 109, // head>. <m 211, 163, 18, 43, 68, 177, 147, 182, 187, 75, 5, 213, // ...+D....K..
101, 116, 97, 32, 110, 97, 109, 101, 61, 34, 100, 101, // eta name="de 105, 29, 183, 238, 109, 234, 230, 38, 105, 123, 123, 85, // i...m..&i{{U
115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 32, 99, // scription" c 93, 30, 138, 132, 44, 214, 20, 169, 242, 97, 91, 53, // ]...,....a[5
111, 110, 116, 101, 110, 116, 61, 34, 77, 111, 110, 103, // ontent="Mong 245, 221, 247, 55, 3, 128, 164, 108, 185, 247, 236, 158, // ...7...l....
111, 111, 115, 101, 32, 69, 109, 98, 101, 100, 100, 101, // oose Embedde 36, 34, 30, 131, 1, 48, 47, 204, 12, 144, 155, 176, // $"...0/.....
100, 32, 70, 105, 108, 101, 115, 121, 116, 101, 109, 32, // d Filesytem 120, 166, 101, 38, 3, 89, 201, 92, 22, 178, 150, 169, // x.e&.Y......
101, 120, 97, 109, 112, 108, 101, 34, 32, 47, 62, 10, // example" />. 186, 223, 203, 68, 205, 23, 50, 82, 47, 194, 40, 169, // ...D..2R/.(.
32, 32, 32, 32, 60, 109, 101, 116, 97, 32, 104, 116, // <meta ht 26, 125, 231, 205, 252, 178, 185, 106, 178, 102, 219, 124, // .}.....j.f.|
116, 112, 45, 101, 113, 117, 105, 118, 61, 34, 67, 111, // tp-equiv="Co 34, 154, 98, 187, 110, 174, 138, 36, 110, 242, 219, 178, // ".b.n..$n...
110, 116, 101, 110, 116, 45, 84, 121, 112, 101, 34, 32, // ntent-Type" 217, 100, 81, 147, 85, 183, 77, 146, 233, 121, 180, 94, // .dQ.U.M..y.^
99, 111, 110, 116, 101, 110, 116, 61, 34, 116, 101, 120, // content="tex 52, 127, 230, 121, 243, 175, 188, 136, 155, 164, 210, 69, // 4..y.......E
116, 47, 104, 116, 109, 108, 59, 32, 99, 104, 97, 114, // t/html; char 248, 34, 153, 174, 234, 44, 170, 146, 60, 123, 86, 122, // ."...,..<{Vz
115, 101, 116, 61, 85, 84, 70, 45, 56, 34, 62, 10, // set=UTF-8">. 152, 72, 220, 175, 242, 194, 187, 193, 172, 193, 179, 36, // .H.........$
32, 32, 32, 32, 60, 109, 101, 116, 97, 32, 104, 116, // <meta ht 123, 150, 9, 61, 15, 22, 42, 195, 207, 180, 208, 85, // {..=..*....U
116, 112, 45, 101, 113, 117, 105, 118, 61, 34, 88, 45, // tp-equiv="X- 93, 100, 207, 244, 190, 29, 177, 242, 180, 184, 39, 216, // ]d........'.
85, 65, 45, 67, 111, 109, 112, 97, 116, 105, 98, 108, // UA-Compatibl 76, 233, 201, 54, 44, 116, 86, 93, 230, 177, 158, 102, // L..6,tV]...f
101, 34, 32, 99, 111, 110, 116, 101, 110, 116, 61, 34, // e" content=" 163, 81, 54, 41, 244, 38, 191, 209, 103, 235, 36, 141, // .Q6).&..g.$.
73, 69, 61, 101, 100, 103, 101, 34, 62, 10, 32, 32, // IE=edge">. 1, 214, 13, 10, 61, 222, 141, 25, 216, 109, 105, 74, // ....=....miJ
32, 32, 60, 109, 101, 116, 97, 32, 110, 97, 109, 101, // <meta name 243, 214, 52, 103, 32, 134, 215, 122, 55, 84, 170, 158, // ..4g ..z7T..
61, 34, 118, 105, 101, 119, 112, 111, 114, 116, 34, 32, // ="viewport" 229, 42, 152, 215, 11, 127, 88, 232, 21, 215, 11, 83, // .*....X....S
99, 111, 110, 116, 101, 110, 116, 61, 34, 119, 105, 100, // content="wid 79, 241, 195, 165, 105, 178, 242, 194, 226, 170, 222, 96, // O...i......`
116, 104, 61, 100, 101, 118, 105, 99, 101, 45, 119, 105, // th=device-wi 230, 114, 146, 234, 236, 170, 90, 127, 249, 114, 52, 242, // .r....Z..r4.
100, 116, 104, 44, 32, 105, 110, 105, 116, 105, 97, 108, // dth, initial 210, 73, 68, 19, 99, 69, 234, 81, 255, 171, 153, 158, // .ID.cE.Q....
45, 115, 99, 97, 108, 101, 61, 49, 34, 62, 10, 32, // -scale=1">. 68, 97, 154, 118, 35, 229, 75, 225, 87, 66, 14, 221, // Da.v#.K.WB..
32, 32, 32, 32, 32, 32, 32, 60, 116, 105, 116, 108, // <titl 26, 49, 87, 181, 219, 234, 124, 245, 140, 118, 82, 167, // .1W...|..vR.
101, 62, 77, 111, 110, 103, 111, 111, 115, 101, 32, 69, // e>Mongoose E 233, 64, 101, 147, 88, 175, 194, 58, 173, 222, 21, 249, // .@e.X..:....
109, 98, 101, 100, 100, 101, 100, 32, 70, 105, 108, 101, // mbedded File 182, 20, 237, 98, 31, 180, 223, 228, 73, 252, 236, 68, // ...b....I..D
115, 121, 116, 101, 109, 32, 101, 120, 97, 109, 112, 108, // sytem exampl 41, 69, 75, 164, 117, 208, 74, 15, 97, 208, 34, 28, // )EK.u.J.a.".
101, 60, 47, 116, 105, 116, 108, 101, 62, 10, 32, 32, // e</title>. 45, 183, 160, 69, 202, 124, 165, 89, 122, 68, 218, 130, // -..E.|.YzD..
32, 32, 60, 108, 105, 110, 107, 32, 114, 101, 108, 61, // <link rel= 23, 150, 225, 134, 80, 32, 17, 45, 201, 215, 114, 75, // ....P .-..rK
34, 115, 116, 121, 108, 101, 115, 104, 101, 101, 116, 34, // "stylesheet" 72, 252, 74, 130, 70, 62, 0, 244, 202, 47, 100, 16, // H.J.F>.../d.
32, 104, 114, 101, 102, 61, 34, 115, 116, 121, 108, 101, // href="style 92, 251, 132, 1, 5, 247, 93, 250, 39, 248, 213, 174, // ......].'...
46, 99, 115, 115, 34, 32, 47, 62, 10, 32, 32, 60, // .css" />. < 26, 251, 102, 105, 40, 70, 174, 109, 109, 10, 81, 158, // ..fi(F.mm.Q.
47, 104, 101, 97, 100, 62, 10, 32, 32, 60, 98, 111, // /head>. <bo 149, 85, 81, 71, 85, 94, 116, 64, 55, 220, 71, 52, // .UQGU^t@7.G4
100, 121, 62, 60, 47, 98, 111, 100, 121, 62, 10, 32, // dy></body>. 31, 143, 3, 191, 222, 187, 21, 59, 106, 220, 100, 96, // .......;j.d`
32, 60, 115, 99, 114, 105, 112, 116, 32, 116, 121, 112, // <script typ 52, 177, 153, 11, 94, 42, 100, 218, 173, 126, 77, 114, // 4...^*d..~Mr
101, 61, 34, 109, 111, 100, 117, 108, 101, 34, 32, 115, // e="module" s 225, 196, 165, 229, 68, 215, 31, 27, 73, 171, 214, 73, // ....D...I..I
114, 99, 61, 34, 109, 97, 105, 110, 46, 106, 115, 34, // rc="main.js" 57, 225, 237, 40, 236, 150, 42, 88, 74, 165, 239, 42, // 9..(..*XJ..*
62, 60, 47, 115, 99, 114, 105, 112, 116, 62, 10, 60, // ></script>.< 213, 131, 189, 49, 176, 96, 180, 89, 80, 38, 90, 196, // ...1.`.YP&Z.
47, 104, 116, 109, 108, 62, 10, 0 // /html>. 65, 48, 67, 47, 62, 146, 126, 240, 247, 122, 146, 100, // A0C/>.~..z.d
177, 190, 251, 145, 228, 114, 124, 42, 120, 11, 211, 86, // .....r|*x..V
158, 167, 217, 107, 205, 64, 70, 14, 166, 217, 120, 44, // ...k.@F...x,
44, 218, 129, 242, 2, 197, 157, 243, 108, 33, 28, 207, // ,.......l!..
9, 165, 118, 211, 113, 197, 82, 225, 136, 160, 232, 9, // ..v.q.R.....
21, 104, 61, 102, 218, 110, 3, 187, 86, 73, 100, 48, // .h=f.n..VId0
237, 230, 211, 60, 95, 59, 23, 85, 34, 163, 124, 84, // ...<_;.U".|T
52, 189, 209, 100, 25, 150, 90, 49, 151, 50, 117, 242, // 4..d..Z1.2u.
255, 220, 192, 253, 35, 132, 102, 47, 203, 66, 135, 215, // ....#.f/.B..
123, 187, 61, 90, 229, 190, 91, 244, 134, 22, 237, 13, // {.=Z..[.....
104, 76, 12, 49, 230, 175, 26, 156, 0, 115, 53, 217, // hL.1.....s5.
214, 37, 49, 120, 52, 26, 92, 161, 185, 24, 143, 155, // .%1x4.......
166, 24, 40, 150, 242, 101, 14, 4, 250, 189, 6, 23, // ..(..e......
138, 36, 187, 2, 140, 231, 21, 71, 123, 154, 38, 23, // .$.....G{.&.
222, 85, 79, 226, 175, 188, 206, 244, 232, 41, 99, 86, // .UO......)cV
149, 219, 169, 208, 40, 151, 121, 81, 121, 14, 222, 72, // ....(.yQy..H
69, 79, 20, 110, 240, 111, 249, 60, 115, 165, 189, 144, // EO.n.o.<s...
21, 217, 72, 141, 97, 27, 221, 27, 214, 242, 194, 233, // ..H.a.......
215, 212, 109, 178, 80, 94, 174, 60, 152, 50, 65, 72, // ..m.P^.<.2AH
232, 71, 75, 175, 86, 132, 242, 29, 237, 36, 32, 124, // .GK.V....$ |
94, 165, 74, 15, 6, 56, 23, 12, 165, 114, 250, 29, // ^.J..8...r..
159, 202, 119, 94, 13, 116, 149, 36, 232, 76, 26, 53, // ..w^.t.$.L.5
2, 81, 234, 73, 126, 155, 233, 226, 195, 207, 223, 158, // .Q.I~.......
167, 154, 108, 141, 52, 156, 161, 97, 235, 217, 188, 88, // ..l.4..a...X
88, 93, 148, 70, 184, 11, 8, 80, 46, 160, 208, 220, // X].F...P....
47, 228, 27, 47, 192, 76, 92, 211, 3, 85, 140, 70, // /../.L...U.F
59, 116, 11, 177, 239, 209, 237, 218, 59, 60, 30, 34, // ;t......;<."
89, 202, 149, 217, 100, 40, 99, 185, 147, 27, 121, 37, // Y...d(c...y%
175, 229, 157, 188, 80, 21, 113, 15, 34, 210, 52, 137, // ....P.q.".4.
60, 87, 23, 142, 184, 68, 117, 214, 30, 218, 95, 8, // <W...Du..._.
49, 11, 95, 103, 174, 47, 60, 16, 177, 13, 75, 206, // 1._g./<...K.
245, 60, 92, 40, 179, 94, 180, 100, 168, 129, 155, 195, // .<.(.^.d....
101, 158, 167, 58, 236, 105, 196, 102, 70, 48, 254, 16, // e..:.i.fF0..
182, 5, 12, 239, 181, 3, 56, 171, 55, 75, 93, 28, // ......8.7K].
182, 45, 147, 171, 36, 171, 250, 227, 183, 60, 47, 54, // .-..$....</6
96, 20, 128, 203, 194, 255, 170, 40, 194, 221, 36, 41, // `......(..$)
249, 235, 109, 4, 192, 214, 242, 222, 25, 25, 127, 179, // ..m.........
239, 129, 179, 85, 245, 55, 36, 16, 95, 158, 0, 112, // ...U.7$._..p
195, 90, 42, 55, 198, 234, 224, 11, 35, 106, 17, 51, // .Z*7....#j.3
207, 253, 141, 96, 83, 67, 53, 21, 112, 227, 146, 247, // ...`SC5.p...
188, 4, 139, 205, 150, 149, 183, 83, 23, 102, 207, 187, // .......S.f..
209, 136, 49, 40, 181, 163, 15, 213, 8, 189, 162, 58, // ..1(.......:
21, 4, 193, 41, 35, 11, 83, 157, 150, 250, 25, 145, // ...)#.S.....
58, 6, 133, 227, 215, 231, 211, 24, 164, 165, 185, 24, // :...........
95, 76, 74, 251, 215, 200, 238, 9, 202, 97, 51, 186, // _LJ......a3.
187, 99, 54, 236, 223, 65, 4, 54, 114, 167, 118, 77, // .c6..A.6r.vM
147, 30, 72, 129, 188, 82, 27, 35, 198, 49, 10, 56, // ..H..R.#.1.8
42, 48, 201, 142, 190, 3, 69, 2, 127, 215, 52, 222, // *0....E...4.
29, 152, 46, 36, 55, 142, 70, 119, 70, 183, 185, 230, // ...$7.FwF...
232, 45, 109, 99, 204, 212, 136, 154, 230, 10, 141, 194, // .-mc........
138, 241, 213, 204, 90, 229, 107, 160, 187, 86, 87, 71, // ....Z.k..VWG
207, 80, 179, 17, 103, 147, 8, 203, 53, 237, 142, 4, // .P..g...5...
142, 54, 135, 239, 108, 195, 246, 165, 84, 75, 111, 131, // .6..l...TKo.
133, 195, 132, 150, 234, 204, 108, 74, 94, 64, 124, 75, // ......lJ^@|K
33, 87, 144, 144, 124, 203, 136, 161, 86, 129, 177, 182, // !W..|...V...
71, 38, 11, 236, 100, 44, 209, 64, 41, 124, 61, 185, // G&..d,.@)|=.
9, 211, 90, 171, 225, 16, 104, 105, 255, 100, 12, 21, // ..Z...hi.d..
74, 101, 207, 101, 129, 1, 198, 152, 82, 221, 120, 59, // Je.e....R.x;
168, 151, 211, 8, 173, 174, 161, 16, 231, 211, 240, 249, // ............
243, 169, 48, 203, 39, 150, 2, 242, 47, 102, 238, 224, // ..0.'.../f..
8, 195, 104, 228, 74, 138, 5, 41, 110, 151, 118, 227, // ..h.J..)n.v.
85, 50, 196, 41, 37, 228, 79, 30, 193, 72, 150, 42, // U2.)%.O..H.*
65, 71, 196, 29, 251, 23, 70, 21, 239, 250, 170, 248, // AG....F.....
209, 187, 35, 200, 187, 249, 120, 220, 126, 122, 182, 96, // ..#...x.~z.`
105, 108, 129, 209, 126, 24, 4, 86, 237, 10, 104, 170, // il..~..V..h.
195, 131, 163, 2, 42, 216, 58, 115, 94, 84, 36, 122, // ....*.:s^T$z
30, 153, 24, 156, 194, 153, 58, 178, 179, 220, 80, 123, // ......:...P{
233, 229, 140, 221, 63, 35, 171, 132, 63, 60, 222, 24, // ....?#..?<..
39, 24, 227, 214, 169, 233, 29, 222, 103, 125, 227, 100, // '.......g}.d
150, 5, 111, 79, 38, 180, 201, 214, 70, 146, 201, 140, // ..oO&...F...
133, 49, 180, 49, 27, 208, 248, 64, 105, 218, 163, 63, // .1.1...@i..?
192, 161, 1, 43, 216, 52, 166, 154, 247, 248, 39, 180, // ...+.4....'.
223, 130, 1, 160, 56, 96, 45, 44, 186, 158, 132, 219, // ....8`-,....
45, 14, 31, 227, 142, 194, 164, 214, 172, 58, 60, 1, // -........:<.
31, 59, 169, 42, 224, 84, 159, 76, 81, 72, 39, 25, // .;.*.T.LQH'.
124, 144, 15, 201, 50, 53, 71, 88, 242, 186, 61, 135, // |...25GX..=.
146, 177, 122, 73, 246, 144, 102, 23, 172, 131, 56, 171, // ..zI..f...8.
52, 188, 142, 82, 23, 213, 215, 26, 136, 180, 71, 59, // 4..R......G;
5, 250, 194, 157, 172, 221, 89, 48, 171, 253, 188, 143, // ......Y0....
187, 163, 211, 157, 99, 220, 240, 57, 200, 14, 155, 122, // ....c..9...z
178, 128, 147, 90, 106, 246, 24, 129, 122, 231, 49, 225, // ...Zj...z.1.
53, 14, 119, 107, 121, 131, 217, 112, 232, 59, 59, 58, // 5.wky..p.;;:
104, 101, 176, 105, 162, 73, 165, 203, 202, 203, 196, 44, // he.i.I.....,
240, 131, 241, 112, 123, 55, 236, 166, 185, 232, 216, 97, // ...p{7.....a
152, 81, 76, 153, 110, 176, 209, 187, 84, 243, 204, 194, // .QL.n...T...
84, 15, 77, 118, 0, 250, 49, 200, 36, 42, 203, 143, // T.Mv..1.$*..
228, 160, 5, 134, 114, 199, 128, 43, 246, 23, 14, 193, // ....r..+....
43, 210, 62, 248, 252, 68, 233, 140, 220, 230, 74, 4, // +.>..D....J.
208, 20, 246, 246, 155, 230, 206, 193, 99, 113, 128, 35, // ........cq.#
225, 8, 58, 208, 64, 0, 99, 64, 59, 199, 20, 248, // ..:.@.c@;...
28, 194, 83, 135, 216, 59, 57, 25, 230, 142, 124, 163, // ..S..;9...|.
209, 48, 51, 229, 211, 133, 128, 11, 2, 250, 227, 104, // .03........h
167, 168, 100, 155, 134, 145, 246, 94, 156, 133, 91, 176, // ..d....^..[.
71, 127, 242, 130, 166, 132, 61, 67, 95, 149, 191, 205, // G.....=C_...
111, 117, 113, 6, 23, 201, 19, 152, 89, 207, 30, 180, // ouq.....Y...
77, 202, 52, 193, 88, 68, 11, 89, 91, 132, 22, 164, // M.4.XD.Y[...
176, 163, 248, 69, 16, 195, 181, 121, 54, 46, 16, 158, // ...E...y6...
200, 96, 86, 53, 13, 4, 47, 142, 207, 111, 32, 139, // .`V5../..o .
111, 147, 178, 210, 240, 5, 192, 202, 98, 246, 193, 63, // o.......b..?
135, 152, 192, 54, 153, 40, 233, 41, 128, 86, 1, 134, // ...6.(.).V..
113, 152, 93, 233, 34, 175, 203, 116, 247, 65, 87, 223, // q.]."..t.AW.
101, 128, 187, 248, 248, 195, 91, 50, 134, 198, 59, 206, // e.....[2..;.
197, 193, 246, 238, 32, 96, 215, 243, 11, 127, 189, 192, // .... `......
6, 215, 67, 209, 245, 148, 151, 225, 134, 183, 93, 14, // ..C.......].
123, 248, 215, 20, 98, 17, 50, 16, 46, 197, 66, 92, // {...b.2...B.
25, 108, 216, 184, 114, 21, 46, 191, 35, 255, 218, 213, // .l..r...#...
99, 248, 54, 105, 30, 198, 182, 206, 220, 210, 162, 42, // c.6i.......*
118, 247, 15, 5, 53, 152, 90, 101, 217, 71, 97, 21, // v...5.Ze.Ga.
113, 120, 176, 63, 102, 66, 65, 72, 235, 185, 66, 136, // qx.?fBAH..B.
6, 167, 3, 214, 249, 97, 216, 99, 106, 209, 50, 213, // .....a.cj.2.
40, 200, 87, 21, 196, 111, 89, 87, 218, 106, 136, 37, // (.W..oYW.j.%
104, 175, 89, 244, 253, 218, 115, 154, 154, 67, 141, 116, // h.Y...s..C.t
110, 92, 246, 241, 224, 116, 225, 101, 19, 77, 28, 152, // n....t.e.M..
217, 47, 57, 241, 253, 144, 245, 195, 145, 81, 39, 255, // ./9......Q'.
118, 20, 29, 203, 189, 176, 93, 38, 50, 50, 90, 183, // v.....]&22Z.
146, 161, 220, 202, 27, 235, 155, 45, 229, 25, 121, 103, // .......-..yg
240, 200, 204, 9, 114, 96, 27, 131, 73, 47, 58, 19, // ....r`..I/:.
189, 24, 108, 106, 232, 68, 254, 220, 26, 180, 138, 76, // ..lj.D.....L
9, 38, 204, 156, 91, 21, 27, 101, 42, 175, 77, 248, // .&..[..e*.M.
80, 171, 121, 130, 131, 222, 91, 177, 153, 93, 194, 172, // P.y...[..]..
145, 146, 77, 153, 89, 108, 2, 30, 115, 227, 156, 229, // ..M.Yl..s...
138, 252, 31, 227, 45, 157, 41, 140, 62, 119, 49, 218, // ....-.).>w1.
71, 242, 73, 70, 163, 124, 190, 34, 183, 0, 135, 145, // G.IF.|."....
90, 205, 206, 102, 103, 6, 214, 28, 185, 62, 117, 33, // Z..fg....>u!
70, 165, 197, 68, 179, 43, 133, 19, 141, 86, 100, 214, // F..D.+...Vd.
26, 145, 255, 172, 66, 252, 156, 251, 222, 16, 163, 170, // ....B.......
156, 230, 29, 66, 134, 206, 71, 163, 243, 73, 219, 2, // ...B..G..I..
142, 82, 208, 48, 51, 67, 67, 149, 233, 91, 176, 113, // .R.03CC..[.q
41, 239, 132, 239, 245, 219, 98, 110, 147, 97, 159, 98, // ).....bn.a.b
234, 28, 117, 51, 94, 125, 37, 228, 217, 104, 116, 54, // ..u3^}%..ht6
41, 235, 165, 23, 18, 156, 137, 60, 151, 40, 149, 85, // )......<.(.U
88, 105, 200, 158, 45, 177, 34, 135, 109, 48, 122, 39, // Xi..-.".m0z'
105, 149, 153, 202, 229, 150, 215, 75, 129, 16, 55, 173, // i......K..7.
217, 119, 50, 98, 78, 117, 248, 20, 30, 127, 149, 69, // .w2bNu.....E
228, 220, 164, 243, 201, 149, 174, 222, 32, 240, 185, 209, // ........ ...
241, 7, 234, 248, 166, 200, 55, 156, 12, 104, 71, 184, // ......7..hG.
33, 109, 3, 71, 25, 92, 132, 117, 42, 77, 163, 124, // !m.G...u*M.|
26, 145, 183, 116, 192, 66, 222, 40, 187, 57, 248, 132, // ...t.B.(.9..
22, 173, 220, 10, 179, 206, 191, 90, 138, 89, 44, 109, // .......Z.Y,m
124, 179, 205, 51, 72, 244, 47, 73, 154, 254, 128, 192, // |..3H./I....
13, 6, 248, 88, 171, 231, 246, 215, 235, 124, 147, 196, // ...X.....|..
237, 8, 80, 200, 248, 142, 71, 250, 69, 123, 128, 252, // ..P...G.E{..
251, 117, 45, 161, 8, 55, 79, 44, 239, 189, 142, 52, // .u-..7O,...4
198, 88, 200, 191, 232, 52, 210, 49, 8, 141, 83, 230, // .X...4.1..S.
112, 149, 235, 188, 78, 227, 51, 55, 232, 167, 109, 204, // p...N.37..m.
60, 24, 156, 42, 245, 84, 175, 163, 52, 208, 53, 77, // <..*.T..4.5M
192, 65, 160, 98, 137, 190, 17, 247, 143, 132, 202, 200, // .A.b........
5, 43, 226, 205, 192, 130, 89, 22, 67, 140, 78, 5, // .+....Y.C.N.
163, 186, 161, 195, 226, 129, 218, 94, 115, 249, 218, 148, // .......^s...
39, 176, 194, 231, 33, 236, 102, 63, 140, 213, 54, 46, // '...!.f?..6.
87, 129, 216, 27, 60, 107, 235, 166, 140, 70, 169, 165, // W...<k...F..
187, 104, 237, 238, 81, 226, 185, 237, 30, 109, 238, 237, // .h..Q....m..
243, 40, 155, 187, 193, 45, 159, 219, 229, 17, 37, 30, // .(...-....%.
195, 122, 108, 242, 40, 122, 61, 84, 174, 227, 52, 179, // .zl.(z=T..4.
166, 170, 176, 166, 74, 58, 154, 181, 36, 163, 239, 59, // ....J:..$..;
248, 172, 43, 229, 116, 220, 115, 114, 239, 164, 190, 157, // ..+.t.sr....
71, 60, 64, 238, 54, 4, 161, 99, 151, 240, 204, 128, // G<@.6..c....
145, 35, 12, 205, 179, 17, 190, 124, 212, 239, 145, 122, // .#.....|...z
109, 157, 3, 202, 221, 31, 178, 112, 11, 57, 177, 222, // m......p.9..
159, 217, 40, 76, 201, 230, 233, 94, 34, 3, 208, 92, // ..(L...^"...
40, 179, 8, 196, 93, 43, 23, 234, 173, 141, 100, 42, // (...]+....d*
181, 162, 24, 112, 182, 178, 214, 180, 13, 110, 87, 146, // ...p.....nW.
194, 253, 195, 8, 248, 66, 204, 46, 252, 249, 197, 226, // .....B......
209, 89, 131, 229, 119, 217, 158, 254, 89, 240, 132, 172, // .Y..w...Y...
200, 43, 43, 153, 231, 76, 36, 134, 53, 100, 215, 32, // .++..L$.5d.
187, 241, 177, 108, 82, 16, 14, 89, 95, 240, 103, 222, // ...lR..Y_.g.
67, 145, 181, 162, 44, 124, 83, 185, 245, 172, 100, 247, // C...,|S...d.
150, 24, 137, 41, 179, 56, 78, 86, 43, 29, 91, 46, // ...).8NV+.[.
119, 254, 129, 153, 128, 215, 235, 69, 134, 226, 3, 85, // w......E...U
11, 27, 62, 105, 149, 216, 29, 13, 6, 145, 172, 231, // ..>i........
117, 155, 249, 75, 196, 194, 174, 156, 164, 71, 155, 51, // u..K.....G.3
184, 239, 2, 188, 161, 38, 113, 79, 189, 17, 37, 48, // .....&qO..%0
241, 65, 60, 163, 197, 163, 84, 17, 128, 248, 120, 100, // .A<...T...xd
2, 174, 237, 116, 199, 83, 74, 54, 161, 76, 154, 216, // ...t.SJ6.L..
237, 160, 157, 159, 109, 195, 190, 159, 180, 185, 245, 250, // ....m.......
41, 155, 214, 49, 40, 217, 49, 88, 131, 118, 70, 140, // )..1(.1X.vF.
227, 246, 236, 221, 89, 231, 64, 110, 16, 163, 176, 215, // ....Y.@n....
125, 67, 46, 183, 218, 113, 222, 106, 112, 226, 84, 180, // }C...q.jp.T.
102, 191, 121, 186, 121, 93, 187, 144, 101, 99, 50, 56, // f.y.y]..ec28
136, 109, 235, 249, 134, 67, 189, 146, 60, 40, 136, 232, // .m...C..<(..
110, 6, 127, 38, 199, 194, 201, 33, 4, 42, 255, 21, // n..&...!.*..
194, 226, 9, 165, 115, 249, 108, 23, 216, 129, 42, 37, // ....s.l...*%
141, 50, 177, 146, 201, 57, 244, 18, 177, 157, 245, 86, // .2...9.....V
59, 231, 155, 196, 121, 196, 57, 245, 73, 4, 232, 74, // ;...y.9.I..J
147, 247, 79, 65, 152, 23, 139, 105, 166, 138, 217, 131, // ..OA...i....
110, 155, 20, 187, 252, 0, 7, 180, 170, 182, 254, 139, // n...........
23, 183, 183, 183, 147, 219, 87, 147, 188, 184, 122, 241, // ......W...z.
242, 228, 228, 228, 5, 237, 19, 234, 226, 31, 31, 232, // ............
237, 100, 12, 69, 24, 141, 98, 23, 209, 201, 136, 100, // .d.E..b....d
181, 191, 176, 53, 126, 99, 196, 69, 196, 107, 168, 95, // ...5~c.E.k._
104, 170, 158, 173, 196, 221, 65, 84, 147, 92, 91, 78, // h.....AT..[N
102, 70, 231, 104, 233, 37, 116, 64, 121, 45, 83, 154, // fF.h.%t@y-S.
38, 21, 147, 39, 188, 113, 56, 8, 241, 147, 125, 131, // &..'.q8...}.
168, 37, 152, 227, 211, 154, 174, 114, 136, 163, 155, 215, // .%.....r....
217, 36, 116, 46, 107, 217, 103, 221, 122, 222, 239, 1, // .$t.k.g.z...
47, 38, 25, 184, 69, 119, 10, 135, 173, 236, 112, 77, // /&..Ew....pM
61, 216, 166, 144, 120, 188, 37, 85, 30, 141, 182, 36, // =...x.%U...$
179, 213, 198, 250, 39, 84, 106, 154, 174, 13, 72, 18, // ....'Tj...H.
183, 60, 193, 36, 105, 171, 106, 219, 13, 134, 7, 142, // .<.$i.j.....
8, 137, 104, 218, 79, 190, 30, 134, 145, 180, 155, 194, // ..h.O.......
94, 222, 56, 107, 69, 242, 137, 88, 220, 94, 230, 112, // ^.8kE..X.^.p
88, 206, 55, 38, 77, 67, 113, 168, 185, 242, 64, 252, // X.7&MCq...@.
86, 44, 160, 159, 29, 130, 76, 228, 20, 118, 56, 111, // V,....L..v8o
180, 13, 109, 51, 0, 2, 217, 211, 200, 135, 76, 2, // ..m3......L.
87, 137, 214, 58, 186, 214, 177, 173, 210, 44, 28, 55, // W..:.....,.7
16, 14, 59, 59, 77, 108, 103, 223, 67, 29, 99, 185, // ..;;Mlg.C.c.
70, 43, 172, 230, 86, 184, 100, 104, 27, 29, 109, 156, // F+..V.dh..m.
30, 182, 150, 24, 118, 56, 147, 143, 50, 145, 27, 31, // ....v8..2...
172, 112, 138, 109, 130, 39, 157, 92, 101, 63, 46, 127, // .p.m.'..e?..
215, 17, 71, 84, 59, 214, 246, 122, 86, 35, 152, 241, // ..GT;..zV#..
43, 147, 9, 163, 60, 16, 244, 55, 58, 84, 225, 141, // +...<..7:T..
234, 52, 184, 203, 62, 145, 50, 146, 161, 100, 85, 158, // .4..>.2..dU.
194, 44, 122, 118, 215, 32, 92, 12, 84, 46, 108, 192, // .,zv. ..T.l.
240, 216, 136, 4, 9, 195, 134, 147, 44, 92, 5, 101, // ........,..e
176, 145, 171, 66, 151, 165, 53, 31, 131, 13, 64, 46, // ...B..5...@.
176, 27, 139, 9, 49, 201, 218, 192, 74, 242, 79, 90, // ....1...J.OZ
66, 30, 155, 193, 246, 81, 234, 146, 167, 176, 117, 139, // B....Q....u.
207, 141, 100, 140, 182, 66, 56, 197, 254, 113, 162, 232, // ..d..B8..q..
163, 181, 211, 108, 113, 143, 93, 175, 204, 180, 199, 225, // ...lq.].....
93, 84, 23, 148, 216, 81, 193, 99, 59, 123, 96, 229, // ]T...Q.c;{`.
127, 114, 8, 237, 45, 35, 223, 188, 76, 234, 108, 99, // .r..-#..L.lc
156, 211, 182, 8, 4, 146, 83, 97, 38, 59, 234, 229, // ......Sa&;..
110, 6, 132, 54, 174, 72, 25, 36, 154, 163, 105, 62, // n..6.H.$..i>
82, 10, 140, 197, 182, 77, 129, 218, 60, 90, 100, 18, // R....M..<Zd.
199, 249, 3, 79, 202, 76, 194, 49, 241, 241, 46, 239, // ...O.L.1....
216, 129, 33, 246, 185, 57, 186, 115, 118, 113, 56, 201, // ..!..9.svq8.
75, 200, 77, 198, 142, 229, 163, 128, 213, 40, 94, 231, // K.M......(^.
78, 70, 10, 152, 138, 28, 194, 60, 26, 253, 228, 229, // NF.....<....
44, 217, 242, 136, 14, 153, 216, 21, 81, 159, 243, 96, // ,.......Q..`
236, 182, 86, 230, 206, 73, 200, 238, 166, 200, 165, 224, // ..V..I......
58, 138, 126, 229, 114, 84, 150, 123, 238, 194, 206, 197, // :.~.rT.{....
90, 102, 225, 45, 248, 15, 94, 223, 64, 144, 220, 79, // Zf.-..^.@..O
105, 127, 230, 196, 165, 62, 178, 216, 216, 198, 177, 124, // i....>.....|
163, 48, 87, 7, 57, 241, 128, 239, 43, 140, 99, 193, // .0W.9...+.c.
151, 222, 239, 160, 46, 129, 242, 6, 208, 175, 28, 29, // ............
130, 117, 53, 244, 214, 134, 47, 243, 0, 17, 89, 77, // .u5.../...YM
121, 240, 180, 187, 132, 169, 30, 93, 194, 240, 232, 217, // y......]....
60, 95, 248, 181, 153, 170, 154, 172, 146, 162, 52, 190, // <_........4.
158, 187, 30, 174, 250, 103, 128, 185, 167, 73, 236, 200, // .....g...I..
28, 227, 106, 162, 213, 193, 64, 74, 252, 189, 241, 146, // ..j...@J....
3, 50, 124, 99, 46, 170, 248, 2, 82, 221, 243, 229, // .2|c....R...
171, 26, 226, 115, 54, 28, 215, 227, 49, 221, 215, 106, // ...s6...1..j
9, 231, 178, 196, 225, 86, 248, 79, 92, 110, 57, 163, // .....V.O.n9.
227, 101, 98, 47, 17, 204, 220, 36, 241, 1, 176, 69, // .eb/...$...E
47, 171, 105, 159, 53, 15, 92, 87, 216, 10, 119, 129, // /.i.5..W..w.
133, 240, 150, 242, 51, 4, 37, 143, 129, 170, 158, 31, // ....3.%.....
239, 48, 238, 13, 228, 209, 136, 72, 245, 151, 210, 93, // .0.....H...]
234, 26, 43, 194, 202, 195, 37, 114, 26, 217, 115, 66, // ..+...%r..sB
8, 96, 177, 213, 203, 131, 177, 129, 187, 91, 156, 186, // .`.......[..
71, 5, 199, 84, 102, 122, 188, 185, 191, 106, 76, 180, // G..Tfz...jL.
229, 252, 92, 208, 187, 17, 150, 48, 103, 252, 50, 129, // .......0g.2.
185, 75, 215, 157, 36, 240, 237, 237, 116, 123, 197, 29, // .K..$...t{..
76, 28, 141, 57, 186, 154, 56, 246, 244, 51, 31, 176, // L..9..8..3..
63, 112, 65, 77, 18, 80, 102, 196, 88, 253, 128, 123, // ?pAM.Pf.X..{
237, 181, 51, 105, 193, 52, 227, 88, 102, 202, 158, 88, // ..3i.4.Xf..X
192, 229, 136, 46, 80, 233, 164, 97, 227, 64, 237, 213, // ....P..a.@..
131, 108, 143, 139, 82, 171, 99, 161, 241, 121, 81, 228, // .l..R.c..yQ.
5, 59, 195, 37, 162, 12, 106, 245, 158, 134, 195, 102, // .;.%..j....f
133, 204, 205, 253, 131, 179, 91, 193, 65, 128, 118, 70, // ......[.A.vF
54, 136, 209, 61, 106, 37, 202, 181, 99, 243, 254, 117, // 6..=j%..c..u
248, 121, 107, 133, 177, 95, 173, 178, 125, 181, 46, 242, // .yk.._..}...
91, 4, 155, 123, 104, 232, 9, 60, 179, 46, 135, 227, // [..{h..<....
22, 169, 14, 137, 100, 238, 229, 3, 27, 9, 177, 76, // ....d......L
112, 26, 197, 149, 72, 121, 89, 80, 104, 236, 204, 181, // p...HyYPh...
250, 174, 96, 146, 36, 29, 196, 209, 235, 39, 142, 147, // ..`.$....'..
149, 54, 65, 29, 226, 200, 78, 64, 65, 20, 116, 150, // .6A...N@A.t.
198, 251, 183, 215, 240, 237, 220, 20, 166, 103, 109, 205, // .........gm.
6, 184, 153, 144, 27, 143, 154, 112, 136, 29, 236, 15, // .......p....
220, 142, 244, 83, 218, 96, 144, 217, 162, 166, 236, 145, // ...S.`......
126, 136, 88, 63, 133, 216, 38, 175, 214, 230, 54, 59, // ~.X?..&...6;
63, 102, 46, 33, 173, 155, 164, 212, 51, 251, 237, 13, // ?f.!....3...
174, 214, 58, 155, 44, 161, 1, 158, 235, 195, 193, 159, // ..:.,.......
167, 55, 26, 113, 172, 15, 150, 124, 76, 54, 58, 175, // .7.q...|L6:.
43, 105, 110, 219, 79, 96, 144, 79, 88, 243, 222, 202, // +in.O`.OX...
75, 249, 139, 124, 143, 150, 239, 104, 214, 31, 77, 206, // K..|...h..M.
80, 254, 108, 2, 114, 249, 71, 27, 181, 201, 175, 141, // P.l.r.G.....
44, 203, 79, 84, 123, 162, 118, 15, 138, 126, 239, 34, // ,.OT{.v..~."
173, 181, 177, 251, 107, 239, 82, 106, 249, 30, 14, 153, // ....k.Rj....
32, 244, 60, 89, 165, 46, 209, 115, 1, 251, 196, 95, // .<Y...s..._
210, 37, 31, 147, 210, 243, 148, 249, 98, 223, 222, 42, // .%......b..*
233, 47, 57, 164, 108, 195, 86, 174, 48, 237, 40, 91, // ./9.l.V.0.([
71, 181, 185, 94, 116, 118, 247, 219, 222, 19, 148, 247, // G..^tv......
234, 84, 254, 233, 37, 90, 246, 179, 179, 127, 30, 220, // .T..%Z......
149, 169, 223, 189, 183, 48, 199, 47, 219, 233, 170, 73, // .....0./...I
69, 143, 82, 38, 124, 229, 201, 209, 171, 154, 7, 179, // E.R&|.......
0, 18, 224, 39, 218, 230, 103, 33, 193, 242, 209, 195, // ...'..g!....
2, 172, 178, 98, 120, 184, 120, 146, 206, 90, 83, 52, // ...bx.x..ZS4
41, 114, 139, 40, 51, 235, 61, 93, 44, 204, 12, 157, // )r.(3.=],...
14, 99, 47, 98, 111, 91, 213, 165, 217, 87, 183, 230, // .c/bo[...W..
191, 25, 130, 246, 87, 252, 74, 76, 7, 153, 81, 154, // ....W.JL..Q.
84, 51, 250, 11, 73, 175, 74, 204, 76, 102, 7, 23, // T3..I.J.Lf..
42, 144, 76, 219, 78, 222, 42, 209, 35, 197, 247, 143, // *.L.N.*.#...
209, 126, 246, 127, 64, 123, 12, 229, 223, 15, 200, 255, // .~..@{......
185, 252, 213, 123, 116, 166, 220, 91, 239, 202, 39, 123, // ...{t..[..'{
49, 239, 95, 99, 254, 195, 177, 230, 189, 250, 66, 126, // 1._c......B~
223, 31, 249, 132, 103, 152, 145, 60, 155, 124, 152, 243, // ....g..<.|..
15, 169, 105, 47, 221, 21, 68, 224, 179, 105, 133, 177, // ..i/..D..i..
34, 83, 216, 205, 244, 107, 255, 116, 54, 59, 255, 175, // "S...k.t6;..
86, 4, 82, 205, 169, 134, 11, 64, 216, 172, 3, 172, // V.R....@....
136, 224, 112, 254, 66, 101, 54, 31, 160, 77, 67, 135, // ..p.Be6..MC.
242, 159, 7, 135, 247, 123, 245, 223, 199, 246, 14, 27, // .....{......
9, 160, 110, 144, 214, 157, 252, 92, 186, 115, 102, 206, // ..n......sf.
126, 37, 52, 193, 174, 236, 127, 68, 119, 66, 69, 116, // ~%4....DwBEt
87, 235, 46, 223, 3, 246, 171, 204, 10, 97, 92, 50, // W........a.2
78, 113, 95, 146, 135, 218, 63, 136, 201, 123, 238, 47, // Nq_...?..{./
52, 211, 78, 61, 235, 82, 191, 209, 203, 250, 234, 103, // 4.N=.R.....g
115, 74, 63, 104, 240, 72, 236, 31, 92, 109, 4, 189, // sJ?h.H...m..
245, 154, 197, 157, 34, 132, 9, 212, 183, 94, 119, 11, // ...."....^w.
108, 4, 229, 242, 241, 129, 194, 154, 254, 168, 245, 192, // l...........
108, 246, 60, 69, 34, 48, 52, 133, 206, 107, 1, 247, // l.<E"04..k..
142, 180, 170, 127, 208, 83, 151, 209, 70, 232, 77, 183, // .....S..F.M.
64, 168, 146, 184, 255, 238, 104, 222, 52, 49, 222, 238, // @.....h.41..
59, 115, 81, 213, 170, 133, 3, 45, 172, 27, 124, 216, // ;sQ....-..|.
90, 247, 91, 97, 19, 237, 185, 23, 136, 251, 126, 171, // Z.[a......~.
77, 57, 153, 247, 104, 156, 242, 97, 3, 186, 103, 243, // M9..h..a..g.
121, 176, 193, 75, 147, 172, 248, 113, 52, 250, 145, 118, // y..K...q4..v
198, 3, 139, 3, 136, 159, 71, 163, 159, 105, 243, 111, // ......G..i.o
173, 153, 204, 148, 119, 105, 35, 13, 154, 145, 222, 88, // ....wi#....X
122, 217, 163, 149, 103, 143, 86, 157, 217, 181, 241, 36, // z...g.V....$
198, 106, 31, 204, 243, 199, 104, 244, 135, 243, 184, 204, // .j....h.....
19, 178, 104, 26, 152, 252, 222, 133, 253, 28, 164, 11, // ..h.........
61, 186, 149, 251, 206, 168, 60, 89, 132, 95, 56, 143, // =.....<Y._8.
80, 232, 63, 106, 93, 86, 95, 101, 201, 38, 36, 204, // P.?j]V_e.&$.
223, 20, 225, 134, 210, 160, 222, 47, 79, 117, 10, 132, // ......./Ou..
29, 143, 31, 101, 245, 157, 184, 40, 213, 97, 97, 143, // ...e...(.aa.
40, 88, 23, 153, 67, 54, 163, 48, 139, 116, 122, 136, // (X..C6.0.tz.
137, 78, 229, 238, 48, 99, 114, 86, 170, 215, 16, 64, // .N..0crV...@
56, 79, 196, 148, 134, 123, 153, 58, 186, 24, 236, 4, // 8O...{.:....
226, 229, 85, 228, 39, 93, 186, 200, 135, 73, 23, 245, // ..U.']...I..
61, 150, 128, 61, 203, 135, 201, 63, 39, 71, 143, 101, // =..=...?'G.e
104, 173, 108, 123, 146, 86, 186, 56, 24, 100, 180, 132, // h.l{.V.8.d..
31, 216, 53, 77, 173, 89, 188, 173, 80, 85, 71, 103, // ..5M.Y..PUGg
209, 230, 20, 245, 116, 203, 79, 82, 184, 86, 230, 170, // ....t.OR.V..
158, 204, 125, 61, 26, 125, 109, 162, 49, 217, 158, 202, // ..}=.}m.1...
7, 60, 255, 100, 52, 250, 228, 33, 207, 233, 210, 221, // .<.d4..!....
242, 155, 53, 195, 113, 190, 191, 169, 167, 115, 155, 140, // ..5.q....s..
42, 215, 199, 220, 147, 163, 4, 239, 156, 132, 162, 111, // *..........o
250, 166, 71, 95, 86, 114, 162, 150, 63, 30, 177, 167, // ..G_Vr..?...
151, 54, 168, 15, 6, 51, 8, 111, 231, 33, 92, 170, // .6...3.o.!..
251, 86, 121, 160, 233, 94, 222, 8, 52, 231, 45, 76, // .Vy..^..4.-L
17, 65, 241, 3, 178, 247, 195, 93, 122, 65, 64, 111, // .A.....]zA@o
161, 251, 105, 220, 228, 0, 237, 177, 231, 195, 179, 140, // ..i.........
31, 132, 238, 105, 137, 209, 161, 247, 219, 75, 79, 76, // ...i.....KOL
233, 114, 27, 122, 238, 98, 134, 66, 157, 34, 184, 207, // .r.z.b.B."..
250, 193, 189, 121, 59, 67, 25, 172, 241, 120, 33, 83, // ...y;C...x!S
78, 101, 193, 254, 99, 92, 163, 234, 217, 169, 255, 146, // Ne..c.......
94, 66, 112, 231, 2, 243, 205, 199, 227, 98, 49, 125, // ^Bp......b1}
165, 232, 209, 73, 69, 184, 83, 255, 51, 91, 57, 93, // ...IE.S.3[9]
40, 147, 143, 154, 132, 101, 153, 92, 101, 30, 53, 53, // (....e..e.55
13, 124, 227, 84, 248, 159, 51, 16, 55, 41, 215, 142, // .|.T..3.7)..
88, 145, 209, 17, 146, 47, 90, 36, 174, 113, 172, 210, // X..../Z$.q..
241, 112, 136, 112, 152, 179, 19, 225, 118, 155, 238, 188, // .p.p....v...
84, 70, 68, 24, 122, 214, 56, 31, 14, 249, 16, 94, // TFD.z.8....^
8, 242, 101, 216, 104, 228, 66, 166, 244, 190, 197, 172, // ..e.h.B.....
253, 165, 143, 77, 20, 207, 95, 98, 251, 156, 146, 83, // ...M.._b...S
57, 142, 114, 11, 153, 182, 153, 34, 132, 159, 244, 14, // 9.r...."....
86, 223, 62, 251, 33, 220, 202, 213, 161, 143, 109, 216, // V.>.!.....m.
15, 231, 22, 225, 143, 241, 161, 219, 51, 136, 146, 154, // ........3...
237, 176, 146, 195, 16, 134, 160, 231, 74, 18, 93, 88, // ........J.]X
167, 169, 242, 88, 109, 146, 160, 4, 68, 65, 93, 127, // ...Xm...DA].
14, 199, 25, 230, 26, 220, 73, 56, 226, 67, 89, 208, // ......I8.CY.
79, 173, 232, 72, 74, 15, 160, 233, 246, 144, 159, 193, // O..HJ.......
0, 95, 174, 242, 238, 237, 197, 191, 126, 43, 255, 243, // ._......~+..
183, 12, 63, 141, 43, 124, 242, 226, 138, 31, 160, 136, // ..?.+|......
89, 109, 54, 141, 224, 0, 81, 22, 229, 226, 29, 138, // Ym6...Q.....
92, 204, 60, 219, 249, 138, 59, 177, 130, 151, 194, 127, // ..<...;.....
105, 32, 134, 147, 201, 132, 82, 121, 57, 84, 196, 225, // i ....Ry9T..
248, 12, 96, 39, 45, 4, 122, 6, 109, 215, 231, 242, // ..`'-.z.m...
68, 194, 71, 192, 12, 213, 151, 234, 115, 122, 159, 155, // D.G.....sz..
55, 205, 0, 166, 145, 88, 95, 145, 163, 99, 1, 43, // 7....X_..c.+
0, 230, 28, 47, 169, 47, 56, 78, 234, 58, 128, 220, // ..././8N.:..
117, 8, 166, 196, 158, 159, 78, 37, 175, 117, 247, 78, // u.....N%.u.N
138, 222, 54, 210, 97, 97, 150, 144, 66, 33, 83, 47, // ..6.aa..B!S/
17, 162, 21, 241, 8, 3, 162, 215, 122, 158, 44, 220, // ........z.,.
152, 8, 99, 16, 242, 163, 101, 14, 167, 135, 7, 206, // ..c...e.....
134, 175, 249, 185, 199, 204, 35, 4, 160, 116, 13, 215, // ......#..t..
88, 189, 18, 126, 62, 86, 25, 75, 52, 64, 158, 63, // X..~>V.K4@.?
183, 219, 31, 126, 105, 129, 29, 131, 0, 167, 178, 113, // ...~i......q
78, 185, 214, 98, 150, 81, 38, 120, 70, 44, 51, 163, // N..b.Q&xF,3.
63, 29, 126, 106, 238, 65, 134, 159, 154, 97, 5, 26, // ?.~j.A...a..
91, 20, 52, 31, 208, 128, 74, 244, 216, 79, 181, 136, // [.4...J..O..
63, 135, 205, 205, 45, 242, 225, 11, 110, 38, 167, 248, // ?...-...n&..
245, 231, 192, 195, 99, 205, 250, 199, 244, 62, 133, 145, // ....c....>..
56, 62, 214, 138, 114, 190, 132, 180, 150, 174, 98, 232, // 8>..r.....b.
249, 18, 212, 172, 168, 3, 28, 27, 62, 27, 218, 69, // ........>..E
253, 86, 181, 165, 172, 45, 21, 7, 171, 123, 105, 232, // .V...-...{i.
208, 206, 49, 28, 180, 164, 192, 74, 63, 147, 118, 22, // ..1....J?.v.
167, 67, 76, 194, 61, 167, 2, 48, 166, 251, 191, 15, // .CL.=..0....
56, 74, 132, 251, 175, 17, 167, 179, 204, 39, 189, 220, // 8J.......'..
155, 168, 49, 20, 83, 125, 183, 205, 139, 234, 62, 124, // ..1.S}....>|
22, 150, 207, 214, 208, 60, 254, 86, 155, 84, 254, 64, // .....<.V.T.@
37, 19, 157, 202, 152, 202, 109, 82, 72, 126, 67, 85, // %.....mRH~CU
115, 79, 99, 51, 74, 242, 91, 106, 130, 91, 201, 81, // sOc3J.[j.[.Q
142, 252, 211, 214, 222, 235, 184, 142, 48, 254, 111, 182, // ........0.o.
126, 14, 239, 36, 170, 228, 247, 182, 250, 54, 220, 225, // ~..$.....6..
252, 182, 141, 127, 111, 199, 172, 228, 63, 108, 249, 187, // ....o...?l..
205, 86, 23, 56, 84, 110, 244, 69, 152, 197, 169, 150, // .V.8Tn.E....
191, 218, 142, 31, 244, 38, 151, 255, 180, 149, 179, 48, // .....&.....0
77, 151, 97, 116, 45, 181, 118, 45, 118, 85, 153, 107, // M.at-.v-vU.k
232, 188, 93, 25, 184, 54, 206, 156, 124, 141, 179, 51, // ..]..6..|..3
14, 139, 221, 126, 250, 31, 255, 11, 22, 19, 178, 116, // ...~.......t
138, 51, 0, 0, 0 // .3..
}; };
static const unsigned char v2[] = { static const unsigned char v2[] = {
31, 139, 8, 8, 219, 27, 244, 98, 0, 3, 109, 97, // .......b..ma
105, 110, 46, 106, 115, 0, 165, 86, 237, 110, 219, 54, // in.js..V.n.6
20, 253, 239, 167, 184, 8, 6, 52, 65, 109, 41, 77, // .......4Am)M
246, 1, 52, 138, 1, 55, 93, 129, 20, 93, 61, 204, // ..4..7]..]=.
233, 218, 254, 43, 37, 210, 22, 91, 138, 84, 249, 97, // ...+%..[.T.a
205, 11, 242, 46, 125, 150, 62, 217, 14, 37, 217, 177, // ....}.>..%..
19, 103, 195, 218, 95, 166, 36, 222, 123, 15, 207, 185, // .g.._.$.{...
247, 208, 143, 130, 19, 228, 188, 149, 133, 127, 116, 54, // ..........t6
144, 85, 109, 172, 167, 107, 42, 135, 84, 250, 74, 13, // .Um..k*.T.J.
201, 10, 205, 133, 165, 27, 154, 91, 83, 209, 163, 36, // .......[S..$
173, 173, 96, 133, 79, 42, 169, 147, 143, 14, 33, 131, // ..`.O*....!.
65, 97, 180, 243, 244, 142, 206, 105, 30, 116, 225, 165, // Aa.....i.t..
209, 116, 120, 68, 215, 131, 1, 33, 218, 7, 171, 219, // .txD...!....
84, 31, 240, 152, 113, 185, 164, 66, 49, 231, 206, 15, // T...q..B1...
16, 229, 153, 212, 194, 30, 140, 241, 5, 223, 202, 147, // ............
245, 39, 39, 218, 44, 7, 227, 201, 179, 233, 155, 43, // .''.,......+
122, 51, 203, 210, 242, 164, 223, 181, 149, 193, 154, 166, // z3..........
143, 189, 155, 89, 141, 126, 217, 124, 193, 183, 122, 220, // ...Y.~.|..z.
45, 54, 111, 136, 46, 132, 99, 168, 79, 51, 51, 247, // -6o...c.O33.
13, 179, 130, 94, 121, 158, 144, 116, 84, 10, 198, 63, // ...^y..tT..?
7, 102, 189, 176, 130, 127, 253, 34, 53, 61, 15, 185, // .f....."5=..
146, 122, 72, 127, 136, 58, 174, 10, 50, 115, 186, 180, // .zH..:..2s..
66, 49, 205, 147, 219, 26, 105, 189, 83, 112, 231, 121, // B1....i.Sp.y
26, 44, 40, 54, 118, 69, 214, 24, 239, 40, 103, 197, // .,(6vE...(g.
39, 242, 134, 78, 142, 143, 127, 28, 82, 83, 10, 77, // '..N....RS.M
191, 25, 189, 48, 6, 82, 188, 21, 57, 205, 132, 93, // ...0.R..9..]
130, 243, 87, 50, 183, 204, 174, 190, 126, 225, 98, 41, // ..W2....~.b)
148, 169, 43, 161, 61, 242, 68, 108, 192, 154, 229, 118, // ..+.=.Dl...v
60, 216, 148, 152, 184, 189, 41, 22, 86, 52, 132, 51, // <.....).V4.3
212, 166, 14, 138, 89, 233, 87, 4, 216, 84, 49, 200, // ....Y.W..T1.
34, 56, 153, 184, 199, 151, 130, 230, 70, 41, 211, 72, // "8......F).H
189, 160, 149, 96, 214, 13, 99, 204, 201, 241, 147, 211, // ...`..c.....
13, 79, 13, 115, 36, 80, 27, 4, 184, 18, 145, 64, // .O.s$P.....@
31, 5, 148, 58, 8, 146, 56, 210, 54, 196, 88, 97, // ...:..8.6.Xa
3, 172, 182, 102, 41, 57, 90, 44, 212, 109, 107, 33, // ...f)9Z,.mk!
208, 128, 142, 37, 83, 1, 105, 138, 0, 94, 42, 97, // ...%S.i..^*a
221, 195, 76, 190, 21, 20, 245, 65, 158, 208, 150, 45, // ..L....A...-
217, 18, 111, 42, 28, 182, 77, 180, 201, 128, 67, 233, // ..o*..M...C.
21, 101, 114, 252, 2, 101, 130, 22, 244, 211, 241, 113, // .er..e.....q
150, 202, 49, 112, 86, 53, 211, 82, 56, 194, 25, 26, // ..1pV5.R8...
161, 84, 252, 173, 4, 151, 161, 106, 161, 186, 138, 225, // .T.....j....
157, 147, 127, 11, 202, 131, 67, 71, 58, 39, 182, 240, // ......CG:'..
16, 184, 44, 194, 134, 58, 244, 134, 138, 107, 52, 65, // ..,..:...k4A
44, 239, 140, 10, 177, 87, 93, 236, 29, 70, 53, 179, // ,....W]..F5.
128, 22, 64, 194, 220, 88, 10, 174, 13, 105, 9, 198, // ..@..X...i..
204, 96, 193, 252, 94, 153, 16, 139, 49, 228, 148, 175, // .`..^...1...
232, 245, 100, 54, 33, 150, 27, 102, 187, 192, 75, 141, // ..d6!..f..K.
78, 212, 44, 214, 96, 138, 102, 53, 43, 4, 205, 124, // N.,.`.f5+..|
251, 28, 195, 182, 96, 198, 221, 57, 52, 138, 194, 204, // ....`..94...
165, 173, 186, 61, 96, 76, 250, 100, 135, 212, 150, 214, // ...=`L.d....
153, 212, 200, 20, 53, 30, 110, 68, 46, 163, 200, 127, // ....5.nD....
129, 44, 14, 44, 81, 85, 144, 206, 3, 128, 71, 229, // .,.,QU....G.
208, 34, 210, 36, 64, 189, 214, 186, 61, 27, 151, 209, // .".$@...=...
59, 242, 224, 5, 137, 42, 23, 60, 70, 186, 245, 76, // ;....*.<F..L
197, 13, 37, 14, 210, 62, 52, 210, 151, 96, 5, 122, // ..%..>4..`.z
17, 96, 1, 163, 198, 148, 99, 119, 95, 227, 150, 170, // .`....cw_...
238, 196, 194, 71, 138, 175, 74, 244, 164, 235, 224, 175, // ...G..J.....
39, 61, 197, 168, 247, 102, 176, 94, 246, 139, 15, 103, // '=...f.^...g
131, 155, 179, 181, 31, 189, 255, 110, 63, 58, 189, 239, // .......n?:..
71, 155, 182, 187, 69, 109, 197, 83, 216, 211, 233, 55, // G...Em.S...7
219, 83, 22, 212, 150, 52, 153, 146, 219, 66, 81, 6, // .S...4...BQ.
85, 172, 152, 159, 31, 148, 222, 215, 238, 105, 154, 86, // U........i.V
125, 251, 36, 141, 75, 15, 198, 123, 154, 41, 75, 217, // }.$.K..{.)K.
78, 134, 17, 136, 189, 213, 166, 193, 62, 215, 53, 93, // N.......>.5]
228, 27, 52, 55, 198, 126, 138, 131, 175, 58, 183, 217, // ..47.~...:..
130, 146, 238, 96, 249, 79, 100, 75, 48, 152, 72, 3, // ...`.OdK0.H.
84, 127, 94, 76, 95, 99, 117, 31, 201, 196, 242, 32, // T.^L_cu....
181, 25, 181, 35, 233, 101, 174, 208, 177, 177, 211, 93, // ...#.e.....]
215, 29, 121, 144, 202, 143, 96, 61, 177, 125, 219, 166, // ..y...`=.}..
153, 94, 77, 40, 212, 156, 121, 225, 182, 51, 117, 30, // .^M(..y..3u.
166, 217, 66, 180, 134, 195, 153, 43, 219, 60, 223, 14, // ..B....+.<..
190, 138, 57, 18, 208, 1, 248, 213, 243, 126, 189, 151, // ..9......~..
74, 152, 5, 32, 142, 12, 28, 230, 210, 92, 209, 239, // J.. ........
138, 97, 52, 108, 245, 29, 165, 123, 13, 71, 198, 37, // .a4l...{.G.%
32, 102, 75, 212, 233, 108, 47, 2, 83, 11, 11, 246, // fK..l/.S...
160, 153, 91, 57, 47, 170, 214, 107, 96, 223, 163, 218, // ..[9/..k`...
52, 208, 181, 146, 133, 53, 177, 155, 45, 76, 29, 198, // 4....5..-L..
120, 23, 217, 255, 128, 182, 128, 42, 33, 143, 168, 210, // x......*!...
162, 243, 136, 180, 250, 232, 192, 208, 203, 253, 200, 54, // ...........6
109, 246, 146, 45, 217, 172, 176, 178, 246, 36, 244, 2, // m..-.....$..
83, 213, 98, 188, 72, 47, 30, 63, 126, 128, 168, 44, // S.b.H/.?~..,
189, 157, 131, 173, 17, 191, 63, 58, 63, 239, 222, 236, // ......?:?...
89, 62, 158, 238, 248, 112, 55, 144, 249, 238, 13, 188, // Y>...p7.....
59, 100, 237, 193, 37, 108, 102, 1, 30, 163, 213, 105, // ;d..%lf....i
184, 164, 47, 77, 192, 17, 209, 139, 240, 29, 156, 24, // ../M........
119, 74, 33, 97, 185, 235, 73, 191, 35, 107, 155, 131, // wJ!a..I.#k..
139, 90, 153, 85, 119, 29, 150, 65, 115, 220, 169, 109, // .Z.Uw..As..m
120, 37, 149, 106, 193, 192, 42, 37, 152, 107, 175, 224, // x%.j..*%.k..
46, 79, 116, 35, 161, 151, 210, 26, 29, 123, 247, 78, // .Ot#.....{.N
218, 7, 88, 248, 87, 163, 155, 212, 245, 142, 213, 161, // ..X.W.......
80, 237, 246, 249, 93, 86, 62, 25, 63, 99, 14, 255, // P...]V>.?c..
96, 126, 93, 235, 244, 66, 42, 209, 55, 17, 23, 21, // `~]..B*.7...
38, 22, 91, 6, 89, 95, 236, 135, 235, 242, 240, 221, // &.[.Y_......
209, 205, 160, 47, 186, 253, 250, 253, 230, 117, 15, 5, // .../.....u..
255, 29, 184, 105, 18, 163, 149, 97, 28, 112, 96, 184, // ...i...a.p`.
231, 227, 254, 207, 227, 97, 121, 8, 140, 71, 67, 226, // .....ay..GC.
112, 255, 120, 232, 36, 55, 124, 117, 116, 54, 248, 7, // p.x.$7|ut6..
71, 33, 75, 134, 124, 10, 0, 0, 0 // G!K.|...
};
static const unsigned char v3[] = {
39, 117, 115, 101, 32, 115, 116, 114, 105, 99, 116, 39, // 'use strict' 39, 117, 115, 101, 32, 115, 116, 114, 105, 99, 116, 39, // 'use strict'
59, 10, 105, 109, 112, 111, 114, 116, 32, 123, 32, 104, // ;.import { h 59, 10, 105, 109, 112, 111, 114, 116, 32, 123, 32, 104, // ;.import { h
44, 32, 104, 116, 109, 108, 44, 32, 114, 101, 110, 100, // , html, rend 44, 32, 104, 116, 109, 108, 44, 32, 114, 101, 110, 100, // , html, rend
@@ -273,7 +774,7 @@ static const unsigned char v2[] = {
112, 41, 44, 32, 100, 111, 99, 117, 109, 101, 110, 116, // p), document 112, 41, 44, 32, 100, 111, 99, 117, 109, 101, 110, 116, // p), document
46, 98, 111, 100, 121, 41, 59, 10, 0 // .body);. 46, 98, 111, 100, 121, 41, 59, 10, 0 // .body);.
}; };
static const unsigned char v3[] = { static const unsigned char v4[] = {
118, 97, 114, 32, 101, 44, 110, 44, 95, 44, 116, 44, // var e,n,_,t, 118, 97, 114, 32, 101, 44, 110, 44, 95, 44, 116, 44, // var e,n,_,t,
111, 44, 114, 44, 117, 44, 108, 61, 123, 125, 44, 105, // o,r,u,l={},i 111, 44, 114, 44, 117, 44, 108, 61, 123, 125, 44, 105, // o,r,u,l={},i
61, 91, 93, 44, 99, 61, 47, 97, 99, 105, 116, 124, // =[],c=/acit| 61, 91, 93, 44, 99, 61, 47, 97, 99, 105, 116, 124, // =[],c=/acit|
@@ -1375,7 +1876,147 @@ static const unsigned char v3[] = {
115, 101, 69, 114, 114, 111, 114, 66, 111, 117, 110, 100, // seErrorBound 115, 101, 69, 114, 114, 111, 114, 66, 111, 117, 110, 100, // seErrorBound
97, 114, 121, 125, 59, 10, 0 // ary};. 97, 114, 121, 125, 59, 10, 0 // ary};.
}; };
static const unsigned char v4[] = { static const unsigned char v5[] = {
60, 33, 68, 79, 67, 84, 89, 80, 69, 32, 104, 116, // <!DOCTYPE ht
109, 108, 62, 10, 60, 104, 116, 109, 108, 32, 108, 97, // ml>.<html la
110, 103, 61, 34, 101, 110, 34, 62, 10, 32, 32, 60, // ng="en">. <
104, 101, 97, 100, 62, 10, 32, 32, 32, 32, 60, 109, // head>. <m
101, 116, 97, 32, 110, 97, 109, 101, 61, 34, 100, 101, // eta name="de
115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 32, 99, // scription" c
111, 110, 116, 101, 110, 116, 61, 34, 77, 111, 110, 103, // ontent="Mong
111, 111, 115, 101, 32, 69, 109, 98, 101, 100, 100, 101, // oose Embedde
100, 32, 70, 105, 108, 101, 115, 121, 116, 101, 109, 32, // d Filesytem
101, 120, 97, 109, 112, 108, 101, 34, 32, 47, 62, 10, // example" />.
32, 32, 32, 32, 60, 109, 101, 116, 97, 32, 104, 116, // <meta ht
116, 112, 45, 101, 113, 117, 105, 118, 61, 34, 67, 111, // tp-equiv="Co
110, 116, 101, 110, 116, 45, 84, 121, 112, 101, 34, 32, // ntent-Type"
99, 111, 110, 116, 101, 110, 116, 61, 34, 116, 101, 120, // content="tex
116, 47, 104, 116, 109, 108, 59, 32, 99, 104, 97, 114, // t/html; char
115, 101, 116, 61, 85, 84, 70, 45, 56, 34, 62, 10, // set=UTF-8">.
32, 32, 32, 32, 60, 109, 101, 116, 97, 32, 104, 116, // <meta ht
116, 112, 45, 101, 113, 117, 105, 118, 61, 34, 88, 45, // tp-equiv="X-
85, 65, 45, 67, 111, 109, 112, 97, 116, 105, 98, 108, // UA-Compatibl
101, 34, 32, 99, 111, 110, 116, 101, 110, 116, 61, 34, // e" content="
73, 69, 61, 101, 100, 103, 101, 34, 62, 10, 32, 32, // IE=edge">.
32, 32, 60, 109, 101, 116, 97, 32, 110, 97, 109, 101, // <meta name
61, 34, 118, 105, 101, 119, 112, 111, 114, 116, 34, 32, // ="viewport"
99, 111, 110, 116, 101, 110, 116, 61, 34, 119, 105, 100, // content="wid
116, 104, 61, 100, 101, 118, 105, 99, 101, 45, 119, 105, // th=device-wi
100, 116, 104, 44, 32, 105, 110, 105, 116, 105, 97, 108, // dth, initial
45, 115, 99, 97, 108, 101, 61, 49, 34, 62, 10, 32, // -scale=1">.
32, 32, 32, 32, 32, 32, 32, 60, 116, 105, 116, 108, // <titl
101, 62, 77, 111, 110, 103, 111, 111, 115, 101, 32, 69, // e>Mongoose E
109, 98, 101, 100, 100, 101, 100, 32, 70, 105, 108, 101, // mbedded File
115, 121, 116, 101, 109, 32, 101, 120, 97, 109, 112, 108, // sytem exampl
101, 60, 47, 116, 105, 116, 108, 101, 62, 10, 32, 32, // e</title>.
32, 32, 60, 108, 105, 110, 107, 32, 114, 101, 108, 61, // <link rel=
34, 115, 116, 121, 108, 101, 115, 104, 101, 101, 116, 34, // "stylesheet"
32, 104, 114, 101, 102, 61, 34, 115, 116, 121, 108, 101, // href="style
46, 99, 115, 115, 34, 32, 47, 62, 10, 32, 32, 60, // .css" />. <
47, 104, 101, 97, 100, 62, 10, 32, 32, 60, 98, 111, // /head>. <bo
100, 121, 62, 60, 47, 98, 111, 100, 121, 62, 10, 32, // dy></body>.
32, 60, 115, 99, 114, 105, 112, 116, 32, 116, 121, 112, // <script typ
101, 61, 34, 109, 111, 100, 117, 108, 101, 34, 32, 115, // e="module" s
114, 99, 61, 34, 109, 97, 105, 110, 46, 106, 115, 34, // rc="main.js"
62, 60, 47, 115, 99, 114, 105, 112, 116, 62, 10, 60, // ></script>.<
47, 104, 116, 109, 108, 62, 10, 0 // /html>.
};
static const unsigned char v6[] = {
31, 139, 8, 8, 219, 27, 244, 98, 0, 3, 105, 110, // .......b..in
100, 101, 120, 46, 104, 116, 109, 108, 0, 141, 145, 77, // dex.html...M
75, 3, 49, 16, 134, 239, 253, 21, 99, 206, 166, 139, // K.1.....c...
55, 193, 205, 130, 212, 22, 60, 136, 30, 90, 208, 99, // 7.....<..Z.c
154, 140, 205, 104, 62, 214, 205, 244, 99, 255, 189, 217, // ...h>...c...
110, 133, 5, 17, 60, 205, 7, 47, 15, 51, 239, 91, // n...<../.3.[
95, 61, 60, 47, 214, 111, 47, 75, 112, 28, 124, 51, // _=</.o/Kp.|3
171, 135, 2, 94, 199, 157, 18, 24, 69, 51, 3, 168, // ...^....E3..
29, 106, 59, 52, 165, 13, 200, 26, 162, 14, 168, 132, // .j;4........
197, 108, 58, 106, 153, 82, 20, 96, 82, 100, 140, 172, // .l:j.R.`Rd..
196, 83, 138, 187, 148, 50, 194, 50, 108, 209, 90, 180, // .S...2.2l.Z.
176, 34, 143, 185, 103, 12, 128, 39, 29, 90, 143, 2, // ."..g..'.Z..
170, 41, 205, 49, 183, 18, 191, 246, 116, 80, 98, 49, // .).1....tPb1
98, 228, 186, 111, 113, 2, 101, 60, 113, 53, 28, 118, // b..oq.e<q5.v
7, 198, 233, 46, 35, 171, 205, 122, 37, 111, 197, 95, // ....#..z%o._
156, 87, 185, 185, 151, 139, 20, 90, 205, 180, 245, 83, // .W.....Z...S
212, 227, 82, 161, 221, 161, 248, 253, 207, 129, 240, 216, // ..R.........
166, 142, 39, 226, 35, 89, 118, 202, 226, 129, 12, 202, // ..'.#Yv.....
243, 112, 13, 20, 137, 73, 123, 153, 141, 246, 168, 110, // .p...I{....n
46, 160, 51, 140, 137, 61, 54, 255, 112, 160, 174, 70, // ..3..=6.p..F
233, 120, 131, 167, 248, 9, 29, 122, 37, 50, 247, 69, // .x.....z%2.E
233, 16, 203, 17, 174, 195, 247, 203, 102, 110, 114, 190, // ........fnr.
152, 86, 87, 63, 97, 212, 219, 100, 251, 166, 174, 206, // .VW?a..d....
101, 152, 199, 52, 128, 139, 117, 74, 132, 100, 247, 195, // e..4..uJ.d..
223, 185, 51, 101, 208, 20, 231, 31, 89, 20, 245, 40, // ..3e....Y..(
42, 49, 87, 99, 220, 223, 14, 156, 225, 97, 255, 1, // *1Wc.....a..
0, 0, 0 // ..
};
static const unsigned char v7[] = {
31, 139, 8, 8, 219, 27, 244, 98, 0, 3, 115, 116, // .......b..st
121, 108, 101, 46, 99, 115, 115, 0, 117, 84, 203, 110, // yle.css.uT.n
219, 48, 16, 188, 251, 43, 88, 4, 5, 218, 32, 82, // .0...+X... R
44, 41, 178, 99, 249, 210, 91, 63, 162, 232, 129, 18, // ,).c..[?....
87, 54, 17, 138, 84, 73, 58, 118, 90, 248, 223, 187, // W6..TI:vZ...
164, 30, 164, 226, 228, 98, 75, 187, 163, 125, 204, 12, // .....bK..}..
121, 79, 254, 145, 90, 93, 18, 195, 255, 114, 121, 168, // yO..Z]...ry.
240, 89, 51, 208, 9, 134, 246, 228, 186, 58, 218, 78, // .Y3......:.N
60, 96, 140, 189, 33, 172, 163, 250, 192, 101, 69, 214, // <`..!....eE.
123, 210, 83, 198, 60, 28, 159, 143, 192, 15, 71, 91, // {.S.<.....G[
145, 108, 189, 254, 186, 39, 173, 146, 238, 121, 211, 95, // .l...'...y._
136, 161, 210, 36, 6, 52, 111, 93, 41, 3, 2, 26, // ...$.4o])...
251, 64, 184, 236, 79, 248, 39, 104, 13, 162, 170, 106, // .@..O.'h...j
104, 149, 134, 7, 98, 225, 98, 169, 6, 138, 109, 212, // h...b.b...m.
201, 10, 46, 161, 34, 82, 73, 216, 15, 195, 29, 41, // ...."RI....)
83, 231, 202, 5, 200, 23, 222, 245, 74, 91, 42, 237, // S.......J[*.
126, 28, 22, 219, 185, 110, 74, 112, 70, 238, 154, 166, // ~....nJpF...
89, 64, 174, 171, 70, 49, 108, 208, 107, 192, 218, 141, // Y@..F1l.k...
18, 10, 241, 119, 197, 182, 24, 70, 77, 90, 218, 113, // ...w...FMZ.q
241, 86, 145, 78, 73, 101, 122, 218, 192, 24, 63, 143, // .V.NIez...?.
91, 213, 74, 96, 139, 49, 136, 36, 225, 92, 166, 163, // [.J`.1.$....
66, 184, 88, 77, 155, 151, 131, 86, 39, 201, 176, 36, // B.XM...V'..$
99, 44, 230, 37, 205, 160, 195, 223, 2, 186, 105, 204, // c,.%......i.
68, 83, 198, 79, 198, 229, 114, 23, 189, 174, 166, 165, // DS.O..r.....
103, 82, 82, 252, 92, 73, 156, 51, 234, 150, 149, 253, // gRR..I.3....
229, 179, 77, 23, 13, 203, 161, 40, 86, 163, 213, 43, // ..M....(V..+
55, 220, 2, 115, 143, 180, 177, 252, 53, 222, 189, 44, // 7..s....5..,
189, 30, 115, 175, 197, 22, 0, 72, 0, 233, 184, 76, // ..s....H...L
206, 156, 217, 99, 69, 118, 88, 21, 193, 181, 69, 232, // ...cEvX...E.
138, 44, 193, 126, 130, 155, 229, 162, 149, 189, 63, 166, // .,.~......?.
190, 109, 139, 125, 155, 147, 54, 238, 173, 87, 92, 90, // .m.}..6..W.Z
228, 16, 75, 50, 110, 122, 65, 81, 2, 46, 157, 238, // ..K2nzAQ....
73, 45, 84, 243, 178, 216, 108, 131, 84, 122, 202, 62, // I-T...l.Tz.>
82, 102, 53, 76, 247, 11, 203, 208, 90, 0, 251, 237, // Rf5L....Z...
44, 132, 66, 114, 251, 230, 89, 9, 61, 233, 201, 42, // ,.Br..Y.=..*
183, 139, 233, 148, 178, 71, 132, 89, 141, 14, 229, 150, // .....G.Y....
43, 52, 53, 74, 74, 210, 220, 120, 102, 26, 108, 67, // +45JJ..xf.lC
113, 20, 29, 155, 158, 228, 107, 39, 196, 72, 139, 175, // q.....k'.H..
229, 176, 44, 105, 5, 92, 16, 56, 175, 225, 222, 199, // ..,i...8....
148, 55, 108, 148, 26, 28, 237, 6, 246, 244, 248, 163, // .7l.........
119, 163, 171, 55, 18, 98, 60, 203, 192, 102, 80, 68, // w..7.b<..fPD
241, 40, 117, 42, 213, 89, 211, 30, 17, 231, 35, 202, // .(u*.Y....#.
157, 120, 255, 186, 46, 46, 234, 1, 157, 57, 188, 87, // .x.......9.W
152, 65, 59, 139, 38, 160, 69, 34, 203, 208, 187, 220, // .A;.&.E"....
177, 91, 79, 69, 102, 220, 185, 35, 62, 81, 226, 29, // .[OEf..#>Q..
238, 219, 24, 60, 217, 220, 155, 41, 208, 149, 141, 51, // ...<...)...3
90, 213, 243, 6, 173, 205, 168, 69, 107, 166, 127, 148, // Z......Ek...
65, 88, 220, 35, 247, 7, 165, 252, 240, 160, 60, 185, // AX.#......<.
232, 80, 51, 209, 131, 236, 35, 212, 149, 30, 106, 45, // .P3...#...j-
253, 219, 210, 208, 245, 125, 178, 133, 33, 233, 70, 121, // .....}..!.Fy
159, 163, 224, 79, 197, 234, 241, 158, 252, 212, 72, 197, // ...O......H.
253, 163, 83, 224, 124, 43, 172, 251, 77, 28, 193, 21, // ..S.|+..M...
153, 105, 70, 139, 127, 126, 63, 170, 87, 208, 173, 192, // .iF..~?.W...
235, 43, 152, 6, 241, 73, 150, 59, 221, 6, 55, 13, // .+...I.;..7.
87, 231, 148, 200, 66, 98, 151, 165, 155, 77, 148, 90, // W...Bb...M.Z
135, 212, 115, 145, 22, 69, 72, 237, 66, 102, 91, 134, // ..s..EH.Bf[.
240, 115, 8, 111, 54, 139, 90, 219, 144, 41, 159, 23, // .s.o6.Z..)..
165, 54, 81, 38, 154, 171, 12, 225, 167, 229, 88, 79, // .6Q&......XO
33, 83, 44, 167, 42, 66, 38, 143, 166, 138, 87, 95, // !S,.*B&...W_
78, 21, 237, 62, 15, 245, 163, 3, 198, 41, 249, 22, // N..>.....)..
221, 74, 89, 145, 225, 105, 252, 142, 224, 15, 15, 235, // .JY..i......
64, 244, 132, 205, 183, 254, 228, 94, 227, 82, 244, 50, // @......^.R.2
95, 112, 249, 84, 201, 201, 61, 74, 185, 212, 5, 63, // _p.T..=J...?
252, 15, 225, 232, 67, 124, 39, 7, 0, 0, 0 // ....C|'...
};
static const unsigned char v8[] = {
42, 32, 123, 32, 98, 111, 120, 45, 115, 105, 122, 105, // * { box-sizi 42, 32, 123, 32, 98, 111, 120, 45, 115, 105, 122, 105, // * { box-sizi
110, 103, 58, 32, 98, 111, 114, 100, 101, 114, 45, 98, // ng: border-b 110, 103, 58, 32, 98, 111, 114, 100, 101, 114, 45, 98, // ng: border-b
111, 120, 59, 32, 125, 10, 104, 116, 109, 108, 44, 32, // ox; }.html, 111, 120, 59, 32, 125, 10, 104, 116, 109, 108, 44, 32, // ox; }.html,
@@ -1537,10 +2178,14 @@ static const struct packed_file {
size_t size; size_t size;
time_t mtime; time_t mtime;
} packed_files[] = { } packed_files[] = {
{"/web_root/index.html", v1, sizeof(v1), 1660216320}, {"/web_root/preact.min.js.gz", v1, sizeof(v1), 1660165083},
{"/web_root/main.js", v2, sizeof(v2), 1660216320}, {"/web_root/main.js.gz", v2, sizeof(v2), 1660165083},
{"/web_root/preact.min.js", v3, sizeof(v3), 1660216320}, {"/web_root/main.js", v3, sizeof(v3), 1660586478},
{"/web_root/style.css", v4, sizeof(v4), 1660216320}, {"/web_root/preact.min.js", v4, sizeof(v4), 1660586478},
{"/web_root/index.html", v5, sizeof(v5), 1660586478},
{"/web_root/index.html.gz", v6, sizeof(v6), 1660165083},
{"/web_root/style.css.gz", v7, sizeof(v7), 1660165083},
{"/web_root/style.css", v8, sizeof(v8), 1660586478},
{NULL, NULL, 0, 0} {NULL, NULL, 0, 0}
}; };
+1 -1
View File
@@ -35,4 +35,4 @@ flash3:
cd build && $(ESPTOOL) --chip esp32 -p $(PORT) -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x100000 mongoose-esp32-example.bin cd build && $(ESPTOOL) --chip esp32 -p $(PORT) -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x100000 mongoose-esp32-example.bin
clean: clean:
$(DOCKER) rm -rf build sdkconfig test -d build && $(DOCKER) rm -rf build sdkconfig || true
+1 -1
View File
@@ -30,6 +30,6 @@ void app_main(void) {
mg_log_set(MG_LL_DEBUG); // Set log level mg_log_set(MG_LL_DEBUG); // Set log level
mg_mgr_init(&mgr); mg_mgr_init(&mgr);
MG_INFO(("Mongoose v%s on %s", MG_VERSION, s_listening_url)); MG_INFO(("Mongoose v%s on %s", MG_VERSION, s_listening_url));
mg_http_listen(&mgr, s_listening_url, device_dashboard_fn, &mgr); mg_http_listen(&mgr, s_listening_url, device_dashboard_fn, NULL);
for (;;) mg_mgr_poll(&mgr, 1000); // Infinite event loop for (;;) mg_mgr_poll(&mgr, 1000); // Infinite event loop
} }
+2 -22
View File
@@ -1,30 +1,10 @@
# A UART to network bridge for ESP32 # A UART to network bridge for ESP32
This example is a demonstration of how Mongoose Library could be integrated
into an embedded device and provide a UART-to-Network bridge capability:
- A device opens listening TCP port and Websocket port and waits for connections
- When a client connects, data is exchanged with the device's UART
- Everything that client send, is sent to the UART
- Everything that is read from the UART, gets sent to the client
- Multiple clients are allowed
- Live UART console allows to talk to the UART from the web page
- Web UI is hardcoded into the binary and does not need a filesystem
# Screenshots
![](../../uart-bridge/screenshots/dashboard.png) ![](../../uart-bridge/screenshots/dashboard.png)
# Build and flash - See detailed tutorial at https://mongoose.ws/tutorials/esp32/uart-bridge/
Build requires Docker installed, and uses Espressif's ESP-IDF docker image: ## Flash pre-built firmware
```sh
make build
make flash PORT=/dev/YOURSERIAL
```
# Flash pre-built firmware
You can flash a pre-built firmware to the ESP32 device using the following You can flash a pre-built firmware to the ESP32 device using the following
instructions: instructions:
+3 -2
View File
@@ -2,8 +2,9 @@
static void cli_wifi(const char *ssid, const char *pass) { static void cli_wifi(const char *ssid, const char *pass) {
if (wifi_init(ssid, pass)) { if (wifi_init(ssid, pass)) {
mg_file_printf(&mg_fs_posix, WIFI_FILE, "{%Q:%Q,%Q:%Q}\n", "ssid", ssid, mg_file_printf(&mg_fs_posix, WIFI_FILE, "{%m:%m,%m:%m}\n", mg_print_esc, 0,
"pass", pass); "ssid", mg_print_esc, 0, ssid, mg_print_esc, 0, "pass",
mg_print_esc, 0, pass);
MG_INFO(("Reboot now")); MG_INFO(("Reboot now"));
} }
} }
-22
View File
@@ -1,22 +0,0 @@
# An example ESP8266 application
To build this application, follow these steps:
1. Make sure you have Docker installed
2. Clone whole mongoose repository on your machine:
```sh
git clone https://github.com/cesanta/mongoose.git
```
3. Start command line or terminal, and go into the example's directory:
```sh
cd mongoose/examples/esp8266
```
4. Run `make`. This invokes a Docker-based build. A firmware will be built
in the `src/build/` directory:
```sh
make build
```
5. Flash your ESP8266. If you have esptool.py installed, the build process will end telling you the command to flash your device. You can just run `make` again to use Docker:
```sh
make flash PORT=/your/serial
```
@@ -1,5 +1,5 @@
THISDIR = $(realpath $(CURDIR)) THISDIR = $(realpath $(CURDIR))
ROOTDIR = $(realpath $(CURDIR)/../..) ROOTDIR = $(realpath $(CURDIR)/../../..)
DOCKER ?= docker run --rm $(DA) -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) docker.io/mdashnet/8266 DOCKER ?= docker run --rm $(DA) -v $(ROOTDIR):$(ROOTDIR) -w $(THISDIR) docker.io/mdashnet/8266
CMD ?= make -C src defconfig app CMD ?= make -C src defconfig app
PORT ?= /dev/ttyUSB0 PORT ?= /dev/ttyUSB0
@@ -41,6 +41,5 @@ monitor: build
.PHONY: build .PHONY: build
clean: clean:
clean: CMD = rm -rf src/build test -d src/build && $(DOCKER) rm -rf src/build || true
clean: build
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/esp8266/http-client-server/
@@ -7,4 +7,4 @@
# please read the ESP-IDF documents if you need to do this. # please read the ESP-IDF documents if you need to do this.
# #
COMPONENT_INCLUDES += ../../../../.. COMPONENT_INCLUDES += ../../../../../..
@@ -0,0 +1 @@
../../../../../mongoose.c
@@ -0,0 +1,524 @@
#
# Automatically generated file. DO NOT EDIT.
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
#
CONFIG_IDF_TARGET_ESP8266=y
CONFIG_IDF_TARGET="esp8266"
#
# SDK tool configuration
#
CONFIG_SDK_TOOLPREFIX="xtensa-lx106-elf-"
CONFIG_SDK_PYTHON="python"
# CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES is not set
CONFIG_BOOTLOADER_INIT_SPI_FLASH=y
# CONFIG_BOOTLOADER_DISABLE_JTAG_IO is not set
# CONFIG_BOOTLOADER_FAST_BOOT is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set
CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y
# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set
CONFIG_LOG_BOOTLOADER_LEVEL=3
# CONFIG_BOOTLOADER_APP_TEST is not set
CONFIG_BOOTLOADER_STORE_OFFSET=0x0
CONFIG_ESPTOOLPY_PORT="/dev/ttyACM0"
CONFIG_ESPTOOLPY_BAUD_115200B=y
# CONFIG_ESPTOOLPY_BAUD_230400B is not set
# CONFIG_ESPTOOLPY_BAUD_921600B is not set
# CONFIG_ESPTOOLPY_BAUD_2MB is not set
# CONFIG_ESPTOOLPY_BAUD_OTHER is not set
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_BAUD=115200
CONFIG_ESPTOOLPY_COMPRESSED=y
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
CONFIG_ESPTOOLPY_FLASHMODE="dio"
CONFIG_SPI_FLASH_MODE=0x0
# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
CONFIG_SPI_FLASH_FREQ=0x0
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_SPI_FLASH_SIZE=0x400000
CONFIG_ESPTOOLPY_BEFORE_RESET=y
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_HARD_RESET=y
# CONFIG_ESPTOOLPY_AFTER_SOFT_RESET is not set
# CONFIG_ESPTOOLPY_AFTER_NORESET is not set
CONFIG_ESPTOOLPY_AFTER="hard_reset"
# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_74880B is not set
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set
CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=74880
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
CONFIG_PARTITION_TABLE_SINGLE_APP=y
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
# CONFIG_PARTITION_TABLE_CUSTOM is not set
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
# CONFIG_COMPILER_CXX_EXCEPTIONS is not set
CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set
# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set
# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set
# CONFIG_COMPILER_STACK_CHECK is not set
# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set
CONFIG_APP_UPDATE_CHECK_APP_SUM=y
# CONFIG_APP_UPDATE_CHECK_APP_HASH is not set
CONFIG_APP_COMPILE_TIME_DATE=y
# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set
# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set
# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set
# CONFIG_ENABLE_COAP is not set
CONFIG_ESP_TLS_USING_MBEDTLS=y
# CONFIG_ESP_TLS_USING_WOLFSSL is not set
# CONFIG_ESP_TLS_SERVER is not set
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
# CONFIG_ESP_WOLFSSL_INTERNAL is not set
# CONFIG_WOLFSSL_DEBUG is not set
CONFIG_ESP8266_NMI_WDT=y
# CONFIG_ESP8266_XTAL_FREQ_40 is not set
CONFIG_ESP8266_XTAL_FREQ_26=y
CONFIG_ESP8266_XTAL_FREQ=26
# CONFIG_ESP8266_DEFAULT_CPU_FREQ_80 is not set
CONFIG_ESP8266_DEFAULT_CPU_FREQ_160=y
CONFIG_ESP8266_DEFAULT_CPU_FREQ_MHZ=160
CONFIG_ESP_FILENAME_MACRO_NO_PATH=y
# CONFIG_ESP_FILENAME_MACRO_RAW is not set
# CONFIG_ESP_FILENAME_MACRO_NULL is not set
CONFIG_USING_NEW_ETS_VPRINTF=y
# CONFIG_LINK_ETS_PRINTF_TO_IRAM is not set
CONFIG_ETS_PRINTF_EXIT_WHEN_FLASH_RW=y
# CONFIG_SOC_FULL_ICACHE is not set
CONFIG_SOC_IRAM_SIZE=0xC000
# CONFIG_DISABLE_ROM_UART_PRINT is not set
# CONFIG_ESP_PANIC_PRINT_HALT is not set
CONFIG_ESP_PANIC_PRINT_REBOOT=y
# CONFIG_ESP_PANIC_SILENT_REBOOT is not set
# CONFIG_ESP_PANIC_GDBSTUB is not set
CONFIG_RESET_REASON=y
CONFIG_WIFI_PPT_TASKSTACK_SIZE=5120
CONFIG_ESP8266_CORE_GLOBAL_DATA_LINK_IRAM=y
# CONFIG_ESP8266_OTA_FROM_OLD is not set
# CONFIG_ESP8266_BOOT_COPY_APP is not set
CONFIG_ESP8266_TIME_SYSCALL_USE_FRC1=y
# CONFIG_ESP8266_TIME_SYSCALL_USE_NONE is not set
# CONFIG_PM_ENABLE is not set
CONFIG_SCAN_AP_MAX=99
CONFIG_WIFI_TX_RATE_SEQUENCE_FROM_HIGH=y
# CONFIG_ESP8266_WIFI_QOS_ENABLED is not set
# CONFIG_ESP8266_WIFI_AMPDU_RX_ENABLED is not set
# CONFIG_ESP8266_WIFI_AMSDU_ENABLED is not set
CONFIG_ESP8266_WIFI_RX_BUFFER_NUM=16
CONFIG_ESP8266_WIFI_LEFT_CONTINUOUS_RX_BUFFER_NUM=16
CONFIG_ESP8266_WIFI_RX_PKT_NUM=7
CONFIG_ESP8266_WIFI_TX_PKT_NUM=6
CONFIG_ESP8266_WIFI_NVS_ENABLED=y
CONFIG_ESP8266_WIFI_CONNECT_OPEN_ROUTER_WHEN_PWD_IS_SET=y
CONFIG_ESP8266_WIFI_ENABLE_WPA3_SAE=y
# CONFIG_ESP8266_WIFI_DEBUG_LOG_ENABLE is not set
CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y
# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set
CONFIG_ESP_PHY_INIT_DATA_VDD33_CONST=33
CONFIG_ESP8266_PHY_MAX_WIFI_TX_POWER=20
# CONFIG_ESP8266_HSPI_HIGH_THROUGHPUT is not set
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2048
CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584
CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
# CONFIG_ESP_CONSOLE_UART_NONE is not set
CONFIG_ESP_CONSOLE_UART_NUM=0
CONFIG_ESP_CONSOLE_UART_BAUDRATE=74880
# CONFIG_ESP_UART0_SWAP_IO is not set
CONFIG_ESP_TASK_WDT=y
CONFIG_ESP_TASK_WDT_PANIC=y
# CONFIG_ESP_TASK_WDT_TIMEOUT_13N is not set
# CONFIG_ESP_TASK_WDT_TIMEOUT_14N is not set
CONFIG_ESP_TASK_WDT_TIMEOUT_15N=y
CONFIG_ESP_TASK_WDT_TIMEOUT_S=15
# CONFIG_ESP_EVENT_LOOP_PROFILING is not set
CONFIG_ESP_EVENT_POST_FROM_ISR=y
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set
CONFIG_HTTP_BUF_SIZE=512
CONFIG_HTTPD_MAX_REQ_HDR_LEN=512
CONFIG_HTTPD_MAX_URI_LEN=512
CONFIG_OTA_BUF_SIZE=256
# CONFIG_OTA_ALLOW_HTTP is not set
# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set
CONFIG_FATFS_CODEPAGE_437=y
# CONFIG_FATFS_CODEPAGE_720 is not set
# CONFIG_FATFS_CODEPAGE_737 is not set
# CONFIG_FATFS_CODEPAGE_771 is not set
# CONFIG_FATFS_CODEPAGE_775 is not set
# CONFIG_FATFS_CODEPAGE_850 is not set
# CONFIG_FATFS_CODEPAGE_852 is not set
# CONFIG_FATFS_CODEPAGE_855 is not set
# CONFIG_FATFS_CODEPAGE_857 is not set
# CONFIG_FATFS_CODEPAGE_860 is not set
# CONFIG_FATFS_CODEPAGE_861 is not set
# CONFIG_FATFS_CODEPAGE_862 is not set
# CONFIG_FATFS_CODEPAGE_863 is not set
# CONFIG_FATFS_CODEPAGE_864 is not set
# CONFIG_FATFS_CODEPAGE_865 is not set
# CONFIG_FATFS_CODEPAGE_866 is not set
# CONFIG_FATFS_CODEPAGE_869 is not set
# CONFIG_FATFS_CODEPAGE_932 is not set
# CONFIG_FATFS_CODEPAGE_936 is not set
# CONFIG_FATFS_CODEPAGE_949 is not set
# CONFIG_FATFS_CODEPAGE_950 is not set
CONFIG_FATFS_CODEPAGE=437
CONFIG_FATFS_LFN_NONE=y
# CONFIG_FATFS_LFN_HEAP is not set
# CONFIG_FATFS_LFN_STACK is not set
CONFIG_FATFS_FS_LOCK=0
CONFIG_FATFS_TIMEOUT_MS=10000
CONFIG_FATFS_PER_FILE_CACHE=y
CONFIG_FMB_COMM_MODE_TCP_EN=y
CONFIG_FMB_TCP_PORT_DEFAULT=502
CONFIG_FMB_TCP_PORT_MAX_CONN=5
CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150
CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200
CONFIG_FMB_QUEUE_LENGTH=20
CONFIG_FMB_PORT_TASK_STACK_SIZE=4096
CONFIG_FMB_SERIAL_BUF_SIZE=256
CONFIG_FMB_PORT_TASK_PRIO=10
CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y
CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233
CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20
CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
CONFIG_FMB_CONTROLLER_STACK_SIZE=4096
CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20
CONFIG_FMB_TIMER_GROUP=0
CONFIG_FMB_TIMER_INDEX=0
# CONFIG_FMB_TIMER_ISR_IN_IRAM is not set
# CONFIG_DISABLE_FREERTOS is not set
CONFIG_FREERTOS_UNICORE=y
# CONFIG_FREERTOS_ENABLE_REENT is not set
CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF
CONFIG_FREERTOS_HZ=100
CONFIG_FREERTOS_MAX_HOOK=2
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024
CONFIG_FREERTOS_ISR_STACKSIZE=512
# CONFIG_FREERTOS_EXTENED_HOOKS is not set
CONFIG_FREERTOS_GLOBAL_DATA_LINK_IRAM=y
# CONFIG_FREERTOS_CODE_LINK_TO_IRAM is not set
CONFIG_FREERTOS_TIMER_STACKSIZE=2048
CONFIG_TASK_SWITCH_FASTER=y
# CONFIG_USE_QUEUE_SETS is not set
# CONFIG_ENABLE_FREERTOS_SLEEP is not set
# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
# CONFIG_HEAP_DISABLE_IRAM is not set
# CONFIG_HEAP_TRACING is not set
CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_COLORS=y
# CONFIG_LOG_SET_LEVEL is not set
CONFIG_LWIP_LOCAL_HOSTNAME="espressif"
CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# CONFIG_LWIP_L2_TO_L3_COPY is not set
# CONFIG_LWIP_IRAM_OPTIMIZATION is not set
CONFIG_LWIP_TIMERS_ONDEMAND=y
CONFIG_LWIP_MAX_SOCKETS=10
# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set
# CONFIG_LWIP_SO_LINGER is not set
CONFIG_LWIP_SO_REUSE=y
CONFIG_LWIP_SO_REUSE_RXTOALL=y
# CONFIG_LWIP_SO_RCVBUF is not set
# CONFIG_LWIP_NETBUF_RECVINFO is not set
CONFIG_LWIP_IP4_FRAG=y
CONFIG_LWIP_IP6_FRAG=y
# CONFIG_LWIP_IP4_REASSEMBLY is not set
# CONFIG_LWIP_IP6_REASSEMBLY is not set
# CONFIG_LWIP_IP_FORWARD is not set
# CONFIG_LWIP_STATS is not set
# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set
CONFIG_LWIP_ESP_GRATUITOUS_ARP=y
CONFIG_LWIP_GARP_TMR_INTERVAL=60
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
# CONFIG_LWIP_AUTOIP is not set
# CONFIG_LWIP_IPV6_AUTOCONFIG is not set
CONFIG_LWIP_NETIF_LOOPBACK=y
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=6
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880
CONFIG_LWIP_TCP_WND_DEFAULT=5760
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_RTO_TIME=3000
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2048
CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set
CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF
# CONFIG_LWIP_PPP_SUPPORT is not set
CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3
CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5
# CONFIG_LWIP_MULTICAST_PING is not set
# CONFIG_LWIP_BROADCAST_PING is not set
CONFIG_LWIP_MAX_RAW_PCBS=16
# CONFIG_LWIP_IPV6 is not set
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
CONFIG_LWIP_ESP_LWIP_ASSERT=y
# CONFIG_LWIP_DEBUG is not set
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set
# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384
CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096
# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set
# CONFIG_MBEDTLS_DEBUG is not set
CONFIG_MBEDTLS_HAVE_TIME=y
# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set
CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set
# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set
# CONFIG_MBEDTLS_TLS_DISABLED is not set
CONFIG_MBEDTLS_TLS_SERVER=y
CONFIG_MBEDTLS_TLS_CLIENT=y
CONFIG_MBEDTLS_TLS_ENABLED=y
# CONFIG_MBEDTLS_PSK_MODES is not set
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set
CONFIG_MBEDTLS_SSL_ALPN=y
CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y
CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y
CONFIG_MBEDTLS_AES_C=y
# CONFIG_MBEDTLS_CAMELLIA_C is not set
# CONFIG_MBEDTLS_DES_C is not set
CONFIG_MBEDTLS_RC4_DISABLED=y
# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set
# CONFIG_MBEDTLS_RC4_ENABLED is not set
# CONFIG_MBEDTLS_BLOWFISH_C is not set
# CONFIG_MBEDTLS_XTEA_C is not set
CONFIG_MBEDTLS_CCM_C=y
CONFIG_MBEDTLS_GCM_C=y
# CONFIG_MBEDTLS_RIPEMD160_C is not set
CONFIG_MBEDTLS_PEM_PARSE_C=y
CONFIG_MBEDTLS_PEM_WRITE_C=y
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
CONFIG_MBEDTLS_ECP_C=y
CONFIG_MBEDTLS_ECDH_C=y
CONFIG_MBEDTLS_ECDSA_C=y
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
CONFIG_MBEDTLS_ECP_NIST_OPTIM=y
# CONFIG_util_assert is not set
# CONFIG_ESP_SHA is not set
CONFIG_ESP_AES=y
CONFIG_ESP_MD5=y
CONFIG_ESP_ARC4=y
# CONFIG_ENABLE_MDNS is not set
CONFIG_MQTT_PROTOCOL_311=y
CONFIG_MQTT_TRANSPORT_SSL=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y
# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set
# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set
# CONFIG_MQTT_CUSTOM_OUTBOX is not set
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set
CONFIG_NEWLIB_NANO_FORMAT=y
# CONFIG_OPENSSL_DEBUG is not set
CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
# CONFIG_OPENSSL_ASSERT_EXIT is not set
CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5
CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
CONFIG_PTHREAD_STACK_MIN=768
CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread"
CONFIG_SPIFFS_MAX_PARTITIONS=3
CONFIG_SPIFFS_CACHE=y
CONFIG_SPIFFS_CACHE_WR=y
# CONFIG_SPIFFS_CACHE_STATS is not set
CONFIG_SPIFFS_PAGE_CHECK=y
CONFIG_SPIFFS_GC_MAX_RUNS=10
# CONFIG_SPIFFS_GC_STATS is not set
CONFIG_SPIFFS_PAGE_SIZE=256
CONFIG_SPIFFS_OBJ_NAME_LEN=32
CONFIG_SPIFFS_USE_MAGIC=y
CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
CONFIG_SPIFFS_META_LENGTH=4
CONFIG_SPIFFS_USE_MTIME=y
# CONFIG_SPIFFS_DBG is not set
# CONFIG_SPIFFS_API_DBG is not set
# CONFIG_SPIFFS_GC_DBG is not set
# CONFIG_SPIFFS_CACHE_DBG is not set
# CONFIG_SPIFFS_CHECK_DBG is not set
# CONFIG_SPIFFS_TEST_VISUALISATION is not set
CONFIG_IP_LOST_TIMER_INTERVAL=120
CONFIG_TCPIP_ADAPTER_GLOBAL_DATA_LINK_IRAM=y
CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y
CONFIG_VFS_SUPPORT_TERMIOS=y
CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128
# CONFIG_WL_SECTOR_SIZE_512 is not set
CONFIG_WL_SECTOR_SIZE_4096=y
CONFIG_WL_SECTOR_SIZE=4096
# CONFIG_ENABLE_UNIFIED_PROVISIONING is not set
CONFIG_LTM_FAST=y
CONFIG_WPA_MBEDTLS_CRYPTO=y
# CONFIG_WPA_DEBUG_PRINT is not set
# CONFIG_WPA_TESTING_OPTIONS is not set
# CONFIG_WPA_WPS_WARS is not set
# CONFIG_WPA_11KV_SUPPORT is not set
# Deprecated options for backward compatibility
CONFIG_TARGET_PLATFORM="esp8266"
CONFIG_TOOLPREFIX="xtensa-lx106-elf-"
# CONFIG_MAKE_WARN_UNDEFINED_VARIABLES is not set
CONFIG_FLASHMODE_QIO=y
# CONFIG_FLASHMODE_QOUT is not set
# CONFIG_FLASHMODE_DIO is not set
# CONFIG_FLASHMODE_DOUT is not set
# CONFIG_MONITOR_BAUD_9600B is not set
# CONFIG_MONITOR_BAUD_57600B is not set
# CONFIG_MONITOR_BAUD_74880B is not set
CONFIG_MONITOR_BAUD_115200B=y
# CONFIG_MONITOR_BAUD_230400B is not set
# CONFIG_MONITOR_BAUD_921600B is not set
# CONFIG_MONITOR_BAUD_2MB is not set
# CONFIG_MONITOR_BAUD_OTHER is not set
CONFIG_MONITOR_BAUD_OTHER_VAL=74880
CONFIG_MONITOR_BAUD=115200
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
# CONFIG_CXX_EXCEPTIONS is not set
CONFIG_STACK_CHECK_NONE=y
# CONFIG_STACK_CHECK_NORM is not set
# CONFIG_STACK_CHECK_STRONG is not set
# CONFIG_STACK_CHECK_ALL is not set
# CONFIG_STACK_CHECK is not set
# CONFIG_WARN_WRITE_STRINGS is not set
CONFIG_MAIN_TASK_STACK_SIZE=3584
CONFIG_CONSOLE_UART_DEFAULT=y
# CONFIG_CONSOLE_UART_CUSTOM is not set
# CONFIG_CONSOLE_UART_NONE is not set
CONFIG_CONSOLE_UART_NUM=0
CONFIG_CONSOLE_UART_BAUDRATE=74880
# CONFIG_UART0_SWAP_IO is not set
CONFIG_TASK_WDT=y
CONFIG_TASK_WDT_PANIC=y
CONFIG_TASK_WDT_TIMEOUT_S=15
CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150
CONFIG_MB_MASTER_DELAY_MS_CONVERT=200
CONFIG_MB_QUEUE_LENGTH=20
CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096
CONFIG_MB_SERIAL_BUF_SIZE=256
CONFIG_MB_SERIAL_TASK_PRIO=10
CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y
CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233
CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20
CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
CONFIG_MB_CONTROLLER_STACK_SIZE=4096
CONFIG_MB_EVENT_QUEUE_TIMEOUT=20
CONFIG_MB_TIMER_GROUP=0
CONFIG_MB_TIMER_INDEX=0
# CONFIG_L2_TO_L3_COPY is not set
# CONFIG_USE_ONLY_LWIP_SELECT is not set
CONFIG_ESP_GRATUITOUS_ARP=y
CONFIG_GARP_TMR_INTERVAL=60
CONFIG_TCPIP_RECVMBOX_SIZE=32
CONFIG_TCP_MAXRTX=12
CONFIG_TCP_SYNMAXRTX=6
CONFIG_TCP_MSS=1440
CONFIG_TCP_MSL=60000
CONFIG_TCP_SND_BUF_DEFAULT=2880
CONFIG_TCP_WND_DEFAULT=5760
CONFIG_TCP_RECVMBOX_SIZE=6
CONFIG_TCP_QUEUE_OOSEQ=y
# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
CONFIG_TCP_OVERSIZE_MSS=y
# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_TCP_OVERSIZE_DISABLE is not set
CONFIG_UDP_RECVMBOX_SIZE=6
CONFIG_TCPIP_TASK_STACK_SIZE=2048
CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set
CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF
# CONFIG_PPP_SUPPORT is not set
CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5
CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
CONFIG_ESP32_PTHREAD_STACK_MIN=768
CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread"
CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
CONFIG_SUPPORT_TERMIOS=y
# End of deprecated options
-1
View File
@@ -1 +0,0 @@
../../../../mongoose.c
+22 -7
View File
@@ -1,10 +1,25 @@
PROG ?= example PROG ?= example # Program we are building
DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
all: $(PROG) # Mongoose build options. See https://mongoose.ws/documentation/#build-options
$(DEBUGGER) ./$(PROG) #CFLAGS_MONGOOSE += -DMG_ENABLE_LINES
$(PROG): ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
$(CC) ../../mongoose.c -I../.. $(CFLAGS) $(EXTRA) -o $(PROG) main.c PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
endif
clean: all: $(PROG) # Default target. Build and run program
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb log.txt $(RUN) ./$(PROG) $(ARGS)
$(PROG): $(SOURCES) # Build program from sources
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM
+1
View File
@@ -35,6 +35,7 @@ static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
mg_http_serve_dir(c, ev_data, &opts); mg_http_serve_dir(c, ev_data, &opts);
} }
} }
(void) fn_data;
} }
int main(void) { int main(void) {
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+22 -7
View File
@@ -1,10 +1,25 @@
PROG ?= example PROG ?= example # Program we are building
DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
all: $(PROG) # Mongoose build options. See https://mongoose.ws/documentation/#build-options
$(DEBUGGER) ./$(PROG) #CFLAGS_MONGOOSE += -DMG_ENABLE_LINES
$(PROG): ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
$(CC) ../../mongoose.c -I../.. $(CFLAGS) $(EXTRA) -o $(PROG) main.c PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
endif
clean: all: $(PROG) # Default target. Build and run program
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb log.txt $(RUN) ./$(PROG) $(ARGS)
$(PROG): $(SOURCES) # Build program from sources
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM
+1 -1
View File
@@ -23,11 +23,11 @@ static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
mg_http_serve_dir(c, ev_data, &opts); mg_http_serve_dir(c, ev_data, &opts);
} }
} }
(void) fn_data;
} }
int main(void) { int main(void) {
struct mg_mgr mgr; struct mg_mgr mgr;
struct mg_timer t1;
mg_mgr_init(&mgr); mg_mgr_init(&mgr);
mg_log_set(MG_LL_DEBUG); // Set log level mg_log_set(MG_LL_DEBUG); // Set log level
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+22 -7
View File
@@ -1,10 +1,25 @@
PROG ?= example PROG ?= example # Program we are building
DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
all: $(PROG) # Mongoose build options. See https://mongoose.ws/documentation/#build-options
$(DEBUGGER) ./$(PROG) #CFLAGS_MONGOOSE += -DMG_ENABLE_LINES
$(PROG): ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
$(CC) ../../mongoose.c -I../.. $(CFLAGS) $(EXTRA) -o $(PROG) main.c PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
endif
clean: all: $(PROG) # Default target. Build and run program
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb log.txt $(RUN) ./$(PROG) $(ARGS)
$(PROG): $(SOURCES) # Build program from sources
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM
+2 -6
View File
@@ -1,7 +1,7 @@
// Copyright (c) 2020 Cesanta Software Limited // Copyright (c) 2020 Cesanta Software Limited
// All rights reserved // All rights reserved
// //
// Streaming upload example. Demonstrates how to use chunked encoding // Streaming upload example. Demonstrates how to use MG_EV_HTTP_CHUNK events
// to send large payload in smaller chunks. To test, use curl utility: // to send large payload in smaller chunks. To test, use curl utility:
// //
// curl http://localhost:8000/upload?name=a.txt --data-binary @large_file.txt // curl http://localhost:8000/upload?name=a.txt --data-binary @large_file.txt
@@ -22,15 +22,11 @@ static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
MG_INFO(("Last chunk received, sending response")); MG_INFO(("Last chunk received, sending response"));
mg_http_reply(c, 200, "", "ok (chunked)\n"); mg_http_reply(c, 200, "", "ok (chunked)\n");
} }
} else if (ev == MG_EV_HTTP_MSG && mg_http_match_uri(hm, "/upload")) {
MG_INFO(("Got all %lu bytes!", (unsigned long) hm->body.len));
MG_INFO(("Query string: [%.*s]", (int) hm->query.len, hm->query.ptr));
// MG_INFO(("Body:\n%.*s", (int) hm->body.len, hm->body.ptr));
mg_http_reply(c, 200, "", "ok (%lu)\n", (unsigned long) hm->body.len);
} else if (ev == MG_EV_HTTP_MSG) { } else if (ev == MG_EV_HTTP_MSG) {
struct mg_http_serve_opts opts = {.root_dir = "web_root"}; struct mg_http_serve_opts opts = {.root_dir = "web_root"};
mg_http_serve_dir(c, hm, &opts); mg_http_serve_dir(c, hm, &opts);
} }
(void) fn_data;
} }
int main(void) { int main(void) {
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
@@ -32,21 +32,22 @@
<div id="wrapper"> <div id="wrapper">
<input type="file" id="el1" style="display: none"/> <input type="file" id="el1" style="display: none"/>
<button id="el2">choose file...</button> <button id="el2">choose file...</button>
<span>Selected file:</span> <span id="el4"></span> <br/>
<button id="el5" style="margin: 0.5em 0;" disabled>upload file</button>
<div id="el3" style="margin-top: 1em;"></div> <div id="el3" style="margin-top: 1em;"></div>
</div> </div>
</div> </div>
</body> </body>
<script> <script>
var f; // selected file
// When user clicks on a button, trigger file selection dialog // When user clicks on a button, trigger file selection dialog
document.getElementById('el2').onclick = function(ev) { document.getElementById('el2').onclick = function(ev) {
document.getElementById('el1').click(); document.getElementById('el1').click();
}; };
// If user selected a file, read it into memory and trigger sendFileData() document.getElementById('el5').onclick = function(ev) {
document.getElementById('el1').onchange = function(ev) { var r = new FileReader();
if (!ev.target.files[0]) return;
var f = ev.target.files[0], r = new FileReader();
r.readAsArrayBuffer(f); r.readAsArrayBuffer(f);
r.onload = function() { r.onload = function() {
ev.target.value = ''; ev.target.value = '';
@@ -60,5 +61,13 @@
}; };
}; };
// If user selected a file, read it into memory and trigger sendFileData()
document.getElementById('el1').onchange = function(ev) {
f = ev.target.files[0];
if (!f) return;
document.getElementById('el4').innerText = f.name;
document.getElementById('el5').removeAttribute('disabled');
};
</script> </script>
</html> </html>
+24 -33
View File
@@ -1,41 +1,32 @@
PROG ?= example PROG ?= example # Program we are building
ROOT ?= $(realpath $(CURDIR)/../..) DELETE = rm -rf # Command to remove files
CFLAGS ?= -DMG_ENABLE_LINES $(EXTRA_CFLAGS) OUT ?= -o $(PROG) # Compiler argument for output file
LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2 SOURCES = main.c mongoose.c # Source code files
SSL = ? CFLAGS = -W -Wall -Wextra -g -I. # Build options
ifeq "$(SSL)" "MBEDTLS" # Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
MAKE += WINDOWS=1 CC=$(CC)
endif endif
ifeq "$(SSL)" "OPENSSL" all: $(PROG) # Default target. Build and run program
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto
endif
all: $(PROG)
$(RUN) ./$(PROG) $(ARGS) $(RUN) ./$(PROG) $(ARGS)
$(PROG): main.c $(PROG): $(SOURCES) # Build program from sources
$(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) -o $(PROG) main.c $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
linux: all clean: # Cleanup. Delete built program and all build artifacts
linux: CFLAGS += -O2 -g -fsanitize=address,undefined,shift,null,return,bounds,alignment,object-size,bool,enum -static-libasan $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM mbedtls
linux: CC = $(LIN) cc
linux: RUN = $(LIN)
# see https://mongoose.ws/tutorials/tls/#how-to-build for TLS build options
ROOT ?= $(realpath $(CURDIR)/../..) mbedtls: # Pull and build mbedTLS library
DOCKER = docker run -it --rm -e Tmp=. -e WINEDEBUG=-all -v $(ROOT):$(ROOT) -w $(CURDIR) git clone --depth 1 -b v2.28.2 https://github.com/mbed-tls/mbedtls $@
WDEFS = -DMG_ENABLE_MBEDTLS -DMG_ENABLE_LINES -Imbedtls/include -Imbedtls/library $(EXTRA) $(MAKE) -C mbedtls/library
WFLAGS = /nologo -O2 -I. -I../.. ws2_32.lib advapi32.lib /link /out:$(PROG).exe
WSRCS = ../../mongoose.c main.c mbedtls/library/*.c
$(PROG).exe: main.c mbedtls
$(DOCKER) mdashnet/vc2017 wine cl $(WSRCS) $(WDEFS) $(WFLAGS)
vc2017: ARGS = https://cesanta.com
vc2017: $(PROG).exe
$(DOCKER) mdashnet/vc2017 wine $(PROG).exe $(ARGS)
mbedtls:
git clone --depth 1 -b v3.1.0 https://github.com/ARMmbed/mbedtls
clean:
rm -rf $(PROG) _CL* *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb mbedtls
+4 -4
View File
@@ -5,7 +5,7 @@
// print the response and exit. // print the response and exit.
// You can change `s_url` from the command line by executing: ./example YOUR_URL // You can change `s_url` from the command line by executing: ./example YOUR_URL
// //
// To enable SSL/TLS, make SSL=OPENSSL or make SSL=MBEDTLS // To enable SSL/TLS, , see https://mongoose.ws/tutorials/tls/#how-to-build
#include "mongoose.h" #include "mongoose.h"
@@ -17,10 +17,10 @@ static const uint64_t s_timeout_ms = 1500; // Connect timeout in milliseconds
// Print HTTP response and signal that we're done // Print HTTP response and signal that we're done
static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) { static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (ev == MG_EV_OPEN) { if (ev == MG_EV_OPEN) {
// Connection created. Store connect expiration time in c->label // Connection created. Store connect expiration time in c->data
*(uint64_t *) c->label = mg_millis() + s_timeout_ms; *(uint64_t *) c->data = mg_millis() + s_timeout_ms;
} else if (ev == MG_EV_POLL) { } else if (ev == MG_EV_POLL) {
if (mg_millis() > *(uint64_t *) c->label && if (mg_millis() > *(uint64_t *) c->data &&
(c->is_connecting || c->is_resolving)) { (c->is_connecting || c->is_resolving)) {
mg_error(c, "Connect timeout"); mg_error(c, "Connect timeout");
} }
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+28 -14
View File
@@ -1,21 +1,35 @@
PROG ?= example PROG ?= example # Program we are building
ARGS ?= 167.235.63.238:3128 http://info.cern.ch/ DELETE = rm -rf # Command to remove files
SSL = ? OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
ifeq "$(SSL)" "MBEDTLS" # Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 #CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1
// see tutorial at https://mongoose.ws/tutorials/http-proxy-client/
ARGS ?= 167.235.63.238:3128 http://info.cern.ch/ # default call arguments
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
MAKE += WINDOWS=1 CC=$(CC)
endif endif
ifeq "$(SSL)" "OPENSSL" all: $(PROG) # Default target. Build and run program
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto $(RUN) ./$(PROG) $(ARGS)
endif
all: $(PROG) $(PROG): $(SOURCES) # Build program from sources
$(DEBUGGER) ./$(PROG) $(ARGS) $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM mbedtls
$(PROG): main.c # see https://mongoose.ws/tutorials/tls/#how-to-build for TLS build options
$(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c
clean: mbedtls: # Pull and build mbedTLS library
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb git clone --depth 1 -b v2.28.2 https://github.com/mbed-tls/mbedtls $@
$(MAKE) -C mbedtls/library
+1
View File
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/http-proxy-client/
+1 -1
View File
@@ -5,7 +5,7 @@
// make // make
// ./example PROXY:PORT http://www.ladyada.net // ./example PROXY:PORT http://www.ladyada.net
// //
// To enable SSL/TLS, make SSL=OPENSSL or make SSL=MBEDTLS // To enable SSL/TLS, see https://mongoose.ws/tutorials/tls/#how-to-build
// //
#include "mongoose.h" #include "mongoose.h"
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+26 -14
View File
@@ -1,20 +1,32 @@
PROG ?= example PROG ?= example # Program we are building
CFLAGS ?= -W -Wall -DMG_ENABLE_LINES=1 DELETE = rm -rf # Command to remove files
SSL = ? OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
ifeq "$(SSL)" "MBEDTLS" # Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
MAKE += WINDOWS=1 CC=$(CC)
endif endif
ifeq "$(SSL)" "OPENSSL" all: $(PROG) # Default target. Build and run program
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto $(RUN) ./$(PROG) $(ARGS)
endif
all: $(PROG) $(PROG): $(SOURCES) # Build program from sources
$(DEBUGGER) ./$(PROG) $(ARGS) $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
$(PROG): main.c clean: # Cleanup. Delete built program and all build artifacts
$(CC) ../../mongoose.c -I../.. $(CFLAGS) $(EFLAGS) -o $(PROG) main.c $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM mbedtls
clean: # see https://mongoose.ws/tutorials/tls/#how-to-build for TLS build options
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb
mbedtls: # Pull and build mbedTLS library
git clone --depth 1 -b v2.28.2 https://github.com/mbed-tls/mbedtls $@
$(MAKE) -C mbedtls/library
+1
View File
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/http-server/
+3 -5
View File
@@ -9,7 +9,7 @@
// any other URI serves static files from s_root_dir // any other URI serves static files from s_root_dir
// //
// To enable SSL/TLS (using self-signed certificates in PEM files), // To enable SSL/TLS (using self-signed certificates in PEM files),
// 1. make SSL=OPENSSL or make SSL=MBEDTLS // 1. See https://mongoose.ws/tutorials/tls/#how-to-build
// 2. curl -k https://127.0.0.1:8443 // 2. curl -k https://127.0.0.1:8443
#include "mongoose.h" #include "mongoose.h"
@@ -35,14 +35,12 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
mg_printf(c, "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n"); mg_printf(c, "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n");
mg_http_printf_chunk(c, "ID PROTO TYPE LOCAL REMOTE\n"); mg_http_printf_chunk(c, "ID PROTO TYPE LOCAL REMOTE\n");
for (struct mg_connection *t = c->mgr->conns; t != NULL; t = t->next) { for (struct mg_connection *t = c->mgr->conns; t != NULL; t = t->next) {
char loc[40], rem[40]; mg_http_printf_chunk(c, "%-3lu %4s %s %M %M\n", t->id,
mg_http_printf_chunk(c, "%-3lu %4s %s %-15s %s\n", t->id,
t->is_udp ? "UDP" : "TCP", t->is_udp ? "UDP" : "TCP",
t->is_listening ? "LISTENING" t->is_listening ? "LISTENING"
: t->is_accepted ? "ACCEPTED " : t->is_accepted ? "ACCEPTED "
: "CONNECTED", : "CONNECTED",
mg_straddr(&t->loc, loc, sizeof(loc)), mg_print_ip, &t->loc, mg_print_ip, &t->rem);
mg_straddr(&t->rem, rem, sizeof(rem)));
} }
mg_http_printf_chunk(c, ""); // Don't forget the last empty chunk mg_http_printf_chunk(c, ""); // Don't forget the last empty chunk
} else if (mg_http_match_uri(hm, "/api/f2/*")) { } else if (mg_http_match_uri(hm, "/api/f2/*")) {
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+25 -14
View File
@@ -1,21 +1,32 @@
PROG ?= example PROG ?= example # Program we are building
CFLAGS ?= -DMG_IO_SIZE=128 DELETE = rm -rf # Command to remove files
SSL = ? OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
ifeq "$(SSL)" "MBEDTLS" # Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -lmbedtls -lmbedcrypto -lmbedx509 CFLAGS_MONGOOSE += -DMG_IO_SIZE=128 -DMG_ENABLE_LINES=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
MAKE += WINDOWS=1 CC=$(CC)
endif endif
ifeq "$(SSL)" "OPENSSL" all: $(PROG) # Default target. Build and run program
CFLAGS += -DMG_ENABLE_OPENSSL=1 -lssl -lcrypto $(RUN) ./$(PROG) $(ARGS)
endif
all: $(PROG) $(PROG): $(SOURCES) # Build program from sources
$(DEBUGGER) ./$(PROG) $(ARGS) $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM mbedtls
$(PROG): main.c # see https://mongoose.ws/tutorials/tls/#how-to-build for TLS build options
$(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) $(EXTRA_CFLAGS) -o $(PROG) main.c
clean: mbedtls: # Pull and build mbedTLS library
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb git clone --depth 1 -b v2.28.2 https://github.com/mbed-tls/mbedtls $@
$(MAKE) -C mbedtls/library
+1
View File
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/http-reverse-proxy/
+5 -4
View File
@@ -5,18 +5,18 @@
// 1. Run `make`. This builds and starts a proxy on port 8000 // 1. Run `make`. This builds and starts a proxy on port 8000
// 2. Start your browser, go to https://localhost:8000 // 2. Start your browser, go to https://localhost:8000
// //
// To enable SSL/TLS, add SSL=OPENSSL or SSL=MBEDTLS // To enable SSL/TLS, see https://mongoose.ws/tutorials/tls/#how-to-build
#include "mongoose.h"
static const char *s_backend_url = static const char *s_backend_url =
#if defined(MG_ENABLE_MBEDTLS) || defined(MG_ENABLE_OPENSSL) #if MG_ENABLE_MBEDTLS || MG_ENABLE_OPENSSL
"https://cesanta.com"; "https://cesanta.com";
#else #else
"http://info.cern.ch"; "http://info.cern.ch";
#endif #endif
static const char *s_listen_url = "http://localhost:8000"; static const char *s_listen_url = "http://localhost:8000";
#include "mongoose.h"
// Forward client request to the backend connection, rewriting the Host header // Forward client request to the backend connection, rewriting the Host header
static void forward_request(struct mg_http_message *hm, static void forward_request(struct mg_http_message *hm,
struct mg_connection *c) { struct mg_connection *c) {
@@ -64,6 +64,7 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
} }
c->fn_data = c2; c->fn_data = c2;
forward_request(hm, c2); forward_request(hm, c2);
c->is_resp = 0; // process further msgs in keep-alive connection
c2->is_hexdumping = 1; c2->is_hexdumping = 1;
} }
} else if (ev == MG_EV_CLOSE) { } else if (ev == MG_EV_CLOSE) {
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+22 -22
View File
@@ -1,26 +1,26 @@
PROG ?= example PROG ?= example # Program we are building
ROOT ?= $(realpath $(CURDIR)/../..) DELETE = rm -rf # Command to remove files
DEFS ?= -DMG_ENABLE_LINES=1 -DMG_ENABLE_IPV6=1 -DMG_ENABLE_SSI=1 OUT ?= -o $(PROG) # Compiler argument for output file
CFLAGS ?= -I../.. -W -Wall $(DEFS) $(EXTRA) SOURCES = main.c mongoose.c # Source code files
VCFLAGS = /nologo /W3 /O2 /I../.. $(DEFS) $(EXTRA) /link /incremental:no /machine:IX86 CFLAGS = -W -Wall -Wextra -g -I. # Build options
VC98 = docker run -it --rm -e Tmp=. -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/vc98
LIN = docker run -it --rm -v $(ROOT):$(ROOT) -w $(CURDIR) mdashnet/cc2
all: $(PROG) # Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_HTTP_DIRLIST_TIME_FMT="%Y/%m/%d %H:%M:%S"
CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_ENABLE_IPV6=1 -DMG_ENABLE_SSI=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
endif
all: $(PROG) # Default target. Build and run program
$(RUN) ./$(PROG) $(ARGS) $(RUN) ./$(PROG) $(ARGS)
$(PROG): main.c Makefile $(PROG): $(SOURCES) # Build program from sources
$(CC) ../../mongoose.c main.c -I../.. $(CFLAGS) -o $@ $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
mongoose.exe: main.c clean: # Cleanup. Delete built program and all build artifacts
$(VC98) wine cl ../../mongoose.c main.c $(VCFLAGS) ws2_32.lib /out:$@ $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM
mingw:
gcc ../../mongoose.c main.c -I../.. -W -Wall -DMG_ENABLE_IPV6=1 -DMG_ENABLE_LINES=1 -D_POSIX_C_SOURCE=200000L -lws2_32 -o mongoose.exe
linux: example
#linux: CFLAGS += -O2 -fsanitize=address,undefined,shift,null,return,bounds,alignment,object-size,bool,enum -static-libasan
linux: CC = $(LIN) cc
clean:
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb mongoose mongoose_* mongoose.*
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+25 -15
View File
@@ -1,22 +1,32 @@
PROG ?= example PROG ?= example # Program we are building
CFLAGS ?= -DMG_ENABLE_LINES $(EXTRA) DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
ifneq ($(MBEDTLS),) # Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS += -DMG_ENABLE_MBEDTLS=1 -I$(MBEDTLS)/include -I/usr/include CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1
CFLAGS += -L$(MBEDTLS)/lib -lmbedtls -lmbedcrypto -lmbedx509
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
MAKE += WINDOWS=1 CC=$(CC)
endif endif
ifneq ($(OPENSSL),) all: $(PROG) # Default target. Build and run program
CFLAGS += -DMG_ENABLE_OPENSSL=1 -I$(OPENSSL)/include $(RUN) ./$(PROG) $(ARGS)
CFLAGS += -L$(OPENSSL)/lib -lssl -lcrypto
endif
all: $(PROG) $(PROG): $(SOURCES) # Build program from sources
$(DEBUGGER) ./$(PROG) $(ARGS) $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) *.o *.obj *.exe *.dSYM mbedtls
$(PROG): main.c # see https://mongoose.ws/tutorials/tls/#how-to-build for TLS build options
$(CC) ../../mongoose.c -I../.. -W -Wall $(CFLAGS) -o $(PROG) main.c
clean: mbedtls: # Pull and build mbedTLS library
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb git clone --depth 1 -b v2.28.2 https://github.com/mbed-tls/mbedtls $@
$(MAKE) -C mbedtls/library
+1 -3
View File
@@ -9,9 +9,7 @@
// //
// You can change `s_url` from the command line by executing: ./example YOUR_URL // You can change `s_url` from the command line by executing: ./example YOUR_URL
// //
// To enable SSL/TLS for this client, build it like this: // To enable SSL/TLS, see https://mongoose.ws/tutorials/tls/#how-to-build
// make MBEDTLS=/path/to/your/mbedtls/installation
// make OPENSSL=/path/to/your/openssl/installation
#include "mongoose.h" #include "mongoose.h"
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
+21 -7
View File
@@ -1,11 +1,25 @@
PROG ?= example PROG ?= example # Program we are building
CFLAGS ?= -W -Wall -Wextra -O0 -g DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
all: $(PROG) # Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
OUT ?= -o $(PROG) # Build output
endif
all: $(PROG) # Default target. Build and run program
$(RUN) ./$(PROG) $(ARGS) $(RUN) ./$(PROG) $(ARGS)
$(PROG): main.c $(PROG): $(SOURCES) # Build program from sources
$(CC) ../../mongoose.c -I../.. -W -Wall -DMG_ENABLE_LINES=1 $(CFLAGS) -o $(PROG) main.c $(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: clean: # Cleanup. Delete built program and all build artifacts
rm -rf $(PROG) *.o *.dSYM *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb $(DELETE) $(PROG) *.o *.obj *.exe *.dSYM
+1
View File
@@ -0,0 +1 @@
See detailed tutorial at https://mongoose.ws/tutorials/huge-response/
+5 -4
View File
@@ -52,12 +52,13 @@ static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
if (version > 0 && version != s_version) { if (version > 0 && version != s_version) {
// Version mismatch: s_data has changed while client fetches it // Version mismatch: s_data has changed while client fetches it
// Tell client to restart // Tell client to restart
mg_http_reply(c, 200, headers, "{%Q:%Q, %Q:%ld}", "error", mg_http_reply(c, 200, headers, "{%m:%m, %m:%ld}", MG_ESC("error"),
"wrong version", "version", version); MG_ESC("wrong version"), MG_ESC("version"), version);
} else { } else {
// Return data, up to CHUNK_SIZE elements // Return data, up to CHUNK_SIZE elements
mg_http_reply(c, 200, headers, "{%Q:%ld,%Q:%ld,%Q:[%M]}", "version", mg_http_reply(c, 200, headers, "{%m:%ld,%m:%ld,%m:[%M]}",
s_version, "start", start, "data", printdata, start); MG_ESC("version"), s_version, MG_ESC("start"), start,
MG_ESC("data"), printdata, start);
} }
} else { } else {
struct mg_http_serve_opts opts = {0}; struct mg_http_serve_opts opts = {0};
+1
View File
@@ -0,0 +1 @@
../../mongoose.c
+1
View File
@@ -0,0 +1 @@
../../mongoose.h
Loaded 100 of 1607 files, more files were not shown because too many files have changed in this diff. Show more