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