NetBurner 3.5.0
PDF Version
 
predef.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
5#ifndef _PREDEF_H_
6#define _PREDEF_H_
7
8/* This release Build on: $Date: 2012/03/28 14:35:22 $ */
9/* This build revision tag: $Name: $ */
10
11/*
12 *****************************************************************************
13 *
14 * Features
15 * NBRTOS_PRIO_PROMOTION - Priority Inheritance upon Priority Inversion
16 * of OS_CRIT ownership
17 * NBRTOS_SCANF_FLOAT - Enable float support on scanf. Can be disabled
18 * to save ~1k flash image size
19 *
20 *****************************************************************************
21 */
22/* #define NBRTOS_PRIO_PROMOTION (1) */
23#define NBRTOS_SCANF_FLOAT (1)
24
25/*
26 *****************************************************************************
27 *
28 * Debugging
29 *
30 * Use these constants to turn debug features on and off
31 * NBRTOS_STACKCHECK - Stack integrity
32 * NBRTOS_STACKOVERFLOW - Real time stack overflow protection
33 * * Reduces all stack sizes by 256 bytes, creating
34 * a canary zone which will be watched for writes
35 * * Use compiler option -fstack-check
36 * * Enable in application with EnableOSStackProtector()
37 * * Coldfire modules can enable either overflow or underflow checking
38 * * ARM modules can enable both overflow and underflow checking simultaneously
39 * NBRTOS_STACKUNDERFLOW - Real time stack underflow protection
40 * * Reduces all stack sizes by 256 bytes, creating
41 * a canary zone which will be watched for writes
42 * * Use compiler option -fstack-check
43 * * Enable in application with EnableOSStackProtector()
44 * * Coldfire modules can enable either overflow or underflow checking
45 * * ARM modules can enable both overflow and underflow checking simultaneously
46 * NBRTOS_TASKLIST - Task diagnostics
47 * NBRTOS_TASK_LOG - Task change callback with new prio, IRQ context.
48 * NBRTOS_TIME - Task time counting
49 * BUFFER_WATERMARK - Remember Buffer hi and low watermarks.
50 * BUFFER_DIAG - Buffer integrity and use
51 * BUFFER_DIAG_LOG - Buffer integrity and use logging, via SysLog
52 * BUFFER_SANITY - Buffer Pool sanity traps
53 * USER_CRITICAL_SANITY - Enables an assert if an illegal pend occurs within a USER_ENTER_CRITICAL() block
54 * _DEBUG_PRINT - Enables DBPRINT Macros in release builds
55 * ENABLE_SMARTTRAP - Enables extra debugging information during traps
56 *****************************************************************************
57 */
58/* #define NBRTOS_STACKCHECK (1) */
59/* #define NBRTOS_STACKOVERFLOW (1) */
60/* #define NBRTOS_STACKUNDERFLOW (1) */
61/* #define NBRTOS_TASKLIST (1) */
62/* #define NBRTOS_TASK_LOG (1) */
63/* #define NBRTOS_TIME (1) */
64/* #define BUFFER_DIAG (1) */
65/* #define BUFFER_DIAG_LOG (1) */
66/* #define BUFFER_SANITY (1) */
67/* #define USER_CRITICAL_SANITY (1) */
68/* #define _DEBUG_PRINT (1) */
69/* #define BUFFER_WATERMARK (1) */
70#define ENABLE_SMARTTRAP (1)
71
72/*
73 *****************************************************************************
74 *
75 * Utility
76 *
77 * Development features potentially undesirable in final release
78 * ALLOW_NBID_REBOOT - Adds single UDP message reboot to device
79 *****************************************************************************
80 */
81/* #define ALLOW_NBID_REBOOT (1) */
82
83/*
84 *****************************************************************************
85 *
86 * Multihome
87 *
88 * Uncomment to enable multihoming operation
89 *
90 *****************************************************************************
91 */
92//#define MULTIHOME
93#ifdef MULTIHOME
94#define NUM_MULTI_INTERFACES (10)
95#else
96#define NUM_MULTI_INTERFACES (0)
97#endif
98
99/*
100 *****************************************************************************
101 *
102 * Interface limits
103 *
104 * MAX_NET_INTERFACES - Maximum number of registered network interfaces
105 *
106 *****************************************************************************
107 */
108#define MAX_NET_INTERFACES (4 + NUM_MULTI_INTERFACES)
109
110/*****************************************************************************
111 *
112 * IPv6 Config
113 *
114 * Select dual stack mode or IPv4 only mode
115 *
116 *****************************************************************************
117 */
118#define IPV6 (1) // Dual stack IPv4/IPv6 mode
119
120#define IPV6_COUNTERS (1) // add counters to IPV6
121//#define IPV4ONLY (1) // IPv4 only mode
122
123/*
124 *****************************************************************************
125 *
126 * Auto-IP
127 *
128 * Comment out this line to disable the Auto-IP virtual interface
129 *
130 *****************************************************************************
131 */
132
133#define AUTOIP
134
135/*
136 *****************************************************************************
137 *
138 * Custom Ethernet Handlers
139 *
140 * Uncomment this line to enable Custom Ethernet Handlers
141 *
142 *****************************************************************************
143 */
144/* #define ALLOW_CUSTOM_NET_DO_RX */
145
146/*
147 *****************************************************************************
148 *
149 * TCP No Copy Mode
150 *
151 * Uncomment these lines to enable TCP No Copy features
152 * These reduce buffer space efficiency in order to eliminate the secondary
153 * copy when performing TCP transactions.
154 *
155 *****************************************************************************
156 */
157#define TCP_NOCOPY_TX (1)
158
159/*
160 *****************************************************************************
161 *
162 * TCP Socket Throughput Information
163 *
164 * Uncomment this line to enable TCP Throughput Information
165 * This will add statistics counters that will track the total and payload
166 * bytes sent and received by individual TCP sockets.
167 *
168 *****************************************************************************
169 */
170/* #define TCP_THROUGHPUT_INFO_ENABLED (1) */
171
172/*
173 *****************************************************************************
174 *
175 * Multi-home
176 *
177 * Uncomment to enable UDP fragments
178 *
179 *****************************************************************************
180 */
181/* #define UDP_FRAGMENTS ( 4 ) */
182
183/*
184 *****************************************************************************
185 *
186 * Random value
187 *
188 * Comment out this line to eliminate the random value support in the
189 * library. It was commented out up until and including Rel2.4 Rc3
190 *
191 *****************************************************************************
192 */
193#define GATHER_RANDOM (1)
194
195/*
196 *****************************************************************************
197 *
198 * SSL and/or SSH support
199 *
200 * Needs to be uncommented to support these features
201 *
202 *****************************************************************************
203 */
204/*
205 * SSL Supported
206 * Should be defined when SSL is included in library
207 *
208 */
209#define NB_SSL_SUPPORTED (1)
210/* #define SSL_V3_DISABLED ( 1 ) */
211
212/*****************************************************************************
213 * Optional SSL Features
214 * SSL_TLS_SUPPORT - TLS is supported by default with SSL.
215 * WEB_CLIENT_SSL_SUPPORT - Whether the webclient library recognizes 'https://'
216 * SSL_DEFAULT_MAX_SESSION_AGE_TICKS
217 * - Maximum time to allow a sessions to be reused after it is created
218 * - A value of 0 will force a negotiation on every connection
219 *****************************************************************************/
220
221#ifdef NB_SSL_SUPPORTED
222#define SSL_TLS_SUPPORT (1)
223#define WEB_CLIENT_SSL_SUPPORT (1)
224#define SSL_DEFAULT_MAX_SESSION_AGE_TICKS (3600 * TICKS_PER_SECOND) // 1 Hour
225#define TLS_CACHE_PEER_CERT_VALIDATIONS (1)
226#define ENABLE_ED25519 (1)
227//#define ENABLE_AUTOCERT_REGEN (1) // Enable if autogenerated certificates should renew automatically when expired
228#ifdef ENABLE_AUTOCERT_REGEN
229#define AUTO_CERT_GEN_CHECK (60 * TICKS_PER_SECOND) // Every min
230#endif
231
232/*****************************************************************************
233 * SSL uses 1.3 by default and will downgrade to support older versions
234 * Minimum version can be set here
235 *
236 * 0 - TLS 1.3 (No downgrade allowed)
237 * 1 - TLS 1.2
238 * 2 - TLS 1.1
239 * 3 - TLS 1.0
240 * 4 - SSL 3.0 (Oldest, all versions will be supported)
241 *****************************************************************************/
242#define SSL_MINIMUM_VERSION (1)
243
244// Used to enable more robust ECC curves, at the expense of handshake speed
245#define ENABLE_ECC384 (1)
246//#define ENABLE_ECC521 (1)
247
248// Used to enable RSA 4K Keys
249//#define ENABLE_RSA_4K (1)
250
251/*****************************************************************************
252 * Use custom static malloc/free functions for SSL to speed up TLS performance
253 *
254 * This will claim a static 15KB chunk of memory from the memory specified
255 *
256 * Commented out/Undefined - Use default system malloc/free
257 * 1 - Use custom malloc/free, utilizing fastest available memory
258 * 2 - Use custom malloc/free, utilizing TCM memory (if available)
259 * 3 - Use custom malloc/free, utilizing SRAM memory
260 * 4 - Use custom malloc/free, utilizing SDRAM memory
261 *
262 *****************************************************************************/
263#define SSL_CUSTOM_MALLOC (1)
264// #define SSL_CUSTOM_MALLOC (2)
265// #define SSL_CUSTOM_MALLOC (3)
266// #define SSL_CUSTOM_MALLOC (4)
267
268#endif
269
270/*
271 * FTPS Support
272 *
273 * Uncomment to enable SSL use for control and data channels
274 */
275#ifdef NB_SSL_SUPPORTED
276#define FTPD_SSL_SUPPORT (1)
277#define FTPD_CLIENT_SSL_SUPPORT (1) // Data and connection ports used are defined in SslClientSession.cpp
278#endif /* #ifdef NB_SSL_SUPPORTED */
279
280/*
281 * SSL client certificate checking supported
282 * Should be defined when client certificate checking is required
283 *
284 */
285#ifdef NB_SSL_SUPPORTED
286/* #define NB_SSL_CLIENT_CERTIFICATE_CHECKING_ENABLED ( 1 ) */
287#endif /* #ifdef NB_SSL_SUPPORTED */
288
289/*
290 * SSH Supported
291 * Should be defined when SSH is included in library
292 */
293
294//#define NB_SSH_SUPPORTED ( 1 )
295
296/*
297 * Security Random Number Support is required for SSL and SSH
298 *
299 */
300#if defined(NB_SSL_SUPPORTED) || defined(NB_SSH_SUPPORTED)
301#ifndef GATHER_RANDOM
302#define GATHER_RANDOM (1)
303#endif
304#endif
305
306/*
307 *****************************************************************************
308 *
309 * User QSPI driver
310 *
311 * Uncomment to enable user QSPI driver defined in qspi.h
312 * Enabling the user QSPI driver disables the joint use of the QSPI by
313 * WLAN and SD/MMC.
314 *
315 *****************************************************************************
316 */
317#define NB_ENABLE_USER_QSPI (1)
318
319/*
320 *****************************************************************************
321 *
322 * Enable Legacy config records for the primary interface
323 *
324 * Uncomment to enable
325 *
326 *****************************************************************************
327 */
328#define SUPPORT_LEGACY_FIND (1)
329//#define SUPPORT_LEGACY_IPSETUP (1)
330
331/*
332 *****************************************************************************
333 *
334 * For 5441X products MOD5441X, SB800EX, Nano5441X.
335 * update the Legacy config records for ethernet interface(s)
336 *
337 * This will keep the alternate monitor in sync for acces if one sets static IP Addresses etc..
338 * This has NO effect on the any other platform.
339 *
340 *****************************************************************************
341 */
342#define KEEP_LEGACY_CONFIG_UPDATED (1)
343/*
344 *****************************************************************************
345 *
346 * For 5441X products MOD5441X, SB800EX, Nano5441X.
347 * update the Legacy config boot uart when config is changed
348 *
349 * This will keep the alternate monitor in sync
350 * This has NO effect on the any other platform.
351 *
352 *****************************************************************************
353 */
354#define SET_LEGACY_CONFIG_UART (1)
355
356
357//Should we run a DNS cache?
358//#define DNS_CACHE (1)
359
360
361/*
362 *****************************************************************************
363 *
364 * Disable Symetric Routing
365 *
366 * Uncomment to prevent all non-local incoming packet routes from being put
367 * in the arp cache.
368 *
369 *****************************************************************************
370 */
371/* #define NO_SYMETRIC_ROUTING (1) */
372
373/*
374 *****************************************************************************
375 *
376 * FEC ISR Error Counters
377 *
378 * Uncomment to enable FEC error counters in ethernet.cpp and etherprint.cpp
379 *
380 *****************************************************************************
381 */
382/*#define FEC_ISR_ERROR_COUNTERS (1) */
383
384/*
385 *****************************************************************************
386 *
387 * Library Constants
388 *
389 * Please do not modify any definitions below this comment.
390 *
391 *****************************************************************************
392 */
393/*
394 * Library Versions
395 *
396 */
397
398#define WARN_STUB (1)
399
400#define NNDK_MAJOR
401#define NNDK_MINOR
402#define NNDK_PATCH
403
404#define NB_VERSION_TEXT "3.3"
405
406#include <predef-overload.h>
407
408#endif /* #ifndef _PREDEF_H_ */