1 /* 2 * Copyright (c) 2021, 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 #include "openthread-config-android-version.h" 30 31 /** 32 * @def OPENTHREAD_CONFIG_CLI_TX_BUFFER_SIZE 33 * 34 * The size of CLI message buffer in bytes 35 * 36 */ 37 #define OPENTHREAD_CONFIG_CLI_UART_TX_BUFFER_SIZE 3500 38 39 /** 40 * @def OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 41 * 42 * The size of CLI UART RX buffer in bytes. 43 * 44 */ 45 #define OPENTHREAD_CONFIG_CLI_UART_RX_BUFFER_SIZE 3500 46 47 /** 48 * Enables the default posix infrastructure interface implementation. 49 */ 50 #define OPENTHREAD_POSIX_CONFIG_INFRA_IF_ENABLE 1 51 52 /** 53 * Disables the default posix TUN interface implementation 54 * so that we can can use the Android specific implementation. 55 */ 56 #define OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE 0 57 58 /** 59 * Enables platform UDP support. 60 */ 61 #define OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE 1 62 63 /** 64 * Enables CLI for Thread certification. 65 */ 66 #define OPENTHREAD_POSIX_CONFIG_DAEMON_CLI_ENABLE 1 67 68 /** 69 * @def OPENTHREAD_POSIX_CONFIG_THREAD_NETIF_DEFAULT_NAME 70 * 71 * Define the Thread default network interface name. 72 * 73 */ 74 #define OPENTHREAD_POSIX_CONFIG_THREAD_NETIF_DEFAULT_NAME "thread-wpan" 75 76 /** 77 * Avoids killing the ot-daemon process when the infra link disappears. 78 */ 79 #define OPENTHREAD_POSIX_CONFIG_EXIT_ON_INFRA_NETIF_LOST_ENABLE 0 80 81 /** 82 * Enables the posix platform to support power calibration. 83 * 84 * This flag is needed by the framework API `setChannelTargetPower()` to set the target power of each channel. 85 */ 86 #define OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE 1 87 88 // Enable the configuration file support for power calibration. 89 #define OPENTHREAD_POSIX_CONFIG_CONFIGURATION_FILE_ENABLE 1 90 91 // Disable the max power table support, this feature is supported by 92 // OPENTHREAD_POSIX_CONFIG_CONFIGURATION_FILE_ENABLE and 93 // OPENTHREAD_CONFIG_PLATFORM_POWER_CALIBRATION_ENABLE. 94 #define OPENTHREAD_POSIX_CONFIG_MAX_POWER_TABLE_ENABLE 0 95 96 // Enable the spinel vendor interface to adopt the HAL-based RCP. 97 #define OPENTHREAD_POSIX_CONFIG_SPINEL_VENDOR_INTERFACE_ENABLE 1 98 99 // Using packet filtering in OT core instead of the iptables-based firewall feature. 100 #define OPENTHREAD_POSIX_CONFIG_FIREWALL_ENABLE 0 101 102 // Disable the feature to add external routes to POSIX kernel when external routes are changed in 103 // netdata. 104 #define OPENTHREAD_POSIX_CONFIG_INSTALL_EXTERNAL_ROUTES_ENABLE 0 105 106 // Disable backtrace support as Android already has support for dumping backtrace after crash. 107 #define OPENTHREAD_POSIX_CONFIG_BACKTRACE_ENABLE 0 108 109 // Enable for Android platform. 110 #define OPENTHREAD_POSIX_CONFIG_ANDROID_ENABLE 1 111 112 // Bind the upstream DNS socket to infra network interface. 113 #define OPENTHREAD_POSIX_CONFIG_UPSTREAM_DNS_BIND_TO_INFRA_NETIF 1 114 115 // Enable TREL to select infra interface 116 #define OPENTHREAD_POSIX_CONFIG_TREL_SELECT_INFRA_IF 1 117