📄 net_cfg_net.h
字号:
/*
*********************************************************************************************************
* uC/TCP-IP
* The Embedded TCP/IP Suite
*
* (c) Copyright 2003-2006; Micrium, Inc.; Weston, FL
*
* All rights reserved. Protected by international copyright laws.
*
* uC/TCP-IP is provided in source form for FREE evaluation, for educational
* use or peaceful research. If you plan on using uC/TCP-IP in a commercial
* product you need to contact Micrium to properly license its use in your
* product. We provide ALL the source code for your convenience and to help
* you experience uC/TCP-IP. The fact that the source code is provided does
* NOT mean that you can use it without paying a licensing fee.
*
* Knowledge of the source code may NOT be used to develop a similar product.
*
* Please help us continue to provide the Embedded community with the finest
* software available. Your honesty is greatly appreciated.
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*
* NETWORK CONFIGURATION
*
* Filename : net_cfg_net.h
* Version : V1.87
* Programmer(s) : ITJ
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* NETWORK DEBUG CONFIGURATION
*********************************************************************************************************
*/
#if (NET_ICMP_CFG_TX_SRC_QUENCH_EN == DEF_ENABLED)
#define NET_DBG_CFG_MON_TASK_EN DEF_ENABLED
#else
#define NET_DBG_CFG_MON_TASK_EN DEF_DISABLED
#endif
#if ((NET_DBG_CFG_MON_TASK_EN == DEF_ENABLED) || \
(NET_DBG_CFG_STATUS_EN == DEF_ENABLED))
#define NET_DBG_CFG_STATUS_RSRC_LOST_EN DEF_ENABLED
#else
#define NET_DBG_CFG_STATUS_RSRC_LOST_EN DEF_DISABLED
#endif
#if ((NET_DBG_CFG_MON_TASK_EN == DEF_ENABLED) || \
(NET_DBG_CFG_STATUS_EN == DEF_ENABLED))
#define NET_DBG_CFG_STATUS_RSRC_LO_EN DEF_ENABLED
#else
#define NET_DBG_CFG_STATUS_RSRC_LO_EN DEF_DISABLED
#endif
/*$PAGE*/
/*
*********************************************************************************************************
* NETWORK INTERFACE LAYER CONFIGURATION
*
* Note(s) : (1) The following pre-processor directives correctly configure network interface parameters.
* DO NOT MODIFY.
*
* (2) Network interface maximum header size MUST be #define'd based on network interface type
* configured in 'net_cfg.h'. Assumes header sizes are fixed based on configured network
* interface type (see any 'net_if.h NETWORK INTERFACE HEADER DEFINES Note #1').
*
* (3) Ideally, the Packet-based Network Interface Layer would configure the network protocol
* suite for the inclusion of the Packet-based Network Interface Layer via the
* NET_IF_PKT_MODULE_PRESENT #define (see 'net_if_pkt.h MODULE Note #2').
*
* However, the presence of the Packet-based Network Interface Layer MUST be configured ...
*
* (a) By each network interface that requires the Packet-based Network Interface Layer
* AND
* (b) PRIOR to all other network modules that require Packet-based Network Interface Layer
* Configuration
*
* (4) Some network interfaces require network-address-to-hardware-address bindings, implemented
* in an Address Resolution Protocol Layer (see 'net_arp.h Note #1').
*
* Ideally, the ARP Layer would configure the network protocol suite for the inclusion of
* the ARP Layer via the NET_ARP_MODULE_PRESENT #define (see 'net_arp.h MODULE Note #2' &
* 'ARP LAYER CONFIGURATION Note #2b').
*
* However, since the ARP Layer is required only for SOME network interfaces, the presence of
* the ARP Layer MUST be configured ...
*
* (a) By each network interface that requires the ARP Layer
* AND
* (b) PRIOR to all other network modules that require ARP Layer Configuration
*********************************************************************************************************
*/
/* ---------------- CFG NET IF PARAMS ----------------- */
#ifdef NET_IF_HDR_SIZE_MAX
#undef NET_IF_HDR_SIZE_MAX
#endif
/* See Note #2. */
#if (NET_IF_CFG_TYPE == NET_IF_TYPE_ETHER)
#define NET_IF_HDR_SIZE_MAX NET_IF_HDR_SIZE_ETHER
#define NET_IF_PKT_MODULE_PRESENT /* See Note #3. */
#define NET_ARP_MODULE_PRESENT /* See Note #4. */
#endif
/*$PAGE*/
/*
*********************************************************************************************************
* ARP LAYER CONFIGURATION
*
* Note(s) : (1) The following pre-processor directives correctly configure ARP parameters. DO NOT MODIFY.
*
* (2) (a) Address Resolution Protocol required only for some network interfaces (see 'net_arp.h
* Note #1').
*
* (b) ARP Layer Configuration included only when NET_ARP_MODULE_PRESENT is #define'd.
*
* See 'net_arp.h MODULE Note #2' & 'NETWORK INTERFACE LAYER CONFIGURATION Note #4'.
*
* (3) ARP hardware & protocol address lengths MUST be #define'd based on ARP hardware & protocol
* types configured in 'net_cfg.h'. Assumes hardware & protocol address lengths are fixed
* based on configured ARP hardware & protocol types (see 'net_arp.h Notes #2a & #2b').
*********************************************************************************************************
*/
#ifdef NET_ARP_MODULE_PRESENT /* See Note #2b. */
/* ------------------ CFG ARP PARAMS ------------------ */
#ifdef NET_ARP_CFG_HW_ADDR_LEN
#undef NET_ARP_CFG_HW_ADDR_LEN
#endif
/* See Note #3. */
#if (NET_ARP_CFG_HW_TYPE == NET_ARP_HW_TYPE_ETHER)
#define NET_ARP_CFG_HW_ADDR_LEN NET_ARP_HW_ADDR_LEN_ETHER
#endif
#ifdef NET_ARP_CFG_PROTOCOL_ADDR_LEN
#undef NET_ARP_CFG_PROTOCOL_ADDR_LEN
#endif
/* See Note #3. */
#if (NET_ARP_CFG_PROTOCOL_TYPE == NET_ARP_PROTOCOL_TYPE_IP_V4)
#define NET_ARP_CFG_PROTOCOL_ADDR_LEN NET_ARP_PROTOCOL_ADDR_LEN_IP_V4
#endif
#endif
/*$PAGE*/
/*
*********************************************************************************************************
* TRANSPORT LAYER CONFIGURATION
*
* Note(s) : (1) The following pre-processor directives correctly configure transport layer parameters.
* DO NOT MODIFY.
*********************************************************************************************************
*/
#ifdef NET_CFG_TRANSPORT_TYPE_STREAM_EN
#undef NET_CFG_TRANSPORT_TYPE_STREAM_EN
#endif
#if (NET_CFG_TRANSPORT_LAYER_SEL == NET_TRANSPORT_LAYER_SEL_UDP_TCP)
#define NET_CFG_TRANSPORT_TYPE_STREAM_EN DEF_ENABLED
#else
#define NET_CFG_TRANSPORT_TYPE_STREAM_EN DEF_DISABLED
#endif
/*
*********************************************************************************************************
* TCP LAYER CONFIGURATION
*
* Note(s) : (1) The following pre-processor directives correctly configure TCP parameters. DO NOT MODIFY.
*
* (2) (a) TCP Layer required only for some application interfaces (see 'net_tcp.h MODULE
* Note #1').
*
* (b) Ideally, the TCP Layer would configure the network protocol suite for the inclusion of
* the TCP Layer via the NET_TCP_MODULE_PRESENT #define (see 'net_tcp.h MODULE Note #2').
* However, the presence of the TCP Layer MUST be configured PRIOR to all other network
* modules that require TCP Layer Configuration.
*********************************************************************************************************
*/
#if (NET_CFG_TRANSPORT_LAYER_SEL == NET_TRANSPORT_LAYER_SEL_UDP_TCP)
#define NET_TCP_MODULE_PRESENT /* See Note #2. */
#endif
/*$PAGE*/
/*
*********************************************************************************************************
* NETWORK SOCKET LAYER CONFIGURATION
*
* Note(s) : (1) The following pre-processor directives correctly configure network socket parameters.
* DO NOT MODIFY.
*
* (2) (a) Network Socket Layer required only for some application interfaces (see 'net_sock.h
* Note #1').
*
* (b) Ideally, the Network Socket Layer would configure the network protocol suite for the
* inclusion of the Socket Layer via the NET_SOCK_MODULE_PRESENT #define (see 'net_sock.h
* MODULE Note #2'). However, the presence of the Socket Layer MUST be configured PRIOR
* to all other network modules that require Socket Layer Configuration.
*
* (3) Network socket family configuration values MUST be #define'd based on Network Socket
* Family type configured in 'net_cfg.h'.
*********************************************************************************************************
*/
/* ------------ CFG SOCK MODULE INCLUSION ------------- */
#if ((NET_CFG_TRANSPORT_LAYER_SEL == NET_TRANSPORT_LAYER_SEL_UDP_TCP) || \
((NET_CFG_TRANSPORT_LAYER_SEL == NET_TRANSPORT_LAYER_SEL_UDP ) && \
((NET_UDP_CFG_APP_API_SEL == NET_UDP_APP_API_SEL_SOCK ) || \
(NET_UDP_CFG_APP_API_SEL == NET_UDP_APP_API_SEL_SOCK_APP))))
#define NET_SOCK_MODULE_PRESENT /* See Note #2. */
/* ----------------- CFG SOCK PARAMS ------------------ */
#ifdef NET_SOCK_CFG_ADDR_LEN
#undef NET_SOCK_CFG_ADDR_LEN
#endif
#ifdef NET_SOCK_CFG_PROTOCOL_MAX
#undef NET_SOCK_CFG_PROTOCOL_MAX
#endif
/* See Note #3. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -