mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
mongoose.h 6.17
This commit is contained in:
commit
af1aff7fbb
20 files changed
+469
-1300
No files matched your search
+32
-505
@@ -1,9 +1,6 @@
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_common.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2004-2013 Sergey Lyubka
|
||||
* Copyright (c) 2013-2015 Cesanta Software Limited
|
||||
* Copyright (c) 2013-2020 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* This software is dual-licensed: you can redistribute it and/or modify
|
||||
@@ -20,10 +17,17 @@
|
||||
* license, as set out in <https://www.cesanta.com/license>.
|
||||
*/
|
||||
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_common.h"
|
||||
#endif
|
||||
#ifndef CS_MONGOOSE_SRC_COMMON_H_
|
||||
#define CS_MONGOOSE_SRC_COMMON_H_
|
||||
|
||||
<<<<<<< HEAD
|
||||
#define MG_VERSION "6.16"
|
||||
=======
|
||||
#define MG_VERSION "6.17"
|
||||
>>>>>>> origin/dev
|
||||
|
||||
/* Local tweaks, applied before any of Mongoose's own headers. */
|
||||
#ifdef MG_LOCALS
|
||||
@@ -510,22 +514,6 @@ typedef struct stat cs_stat_t;
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_esp32.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_ESP32_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_ESP32_H_
|
||||
@@ -567,22 +555,6 @@ typedef struct stat cs_stat_t;
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_esp8266.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_ESP8266_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_ESP8266_H_
|
||||
@@ -640,22 +612,6 @@ typedef struct stat cs_stat_t;
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_cc3100.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_CC3100_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_CC3100_H_
|
||||
@@ -701,22 +657,6 @@ int inet_pton(int af, const char *src, void *dst);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_cc3200.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_CC3200_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_CC3200_H_
|
||||
@@ -838,22 +778,6 @@ int stat(const char *pathname, struct stat *st);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_cc3220.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_CC3220_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_CC3220_H_
|
||||
@@ -962,22 +886,6 @@ int stat(const char *pathname, struct stat *st);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_msp432.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_MSP432_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_MSP432_H_
|
||||
@@ -1082,22 +990,6 @@ int _stat(const char *pathname, struct stat *st);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_tm4c129.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_TM4C129_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_TM4C129_H_
|
||||
@@ -1154,22 +1046,6 @@ typedef struct stat cs_stat_t;
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_mbed.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_MBED_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_MBED_H_
|
||||
@@ -1250,22 +1126,6 @@ in_addr_t inet_addr(const char *cp);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_nrf51.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_NRF51_H_
|
||||
#if CS_PLATFORM == CS_P_NRF51
|
||||
@@ -1307,22 +1167,6 @@ int gettimeofday(struct timeval *tp, void *tzp);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_nrf52.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_NRF52_H_
|
||||
#if CS_PLATFORM == CS_P_NRF52
|
||||
@@ -1367,22 +1211,6 @@ int gettimeofday(struct timeval *tp, void *tzp);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/simplelink/cs_simplelink.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_SIMPLELINK_CS_SIMPLELINK_H_
|
||||
#define CS_COMMON_PLATFORMS_SIMPLELINK_CS_SIMPLELINK_H_
|
||||
@@ -1750,22 +1578,6 @@ const char *strerror();
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_nxp_lpc.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NXP_LPC_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_NXP_LPC_H_
|
||||
@@ -1818,22 +1630,6 @@ typedef struct stat cs_stat_t;
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_nxp_kinetis.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_NXP_KINETIS_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_NXP_KINETIS_H_
|
||||
@@ -1864,22 +1660,6 @@ typedef struct stat cs_stat_t;
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_pic32.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_PIC32_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_PIC32_H_
|
||||
@@ -1916,22 +1696,6 @@ char *inet_ntoa(struct in_addr in);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_rs14100.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2019 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_
|
||||
@@ -1980,22 +1744,6 @@ typedef struct stat cs_stat_t;
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/platform_stm32.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_PLATFORM_STM32_H_
|
||||
#define CS_COMMON_PLATFORMS_PLATFORM_STM32_H_
|
||||
@@ -2034,22 +1782,6 @@ typedef struct stat cs_stat_t;
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/lwip/mg_lwip.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_PLATFORMS_LWIP_MG_LWIP_H_
|
||||
#define CS_COMMON_PLATFORMS_LWIP_MG_LWIP_H_
|
||||
@@ -2117,22 +1849,6 @@ void mg_lwip_set_keepalive_params(struct mg_connection *nc, int idle,
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/cs_md5.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_MD5_H_
|
||||
#define CS_COMMON_MD5_H_
|
||||
@@ -2165,22 +1881,6 @@ void cs_md5_final(unsigned char *md, cs_md5_ctx *c);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/cs_sha1.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_SHA1_H_
|
||||
#define CS_COMMON_SHA1_H_
|
||||
@@ -2219,22 +1919,6 @@ void cs_hmac_sha1(const unsigned char *key, size_t key_len,
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/cs_time.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_CS_TIME_H_
|
||||
#define CS_COMMON_CS_TIME_H_
|
||||
@@ -2264,22 +1948,6 @@ double cs_timegm(const struct tm *tm);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/mg_str.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_MG_STR_H_
|
||||
#define CS_COMMON_MG_STR_H_
|
||||
@@ -2351,6 +2019,11 @@ int mg_strcmp(const struct mg_str str1, const struct mg_str str2);
|
||||
*/
|
||||
int mg_strncmp(const struct mg_str str1, const struct mg_str str2, size_t n);
|
||||
|
||||
/*
|
||||
* Compare two `mg_str`s ignoreing case; return value is the same as `strcmp`.
|
||||
*/
|
||||
int mg_strcasecmp(const struct mg_str str1, const struct mg_str str2);
|
||||
|
||||
/*
|
||||
* Free the string (assuming it was heap allocated).
|
||||
*/
|
||||
@@ -2375,22 +2048,6 @@ int mg_str_starts_with(struct mg_str s, struct mg_str prefix);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/mbuf.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Mbufs are mutable/growing memory buffers, like C++ strings.
|
||||
@@ -2489,22 +2146,6 @@ void mbuf_trim(struct mbuf *);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/cs_base64.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_CS_BASE64_H_
|
||||
#define CS_COMMON_CS_BASE64_H_
|
||||
@@ -2558,22 +2199,6 @@ int cs_base64_decode(const unsigned char *s, int len, char *dst, int *dec_len);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/str_util.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the ""License"");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an ""AS IS"" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef CS_COMMON_STR_UTIL_H_
|
||||
#define CS_COMMON_STR_UTIL_H_
|
||||
@@ -3514,10 +3139,6 @@ struct { \
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_features.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
#ifndef CS_MONGOOSE_SRC_FEATURES_H_
|
||||
#define CS_MONGOOSE_SRC_FEATURES_H_
|
||||
@@ -3693,10 +3314,6 @@ struct { \
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_net_if.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
#ifndef CS_MONGOOSE_SRC_NET_IF_H_
|
||||
#define CS_MONGOOSE_SRC_NET_IF_H_
|
||||
@@ -3827,10 +3444,6 @@ double mg_mgr_min_timer(const struct mg_mgr *mgr);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_ssl_if.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014-2016 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
#ifndef CS_MONGOOSE_SRC_SSL_IF_H_
|
||||
#define CS_MONGOOSE_SRC_SSL_IF_H_
|
||||
@@ -3844,7 +3457,7 @@ extern "C" {
|
||||
struct mg_ssl_if_ctx;
|
||||
struct mg_connection;
|
||||
|
||||
void mg_ssl_if_init();
|
||||
void mg_ssl_if_init(void);
|
||||
|
||||
enum mg_ssl_if_result {
|
||||
MG_SSL_OK = 0,
|
||||
@@ -3885,22 +3498,6 @@ int mg_ssl_if_write(struct mg_connection *nc, const void *data, size_t len);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_net.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
* This software is dual-licensed: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. For the terms of this
|
||||
* license, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* You are free to use this software under the terms of the GNU General
|
||||
* Public License, but WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* Alternatively, you can license this software under a commercial
|
||||
* license, as set out in <https://www.cesanta.com/license>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* === Core API: TCP/UDP/SSL
|
||||
@@ -3997,9 +3594,6 @@ struct mg_connection {
|
||||
struct mbuf send_mbuf; /* Data scheduled for sending */
|
||||
time_t last_io_time; /* Timestamp of the last socket IO */
|
||||
double ev_timer_time; /* Timestamp of the future MG_EV_TIMER */
|
||||
#if MG_ENABLE_SSL
|
||||
void *ssl_if_data; /* SSL library data. */
|
||||
#endif
|
||||
mg_event_handler_t proto_handler; /* Protocol-specific event handler */
|
||||
void *proto_data; /* Protocol-specific data */
|
||||
void (*proto_data_destructor)(void *proto_data);
|
||||
@@ -4032,16 +3626,25 @@ struct mg_connection {
|
||||
/* Flags that are settable by user */
|
||||
#define MG_F_SEND_AND_CLOSE (1 << 10) /* Push remaining data and close */
|
||||
#define MG_F_CLOSE_IMMEDIATELY (1 << 11) /* Disconnect */
|
||||
#define MG_F_WEBSOCKET_NO_DEFRAG (1 << 12) /* Websocket specific */
|
||||
#define MG_F_DELETE_CHUNK (1 << 13) /* HTTP specific */
|
||||
|
||||
/* Flags for protocol handlers */
|
||||
#define MG_F_PROTO_1 (1 << 12)
|
||||
#define MG_F_PROTO_2 (1 << 13)
|
||||
#define MG_F_ENABLE_BROADCAST (1 << 14) /* Allow broadcast address usage */
|
||||
|
||||
#define MG_F_USER_1 (1 << 20) /* Flags left for application */
|
||||
/* Flags left for application */
|
||||
#define MG_F_USER_1 (1 << 20)
|
||||
#define MG_F_USER_2 (1 << 21)
|
||||
#define MG_F_USER_3 (1 << 22)
|
||||
#define MG_F_USER_4 (1 << 23)
|
||||
#define MG_F_USER_5 (1 << 24)
|
||||
#define MG_F_USER_6 (1 << 25)
|
||||
|
||||
#if MG_ENABLE_SSL
|
||||
void *ssl_if_data; /* SSL library data. */
|
||||
#else
|
||||
void *unused_ssl_if_data; /* To keep the size of the structure the same. */
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -4481,10 +4084,6 @@ double mg_time(void);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_uri.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
/*
|
||||
* === URI
|
||||
@@ -4551,10 +4150,6 @@ int mg_normalize_uri_path(const struct mg_str *in, struct mg_str *out);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_util.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
/*
|
||||
* === Utility API
|
||||
@@ -4769,10 +4364,6 @@ struct mg_str mg_url_encode(const struct mg_str src);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_http.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
/*
|
||||
* === Common API reference
|
||||
@@ -4783,8 +4374,8 @@ struct mg_str mg_url_encode(const struct mg_str src);
|
||||
|
||||
#if MG_ENABLE_HTTP
|
||||
|
||||
/* Amalgamated: #include "mg_net.h" */
|
||||
/* Amalgamated: #include "common/mg_str.h" */
|
||||
/* Amalgamated: #include "mg_net.h" */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -4891,6 +4482,9 @@ struct mg_ssi_call_ctx {
|
||||
#define MG_EV_HTTP_MULTIPART_REQUEST_END 125
|
||||
#endif
|
||||
|
||||
#define MG_F_WEBSOCKET_NO_DEFRAG MG_F_PROTO_1
|
||||
#define MG_F_DELETE_CHUNK MG_F_PROTO_2
|
||||
|
||||
/*
|
||||
* Attaches a built-in HTTP event handler to the given connection.
|
||||
* The user-defined event handler will receive following extra events:
|
||||
@@ -5775,22 +5369,6 @@ int mg_http_create_digest_auth_header(char *buf, size_t buf_len,
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_mqtt.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
* This software is dual-licensed: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. For the terms of this
|
||||
* license, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* You are free to use this software under the terms of the GNU General
|
||||
* Public License, but WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* Alternatively, you can license this software under a commercial
|
||||
* license, as set out in <https://www.cesanta.com/license>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* === MQTT API reference
|
||||
@@ -5878,10 +5456,10 @@ struct mg_mqtt_proto_data {
|
||||
|
||||
/* Message flags */
|
||||
#define MG_MQTT_RETAIN 0x1
|
||||
#define MG_MQTT_DUP 0x4
|
||||
#define MG_MQTT_QOS(qos) ((qos) << 1)
|
||||
#define MG_MQTT_GET_QOS(flags) (((flags) &0x6) >> 1)
|
||||
#define MG_MQTT_SET_QOS(flags, qos) (flags) = ((flags) & ~0x6) | ((qos) << 1)
|
||||
#define MG_MQTT_DUP 0x8
|
||||
|
||||
/* Connection flags */
|
||||
#define MG_MQTT_CLEAN_SESSION 0x02
|
||||
@@ -6006,22 +5584,6 @@ int mg_mqtt_vmatch_topic_expression(const char *exp, struct mg_str topic);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_mqtt_server.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
* This software is dual-licensed: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. For the terms of this
|
||||
* license, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* You are free to use this software under the terms of the GNU General
|
||||
* Public License, but WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* Alternatively, you can license this software under a commercial
|
||||
* license, as set out in <https://www.cesanta.com/license>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* === MQTT Server API reference
|
||||
@@ -6113,10 +5675,6 @@ struct mg_mqtt_session *mg_mqtt_next(struct mg_mqtt_broker *brk,
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_dns.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
/*
|
||||
* === DNS API reference
|
||||
@@ -6239,6 +5797,7 @@ int mg_dns_encode_record(struct mbuf *io, struct mg_dns_resource_record *rr,
|
||||
* Encodes a DNS name.
|
||||
*/
|
||||
int mg_dns_encode_name(struct mbuf *io, const char *name, size_t len);
|
||||
int mg_dns_encode_name_s(struct mbuf *io, struct mg_str name);
|
||||
|
||||
/* Low-level: parses a DNS response. */
|
||||
int mg_parse_dns(const char *buf, int len, struct mg_dns_message *msg);
|
||||
@@ -6280,10 +5839,6 @@ void mg_set_protocol_dns(struct mg_connection *nc);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_dns_server.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
/*
|
||||
* === DNS server API reference
|
||||
@@ -6377,10 +5932,6 @@ void mg_dns_send_reply(struct mg_connection *nc, struct mg_dns_reply *r);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_resolv.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2014 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
/*
|
||||
* === API reference
|
||||
@@ -6461,22 +6012,6 @@ int mg_resolve_from_hosts_file(const char *host, union socket_address *usa);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_coap.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2015 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
* This software is dual-licensed: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. For the terms of this
|
||||
* license, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* You are free to use this software under the terms of the GNU General
|
||||
* Public License, but WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* Alternatively, you can license this software under a commercial
|
||||
* license, as set out in <https://www.cesanta.com/license>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* === CoAP API reference
|
||||
@@ -6629,10 +6164,6 @@ uint32_t mg_coap_compose(struct mg_coap_message *cm, struct mbuf *io);
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_sntp.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2016 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
#ifndef CS_MONGOOSE_SRC_SNTP_H_
|
||||
#define CS_MONGOOSE_SRC_SNTP_H_
|
||||
@@ -6686,10 +6217,6 @@ struct mg_connection *mg_sntp_get_time(struct mg_mgr *mgr,
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "mongoose/src/mg_socks.h"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2017 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
#ifndef CS_MONGOOSE_SRC_SOCKS_H_
|
||||
#define CS_MONGOOSE_SRC_SOCKS_H_
|
||||
|
||||
Reference in new issue
Block a user