1 #ifndef __LIB_LWIP_LWIPOPTS_H 2 #define __LIB_LWIP_LWIPOPTS_H 3 4 #include <errno.h> 5 #include <malloc.h> 6 #include <kernel/thread.h> 7 8 #ifdef WITH_TARGET_LWIPOPTS 9 #include <target/lwipopts.h> 10 #else 11 12 // use lk's libc malloc 13 #define MEM_LIBC_MALLOC 1 14 15 // use mem_malloc() which calls malloc() 16 // instead of creating static memory pools 17 #define MEMP_MEM_MALLOC 1 18 19 // these don't actually affect anything 20 // unless MEMP_MEM_MALLOC is 0 21 #define MEM_SIZE (256 * 1024 * 1024) 22 #define MEMP_NUM_UDP_PCB 128 23 #define MEMP_NUM_TCP_PCB 128 24 #define MEMP_NUM_TCP_PCB_LISTEN 128 25 #define MEMP_NUM_NETBUF 32 26 #define MEMP_NUM_NETCONN 32 27 #define MEMP_NUM_NETDB 32 28 29 #define LWIP_COMPAT_SOCKETS 0 30 31 #define LWIP_DHCP 1 32 #define LWIP_AUTOIP 1 33 #define LWIP_DHCP_AUTOIP_COOP 1 34 35 #define LWIP_DNS 1 36 37 #define LWIP_NETIF_HOSTNAME 1 38 #define LWIP_NETIF_API 1 39 #define LWIP_NETIF_STATUS_CALLBACK 1 40 #define LWIP_NETIF_HWADDRHINT 1 41 #define LWIP_NETIF_LOOPBACK 1 42 43 #define LWIP_HAVE_LOOPIF 1 44 45 #define TCPIP_THREAD_STACKSIZE DEFAULT_STACK_SIZE 46 #define TCPIP_THREAD_PRIO DEFAULT_PRIORITY 47 48 #define TCPIP_MBOX_SIZE 16 49 50 #define DEFAULT_THREAD_STACKSIZE DEFAULT_STACK_SIZE 51 52 #define DEFAULT_UDP_RECVMBOX_SIZE 16 53 #define DEFAULT_TCP_RECVMBOX_SIZE 16 54 #define DEFAULT_ACCEPTMBOX_SIZE 16 55 56 #define LWIP_STATS_DISPLAY 0 57 58 #endif 59 #endif 60 61