1 /* 2 * lwipopts.h -- LwIP example 3 * 4 * Copyright (C) 2013-2016 Christian Amsüss <chrysn@fsfe.org> 5 * Copyright (C) 2018-2023 Jon Shallow <supjps-libcoap@jpshallow.com> 6 * 7 * SPDX-License-Identifier: BSD-2-Clause 8 * 9 * This file is part of the CoAP library libcoap. Please see README for terms 10 * of use. 11 */ 12 13 #define NO_SYS 1 14 #define LWIP_SOCKET (NO_SYS==0) 15 #define LWIP_NETCONN (NO_SYS==0) 16 #define LWIP_NETIF_API (NO_SYS==0) 17 18 #define LWIP_IPV4 1 19 20 #define LWIP_IPV6 1 21 #define LWIP_IPV6_REASS 0 22 23 #define LWIP_IPV6_MLD 0 24 #define LWIP_ICMP6 (LWIP_IPV6==1) 25 26 #ifndef LWIP_RAND 27 #define LWIP_RAND() ((u32_t)rand()) 28 #endif 29 30 #ifndef netif_get_index 31 #define netif_get_index(netif) ((u8_t)((netif)->num + 1)) 32 #endif 33 34 #if NO_SYS 35 #define LOCK_TCPIP_CORE() 36 #define UNLOCK_TCPIP_CORE() 37 #endif 38 39 #define MEMP_USE_CUSTOM_POOLS 1 40 #define MEM_SIZE (4 * 1024) 41 /* Support a 1500 MTU packet */ 42 #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(2*6 + 2 + 1500) 43 44 /* Set if space is to be reserved for a response PDU */ 45 #define MEMP_STATS 1 46 47 /* 48 * Set to display (with COAP_LOG_DEBUG) custom pools information 49 * (Needs MEMP_STATS set) when coap_free_context() is called. 50 */ 51 #define LWIP_STATS_DISPLAY 1 52