1 | /*********************************************************************
|
2 | *
|
3 | * Microchip TCP/IP Stack Demo Application Configuration Header
|
4 | *
|
5 | *********************************************************************
|
6 | * FileName: TCPIPConfig.h
|
7 | * Dependencies: Microchip TCP/IP Stack
|
8 | * Processor: PIC18, PIC24F, PIC24H, dsPIC30F, dsPIC33F, PIC32
|
9 | * Compiler: Microchip C32 v1.10 or higher
|
10 | * Microchip C30 v3.12 or higher
|
11 | * Microchip C18 v3.34 or higher
|
12 | * HI-TECH PICC-18 PRO 9.63PL2 or higher
|
13 | * Company: Microchip Technology, Inc.
|
14 | *
|
15 | * Software License Agreement
|
16 | *
|
17 | * Copyright (C) 2002-2010 Microchip Technology Inc. All rights
|
18 | * reserved.
|
19 | *
|
20 | * Microchip licenses to you the right to use, modify, copy, and
|
21 | * distribute:
|
22 | * (i) the Software when embedded on a Microchip microcontroller or
|
23 | * digital signal controller product ("Device") which is
|
24 | * integrated into Licensee's product; or
|
25 | * (ii) ONLY the Software driver source files ENC28J60.c, ENC28J60.h,
|
26 | * ENCX24J600.c and ENCX24J600.h ported to a non-Microchip device
|
27 | * used in conjunction with a Microchip ethernet controller for
|
28 | * the sole purpose of interfacing with the ethernet controller.
|
29 | *
|
30 | * You should refer to the license agreement accompanying this
|
31 | * Software for additional information regarding your rights and
|
32 | * obligations.
|
33 | *
|
34 | * THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
|
35 | * WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
|
36 | * LIMITATION, ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A
|
37 | * PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
38 | * MICROCHIP BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR
|
39 | * CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF
|
40 | * PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY OR SERVICES, ANY CLAIMS
|
41 | * BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE
|
42 | * THEREOF), ANY CLAIMS FOR INDEMNITY OR CONTRIBUTION, OR OTHER
|
43 | * SIMILAR COSTS, WHETHER ASSERTED ON THE BASIS OF CONTRACT, TORT
|
44 | * (INCLUDING NEGLIGENCE), BREACH OF WARRANTY, OR OTHERWISE.
|
45 | *
|
46 | *
|
47 | * Author Date Comment
|
48 | *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
49 | * Howard Schlunder 10/04/2006 Original
|
50 | * Ken Hesky 07/01/2008 Added ZG2100-specific features
|
51 | * SG 03/25/2009 Added ZGLinkMgrII specific features
|
52 | ********************************************************************/
|
53 | #ifndef __TCPIPCONFIG_H
|
54 | #define __TCPIPCONFIG_H
|
55 |
|
56 | #include "GenericTypeDefs.h"
|
57 | #include "Compiler.h"
|
58 | #define GENERATED_BY_TCPIPCONFIG "Version 1.0.3937.25080"
|
59 |
|
60 | // =======================================================================
|
61 | // Application Options
|
62 | // =======================================================================
|
63 |
|
64 | /* Application Level Module Selection
|
65 | * Uncomment or comment the following lines to enable or
|
66 | * disabled the following high-level application modules.
|
67 | */
|
68 | //#define STACK_USE_UART // Application demo using UART for IP address display and stack configuration
|
69 | //#define STACK_USE_UART2TCP_BRIDGE // UART to TCP Bridge application example
|
70 | //#define STACK_USE_IP_GLEANING
|
71 | #define STACK_USE_ICMP_SERVER // Ping query and response capability
|
72 | #define STACK_USE_ICMP_CLIENT // Ping transmission capability
|
73 | //#define STACK_USE_HTTP_SERVER // Old HTTP server
|
74 | #define STACK_USE_HTTP2_SERVER // New HTTP server with POST, Cookies, Authentication, etc.
|
75 | //#define STACK_USE_SSL_SERVER // SSL server socket support (Requires SW300052)
|
76 | //#define STACK_USE_SSL_CLIENT // SSL client socket support (Requires SW300052)
|
77 | #define STACK_USE_AUTO_IP // Dynamic link-layer IP address automatic configuration protocol
|
78 | #define STACK_USE_DHCP_CLIENT // Dynamic Host Configuration Protocol client for obtaining IP address and other parameters
|
79 | //#define STACK_USE_DHCP_SERVER // Single host DHCP server
|
80 | //#define STACK_USE_FTP_SERVER // File Transfer Protocol (old)
|
81 | //#define STACK_USE_SMTP_CLIENT // Simple Mail Transfer Protocol for sending email
|
82 | //#define STACK_USE_SNMP_SERVER // Simple Network Management Protocol v2C Community Agent
|
83 | //#define STACK_USE_SNMPV3_SERVER // Simple Network Management Protocol v3 Agent
|
84 | //#define STACK_USE_TFTP_CLIENT // Trivial File Transfer Protocol client
|
85 | //#define STACK_USE_GENERIC_TCP_CLIENT_EXAMPLE // HTTP Client example in GenericTCPClient.c
|
86 | //#define STACK_USE_GENERIC_TCP_SERVER_EXAMPLE // ToUpper server example in GenericTCPServer.c
|
87 | //#define STACK_USE_TELNET_SERVER // Telnet server
|
88 | //#define STACK_USE_ANNOUNCE // Microchip Embedded Ethernet Device Discoverer server/client
|
89 | //#define STACK_USE_DNS // Domain Name Service Client for resolving hostname strings to IP addresses
|
90 | //#define STACK_USE_DNS_SERVER // Domain Name Service Server for redirection to the local device
|
91 | //#define STACK_USE_NBNS // NetBIOS Name Service Server for repsonding to NBNS hostname broadcast queries
|
92 | //#define STACK_USE_REBOOT_SERVER // Module for resetting this PIC remotely. Primarily useful for a Bootloader.
|
93 | //#define STACK_USE_SNTP_CLIENT // Simple Network Time Protocol for obtaining current date/time from Internet
|
94 | //#define STACK_USE_UDP_PERFORMANCE_TEST // Module for testing UDP TX performance characteristics. NOTE: Enabling this will cause a huge amount of UDP broadcast packets to flood your network on the discard port. Use care when enabling this on production networks, especially with VPNs (could tunnel broadcast traffic across a limited bandwidth connection).
|
95 | //#define STACK_USE_TCP_PERFORMANCE_TEST // Module for testing TCP TX performance characteristics
|
96 | //#define STACK_USE_DYNAMICDNS_CLIENT // Dynamic DNS client updater module
|
97 | //#define STACK_USE_BERKELEY_API // Berekely Sockets APIs are available
|
98 | //#define STACK_USE_ZEROCONF_LINK_LOCAL // Zeroconf IPv4 Link-Local Addressing
|
99 | //#define STACK_USE_ZEROCONF_MDNS_SD // Zeroconf mDNS and mDNS service discovery
|
100 |
|
101 |
|
102 | // =======================================================================
|
103 | // Data Storage Options
|
104 | // =======================================================================
|
105 |
|
106 | /* MPFS Configuration
|
107 | * MPFS is automatically included when required for other
|
108 | * applications. If your custom application requires it
|
109 | * otherwise, uncomment the appropriate selection.
|
110 | */
|
111 | //#define STACK_USE_MPFS
|
112 | #define STACK_USE_MPFS2
|
113 |
|
114 | /* MPFS Storage Location
|
115 | * If html pages are stored in internal program memory,
|
116 | * comment both MPFS_USE_EEPROM and MPFS_USE_SPI_FLASH, then
|
117 | * include an MPFS image (.c or .s file) in the project.
|
118 | * If html pages are stored in external memory, uncomment the
|
119 | * appropriate definition.
|
120 | *
|
121 | * Supported serial flash parts include the SST25VFxxxB series.
|
122 | */
|
123 | //#define MPFS_USE_EEPROM
|
124 | //#define MPFS_USE_SPI_FLASH
|
125 |
|
126 | /* EEPROM Addressing Selection
|
127 | * If using the 1Mbit EEPROM, uncomment this line
|
128 | */
|
129 | //#define USE_EEPROM_25LC1024
|
130 |
|
131 | /* EEPROM Reserved Area
|
132 | * Number of EEPROM bytes to be reserved before MPFS storage starts.
|
133 | * These bytes host application configurations such as IP Address,
|
134 | * MAC Address, and any other required variables.
|
135 | *
|
136 | * For MPFS Classic, this setting must match the Reserved setting
|
137 | * on the Advanced Settings page of the MPFS2 Utility.
|
138 | */
|
139 | #define MPFS_RESERVE_BLOCK (137ul)
|
140 |
|
141 | /* MPFS File Handles
|
142 | * Maximum number of simultaneously open MPFS2 files.
|
143 | * For MPFS Classic, this has no effect.
|
144 | */
|
145 | #define MAX_MPFS_HANDLES (7ul)
|
146 |
|
147 |
|
148 | // =======================================================================
|
149 | // Network Addressing Options
|
150 | // =======================================================================
|
151 |
|
152 | /* Default Network Configuration
|
153 | * These settings are only used if data is not found in EEPROM.
|
154 | * To clear EEPROM, hold BUTTON0, reset the board, and continue
|
155 | * holding until the LEDs flash. Release, and reset again.
|
156 | */
|
157 | #define MY_DEFAULT_HOST_NAME "MCHPBOARD"
|
158 |
|
159 | #define MY_DEFAULT_MAC_BYTE1 (0x00) // Use the default of 00-04-A3-00-00-00
|
160 | #define MY_DEFAULT_MAC_BYTE2 (0x04) // if using an ENCX24J600, MRF24WB0M, or
|
161 | #define MY_DEFAULT_MAC_BYTE3 (0xA3) // PIC32MX6XX/7XX internal Ethernet
|
162 | #define MY_DEFAULT_MAC_BYTE4 (0x00) // controller and wish to use the
|
163 | #define MY_DEFAULT_MAC_BYTE5 (0x00) // internal factory programmed MAC
|
164 | #define MY_DEFAULT_MAC_BYTE6 (0x00) // address instead.
|
165 |
|
166 | #define MY_DEFAULT_IP_ADDR_BYTE1 (169ul)
|
167 | #define MY_DEFAULT_IP_ADDR_BYTE2 (254ul)
|
168 | #define MY_DEFAULT_IP_ADDR_BYTE3 (1ul)
|
169 | #define MY_DEFAULT_IP_ADDR_BYTE4 (1ul)
|
170 |
|
171 | #define MY_DEFAULT_MASK_BYTE1 (255ul)
|
172 | #define MY_DEFAULT_MASK_BYTE2 (255ul)
|
173 | #define MY_DEFAULT_MASK_BYTE3 (0ul)
|
174 | #define MY_DEFAULT_MASK_BYTE4 (0ul)
|
175 |
|
176 | #define MY_DEFAULT_GATE_BYTE1 (169ul)
|
177 | #define MY_DEFAULT_GATE_BYTE2 (254ul)
|
178 | #define MY_DEFAULT_GATE_BYTE3 (1ul)
|
179 | #define MY_DEFAULT_GATE_BYTE4 (1ul)
|
180 |
|
181 | #define MY_DEFAULT_PRIMARY_DNS_BYTE1 (169ul)
|
182 | #define MY_DEFAULT_PRIMARY_DNS_BYTE2 (254ul)
|
183 | #define MY_DEFAULT_PRIMARY_DNS_BYTE3 (1ul)
|
184 | #define MY_DEFAULT_PRIMARY_DNS_BYTE4 (1ul)
|
185 |
|
186 | #define MY_DEFAULT_SECONDARY_DNS_BYTE1 (0ul)
|
187 | #define MY_DEFAULT_SECONDARY_DNS_BYTE2 (0ul)
|
188 | #define MY_DEFAULT_SECONDARY_DNS_BYTE3 (0ul)
|
189 | #define MY_DEFAULT_SECONDARY_DNS_BYTE4 (0ul)
|
190 |
|
191 | // =======================================================================
|
192 | // PIC32MX7XX/6XX MAC Layer Options
|
193 | // If not using a PIC32MX7XX/6XX device, ignore this section.
|
194 | // =======================================================================
|
195 | #define ETH_CFG_LINK 0 // set to 1 if you need to config the link to specific following parameters
|
196 | // otherwise the default connection will be attempted
|
197 | // depending on the selected PHY
|
198 | #define ETH_CFG_AUTO 1 // use auto negotiation
|
199 | #define ETH_CFG_10 1 // use/advertise 10 Mbps capability
|
200 | #define ETH_CFG_100 1 // use/advertise 100 Mbps capability
|
201 | #define ETH_CFG_HDUPLEX 1 // use/advertise half duplex capability
|
202 | #define ETH_CFG_FDUPLEX 1 // use/advertise full duplex capability
|
203 | #define ETH_CFG_AUTO_MDIX 1 // use/advertise auto MDIX capability
|
204 | #define ETH_CFG_SWAP_MDIX 1 // use swapped MDIX. else normal MDIX
|
205 |
|
206 | #define EMAC_TX_DESCRIPTORS 2 // number of the TX descriptors to be created
|
207 | #define EMAC_RX_DESCRIPTORS 8 // number of the RX descriptors and RX buffers to be created
|
208 |
|
209 | #define EMAC_RX_BUFF_SIZE 1536 // size of a RX buffer. should be multiple of 16
|
210 | // this is the size of all receive buffers processed by the ETHC
|
211 | // The size should be enough to accomodate any network received packet
|
212 | // If the packets are larger, they will have to take multiple RX buffers
|
213 | // The current implementation does not handle this situation right now and the packet is discarded.
|
214 |
|
215 |
|
216 | // =======================================================================
|
217 | // Transport Layer Options
|
218 | // =======================================================================
|
219 |
|
220 | /* Transport Layer Configuration
|
221 | * The following low level modules are automatically enabled
|
222 | * based on module selections above. If your custom module
|
223 | * requires them otherwise, enable them here.
|
224 | */
|
225 | //#define STACK_USE_TCP
|
226 | //#define STACK_USE_UDP
|
227 |
|
228 | /* Client Mode Configuration
|
229 | * Uncomment following line if this stack will be used in CLIENT
|
230 | * mode. In CLIENT mode, some functions specific to client operation
|
231 | * are enabled.
|
232 | */
|
233 | #define STACK_CLIENT_MODE
|
234 |
|
235 | /* TCP Socket Memory Allocation
|
236 | * TCP needs memory to buffer incoming and outgoing data. The
|
237 | * amount and medium of storage can be allocated on a per-socket
|
238 | * basis using the example below as a guide.
|
239 | */
|
240 | // Allocate how much total RAM (in bytes) you want to allocate
|
241 | // for use by your TCP TCBs, RX FIFOs, and TX FIFOs.
|
242 | #define TCP_ETH_RAM_SIZE (2142ul)
|
243 | #define TCP_PIC_RAM_SIZE (0ul)
|
244 | #define TCP_SPI_RAM_SIZE (0ul)
|
245 | #define TCP_SPI_RAM_BASE_ADDRESS (0x00)
|
246 |
|
247 | // Define names of socket types
|
248 | #define TCP_SOCKET_TYPES
|
249 | #define TCP_PURPOSE_GENERIC_TCP_CLIENT 0
|
250 | #define TCP_PURPOSE_GENERIC_TCP_SERVER 1
|
251 | #define TCP_PURPOSE_TELNET 2
|
252 | #define TCP_PURPOSE_FTP_COMMAND 3
|
253 | #define TCP_PURPOSE_FTP_DATA 4
|
254 | #define TCP_PURPOSE_TCP_PERFORMANCE_TX 5
|
255 | #define TCP_PURPOSE_TCP_PERFORMANCE_RX 6
|
256 | #define TCP_PURPOSE_UART_2_TCP_BRIDGE 7
|
257 | #define TCP_PURPOSE_HTTP_SERVER 8
|
258 | #define TCP_PURPOSE_DEFAULT 9
|
259 | #define TCP_PURPOSE_BERKELEY_SERVER 10
|
260 | #define TCP_PURPOSE_BERKELEY_CLIENT 11
|
261 | #define END_OF_TCP_SOCKET_TYPES
|
262 |
|
263 | #if defined(__TCP_C)
|
264 | // Define what types of sockets are needed, how many of
|
265 | // each to include, where their TCB, TX FIFO, and RX FIFO
|
266 | // should be stored, and how big the RX and TX FIFOs should
|
267 | // be. Making this initializer bigger or smaller defines
|
268 | // how many total TCP sockets are available.
|
269 | //
|
270 | // Each socket requires up to 56 bytes of PIC RAM and
|
271 | // 48+(TX FIFO size)+(RX FIFO size) bytes of TCP_*_RAM each.
|
272 | //
|
273 | // Note: The RX FIFO must be at least 1 byte in order to
|
274 | // receive SYN and FIN messages required by TCP. The TX
|
275 | // FIFO can be zero if desired.
|
276 | #define TCP_CONFIGURATION
|
277 | ROM struct
|
278 | {
|
279 | BYTE vSocketPurpose;
|
280 | BYTE vMemoryMedium;
|
281 | WORD wTXBufferSize;
|
282 | WORD wRXBufferSize;
|
283 | } TCPSocketInitializer[] =
|
284 | {
|
285 | //{TCP_PURPOSE_GENERIC_TCP_CLIENT, TCP_ETH_RAM, 125, 1200},
|
286 | //{TCP_PURPOSE_GENERIC_TCP_SERVER, TCP_ETH_RAM, 20, 20},
|
287 | //{TCP_PURPOSE_TELNET, TCP_ETH_RAM, 200, 150},
|
288 | //{TCP_PURPOSE_TELNET, TCP_ETH_RAM, 200, 150},
|
289 | //{TCP_PURPOSE_TELNET, TCP_ETH_RAM, 200, 150},
|
290 | //{TCP_PURPOSE_FTP_COMMAND, TCP_ETH_RAM, 100, 40},
|
291 | //{TCP_PURPOSE_FTP_DATA, TCP_ETH_RAM, 0, 128},
|
292 | {TCP_PURPOSE_TCP_PERFORMANCE_TX, TCP_ETH_RAM, 2000, 1},
|
293 | //{TCP_PURPOSE_TCP_PERFORMANCE_RX, TCP_ETH_RAM, 40, 2000},
|
294 | //{TCP_PURPOSE_UART_2_TCP_BRIDGE, TCP_ETH_RAM, 256, 256},
|
295 | //{TCP_PURPOSE_HTTP_SERVER, TCP_ETH_RAM, 1500, 1500},
|
296 | //{TCP_PURPOSE_HTTP_SERVER, TCP_ETH_RAM, 1500, 1500},
|
297 | //{TCP_PURPOSE_DEFAULT, TCP_ETH_RAM, 1000, 1000},
|
298 | {TCP_PURPOSE_BERKELEY_SERVER, TCP_ETH_RAM, 25, 20},
|
299 | //{TCP_PURPOSE_BERKELEY_SERVER, TCP_ETH_RAM, 25, 20},
|
300 | //{TCP_PURPOSE_BERKELEY_SERVER, TCP_ETH_RAM, 25, 20},
|
301 | //{TCP_PURPOSE_BERKELEY_CLIENT, TCP_ETH_RAM, 125, 100},
|
302 | };
|
303 | #define END_OF_TCP_CONFIGURATION
|
304 | #endif
|
305 |
|
306 | /* UDP Socket Configuration
|
307 | * Define the maximum number of available UDP Sockets, and whether
|
308 | * or not to include a checksum on packets being transmitted.
|
309 | */
|
310 | #define MAX_UDP_SOCKETS (10u)
|
311 | #define UDP_USE_TX_CHECKSUM // This slows UDP TX performance by nearly 50%, except when using the ENCX24J600 or PIC32MX6XX/7XX, which have a super fast DMA and incurs virtually no speed pentalty.
|
312 |
|
313 |
|
314 | /* Berkeley API Sockets Configuration
|
315 | * Note that each Berkeley socket internally uses one TCP or UDP socket
|
316 | * defined by MAX_UDP_SOCKETS and the TCPSocketInitializer[] array.
|
317 | * Therefore, this number MUST be less than or equal to MAX_UDP_SOCKETS + the
|
318 | * number of TCP sockets defined by the TCPSocketInitializer[] array
|
319 | * (i.e. sizeof(TCPSocketInitializer)/sizeof(TCPSocketInitializer[0])).
|
320 | * This define has no effect if STACK_USE_BERKELEY_API is not defined and
|
321 | * Berkeley Sockets are disabled. Set this value as low as your application
|
322 | * requires to avoid waisting RAM.
|
323 | */
|
324 | #define BSD_SOCKET_COUNT (5u)
|
325 |
|
326 |
|
327 | // =======================================================================
|
328 | // Application-Specific Options
|
329 | // =======================================================================
|
330 |
|
331 | // -- HTTP2 Server options -----------------------------------------------
|
332 |
|
333 | // Maximum numbers of simultaneous HTTP connections allowed.
|
334 | // Each connection consumes 2 bytes of RAM and a TCP socket
|
335 | #define MAX_HTTP_CONNECTIONS (2u)
|
336 |
|
337 | // Optional setting to use PIC RAM instead of Ethernet/Wi-Fi RAM for
|
338 | // storing HTTP Connection Context variables (HTTP_CONN structure for each
|
339 | // HTTP connection). Undefining this macro results in the Ethernet/Wi-Fi
|
340 | // RAM being used (minimum PIC RAM usage, lower performance). Defining
|
341 | // this macro results in PIC RAM getting used (higher performance, but uses
|
342 | // PIC RAM). This option should not be enabled on PIC18 devices. The
|
343 | // performance increase of having this option defined is only apparent when
|
344 | // the HTTP server is servicing multiple connections simultaneously.
|
345 | //#define HTTP_SAVE_CONTEXT_IN_PIC_RAM
|
346 |
|
347 | // Indicate what file to serve when no specific one is requested
|
348 | #define HTTP_DEFAULT_FILE /*"MyWebsite.html"*/ "index.htm"
|
349 | #define HTTPS_DEFAULT_FILE /*"MyWebsite.html"*/ "index.htm"
|
350 | #define HTTP_DEFAULT_LEN (10u) // For buffer overrun protection.
|
351 | // Set to longest length of above two strings.
|
352 |
|
353 | // Configure MPFS over HTTP updating
|
354 | // Comment this line to disable updating via HTTP
|
355 | #define HTTP_MPFS_UPLOAD "mpfsupload"
|
356 | //#define HTTP_MPFS_UPLOAD_REQUIRES_AUTH // Require password for MPFS uploads
|
357 | // Certain firewall and router combinations cause the MPFS2 Utility to fail
|
358 | // when uploading. If this happens, comment out this definition.
|
359 |
|
360 | // Define which HTTP modules to use
|
361 | // If not using a specific module, comment it to save resources
|
362 | //#define HTTP_USE_POST // Enable POST support
|
363 | //#define HTTP_USE_COOKIES // Enable cookie support
|
364 | //#define HTTP_USE_AUTHENTICATION // Enable basic authentication support
|
365 |
|
366 | //#define HTTP_NO_AUTH_WITHOUT_SSL // Uncomment to require SSL before requesting a password
|
367 |
|
368 | // Define the listening port for the HTTP server
|
369 | #define HTTP_PORT (80u)
|
370 |
|
371 | // Define the listening port for the HTTPS server (if STACK_USE_SSL_SERVER is enabled)
|
372 | #define HTTPS_PORT (443u)
|
373 |
|
374 | // Define the maximum data length for reading cookie and GET/POST arguments (bytes)
|
375 | #define HTTP_MAX_DATA_LEN (100u)
|
376 |
|
377 | // Define the minimum number of bytes free in the TX FIFO before executing callbacks
|
378 | #define HTTP_MIN_CALLBACK_FREE (16u)
|
379 |
|
380 | //#define STACK_USE_HTTP_APP_RECONFIG // Use the AppConfig web page in the Demo App (~2.5kb ROM, ~0b RAM)
|
381 | //#define STACK_USE_HTTP_MD5_DEMO // Use the MD5 Demo web page (~5kb ROM, ~160b RAM)
|
382 | //#define STACK_USE_HTTP_EMAIL_DEMO // Use the e-mail demo web page
|
383 |
|
384 | // -- SSL Options --------------------------------------------------------
|
385 |
|
386 | #define MAX_SSL_CONNECTIONS (2ul) // Maximum connections via SSL
|
387 | #define MAX_SSL_SESSIONS (2ul) // Max # of cached SSL sessions
|
388 | #define MAX_SSL_BUFFERS (4ul) // Max # of SSL buffers (2 per socket)
|
389 | #define MAX_SSL_HASHES (5ul) // Max # of SSL hashes (2 per, plus 1 to avoid deadlock)
|
390 |
|
391 | // Bits in SSL RSA key. This parameter is used for SSL sever
|
392 | // connections only. The only valid value is 512 bits (768 and 1024
|
393 | // bits do not work at this time). Note, however, that SSL client
|
394 | // operations do currently work up to 1024 bit RSA key length.
|
395 | #define SSL_RSA_KEY_SIZE (512ul)
|
396 |
|
397 |
|
398 | // -- Telnet Options -----------------------------------------------------
|
399 |
|
400 | // Number of simultaneously allowed Telnet sessions. Note that you
|
401 | // must have an equal number of TCP_PURPOSE_TELNET type TCP sockets
|
402 | // declared in the TCPSocketInitializer[] array above for multiple
|
403 | // connections to work. If fewer sockets are available than this
|
404 | // definition, then the the lesser of the two quantities will be the
|
405 | // actual limit.
|
406 | #define MAX_TELNET_CONNECTIONS (1u)
|
407 |
|
408 | // Default local listening port for the Telnet server. Port 23 is the
|
409 | // protocol default.
|
410 | #define TELNET_PORT (23u)
|
411 |
|
412 | // Default local listening port for the Telnet server when SSL secured.
|
413 | // Port 992 is the telnets protocol default.
|
414 | #define TELNETS_PORT (992u)
|
415 |
|
416 | // Force all connecting clients to be SSL secured and connected via
|
417 | // TELNETS_PORT. Connections on port TELNET_PORT will be ignored. If
|
418 | // STACK_USE_SSL_SERVER is undefined, this entire setting is ignored
|
419 | // (server will accept unsecured connections on TELNET_PORT and won't even
|
420 | // listen on TELNETS_PORT).
|
421 | //#define TELNET_REJECT_UNSECURED
|
422 |
|
423 | // Default username and password required to login to the Telnet server.
|
424 | #define TELNET_USERNAME "admin"
|
425 | #define TELNET_PASSWORD "microchip"
|
426 |
|
427 |
|
428 | // -- SNMP Options -------------------------------------------------------
|
429 |
|
430 | // Comment following line if SNMP TRAP support is needed
|
431 | //#define SNMP_TRAP_DISABLED
|
432 |
|
433 | //#define SNMP_STACK_USE_V2_TRAP
|
434 | #if defined(STACK_USE_SNMPV3_SERVER)
|
435 | #define SNMP_V1_V2_TRAP_WITH_SNMPV3
|
436 | #endif
|
437 |
|
438 | // This is the maximum length for community string.
|
439 | // Application must ensure that this length is observed.
|
440 | // SNMP module adds one byte extra after SNMP_COMMUNITY_MAX_LEN
|
441 | // for adding '\0' NULL character.
|
442 | #define SNMP_COMMUNITY_MAX_LEN (8u)
|
443 | #define SNMP_MAX_COMMUNITY_SUPPORT (3u)
|
444 | #define NOTIFY_COMMUNITY_LEN (SNMP_COMMUNITY_MAX_LEN)
|
445 |
|
446 | // Default SNMPv2C community names. These can be overridden at run time if
|
447 | // alternate strings are present in external EEPROM or Flash (actual
|
448 | // strings are stored in AppConfig.readCommunity[] and
|
449 | // AppConfig.writeCommunity[] arrays). These strings are case sensitive.
|
450 | // An empty string means disabled (not matchable).
|
451 | // For application security, these default community names should not be
|
452 | // used, but should all be disabled to force the end user to select unique
|
453 | // community names. These defaults are provided only to make it easier to
|
454 | // start development. Specifying more strings than
|
455 | // SNMP_MAX_COMMUNITY_SUPPORT will result in the later strings being
|
456 | // ignored (but still wasting program memory). Specifying fewer strings is
|
457 | // legal, as long as at least one is present. A string larger than
|
458 | // SNMP_COMMUNITY_MAX_LEN bytes will be ignored.
|
459 | #define SNMP_READ_COMMUNITIES {"public", "read", ""}
|
460 | #define END_OF_SNMP_READ_COMMUNITIES
|
461 | #define SNMP_WRITE_COMMUNITIES {"private", "write", "public"}
|
462 | #define END_OF_SNMP_WRITE_COMMUNITIES
|
463 | #endif
|
464 |
|
465 |
|
466 | //#define MPFS_USE_FAT
|
467 |
|
468 | #define MDD_ROOT_DIR_PATH "\\"
|