/* * Copyright (c) 2001, 2002 Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels * */ #ifndef __LWIPOPTS_H__ #define __LWIPOPTS_H__ #if 0 #define LWIP_DEBUG #define DBG_MIN_LEVEL 0 #define DBG_TYPES_ON (DBG_ON | DBG_TRACE | DBG_STATE | DBG_FRESH | DBG_HALT) #define TCP_DEBUG DBG_ON #define TCP_OUTPUT_DEBUG DBG_ON #define TCP_QLEN_DEBUG DBG_ON #if 0 #define TCP_INPUT_DEBUG DBG_ON #define TCP_RTO_DEBUG DBG_ON #define TCP_FR_DEBUG DBG_ON #define RAW_DEBUG DBG_ON #define PBUF_DEBUG DBG_ON #define MEM_DEBUG DBG_ON #define MEMP_DEBUG DBG_ON #endif #endif #define NO_SYS 1 #define LWIP_CALLBACK_API 1 #define LWIP_DHCP 1 /* #define TCP_TMR_INTERVAL 250 */ #define TCP_TMR_INTERVAL 10 /* ---------- Memory options ---------- */ /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2 byte alignment -> define MEM_ALIGNMENT to 2. */ /* tried 4 byte alignment, but that seems to cause problems with pbuf * routines */ #define MEM_ALIGNMENT 4 /* MEM_SIZE: the size of the heap memory. If the application will send a lot of data that needs to be copied, this should be set high. */ #define MEM_SIZE 100 * 1024 /* The following four are used only with the sequential API and can be set to 0 if the application only will use the raw API. */ /* MEMP_NUM_NETBUF: the number of struct netbufs. */ #define MEMP_NUM_NETBUF 0 /* MEMP_NUM_NETCONN: the number of struct netconns. */ #define MEMP_NUM_NETCONN 0 /* MEMP_NUM_APIMSG: the number of struct api_msg, used for communication between the TCP/IP stack and the sequential programs. */ #define MEMP_NUM_API_MSG 0 /* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used for sequential API communication and incoming packets. Used in src/api/tcpip.c. */ #define MEMP_NUM_TCPIP_MSG 0 #define PBUF_POLL_SIZE 30 #define PBUF_POOL_BUFSIZE 1536 #define PBUF_LINK_HLEN 16 #define TCP_MSS 1476 /* TCP_SND_BUF should be less than or equal to MEMP_NUM_TCP_SEG * * TCP_MSS otherwise the system will not be able to allocate enough * tcp_segs to transmit all the data and will return ERR_MEM when * attempting to transmit large amounts of data. You want to guarantee * that there are more tcp_segs than there is memory. Each segment * is equal to TCP_MSS. */ #define TCP_SND_BUF (MEMP_NUM_TCP_SEG * TCP_MSS - 1024) #define TCP_WND (16 * 1024) #endif /* __LWIPOPTS_H__ */