/*
 * Copyright (c) 2001-2003 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 <adam@sics.se>
 *
 */
#ifndef LWIP_LWIPOPTS_H
#define LWIP_LWIPOPTS_H

#ifdef LWIP_OPTTEST_FILE
#include "lwipopts_test.h"
#else /* LWIP_OPTTEST_FILE */

#define LWIP_IPV4 0
#define LWIP_IPV6 1

#define LWIP_DNS 0

#define LWIP_ARP 0
#define ARP_QUEUEING            1

#define LWIP_ETHERNET 1

#define NO_SYS                  0

#define LWIP_SOCKET             0
#define LWIP_COMPAT_SOCKETS     0
#define LWIP_NETCONN            0
#define LWIP_ALTCP              0

#define LWIP_IGMP               LWIP_IPV4
#define LWIP_ICMP               LWIP_IPV4

#define PPP_SUPPORT             0

/* ---- TCP options ----------------------- */
#define TCP_WND 4194304
#define TCP_MSS 16000
#define TCP_SND_BUF 4194304
#define TCP_SNDLOWAT 1048576
#define TCP_SND_QUEUELEN 1050
#define TCP_SNDQUEUELOWAT 32
#define LWIP_WND_SCALE          1
#define TCP_RCV_SCALE           7
#define LWIP_TCP_TIMESTAMPS     1
#define LWIP_TCP_SACK_OUT       1
#define TCP_LISTEN_BACKLOG      1

/* ---- Statistics options ---------------- */
#define LWIP_STATS              0
#define LWIP_STATS_DISPLAY      0

/* ---- Memory options -------------------- */
#define MEM_LIBC_MALLOC         1
#define MEMP_MEM_MALLOC         1
#define MEM_ALIGNMENT           4U

/* ---- Debug options --------------------- */
#ifdef LWIP_DEBUG

#define LWIP_DBG_MIN_LEVEL      0
#define PPP_DEBUG               LWIP_DBG_ON
#define MEM_DEBUG               LWIP_DBG_ON
#define MEMP_DEBUG              LWIP_DBG_ON
#define PBUF_DEBUG              LWIP_DBG_ON
#define API_LIB_DEBUG           LWIP_DBG_ON
#define API_MSG_DEBUG           LWIP_DBG_ON
#define TCPIP_DEBUG             LWIP_DBG_ON
#define NETIF_DEBUG             LWIP_DBG_ON
#define SOCKETS_DEBUG           LWIP_DBG_ON
#define DNS_DEBUG               LWIP_DBG_ON
#define AUTOIP_DEBUG            LWIP_DBG_ON
#define DHCP_DEBUG              LWIP_DBG_ON
#define IP_DEBUG                LWIP_DBG_ON
#define IP_REASS_DEBUG          LWIP_DBG_ON
#define ICMP_DEBUG              LWIP_DBG_ON
#define IGMP_DEBUG              LWIP_DBG_ON
#define UDP_DEBUG               LWIP_DBG_ON
#define TCP_DEBUG               LWIP_DBG_ON
#define TCP_INPUT_DEBUG         LWIP_DBG_ON
#define TCP_OUTPUT_DEBUG        LWIP_DBG_ON
#define TCP_RTO_DEBUG           LWIP_DBG_ON
#define TCP_CWND_DEBUG          LWIP_DBG_ON
#define TCP_WND_DEBUG           LWIP_DBG_ON
#define TCP_FR_DEBUG            LWIP_DBG_ON
#define TCP_QLEN_DEBUG          LWIP_DBG_ON
#define TCP_RST_DEBUG           LWIP_DBG_ON
#endif

#define LWIP_DBG_TYPES_ON       (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)

#endif /* LWIP_OPTTEST_FILE */

/* The following defines must be done even in OPTTEST mode: */

#if !defined(NO_SYS) || !NO_SYS /* default is 0 */
void sys_check_core_locking(void);
#define LWIP_ASSERT_CORE_LOCKED()  sys_check_core_locking()
#endif

#ifndef LWIP_PLATFORM_ASSERT
#define LWIP_PLATFORM_ASSERT(x) g_assert(x)
#endif

#endif /* LWIP_LWIPOPTS_H */
