Embedded TCP/IP stack
4.1.0
|
Detailed Description
The FNET has a number of configuration parameters that specify settings and features of the stack and the services.
Every application that uses the FNET stack must contain a configuration file named fnet_user_config.h
. It is used to specify application-specific parameters for building the FNET code. The file does not need to contain all parameters, specify only those you want to explicitly set or change. All configuration parameters have a default value provided in the FNET stack code.
Typical use of application-specific configuration is disabling the features that are not needed in application and reducing target system-memory requirements.
The FNET configuration parameters are prefixed FNET_CFG_
for coherence and are defined in the following files:
- fnet_user_config.h = The user configuration file used to set or change any of the FNET configuration parameters.
- fnet_config.h = The main FNET configuration file that is included by all C files in the stack, and which in turn includes all other configuration files. The user's configuration file
fnet_user_config.h
has the highest priority.- fnet_stack_config.h = TCP/IP stack-specific configuration.
- fnet_comp_config.h = Compiler-specific configuration.
- fnet_cpu_config.h = The main platform configuration file, which includes all platform-specific configuration files.
- fnet_<platform>_config.h = Platform-specific default configuration parameters.
- fnet_service_config.h = Service-specific configuration file which includes all service-specific configuration files.
- fnet_http_config.h = HTTP-Server-specific configuration.
- fnet_dhcp_config.h = DHCP-Client-specific configuration.
- fnet_tftp_config.h = TFTP-Client-specific configuration.
- fnet_flash_config.h = Flash-Driver-specific configuration.
- fnet_fs_config.h = File-System-Interface-specific configuration.
- fnet_ping_config.h = PING-service-specific configuration.
- fnet_sntp_config.h = SNTP-Client-specific configuration.
- fnet_serial_config.h = Serial library configuration.
- fnet_shell_config.h = Shell-specific configuration.
- fnet_telnet_config.h = Telnet-Server-specific configuration.
- Note
- The fnet_user_config.h is the ONLY file the user should modify.
Example of fnet_user_config.h:#ifndef _FNET_USER_CONFIG_H_#define _FNET_USER_CONFIG_H_/****************************************************************************** Compiler support FNET_CFG_COMP_<name> is defined in project options.*//****************************************************************************** Processor type FNET_CFG_CPU_<name> is defined in project options.*//****************************************************************************** Default serial port number FNET_CFG_CPU_SERIAL_PORT_DEFAULT is defined* in project options.*//****************************************************************************** IPv4 and/or IPv6 protocol support.*/#define FNET_CFG_IP4 (1)#define FNET_CFG_IP6 (1)/****************************************************************************** TCP protocol support.* You can disable it to save a substantial amount of code if* your application only needs UDP. By default it is enabled.*/#define FNET_CFG_TCP (1)/****************************************************************************** UDP protocol support.* You can disable it to save a some amount of code if your* application only needs TCP. By default it is enabled.*/#define FNET_CFG_UDP (1)/****************************************************************************** UDP checksum.* If enabled, the UDP checksum will be generated for transmitted* datagrams and be verified on received UDP datagrams.* You can disable it to speedup UDP applications.* By default it is enabled.*/#define FNET_CFG_UDP_CHECKSUM (1)/****************************************************************************** IP fragmentation.* If the IP fragmentation is enabled, the IP will attempt to reassemble IP* packet fragments and will able to generate fragmented IP packets.* If disabled, the IP will silently discard fragmented IP packets..*/#define FNET_CFG_IP4_FRAGMENTATION (1)/****************************************************************************** DHCP Client service support.*/#define FNET_CFG_DHCP (1)/****************************************************************************** Auto-IP service support.*/#define FNET_CFG_AUTOIP (1)/****************************************************************************** HTTP Server service support.*/#define FNET_CFG_HTTP (1)#define FNET_CFG_HTTP_AUTHENTICATION_BASIC (1) /* Enable HTTP authentication.*/#define FNET_CFG_HTTP_POST (1) /* Enable HTTP POST-method support.*//****************************************************************************** Telnet Server service support.*/#define FNET_CFG_TELNET (1)/****************************************************************************** Flash Module driver support.*/#define FNET_CFG_FLASH (1)/****************************************************************************** DNS client/resolver service support.*/#define FNET_CFG_DNS (1)#define FNET_CFG_DNS_RESOLVER (1)/****************************************************************************** Link-Local Multicast Name Resolution (LLMNR) server/responder support.*/#define FNET_CFG_LLMNR (1)#define FNET_CFG_LLMNR_HOSTNAME_TTL (2u)/****************************************************************************** PING service support.*/#define FNET_CFG_PING (1)/****************************************************************************** Link-Detection service support.*/#define FNET_CFG_LINK (1)#endif*
Modules | |
Stack Configuration Parameters | |
Platform-Specific Configuration Parameters | |
Service-Specific Configuration Parameters | |
© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net