/* Revision: 2.9.7 */

/******************************************************************************
* Copyright 1998-2024 NetBurner, Inc.  ALL RIGHTS RESERVED
*
*    Permission is hereby granted to purchasers of NetBurner Hardware to use or
*    modify this computer program for any use as long as the resultant program
*    is only executed on NetBurner provided hardware.
*
*    No other rights to use this program or its derivatives in part or in
*    whole are granted.
*
*    It may be possible to license this or other NetBurner software for use on
*    non-NetBurner Hardware. Contact sales@Netburner.com for more information.
*
*    NetBurner makes no representation or warranties with respect to the
*    performance of this computer program, and specifically disclaims any
*    responsibility for any damages, special or consequential, connected with
*    the use of this program.
*
* NetBurner
* 16855 W Bernardo Dr
* San Diego, CA 92127
* www.netburner.com
******************************************************************************/

#ifndef _PREDEF_H_
#define _PREDEF_H_

/* This release  Build on: $Date: 2012/03/28 14:35:22 $ */
/* This build revison tag: $Name:  $ */

/*
 *****************************************************************************
 *
 * Features
 *       NBRTOS_SCANF_FLOAT     - Enable float support on scanf. Can be disabled 
 *                                  to save ~1k flash image size
 *
 *****************************************************************************
 */
#define NBRTOS_SCANF_FLOAT (1)
/*
 *****************************************************************************
 *
 * Debugging
 *
 *    Use these constants to turn debug features on and off
 *       UCOS_STACKCHECK      - Stack integrity
 *       UCOS_STACKOVERFLOW   - Real time stack overflow protection
 *                               * Reduces all stack sizes by 256 bytes, creating
 *                                   a canary zone which will be watched for writes
 *                               * Use compiler option -fstack-check
 *                               * Enable in application with EnableOSStackProtector()
 *       UCOS_TASKLIST        - Task diagnostics
 *       UCOS_TASK_LOG        - Task change callback with new prio, IRQ context.
 *       UCOS_TIME            - Task timecounting
 *       BUFFER_DIAG          - Buffer integrity and use
 *       BUFFER_DIAG_LOG      - Buffer integrity and use logging, via SysLog
 *       BUFFER_SANITY        - Buffer Pool sanity traps
 *       _DEBUG_PRINT         - Enables DBPRINT Macros in release builds
 *       ENABLE_SMARTTRAP     - Enables extra debugging information during traps
 *****************************************************************************
 */
/* #define UCOS_STACKCHECK    (1) */
/* #define UCOS_STACKOVERFLOW (1) */
/* #define UCOS_TASKLIST      (1) */
/* #define UCOS_TASK_LOG      (1) */
/* #define UCOS_TIME          (1) */
/* #define BUFFER_DIAG        (1) */
/* #define BUFFER_DIAG_LOG    (1) */
/* #define BUFFER_SANITY      (1) */
/* #define _DEBUG_PRINT       (1) */
#define ENABLE_SMARTTRAP      (1)

/*
 *****************************************************************************
 *
 * Utility
 *
 *  Development features potentionally undesirable in final release
 *      ALLOW_NBID_REBOOT       - Adds single UDP message reboot to device
 *****************************************************************************
 */
/* #define ALLOW_NBID_REBOOT (1) */


/*
 *****************************************************************************
 *
 * Multihome
 *
 *    Uncomment to enable multihoming operation
 *
 *****************************************************************************
 */
/* #define MULTIHOME */


/*****************************************************************************
 *
 * IPv6 Config
 *
 * Select dual stack mode or IPv4 only mode
 *
 *****************************************************************************
 */
#define IPV6 (1)        // Dual stack IPv4/IPv6 mode

#define IPV6_COUNTERS (1) //add coutners to IPV6
//#define IPV4ONLY (1)  // IPv4 only mode

/*
 *****************************************************************************
 *
 * Auto-IP
 *
 *  Comment out this line to disable the Auto-IP virtual interface
 *
 *****************************************************************************
 */

#define AUTOIP

/*
 *****************************************************************************
 *
 * Custom Ethernet Handlers
 *
 *  Uncomment this line to enable Custom Ethernet Handlers
 *
 *****************************************************************************
 */
/* #define ALLOW_CUSTOM_NET_DO_RX */

/*
 *****************************************************************************
 *
 * Multi-home
 *
 *    Uncomment to enable UDP fragments
 *
 *****************************************************************************
 */
/* #define UDP_FRAGMENTS  ( 4 ) */

/*
 *****************************************************************************
 *
 * Random value
 *
 *    Comment out this line to eliminate the random value support in the
 *       library. It was commented out up until and including Rel2.4 Rc3
 *
 *****************************************************************************
 */
#define GATHER_RANDOM      ( 1 )

/*
 *****************************************************************************
 *
 * SSL and/or SSH support
 *
 *    Needs to be uncommented to support these features
 *
 *****************************************************************************
 */
/*
 * SSL Supported
 *    Should be defined when SSL is included in library
 *
 */
/* #define NB_SSL_SUPPORTED   ( 1 ) */
/* #define SSL_V3_DISABLED    ( 1 ) */

/*****************************************************************************
 * Optional SSL Features
 *  SSL_TLS_SUPPORT - TLS is supported by default with SSL.
 *  WEB_CLIENT_SSL_SUPPORT - Whether the webclient library recognizes 'https://'
 *  SSL_DEFAULT_MAX_SESSION_AGE_TICKS
 *      - Maximum time to allow a sessions to be resused after it is created
 *      - A value of 0 disables forced renegotiation based on time
 *  SSL_NO_DHE - Disables support for plain DHE negotiations
 *****************************************************************************/

#ifdef NB_SSL_SUPPORTED
    #define SSL_TLS_SUPPORT    ( 1 )
    #define WEB_CLIENT_SSL_SUPPORT ( 1 )
    #define SSL_DEFAULT_MAX_SESSION_AGE_TICKS (0*TICKS_PER_SECOND)
    #define TLS_CACHE_PEER_CERT_VALIDATIONS ( 1 )
    #define TLS_SUPPORT_SERVER_TKTS         ( 1 )
    #define SSL_NO_DHE          ( 1 )
    #define ONBOARD_CERT_GEN (1)
    #define ENABLE_ED25519 (1)
    //#define SSL_TLS_1_3_SUPPORT (1) // Enable support for TLS v1.3
    //#define ENABLE_AUTOCERT_REGEN (1) // Enable if autogenerated certificates should renew automatically when expired
    #ifdef ENABLE_AUTOCERT_REGEN
        #define AUTO_CERT_GEN_CHECK (60 * TICKS_PER_SECOND); // Every min
    #endif

    // Used to enable more robust ECC curves, at the expense of handshake speed
    //#define ENABLE_ECC384 (1)
    //#define ENABLE_ECC521 (1)

    // Used to enable RSA 4K Keys
    //#define ENABLE_RSA_4K (1)
#endif

 /*
  * FTPS Support
  *
  * Uncomment to enable SSL use for control and data channels
  */
#ifdef NB_SSL_SUPPORTED
    /* #define FTPD_SSL_SUPPORT    (1) */
#endif /* #ifdef NB_SSL_SUPPORTED */

/*
 * SSH Supported
 *    Should be defined when SSH is included in library
 *
 */

/* #define NB_SSH_SUPPORTED   ( 1 ) */

/*
 * Security Random Number Support is required for SSL and SSH
 *
 */
#if defined( NB_SSL_SUPPORTED ) || defined( NB_SSH_SUPPORTED )
   #ifndef GATHER_RANDOM
      #define GATHER_RANDOM   ( 1 )
   #endif
#endif

/*
 *****************************************************************************
 *
 * User QSPI driver
 *
 *    Uncomment to enable user QSPI driver defined in qspi.h
 *       Enabling the user QSPI driver disables the joint use of the QSPI by
 *       WLAN and SD/MMC.
 *
 *****************************************************************************
 */
 #define NB_ENABLE_USER_QSPI      ( 1 )


/*
 *****************************************************************************
 *
 * Disable Symetric Routing
 *
 * Uncomment to prevent all non-local incoming packet routes from being put
 * in the arp cache.
 *
 *****************************************************************************
 */
 /*  #define NO_SYMETRIC_ROUTING (1)  */


/*
 *****************************************************************************
 *
 * FEC ISR Error Counters
 *
 *    Uncomment to enable FEC error counters in ethernet.cpp and etherprint.cpp
 *
 *****************************************************************************
 */
 /*#define FEC_ISR_ERROR_COUNTERS (1) */

/*****************************************************************************
 *
 * MCF5441x Data Cache Support
 *
 *  Comment out to enable the MCF5441x Data Cache. Increases system performance,
 *  but requires the need to invalidate the Data Cache.
 *
 *****************************************************************************/
#define MCF5441X_NO_D_CACHE (1)

/*
 *****************************************************************************
 *
 * Library Constants
 *
 *    Please do not modify any definitions below this comment.
 *
 *****************************************************************************
 */
/*
 * Library Versions
 *
 */

#define NNDK_MAJOR (2)
#define NNDK_MINOR (9)
#define NNDK_PATCH (7)

 // Old defines preserved, use major/minor/patch defines above
#define NB_VERSION_1_5
#define NB_VERSION_1_6
#define NB_VERSION_1_7
#define NB_VERSION_1_8
#define NB_VERSION_1_9
#define NB_VERSION_2_0
#define NB_VERSION_2_7
#define NB_MINOR_VERSION (7)
#define NB_VERSION_TEXT "2.9.7"

#endif   /* #ifndef _PREDEF_H_ */



