1 /* 2 * Copyright (c) 2017, The OpenThread Authors. 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 are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 3. Neither the name of the copyright holder nor the 13 * names of its contributors may be used to endorse or promote products 14 * derived from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** 30 * @file 31 * This file includes posix app compile-time configuration constants for OpenThread core. 32 */ 33 34 #ifndef OPENTHREAD_CORE_POSIX_CONFIG_H_ 35 #define OPENTHREAD_CORE_POSIX_CONFIG_H_ 36 37 #ifndef OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 38 #define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 256 39 #endif 40 41 #ifndef OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE 42 #define OPENTHREAD_CONFIG_DIAG_OUTPUT_BUFFER_SIZE 500 43 #endif 44 45 #ifndef OPENTHREAD_CONFIG_LOG_PLATFORM 46 #define OPENTHREAD_CONFIG_LOG_PLATFORM 1 47 #endif 48 49 #ifndef OPENTHREAD_CONFIG_LOG_OUTPUT 50 #define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED 51 #endif 52 53 #ifndef OPENTHREAD_CONFIG_LOG_LEVEL 54 #define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG 55 #endif 56 57 #ifndef OPENTHREAD_CONFIG_LOG_LEVEL_INIT 58 #define OPENTHREAD_CONFIG_LOG_LEVEL_INIT OT_LOG_LEVEL_CRIT 59 #endif 60 61 #ifndef OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 62 #define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 1 63 #endif 64 65 #ifndef OPENTHREAD_CONFIG_PLATFORM_INFO 66 #define OPENTHREAD_CONFIG_PLATFORM_INFO "POSIX" 67 #endif 68 69 #ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 70 #define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1 71 #endif 72 73 #ifndef OPENTHREAD_CONFIG_NCP_HDLC_ENABLE 74 #define OPENTHREAD_CONFIG_NCP_HDLC_ENABLE 1 75 #endif 76 77 #ifndef OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE 78 #define OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE 1 79 #endif 80 81 #if OPENTHREAD_POSIX_CONFIG_DAEMON_ENABLE 82 83 #ifndef OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE 84 #define OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE 1 85 #endif 86 87 #ifndef OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE 88 #define OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE 1 89 #endif 90 91 #endif 92 93 #ifndef OPENTHREAD_CONFIG_LOG_MAX_SIZE 94 #define OPENTHREAD_CONFIG_LOG_MAX_SIZE 1024 95 #endif 96 97 #ifndef OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES 98 #define OPENTHREAD_CONFIG_COMMISSIONER_MAX_JOINER_ENTRIES 4 99 #endif 100 101 #ifndef OPENTHREAD_CONFIG_MLE_MAX_CHILDREN 102 #define OPENTHREAD_CONFIG_MLE_MAX_CHILDREN 64 103 #endif 104 105 #ifndef OPENTHREAD_CONFIG_MLE_IP_ADDRS_PER_CHILD 106 #define OPENTHREAD_CONFIG_MLE_IP_ADDRS_PER_CHILD 16 107 #endif 108 109 #ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 110 #define OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 8 111 #endif 112 113 #ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 114 #define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 8 115 #endif 116 117 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE 118 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE 1 119 #endif 120 121 #ifndef OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE 122 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (63 * 1024) 123 #endif 124 125 #ifndef OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS 126 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS (63 * 1024) 127 #endif 128 129 #ifndef OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH 130 #define OPENTHREAD_CONFIG_CLI_MAX_LINE_LENGTH 640 131 #endif 132 133 #ifndef OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 134 #define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 640 135 #endif 136 137 #ifndef OPENTHREAD_CONFIG_UPTIME_ENABLE 138 #define OPENTHREAD_CONFIG_UPTIME_ENABLE 1 139 #endif 140 141 #ifndef OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME 142 #define OPENTHREAD_CONFIG_LOG_PREPEND_UPTIME 1 143 #endif 144 145 #ifndef OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES 146 #define OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_MAX_SERVICES 20 147 #endif 148 149 #ifndef OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL 150 #define OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL 1 151 #endif 152 153 #ifndef OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE 154 #define OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE 1 155 #endif 156 157 #endif // OPENTHREAD_CORE_POSIX_CONFIG_H_ 158