161#error "If you want to use TCP, TCP_MAXRTX and TCP_SYNMAXRTX must less or equal to 12 (due to tcp_backoff table), so, you have to reduce them in your lwipopts.h"
269#error "LWIP_COMPAT_MUTEX cannot prevent priority inversion. It is recommended to implement priority-aware mutexes. (Define LWIP_COMPAT_MUTEX_ALLOWED to disable this error.)"
270#endif
271
272#ifndef LWIP_DISABLE_TCP_SANITY_CHECKS
273#define LWIP_DISABLE_TCP_SANITY_CHECKS 0
274#endif
275#ifndef LWIP_DISABLE_MEMP_SANITY_CHECKS
276#define LWIP_DISABLE_MEMP_SANITY_CHECKS 0
277#endif
278
279/* MEMP sanity checks */
280#if MEMP_MEM_MALLOC
281#if !LWIP_DISABLE_MEMP_SANITY_CHECKS
282#if LWIP_NETCONN || LWIP_SOCKET
283#if !MEMP_NUM_NETCONN && LWIP_SOCKET
284#error "lwip_sanity_check: WARNING: MEMP_NUM_NETCONN cannot be 0 when using sockets!"
288#error "lwip_sanity_check: WARNING: MEMP_NUM_NETCONN should be less than the sum of MEMP_NUM_{TCP,RAW,UDP}_PCB+MEMP_NUM_TCP_PCB_LISTEN. If you know what you are doing, define LWIP_DISABLE_MEMP_SANITY_CHECKS to 1 to disable this error."
289#endif
290#endif /* LWIP_NETCONN || LWIP_SOCKET */
291#endif /* !LWIP_DISABLE_MEMP_SANITY_CHECKS */
292#if MEM_USE_POOLS
293#error "MEMP_MEM_MALLOC and MEM_USE_POOLS cannot be enabled at the same time"
294#endif
295#ifdef LWIP_HOOK_MEMP_AVAILABLE
296#error "LWIP_HOOK_MEMP_AVAILABLE doesn't make sense with MEMP_MEM_MALLOC"
304#error "lwip_sanity_check: WARNING: MEMP_NUM_TCP_SEG should be at least as big as TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
305#endif
306#if TCP_SND_BUF < (2 * TCP_MSS)
307#error "lwip_sanity_check: WARNING: TCP_SND_BUF must be at least as much as (2 * TCP_MSS) for things to work smoothly. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
310#error "lwip_sanity_check: WARNING: TCP_SND_QUEUELEN must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
311#endif
312#if TCP_SNDLOWAT >= TCP_SND_BUF
313#error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must be less than TCP_SND_BUF. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
314#endif
315#if TCP_MSS >= ((16 * 1024) - 1)
316#error "lwip_sanity_check: WARNING: TCP_MSS must be <= 16382 to prevent u16_t underflow in TCP_SNDLOWAT calculation!"
317#endif
318#if TCP_SNDLOWAT >= (0xFFFF - (4 * TCP_MSS))
319#error "lwip_sanity_check: WARNING: TCP_SNDLOWAT must at least be 4*MSS below u16_t overflow!"
320#endif
321#if TCP_SNDQUEUELOWAT >= TCP_SND_QUEUELEN
322#error "lwip_sanity_check: WARNING: TCP_SNDQUEUELOWAT must be less than TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
325#error "lwip_sanity_check: WARNING: PBUF_POOL_BUFSIZE does not provide enough space for protocol headers. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
328#error "lwip_sanity_check: WARNING: TCP_WND is larger than space provided by PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - protocol headers). If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
329#endif
330#if TCP_WND < TCP_MSS
331#error "lwip_sanity_check: WARNING: TCP_WND is smaller than MSS. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."