/platform/cooja/contiki-conf.h

https://github.com/errordeveloper/contiki-work · C Header · 150 lines · 81 code · 31 blank · 38 comment · 1 complexity · 805549aa5f374a17a64498c27e7d7f6d MD5 · raw file

  1. /*
  2. * Copyright (c) 2006, Swedish Institute of Computer Science.
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above
  11. * copyright notice, this list of conditions and the following
  12. * disclaimer in the documentation and/or other materials provided
  13. * with the distribution.
  14. * 3. The name of the author may not be used to endorse or promote
  15. * products derived from this software without specific prior
  16. * written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
  19. * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  20. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  21. * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  22. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  23. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  24. * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  25. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  26. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  27. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. *
  30. *
  31. */
  32. #ifndef __CONTIKI_CONF_H__
  33. #define __CONTIKI_CONF_H__
  34. #define PROFILE_CONF_ON 0
  35. #define ENERGEST_CONF_ON 0
  36. #define LOG_CONF_ENABLED 1
  37. #define COOJA 1
  38. #if WITH_UIP
  39. #if WITH_UIP6
  40. #error WITH_UIP && WITH_IP6: Bad configuration
  41. #endif /* WITH_UIP6 */
  42. #endif /* WITH_UIP */
  43. #ifdef NETSTACK_CONF_H
  44. /* These header overrides the below default configuration */
  45. #define NETSTACK__QUOTEME(s) NETSTACK_QUOTEME(s)
  46. #define NETSTACK_QUOTEME(s) #s
  47. #include NETSTACK__QUOTEME(NETSTACK_CONF_H)
  48. #else /* NETSTACK_CONF_H */
  49. /* Default network config */
  50. #if WITH_UIP6
  51. /* Network setup for IPv6 */
  52. #define NETSTACK_CONF_NETWORK uip_driver
  53. #define NETSTACK_CONF_MAC nullmac_driver
  54. #define NETSTACK_CONF_RDC nullrdc_driver
  55. #define NETSTACK_CONF_RADIO cooja_radio_driver
  56. #define UIP_CONF_IPV6 1
  57. #define UIP_CONF_IP_FORWARD 0
  58. #else /* WITH_UIP6 */
  59. #if WITH_UIP
  60. /* Network setup for IPv4 */
  61. #define NETSTACK_CONF_NETWORK rime_driver /* NOTE: uip_over_mesh. else: uip_driver */
  62. #define NETSTACK_CONF_MAC nullmac_driver
  63. #define NETSTACK_CONF_RDC nullrdc_driver
  64. #define NETSTACK_CONF_RADIO cooja_radio_driver
  65. #define UIP_CONF_IP_FORWARD 1
  66. #else /* WITH_UIP */
  67. /* Network setup for Rime */
  68. #define NETSTACK_CONF_NETWORK rime_driver
  69. #define NETSTACK_CONF_MAC nullmac_driver
  70. #define NETSTACK_CONF_RDC nullrdc_driver
  71. #define NETSTACK_CONF_RADIO cooja_radio_driver
  72. /*#define NETSTACK_CONF_FRAMER framer_nullmac*/
  73. #endif /* WITH_UIP */
  74. #endif /* WITH_UIP6 */
  75. #endif /* NETSTACK_CONF_H */
  76. #define PACKETBUF_CONF_ATTRS_INLINE 1
  77. #define QUEUEBUF_CONF_NUM 16
  78. #define CC_CONF_REGISTER_ARGS 1
  79. #define CC_CONF_FUNCTION_POINTER_ARGS 1
  80. #define CC_CONF_FASTCALL
  81. #define CC_CONF_VA_ARGS 1
  82. #define CC_CONF_INLINE inline
  83. #define CCIF
  84. #define CLIF
  85. /* These names are deprecated, use C99 names. */
  86. #include <inttypes.h>
  87. typedef uint8_t u8_t;
  88. typedef uint16_t u16_t;
  89. typedef uint32_t u32_t;
  90. typedef int32_t s32_t;
  91. typedef unsigned short uip_stats_t;
  92. #define CLOCK_CONF_SECOND 1000L
  93. typedef unsigned long clock_time_t;
  94. typedef unsigned long rtimer_clock_t;
  95. #define RTIMER_CLOCK_LT(a,b) ((signed long)((a)-(b)) < 0)
  96. #define AODV_COMPLIANCE
  97. #define AODV_NUM_RT_ENTRIES 32
  98. #define WITH_ASCII 1
  99. #define UIP_CONF_MAX_LISTENPORTS 40
  100. #define UIP_CONF_MAX_CONNECTIONS 40
  101. #define UIP_CONF_BYTE_ORDER UIP_LITTLE_ENDIAN
  102. #define UIP_CONF_TCP_SPLIT 0
  103. #define UIP_CONF_LOGGING 0
  104. #define UIP_CONF_UDP_CHECKSUMS 0
  105. #define UIP_CONF_BROADCAST 1
  106. #define UIP_CONF_UDP 1
  107. #define UIP_CONF_TCP 1
  108. #if UIP_CONF_IPV6
  109. #define RIMEADDR_CONF_SIZE 8
  110. #define UIP_CONF_IPV6_QUEUE_PKT 1
  111. #define UIP_CONF_IPV6_CHECKS 1
  112. #define UIP_CONF_IPV6_REASSEMBLY 1
  113. #define UIP_CONF_NETIF_MAX_ADDRESSES 3
  114. #define UIP_CONF_ND6_MAX_PREFIXES 3
  115. #define UIP_CONF_ND6_MAX_NEIGHBORS 4
  116. #define UIP_CONF_ND6_MAX_DEFROUTERS 2
  117. #endif /* UIP_CONF_IPV6 */
  118. #define CFS_CONF_OFFSET_TYPE long
  119. #endif /* __CONTIKI_CONF_H__ */