📄 lwipopts.h
字号:
//*****************************************************************************
//
// lwipopts.h - Configuration file for lwIP
//
// Copyright (c) 2008 Luminary Micro, Inc. All rights reserved.
// Software License Agreement
//
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
// exclusively on LMI's microcontroller products.
//
// The software is owned by LMI and/or its suppliers, and is protected under
// applicable copyright laws. All rights are reserved. You may not combine
// this software with "viral" open-source software in order to form a larger
// program. Any use in violation of the foregoing restrictions may subject
// the user to criminal sanctions under applicable laws, as well as to civil
// liability for the breach of the terms and conditions of this license.
//
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 3618 of the EK-LM3S8962 Firmware Package.
//
//*****************************************************************************
//
// NOTE: This file has been derived from the lwIP/src/include/lwip/opt.h
// header file. It has been reformated to Luminary coding standards, and
// most comments have been removed.
//
// For additional details, refer to the original "opt.h" file, and lwIP
// documentation.
//
//*****************************************************************************
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__
//*****************************************************************************
//
// ---------- Platform specific locking ----------
//
//*****************************************************************************
#define SYS_LIGHTWEIGHT_PROT 1 // default is 0
#define NO_SYS 0 // default is 0
//#define MEMCPY(dst,src,len) memcpy(dst,src,len)
//#define SMEMCPY(dst,src,len) memcpy(dst,src,len)
//*****************************************************************************
//
// ---------- Memory options ----------
//
//*****************************************************************************
//#define MEM_LIBC_MALLOC 0
#define MEM_ALIGNMENT 4 // default is 1
#define MEM_SIZE (18 * 1024) // default is 1600, was 16K
//#define MEMP_OVERFLOW_CHECK 0
#define MEMP_SANITY_CHECK 1
//#define MEM_USE_POOLS 0
//#define MEMP_USE_CUSTOM_POOLS 0
//*****************************************************************************
//
// ---------- Internal Memory Pool Sizes ----------
//
//*****************************************************************************
#define MEMP_NUM_PBUF 24 // Default 16, was 16
//#define MEMP_NUM_RAW_PCB 4
//#define MEMP_NUM_UDP_PCB 4
#define MEMP_NUM_TCP_PCB 16 // Default 5, was 12
//#define MEMP_NUM_TCP_PCB_LISTEN 8
//#define MEMP_NUM_TCP_SEG 16
//#define MEMP_NUM_REASSDATA 5
//#define MEMP_NUM_ARP_QUEUE 30
//#define MEMP_NUM_IGMP_GROUP 8
#define MEMP_NUM_SYS_TIMEOUT 10
//#define MEMP_NUM_NETBUF 2
//#define MEMP_NUM_NETCONN 4
//#define MEMP_NUM_TCPIP_MSG_API 8
//#define MEMP_NUM_TCPIP_MSG_INPKT 8
#define PBUF_POOL_SIZE 24 // Default 16, was 36
//*****************************************************************************
//
// ---------- ARP options ----------
//
//*****************************************************************************
#define LWIP_ARP 1
#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 1
#define ETHARP_TRUST_IP_MAC 1
//*****************************************************************************
//
// ---------- IP options ----------
//
//*****************************************************************************
#define IP_FORWARD 0
#define IP_OPTIONS_ALLOWED 1
#define IP_REASSEMBLY 0 // default is 1
#define IP_FRAG 0 // default is 1
//#define IP_REASS_MAXAGE 3
//#define IP_REASS_MAX_PBUFS 10
//#define IP_FRAG_USES_STATIC_BUF 1
//#define IP_FRAG_MAX_MTU 1500
#define IP_DEFAULT_TTL 255
//*****************************************************************************
//
// ---------- ICMP options ----------
//
//*****************************************************************************
#define LWIP_ICMP 1
#define ICMP_TTL (IP_DEFAULT_TTL)
//*****************************************************************************
//
// ---------- RAW options ----------
//
//*****************************************************************************
//#define LWIP_RAW 1
//#define RAW_TTL (IP_DEFAULT_TTL)
//*****************************************************************************
//
// ---------- DHCP options ----------
//
//*****************************************************************************
#define LWIP_DHCP 1 // default is 0
//#define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP))
//*****************************************************************************
//
// ---------- UPNP options ----------
//
//*****************************************************************************
//#define LWIP_UPNP 0
//*****************************************************************************
//
// ---------- PTPD options ----------
//
//*****************************************************************************
//#define LWIP_PTPD 0
//*****************************************************************************
//
// ---------- AUTOIP options ----------
//
//*****************************************************************************
#define LWIP_AUTOIP 0 // default is 0
#define LWIP_DHCP_AUTOIP_COOP ((LWIP_DHCP) && (LWIP_AUTOIP))
// default is 0
//*****************************************************************************
//
// ---------- SNMP options ----------
//
//*****************************************************************************
//#define LWIP_SNMP 0
//#define SNMP_CONCURRENT_REQUESTS 1
//#define SNMP_TRAP_DESTINATIONS 1
//#define SNMP_PRIVATE_MIB 0
//#define SNMP_SAFE_REQUESTS 1
//*****************************************************************************
//
// ---------- IGMP options ----------
//
//*****************************************************************************
//#define LWIP_IGMP 0
//*****************************************************************************
//
// ---------- DNS options -----------
//
//*****************************************************************************
//#define LWIP_DNS 0
//#define DNS_TABLE_SIZE 4
//#define DNS_MAX_NAME_LENGTH 256
//#define DNS_MAX_SERVERS 2
//#define DNS_DOES_NAME_CHECK 1
//#define DNS_USES_STATIC_BUF 1
//#define DNS_MSG_SIZE 512
//*****************************************************************************
//
// ---------- UDP options ----------
//
//*****************************************************************************
#define LWIP_UDP 1
//#define LWIP_UDPLITE 0
#define UDP_TTL (IP_DEFAULT_TTL)
//*****************************************************************************
//
// ---------- TCP options ----------
//
//*****************************************************************************
//#define LWIP_TCP 1
#define TCP_TTL (IP_DEFAULT_TTL)
#define TCP_WND 4096 // default is 2048
//#define TCP_MAXRTX 12
//#define TCP_SYNMAXRTX 6
//#define TCP_QUEUE_OOSEQ 1
#define TCP_MSS 1500 // default is 128
//#define TCP_CALCULATE_EFF_SEND_MSS 1
#define TCP_SND_BUF (4 * TCP_MSS)
// default is 256, was 6 *
//#define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF/TCP_MSS))
//#define TCP_SNDLOWAT (TCP_SND_BUF/2)
//#define TCP_LISTEN_BACKLOG 0
//#define TCP_DEFAULT_LISTEN_BACKLOG 0xff
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -