lwip-contrib-mac/ports/mac/include/lwipopts-SLIP.h
Eric Pooch 9a5b3d8918 Support for Macintosh System 1.1 on 128K Macintosh
This port of lwip adds support for 128K Macintosh
with the original 64K ROMs running System 1.1 or
later.
Modem port must be connected to a server running pppd
at 9600 baud.
2018-03-12 21:40:46 -07:00

1333 lines
34 KiB
C

/**
* @file
*
* lwIP Options Configuration
*/
/*
* Copyright (c) 2001-2004 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 __LWIPOPTS_H__
#define __LWIPOPTS_H__
/*
* The lwIP stack configuration file.
* This is based on the lwip/opts.h file.
*/
/*
-----------------------------------------------
---------- Platform specific locking ----------
-----------------------------------------------
*/
/**
* SYS_LIGHTWEIGHT_PROT==1: if you want inter-task protection for certain
* critical regions during buffer allocation, deallocation and memory
* allocation and deallocation.
*/
#ifndef SYS_LIGHTWEIGHT_PROT
#define SYS_LIGHTWEIGHT_PROT 0
#endif
/**
* NO_SYS==1: Provides VERY minimal functionality. Otherwise,
* use lwIP facilities.
*/
#ifndef NO_SYS
#define NO_SYS 1
#endif
/*
------------------------------------
---------- Memory options ----------
------------------------------------
*/
/**
* MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library
* instead of the lwip internal allocator. Can save code size if you
* already use it.
*/
#ifndef MEM_LIBC_MALLOC
#define MEM_LIBC_MALLOC 1
#endif
/**
* MEMP_MEM_MALLOC==1: Use mem_malloc/mem_free instead of the lwip pool allocator.
* Especially useful with MEM_LIBC_MALLOC but handle with care regarding execution
* speed and usage from interrupts!
*/
#ifndef MEMP_MEM_MALLOC
#define MEMP_MEM_MALLOC 1
#endif
/**
* MEM_ALIGNMENT: should be set to the alignment of the CPU
* 4 byte alignment -> #define MEM_ALIGNMENT 4
* 2 byte alignment -> #define MEM_ALIGNMENT 2
*/
#ifndef MEM_ALIGNMENT
#define MEM_ALIGNMENT 4
#endif
/**
* 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.
*/
#ifndef MEM_SIZE
#define MEM_SIZE (2*1024)
#endif
/*
---------------------------------
---------- ARP options ----------
---------------------------------
*/
/**
* LWIP_ARP==1: Enable ARP functionality.
*/
#ifndef LWIP_ARP
#define LWIP_ARP 0
#endif
/*
--------------------------------
---------- IP options ----------
--------------------------------
*/
/**
* IP_FORWARD==1: Enables the ability to forward IP packets across network
* interfaces. If you are going to run lwIP on a device with only one network
* interface, define this to 0.
*/
#ifndef IP_FORWARD
#define IP_FORWARD 0
#endif
/**
* IP_OPTIONS_ALLOWED: Defines the behavior for IP options.
* IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped.
* IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed).
*/
#ifndef IP_OPTIONS_ALLOWED
#define IP_OPTIONS_ALLOWED 0
#endif
/**
* IP_REASSEMBLY==1: Reassemble incoming fragmented IP packets. Note that
* this option does not affect outgoing packet sizes, which can be controlled
* via IP_FRAG.
*/
#ifndef IP_REASSEMBLY
#define IP_REASSEMBLY 0
#endif
/**
* IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
* that this option does not affect incoming packet sizes, which can be
* controlled via IP_REASSEMBLY.
*/
#ifndef IP_FRAG
#define IP_FRAG 0
#endif
/*
----------------------------------
---------- ICMP options ----------
----------------------------------
*/
/**
* LWIP_ICMP==1: Enable ICMP module inside the IP stack.
* Be careful, disable that make your product non-compliant to RFC1122
*/
#ifndef LWIP_ICMP
#define LWIP_ICMP 0
#endif
/*
---------------------------------
---------- RAW options ----------
---------------------------------
*/
/**
* LWIP_RAW==1: Enable application layer to hook into the IP layer itself.
*/
#ifndef LWIP_RAW
#define LWIP_RAW 1
#endif
/*
----------------------------------
---------- SNMP options ----------
----------------------------------
*/
/**
* LWIP_SNMP==1: Turn on SNMP module. UDP must be available for SNMP
* transport.
*/
#ifndef LWIP_SNMP
#define LWIP_SNMP 0
#endif
/*
----------------------------------
---------- IGMP options ----------
----------------------------------
*/
/**
* LWIP_IGMP==1: Turn on IGMP module.
*/
#ifndef LWIP_IGMP
#define LWIP_IGMP 0
#endif
/*
----------------------------------
---------- DNS options -----------
----------------------------------
*/
/**
* LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS
* transport.
*/
#ifndef LWIP_DNS
#define LWIP_DNS 0
#endif
/** DNS maximum number of entries to maintain locally. */
#ifndef DNS_TABLE_SIZE
#define DNS_TABLE_SIZE 4
#endif
/** DNS maximum host name length supported in the name table. */
#ifndef DNS_MAX_NAME_LENGTH
#define DNS_MAX_NAME_LENGTH 256
#endif
/** The maximum of DNS servers */
#ifndef DNS_MAX_SERVERS
#define DNS_MAX_SERVERS 2
#endif
/** DNS do a name checking between the query and the response. */
#ifndef DNS_DOES_NAME_CHECK
#define DNS_DOES_NAME_CHECK 1
#endif
/** DNS message max. size. Default value is RFC compliant. */
#ifndef DNS_MSG_SIZE
#define DNS_MSG_SIZE 512
#endif
/** DNS_LOCAL_HOSTLIST: Implements a local host-to-address list. If enabled,
* you have to define
* #define DNS_LOCAL_HOSTLIST_INIT {{"host1", 0x123}, {"host2", 0x234}}
* (an array of structs name/address, where address is an u32_t in network
* byte order).
*
* Instead, you can also use an external function:
* #define DNS_LOOKUP_LOCAL_EXTERN(x) extern u32_t my_lookup_function(const char *name)
* that returns the IP address or INADDR_NONE if not found.
*/
#ifndef DNS_LOCAL_HOSTLIST
#define DNS_LOCAL_HOSTLIST 0
#endif /* DNS_LOCAL_HOSTLIST */
/** If this is turned on, the local host-list can be dynamically changed
* at runtime. */
#ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC
#define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0
#endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */
/*
---------------------------------
---------- UDP options ----------
---------------------------------
*/
/**
* LWIP_UDP==1: Turn on UDP.
*/
#ifndef LWIP_UDP
#define LWIP_UDP 0
#endif
/**
* LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP)
*/
#ifndef LWIP_UDPLITE
#define LWIP_UDPLITE 0
#endif
/*
---------------------------------
---------- TCP options ----------
---------------------------------
*/
/**
* LWIP_TCP==1: Turn on TCP.
*/
#ifndef LWIP_TCP
#define LWIP_TCP 1
#endif
/**
* TCP_WND: The size of a TCP window. This must be at least
* (2 * TCP_MSS) for things to work well
*/
#ifndef TCP_WND
#define TCP_WND (2 * TCP_MSS)
#endif
/**
* TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order.
* Define to 0 if your device is low on memory.
*/
#ifndef TCP_QUEUE_OOSEQ
#define TCP_QUEUE_OOSEQ 0
//(LWIP_TCP)
#endif
/**
* TCP_MSS: TCP Maximum segment size. (default is 536, a conservative default,
* you might want to increase this.)
* For the receive side, this MSS is advertised to the remote side
* when opening a connection. For the transmit size, this MSS sets
* an upper limit on the MSS advertised by the remote host.
*/
#ifndef TCP_MSS
#define TCP_MSS 536
#endif
/**
* TCP_SND_BUF: TCP sender buffer space (bytes).
* To achieve good performance, this should be at least 2 * TCP_MSS.
*/
#ifndef TCP_SND_BUF
#define TCP_SND_BUF (2 * TCP_MSS)
#endif
/**
* LWIP_TCP_TIMESTAMPS==1: support the TCP timestamp option.
*/
#ifndef LWIP_TCP_TIMESTAMPS
#define LWIP_TCP_TIMESTAMPS 0
#endif
/**
* LWIP_EVENT_API and LWIP_CALLBACK_API: Only one of these should be set to 1.
* LWIP_EVENT_API==1: The user defines lwip_tcp_event() to receive all
* events (accept, sent, etc) that happen in the system.
* LWIP_CALLBACK_API==1: The PCB callback function is called directly
* for the event. This is the default.
*/
#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API)
#define LWIP_EVENT_API 0
#define LWIP_CALLBACK_API 1
#endif
/*
----------------------------------
---------- Pbuf options ----------
----------------------------------
*/
/**
* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
* link level header. The default is 14, the standard value for
* Ethernet.
*/
#ifndef PBUF_LINK_HLEN
#define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE)
#endif
/**
* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. The default is
* designed to accomodate single full size TCP frame in one pbuf, including
* TCP_MSS, IP header, and link header.
*/
#ifndef PBUF_POOL_BUFSIZE
#define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)
#endif
/*
------------------------------------------------
---------- Network Interfaces options ----------
------------------------------------------------
*/
/**
* LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname
* field.
*/
#ifndef LWIP_NETIF_HOSTNAME
#define LWIP_NETIF_HOSTNAME 0
#endif
/**
* LWIP_NETIF_API==1: Support netif api (in netifapi.c)
*/
#ifndef LWIP_NETIF_API
#define LWIP_NETIF_API 0
#endif
/**
* LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface
* changes its up/down status (i.e., due to DHCP IP acquistion)
*/
#ifndef LWIP_NETIF_STATUS_CALLBACK
#define LWIP_NETIF_STATUS_CALLBACK 0
#endif
/**
* LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface
* whenever the link changes (i.e., link down)
*/
#ifndef LWIP_NETIF_LINK_CALLBACK
#define LWIP_NETIF_LINK_CALLBACK 0
#endif
/**
* LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called
* when a netif has been removed
*/
#ifndef LWIP_NETIF_REMOVE_CALLBACK
#define LWIP_NETIF_REMOVE_CALLBACK 0
#endif
/**
* LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP
* address equal to the netif IP address, looping them back up the stack.
*/
#ifndef LWIP_NETIF_LOOPBACK
#define LWIP_NETIF_LOOPBACK 0
#endif
/**
* LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback
* sending for each netif (0 = disabled)
*/
#ifndef LWIP_LOOPBACK_MAX_PBUFS
#define LWIP_LOOPBACK_MAX_PBUFS 0
#endif
/**
* LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data
* to be sent into one single pbuf. This is for compatibility with DMA-enabled
* MACs that do not support scatter-gather.
* Beware that this might involve CPU-memcpy before transmitting that would not
* be needed without this flag! Use this only if you need to!
*
* @todo: TCP and IP-frag do not work with this, yet:
*/
#ifndef LWIP_NETIF_TX_SINGLE_PBUF
#define LWIP_NETIF_TX_SINGLE_PBUF 0
#endif /* LWIP_NETIF_TX_SINGLE_PBUF */
/*
------------------------------------
---------- LOOPIF options ----------
------------------------------------
*/
/**
* LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1) and loopif.c
*/
#ifndef LWIP_HAVE_LOOPIF
#define LWIP_HAVE_LOOPIF 0
#endif
/*
------------------------------------
---------- SLIPIF options ----------
------------------------------------
*/
/**
* LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c
*/
#ifndef LWIP_HAVE_SLIPIF
#define LWIP_HAVE_SLIPIF 1
#endif
/*
----------------------------------------------
---------- Sequential layer options ----------
----------------------------------------------
*/
/**
* LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c)
*/
#ifndef LWIP_NETCONN
#define LWIP_NETCONN (NO_SYS==0)
#endif
/** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create
* timers running in tcpip_thread from another thread.
*/
#ifndef LWIP_TCPIP_TIMEOUT
#define LWIP_TCPIP_TIMEOUT 0
#endif
/*
------------------------------------
---------- Socket options ----------
------------------------------------
*/
/**
* LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
*/
#define LWIP_SOCKET (NO_SYS==0)
/**
* LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names.
* (only used if you use sockets.c)
*/
#define LWIP_COMPAT_SOCKETS (NO_SYS==0)
/**
* LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names.
* Disable this option if you use a POSIX operating system that uses the same
* names (read, write & close). (only used if you use sockets.c)
*/
#define LWIP_POSIX_SOCKETS_IO_NAMES (LWIP_SOCKET)
/**
* LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT
* options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set
* in seconds. (does not require sockets.c, and will affect tcp.c)
*/
#ifndef LWIP_TCP_KEEPALIVE
#define LWIP_TCP_KEEPALIVE 0
#endif
/**
* LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and
* SO_SNDTIMEO processing.
*/
#ifndef LWIP_SO_SNDTIMEO
#define LWIP_SO_SNDTIMEO 0
#endif
/**
* LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and
* SO_RCVTIMEO processing.
*/
#ifndef LWIP_SO_RCVTIMEO
#define LWIP_SO_RCVTIMEO 0
#endif
/**
* LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
*/
#ifndef LWIP_SO_RCVBUF
#define LWIP_SO_RCVBUF 0
#endif
/**
* If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize.
*/
#ifndef RECV_BUFSIZE_DEFAULT
#define RECV_BUFSIZE_DEFAULT INT_MAX
#endif
/**
* SO_REUSE==1: Enable SO_REUSEADDR option.
*/
#ifndef SO_REUSE
#define SO_REUSE 0
#endif
/**
* SO_REUSE_RXTOALL==1: Pass a copy of incoming broadcast/multicast packets
* to all local matches if SO_REUSEADDR is turned on.
* WARNING: Adds a memcpy for every packet if passing to more than one pcb!
*/
#ifndef SO_REUSE_RXTOALL
#define SO_REUSE_RXTOALL 0
#endif
/**
* LWIP_FIONREAD_LINUXMODE==0 (default): ioctl/FIONREAD returns the amount of
* pending data in the network buffer. This is the way windows does it. It's
* the default for lwIP since it is smaller.
* LWIP_FIONREAD_LINUXMODE==1: ioctl/FIONREAD returns the size of the next
* pending datagram in bytes. This is the way linux does it. This code is only
* here for compatibility.
*/
#ifndef LWIP_FIONREAD_LINUXMODE
#define LWIP_FIONREAD_LINUXMODE 0
#endif
/*
----------------------------------------
---------- Statistics options ----------
----------------------------------------
*/
/**
* LWIP_STATS==1: Enable statistics collection in lwip_stats.
*/
#ifndef LWIP_STATS
#define LWIP_STATS 0
#endif
#if LWIP_STATS
/**
* LWIP_STATS_DISPLAY==1: Compile in the statistics output functions.
*/
#ifndef LWIP_STATS_DISPLAY
#define LWIP_STATS_DISPLAY 0
#endif
/**
* LINK_STATS==1: Enable link stats.
*/
#ifndef LINK_STATS
#define LINK_STATS 1
#endif
/**
* ETHARP_STATS==1: Enable etharp stats.
*/
#ifndef ETHARP_STATS
#define ETHARP_STATS (LWIP_ARP)
#endif
/**
* IP_STATS==1: Enable IP stats.
*/
#ifndef IP_STATS
#define IP_STATS 1
#endif
/**
* IPFRAG_STATS==1: Enable IP fragmentation stats. Default is
* on if using either frag or reass.
*/
#ifndef IPFRAG_STATS
#define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG)
#endif
/**
* ICMP_STATS==1: Enable ICMP stats.
*/
#ifndef ICMP_STATS
#define ICMP_STATS 1
#endif
/**
* IGMP_STATS==1: Enable IGMP stats.
*/
#ifndef IGMP_STATS
#define IGMP_STATS (LWIP_IGMP)
#endif
/**
* UDP_STATS==1: Enable UDP stats. Default is on if
* UDP enabled, otherwise off.
*/
#ifndef UDP_STATS
#define UDP_STATS (LWIP_UDP)
#endif
/**
* TCP_STATS==1: Enable TCP stats. Default is on if TCP
* enabled, otherwise off.
*/
#ifndef TCP_STATS
#define TCP_STATS (LWIP_TCP)
#endif
/**
* MEM_STATS==1: Enable mem.c stats.
*/
#ifndef MEM_STATS
#define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0))
#endif
/**
* MEMP_STATS==1: Enable memp.c pool stats.
*/
#ifndef MEMP_STATS
#define MEMP_STATS (MEMP_MEM_MALLOC == 0)
#endif
/**
* SYS_STATS==1: Enable system stats (sem and mbox counts, etc).
*/
#ifndef SYS_STATS
#define SYS_STATS (NO_SYS == 0)
#endif
/**
* IP6_STATS==1: Enable IPv6 stats.
*/
#ifndef IP6_STATS
#define IP6_STATS (LWIP_IPV6)
#endif
/**
* ICMP6_STATS==1: Enable ICMP for IPv6 stats.
*/
#ifndef ICMP6_STATS
#define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6)
#endif
/**
* IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats.
*/
#ifndef IP6_FRAG_STATS
#define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS))
#endif
/**
* MLD6_STATS==1: Enable MLD for IPv6 stats.
*/
#ifndef MLD6_STATS
#define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD)
#endif
/**
* ND6_STATS==1: Enable Neighbor discovery for IPv6 stats.
*/
#ifndef ND6_STATS
#define ND6_STATS (LWIP_IPV6)
#endif
#else
#define LINK_STATS 0
#define IP_STATS 0
#define IPFRAG_STATS 0
#define ICMP_STATS 0
#define IGMP_STATS 0
#define UDP_STATS 0
#define TCP_STATS 0
#define MEM_STATS 0
#define MEMP_STATS 0
#define SYS_STATS 0
#define LWIP_STATS_DISPLAY 0
#define IP6_STATS 0
#define ICMP6_STATS 0
#define IP6_FRAG_STATS 0
#define MLD6_STATS 0
#define ND6_STATS 0
#endif /* LWIP_STATS */
/*
---------------------------------
---------- PPP options ----------
---------------------------------
*/
/**
* PPP_SUPPORT==1: Enable PPP.
*/
#define PPP_SUPPORT 0
/**
* PPPOS_SUPPORT==1: Enable PPP Over Serial
*/
#define PPPOS_SUPPORT PPP_SUPPORT
#if PPP_SUPPORT
#define PPP_NOTIFY_PHASE 1
/**
* PPP_INPROC_MULTITHREADED==1 call ppp_input() using tcpip_callback().
* Set this to 0 if pppos_input() is called inside tcpip_thread or with NO_SYS==1.
* Default is 1 for NO_SYS==0 (multithreaded) and 0 for NO_SYS==1 (single-threaded).
*/
#define PPP_INPROC_MULTITHREADED (NO_SYS==0)
/**
* LWIP_PPP_API==1: Support PPP API (in pppapi.c)
*/
#define LWIP_PPP_API 0
/**
* PAP_SUPPORT==1: Support PAP.
*/
#define PAP_SUPPORT 0
/**
* CHAP_SUPPORT==1: Support CHAP.
*/
#define CHAP_SUPPORT 0
/**
* MSCHAP_SUPPORT==1: Support MSCHAP.
*/
#define MSCHAP_SUPPORT 0
#if MSCHAP_SUPPORT
#undef CHAP_SUPPORT
#define CHAP_SUPPORT 1 /* MSCHAP require CHAP support */
#endif /* MSCHAP_SUPPORT */
#if PAP_SUPPORT || CHAP_SUPPORT
#define PPP_AUTH 1
#else
#define PPP_AUTH 0
#endif
#undef PPP_OPTIONS
/**
* LQR_SUPPORT==1: Support Link Quality Report. Do nothing except exchanging some LCP packets.
*/
#define LQR_SUPPORT 0
/**
* VJ_SUPPORT==1: Support VJ header compression.
*/
#define VJ_SUPPORT 0
#if !PPPOS_SUPPORT
#undef VJ_SUPPORT
#define VJ_SUPPORT 0 /* Only PPPoS may need VJ compression */
#endif /* !PPPOS_SUPPORT */
/**
* PPP_MD5_RANDM==1: Use MD5 for better randomness. Automatically enabled if CHAP or L2TP AUTH support is enabled.
*/
#define PPP_MD5_RANDM 0
#if CHAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT
#undef PPP_MD5_RANDM
#define PPP_MD5_RANDM 1 /* MD5 Random is required for CHAP and L2TP AUTH */
#endif /* CHAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT */
#undef PPP_FCS_TABLE
#undef PPP_PROTOCOLNAME
/**
* PolarSSL library, used if necessary and not previously disabled
*
*
* lwIP contains some files fetched from the latest BSD release of
* the PolarSSL project for ciphers and encryption methods we need for lwIP
* PPP support.
*
* The PolarSSL files were cleaned to contain only the necessary struct
* fields and functions needed for lwIP.
*
* The PolarSSL API was not changed at all, so if you are already using
* PolarSSL you can choose to skip the compilation of the included PolarSSL
* library into lwIP:
*
* The following defines are available for flexibility:
*
* LWIP_INCLUDED_POLARSSL_MD4 ; Use lwIP internal PolarSSL for MD4
* LWIP_INCLUDED_POLARSSL_MD5 ; Use lwIP internal PolarSSL for MD5
* LWIP_INCLUDED_POLARSSL_SHA1 ; Use lwIP internal PolarSSL for SHA1
* LWIP_INCLUDED_POLARSSL_DES ; Use lwIP internal PolarSSL for DES
*
* If set (=1), the default if required by another enabled PPP feature unless
* explicitly set to 0, using included lwIP PolarSSL.
*
* If clear (=0), using external PolarSSL.
*
* Undefined if not needed.
*
* Beware of the stack requirements which can be a lot larger if you are not
* using our cleaned PolarSSL library.
*/
#if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM
#define LWIP_INCLUDED_POLARSSL_MD5 1 /* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */
#endif /* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */
#if MSCHAP_SUPPORT
#define LWIP_INCLUDED_POLARSSL_MD4 1 /* MSCHAP require MD4 support */
#define LWIP_INCLUDED_POLARSSL_SHA1 1 /* MSCHAP require SHA1 support */
#define LWIP_INCLUDED_POLARSSL_DES 1 /* MSCHAP require DES support */
#endif /* MSCHAP_SUPPORT */
/*
* Timeouts
*/
#define FSM_DEFTIMEOUT 6 /* Timeout time in seconds */
#define FSM_DEFMAXTERMREQS 2 /* Maximum Terminate-Request transmissions */
#define FSM_DEFMAXCONFREQS 10 /* Maximum Configure-Request transmissions */
#define FSM_DEFMAXNAKLOOPS 5 /* Maximum number of nak loops */
#define UPAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
#define UPAP_DEFTRANSMITS 10 /* Maximum number of auth-reqs to send */
#if PPP_SERVER
#define UPAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
#endif /* PPP_SERVER */
#define CHAP_DEFTIMEOUT 6 /* Timeout (seconds) for retransmitting req */
#define CHAP_DEFTRANSMITS 10 /* max # times to send challenge */
#if PPP_SERVER
#define CHAP_DEFREQTIME 30 /* Time to wait for auth-req from peer */
#endif /* PPP_SERVER */
#define EAP_DEFREQTIME 6 /* Time to wait for peer request */
#define EAP_DEFALLOWREQ 10 /* max # times to accept requests */
#if PPP_SERVER
#define EAP_DEFTIMEOUT 6 /* Timeout (seconds) for rexmit */
#define EAP_DEFTRANSMITS 10 /* max # times to transmit */
#endif /* PPP_SERVER */
/* Default number of times we receive our magic number from the peer
before deciding the link is looped-back. */
#define LCP_DEFLOOPBACKFAIL 10
/* Interval in seconds between keepalive echo requests, 0 to disable. */
#define LCP_ECHOINTERVAL 0
/* Number of unanswered echo requests before failure. */
#define LCP_MAXECHOFAILS 3
/* Max Xmit idle time (in jiffies) before resend flag char. */
#define PPP_MAXIDLEFLAG 100
/*
* Packet sizes
*
* Note - lcp shouldn't be allowed to negotiate stuff outside these
* limits. See lcp.h in the pppd directory.
* (XXX - these constants should simply be shared by lcp.c instead
* of living in lcp.h)
*/
#define PPP_MTU 1500 /* Default MTU (size of Info field) */
/* #define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) */
#define PPP_MAXMTU 1500 /* Largest MTU we allow */
#define PPP_MINMTU 64
#define PPP_MRU 1500 /* default MRU = max length of info field */
#define PPP_MAXMRU 1500 /* Largest MRU we allow */
#define PPP_DEFMRU 296 /* Try for this */
#define PPP_MINMRU 128 /* No MRUs below this */
#define MAXNAMELEN 256 /* max length of hostname or name for auth */
#define MAXSECRETLEN 256 /* max length of password or secret */
#endif /* PPP_SUPPORT */
/*
--------------------------------------
---------- Checksum options ----------
--------------------------------------
*/
/**
* CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.
*/
#define CHECKSUM_GEN_IP 1
/**
* CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.
*/
#define CHECKSUM_GEN_UDP 0
/**
* CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.
*/
#define CHECKSUM_GEN_TCP 1
/**
* CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets.
*/
#define CHECKSUM_GEN_ICMP 1
/**
* CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.
*/
#define CHECKSUM_CHECK_IP 0
/**
* CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.
*/
#define CHECKSUM_CHECK_UDP 0
/**
* CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.
*/
#define CHECKSUM_CHECK_TCP 0
/**
* LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from
* application buffers to pbufs.
*/
#define LWIP_CHECKSUM_ON_COPY 0
/*
---------------------------------------
---------- IPv6 options ---------------
---------------------------------------
*/
/**
* LWIP_IPV6==1: Enable IPv6
*/
#define LWIP_IPV6 0
/*
---------------------------------------
---------- Hook options ---------------
---------------------------------------
*/
/* Hooks are undefined by default, define them to a function if you need them. */
/**
* LWIP_HOOK_IP4_INPUT(pbuf, input_netif):
* - called from ip_input() (IPv4)
* - pbuf: received struct pbuf passed to ip_input()
* - input_netif: struct netif on which the packet has been received
* Return values:
* - 0: Hook has not consumed the packet, packet is processed as normal
* - != 0: Hook has consumed the packet.
* If the hook consumed the packet, 'pbuf' is in the responsibility of the hook
* (i.e. free it when done).
*/
/**
* LWIP_HOOK_IP4_ROUTE(dest):
* - called from ip_route() (IPv4)
* - dest: destination IPv4 address
* Returns the destination netif or NULL if no destination netif is found. In
* that case, ip_route() continues as normal.
*/
/*
---------------------------------------
---------- Debugging options ----------
---------------------------------------
*/
/**
* LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is
* compared against this value. If it is smaller, then debugging
* messages are written.
*/
#ifndef LWIP_DBG_MIN_LEVEL
#define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_WARNING
//LWIP_DBG_LEVEL_ALL
//WARNING
//
#endif
/**
* LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable
* debug messages of certain types.
*/
#ifndef LWIP_DBG_TYPES_ON
#define LWIP_DBG_TYPES_ON LWIP_DBG_ON
//(LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_ON)
//LWIP_DBG_ON
#endif
/**
* ETHARP_DEBUG: Enable debugging in etharp.c.
*/
#ifndef ETHARP_DEBUG
#define ETHARP_DEBUG LWIP_DBG_OFF
#endif
/**
* NETIF_DEBUG: Enable debugging in netif.c.
*/
#ifndef NETIF_DEBUG
#define NETIF_DEBUG LWIP_DBG_ON
#endif
/**
* PBUF_DEBUG: Enable debugging in pbuf.c.
*/
#ifndef PBUF_DEBUG
#define PBUF_DEBUG LWIP_DBG_OFF
#endif
/**
* API_LIB_DEBUG: Enable debugging in api_lib.c.
*/
#ifndef API_LIB_DEBUG
#define API_LIB_DEBUG LWIP_DBG_OFF
#endif
/**
* API_MSG_DEBUG: Enable debugging in api_msg.c.
*/
#ifndef API_MSG_DEBUG
#define API_MSG_DEBUG LWIP_DBG_OFF
#endif
/**
* SOCKETS_DEBUG: Enable debugging in sockets.c.
*/
#ifndef SOCKETS_DEBUG
#define SOCKETS_DEBUG LWIP_DBG_OFF
#endif
/**
* ICMP_DEBUG: Enable debugging in icmp.c.
*/
#ifndef ICMP_DEBUG
#define ICMP_DEBUG LWIP_DBG_OFF
#endif
/**
* IGMP_DEBUG: Enable debugging in igmp.c.
*/
#ifndef IGMP_DEBUG
#define IGMP_DEBUG LWIP_DBG_OFF
#endif
/**
* INET_DEBUG: Enable debugging in inet.c.
*/
#ifndef INET_DEBUG
#define INET_DEBUG LWIP_DBG_OFF
#endif
/**
* IP_DEBUG: Enable debugging for IP.
*/
#ifndef IP_DEBUG
#define IP_DEBUG LWIP_DBG_OFF
//LWIP_DBG_OFF
#endif
/**
* IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
*/
#ifndef IP_REASS_DEBUG
#define IP_REASS_DEBUG LWIP_DBG_OFF
#endif
/**
* RAW_DEBUG: Enable debugging in raw.c.
*/
#ifndef RAW_DEBUG
#define RAW_DEBUG LWIP_DBG_ON
#endif
/**
* MEM_DEBUG: Enable debugging in mem.c.
*/
#ifndef MEM_DEBUG
#define MEM_DEBUG LWIP_DBG_OFF
#endif
/**
* MEMP_DEBUG: Enable debugging in memp.c.
*/
#ifndef MEMP_DEBUG
#define MEMP_DEBUG LWIP_DBG_OFF
#endif
/**
* SYS_DEBUG: Enable debugging in sys.c.
*/
#ifndef SYS_DEBUG
#define SYS_DEBUG LWIP_DBG_OFF
#endif
/**
* TIMERS_DEBUG: Enable debugging in timers.c.
*/
#ifndef TIMERS_DEBUG
#define TIMERS_DEBUG LWIP_DBG_OFF
#endif
/**
* TCP_DEBUG: Enable debugging for TCP.
*/
#ifndef TCP_DEBUG
#define TCP_DEBUG LWIP_DBG_ON
#endif
/**
* TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
*/
#ifndef TCP_INPUT_DEBUG
#define TCP_INPUT_DEBUG LWIP_DBG_OFF
#endif
/**
* TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
*/
#ifndef TCP_FR_DEBUG
#define TCP_FR_DEBUG LWIP_DBG_OFF
#endif
/**
* TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
* timeout.
*/
#ifndef TCP_RTO_DEBUG
#define TCP_RTO_DEBUG LWIP_DBG_OFF
#endif
/**
* TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
*/
#ifndef TCP_CWND_DEBUG
#define TCP_CWND_DEBUG LWIP_DBG_OFF
#endif
/**
* TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
*/
#ifndef TCP_WND_DEBUG
#define TCP_WND_DEBUG LWIP_DBG_OFF
#endif
/**
* TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
*/
#ifndef TCP_OUTPUT_DEBUG
#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
#endif
/**
* TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
*/
#ifndef TCP_RST_DEBUG
#define TCP_RST_DEBUG LWIP_DBG_OFF
#endif
/**
* TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
*/
#ifndef TCP_QLEN_DEBUG
#define TCP_QLEN_DEBUG LWIP_DBG_OFF
#endif
/**
* UDP_DEBUG: Enable debugging in UDP.
*/
#ifndef UDP_DEBUG
#define UDP_DEBUG LWIP_DBG_OFF
#endif
/**
* TCPIP_DEBUG: Enable debugging in tcpip.c.
*/
#ifndef TCPIP_DEBUG
#define TCPIP_DEBUG LWIP_DBG_OFF
#endif
/**
* PPP_DEBUG: Enable debugging for PPP.
*/
#ifndef PPP_DEBUG
#define PPP_DEBUG LWIP_DBG_OFF
//(LWIP_DBG_ON | LWIP_DBG_LEVEL_WARNING)
#endif
/**
* SLIP_DEBUG: Enable debugging in slipif.c.
*/
#ifndef SLIP_DEBUG
#define SLIP_DEBUG LWIP_DBG_ON
#endif
/**
* DHCP_DEBUG: Enable debugging in dhcp.c.
*/
#ifndef DHCP_DEBUG
#define DHCP_DEBUG LWIP_DBG_OFF
#endif
/**
* AUTOIP_DEBUG: Enable debugging in autoip.c.
*/
#ifndef AUTOIP_DEBUG
#define AUTOIP_DEBUG LWIP_DBG_OFF
#endif
/**
* SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
*/
#ifndef SNMP_MSG_DEBUG
#define SNMP_MSG_DEBUG LWIP_DBG_OFF
#endif
/**
* SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
*/
#ifndef SNMP_MIB_DEBUG
#define SNMP_MIB_DEBUG LWIP_DBG_OFF
#endif
/**
* DNS_DEBUG: Enable debugging for DNS.
*/
#ifndef DNS_DEBUG
#define DNS_DEBUG LWIP_DBG_OFF
#endif
/**
* IP6_DEBUG: Enable debugging for IPv6.
*/
#ifndef IP6_DEBUG
#define IP6_DEBUG LWIP_DBG_OFF
#endif
/**
* SIO_DEBUG: Enable debugging for Serial I/O.
*/
#define SIO_DEBUG LWIP_DBG_OFF
#define SIO_TRACE (LWIP_DBG_TRACE | LWIP_DBG_OFF)
#define SIO_STATE (LWIP_DBG_STATE | LWIP_DBG_MASK_LEVEL | LWIP_DBG_OFF)
/**
* MAC_DEBUG: Enable debugging for Macintosh.
*/
#define MAC_DEBUG LWIP_DBG_ON
#define MAC_TRACE (LWIP_DBG_TRACE | LWIP_DBG_OFF)
#define MAC_STATE (LWIP_DBG_STATE | LWIP_DBG_MASK_LEVEL | LWIP_DBG_ON)
#define MAC_SIO_BUFF_SIZE 512
#define SER_DEBUG 1
/**
* HTTPD Options:
*/
#define LWIP_HTTPD_APP 1
#define HTTPD_POLL_INTERVAL 4
//#define HTTPD_USE_CUSTOM_FSDATA 1
#define HTTPD_DEBUG LWIP_DBG_OFF
#define PRINTPKT_SUPPORT 0
#endif /* __LWIPOPTS_H__ */