NetBurner 3.5.6
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
119
//#define IPV4ONLY (1) // IPv4 only mode
120
121
#ifndef IPV4ONLY
122
#define IPV6 (1)
// Dual stack IPv4/IPv6 mode
123
124
#define IPV6_COUNTERS (1)
// add counters to IPV6
125
#endif
126
127
/*
128
*****************************************************************************
129
*
130
* Auto-IP
131
*
132
* Comment out this line to disable the Auto-IP virtual interface
133
*
134
*****************************************************************************
135
*/
136
137
#define AUTOIP
138
139
/*
140
*****************************************************************************
141
*
142
* Custom Ethernet Handlers
143
*
144
* Uncomment this line to enable Custom Ethernet Handlers
145
*
146
*****************************************************************************
147
*/
148
/* #define ALLOW_CUSTOM_NET_DO_RX */
149
150
/*
151
*****************************************************************************
152
*
153
* TCP No Copy Mode
154
*
155
* Uncomment these lines to enable TCP No Copy features
156
* These reduce buffer space efficiency in order to eliminate the secondary
157
* copy when performing TCP transactions.
158
*
159
*****************************************************************************
160
*/
161
#define TCP_NOCOPY_TX (1)
162
163
/*
164
*****************************************************************************
165
*
166
* TCP Socket Throughput Information
167
*
168
* Uncomment this line to enable TCP Throughput Information
169
* This will add statistics counters that will track the total and payload
170
* bytes sent and received by individual TCP sockets.
171
*
172
*****************************************************************************
173
*/
174
/* #define TCP_THROUGHPUT_INFO_ENABLED (1) */
175
176
/*
177
*****************************************************************************
178
*
179
* Multi-home
180
*
181
* Uncomment to enable UDP fragments
182
*
183
*****************************************************************************
184
*/
185
/* #define UDP_FRAGMENTS ( 4 ) */
186
187
/*
188
*****************************************************************************
189
*
190
* Random value
191
*
192
* Comment out this line to eliminate the random value support in the
193
* library. It was commented out up until and including Rel2.4 Rc3
194
*
195
*****************************************************************************
196
*/
197
#define GATHER_RANDOM (1)
198
199
/*
200
*****************************************************************************
201
*
202
* SSL and/or SSH support
203
*
204
* Needs to be uncommented to support these features
205
*
206
*****************************************************************************
207
*/
208
/*
209
* SSL Supported
210
* Should be defined when SSL is included in library
211
*
212
*/
213
#define NB_SSL_SUPPORTED (1)
214
/* #define SSL_V3_DISABLED ( 1 ) */
215
216
/*****************************************************************************
217
* Optional SSL Features
218
* SSL_TLS_SUPPORT - TLS is supported by default with SSL.
219
* WEB_CLIENT_SSL_SUPPORT - Whether the webclient library recognizes 'https://'
220
* SSL_DEFAULT_MAX_SESSION_AGE_TICKS
221
* - Maximum time to allow a sessions to be reused after it is created
222
* - A value of 0 will force a negotiation on every connection
223
*****************************************************************************/
224
225
#ifdef NB_SSL_SUPPORTED
226
#define SSL_TLS_SUPPORT (1)
227
#define WEB_CLIENT_SSL_SUPPORT (1)
228
#define SSL_DEFAULT_MAX_SESSION_AGE_TICKS (3600 * TICKS_PER_SECOND)
// 1 Hour
229
#define TLS_CACHE_PEER_CERT_VALIDATIONS (1)
230
#define ENABLE_ED25519 (1)
231
//#define ENABLE_AUTOCERT_REGEN (1) // Enable if autogenerated certificates should renew automatically when expired
232
#ifdef ENABLE_AUTOCERT_REGEN
233
#define AUTO_CERT_GEN_CHECK (60 * TICKS_PER_SECOND)
// Every min
234
#endif
235
236
237
#define SSL_TLS_1_3_SUPPORT
// Enable TLS 1.3 support. If commented out, TLS 1.2 will be used by default
238
239
240
/*****************************************************************************
241
* SSL uses 1.3 by default and will downgrade to support older versions
242
* Minimum version can be set here
243
*
244
* 0 - TLS 1.3 (No downgrade allowed)
245
* 1 - TLS 1.2
246
* 2 - TLS 1.1
247
* 3 - TLS 1.0
248
* 4 - SSL 3.0 (Oldest, all versions will be supported)
249
*****************************************************************************/
250
#define SSL_MINIMUM_VERSION (1)
251
252
// Used to enable more robust ECC curves, at the expense of handshake speed
253
#define ENABLE_ECC384 (1)
254
//#define ENABLE_ECC521 (1)
255
256
257
/*****************************************************************************
258
* Use custom static malloc/free functions for SSL to speed up TLS performance
259
*
260
* This will claim a static 15KB chunk of memory from the memory specified
261
*
262
* Commented out/Undefined - Use default system malloc/free
263
* 1 - Use custom malloc/free, utilizing fastest available memory
264
* 2 - Use custom malloc/free, utilizing TCM memory (if available)
265
* 3 - Use custom malloc/free, utilizing SRAM memory
266
* 4 - Use custom malloc/free, utilizing SDRAM memory
267
*
268
*****************************************************************************/
269
#define SSL_CUSTOM_MALLOC (1)
270
// #define SSL_CUSTOM_MALLOC (2)
271
// #define SSL_CUSTOM_MALLOC (3)
272
// #define SSL_CUSTOM_MALLOC (4)
273
274
#endif
275
276
/*
277
* FTPS Support
278
*
279
* Uncomment to enable SSL use for control and data channels
280
*/
281
#ifdef NB_SSL_SUPPORTED
282
#define FTPD_SSL_SUPPORT (1)
283
#define FTPD_CLIENT_SSL_SUPPORT (1)
// Data and connection ports used are defined in SslClientSession.cpp
284
#endif
/* #ifdef NB_SSL_SUPPORTED */
285
286
/*
287
* SSL client certificate checking supported
288
* Should be defined when client certificate checking is required
289
*
290
*/
291
#ifdef NB_SSL_SUPPORTED
292
/* #define NB_SSL_CLIENT_CERTIFICATE_CHECKING_ENABLED ( 1 ) */
293
#endif
/* #ifdef NB_SSL_SUPPORTED */
294
295
/*
296
* SSH Supported
297
* Should be defined when SSH is included in library
298
*/
299
300
//#define NB_SSH_SUPPORTED ( 1 )
301
302
/*
303
* Security Random Number Support is required for SSL and SSH
304
*
305
*/
306
#if defined(NB_SSL_SUPPORTED) || defined(NB_SSH_SUPPORTED)
307
#ifndef GATHER_RANDOM
308
#define GATHER_RANDOM (1)
309
#endif
310
#endif
311
312
/*
313
*****************************************************************************
314
*
315
* User QSPI driver
316
*
317
* Uncomment to enable user QSPI driver defined in qspi.h
318
* Enabling the user QSPI driver disables the joint use of the QSPI by
319
* WLAN and SD/MMC.
320
*
321
*****************************************************************************
322
*/
323
#define NB_ENABLE_USER_QSPI (1)
324
325
/*
326
*****************************************************************************
327
*
328
* Enable Legacy config records for the primary interface
329
*
330
* Uncomment to enable
331
*
332
*****************************************************************************
333
*/
334
#define SUPPORT_LEGACY_FIND (1)
335
//#define SUPPORT_LEGACY_IPSETUP (1)
336
337
/*
338
*****************************************************************************
339
* Enable config variable control of the Web Config server
340
*****************************************************************************
341
*/
342
// #define NNDK_WEB_CONFIG_TOGGLE (1)
343
344
/*
345
*****************************************************************************
346
*
347
* For 5441X products MOD5441X, SB800EX, Nano5441X.
348
* update the Legacy config records for ethernet interface(s)
349
*
350
* This will keep the alternate monitor in sync for acces if one sets static IP Addresses etc..
351
* This has NO effect on the any other platform.
352
*
353
*****************************************************************************
354
*/
355
#define KEEP_LEGACY_CONFIG_UPDATED (1)
356
/*
357
*****************************************************************************
358
*
359
* For 5441X products MOD5441X, SB800EX, Nano5441X.
360
* update the Legacy config boot uart when config is changed
361
*
362
* This will keep the alternate monitor in sync
363
* This has NO effect on the any other platform.
364
*
365
*****************************************************************************
366
*/
367
#define SET_LEGACY_CONFIG_UART (1)
368
369
370
//Should we run a DNS cache?
371
#define DNS_CACHE (1)
372
373
//Return v4 addresses if both resolved
374
#define PREFER_DNS_V4 (1)
375
376
377
/*
378
*****************************************************************************
379
*
380
* Disable Symetric Routing
381
*
382
* Uncomment to prevent all non-local incoming packet routes from being put
383
* in the arp cache.
384
*
385
*****************************************************************************
386
*/
387
/* #define NO_SYMETRIC_ROUTING (1) */
388
389
/*
390
*****************************************************************************
391
*
392
* FEC ISR Error Counters
393
*
394
* Uncomment to enable FEC error counters in ethernet.cpp and etherprint.cpp
395
*
396
*****************************************************************************
397
*/
398
/*#define FEC_ISR_ERROR_COUNTERS (1) */
399
400
/*
401
*****************************************************************************
402
*
403
* Library Constants
404
*
405
* Please do not modify any definitions below this comment.
406
*
407
*****************************************************************************
408
*/
409
/*
410
* Library Versions
411
*
412
*/
413
414
#define WARN_STUB (1)
415
416
#define NNDK_MAJOR
417
#define NNDK_MINOR
418
#define NNDK_PATCH
419
420
#define NB_VERSION_TEXT "3.3"
421
422
#include <predef-overload.h>
423
424
#endif
/* #ifndef _PREDEF_H_ */