1 /* 2 * Copyright (c) 2019, 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 compile-time configurations for the IP6 service. 32 * 33 */ 34 35 #ifndef CONFIG_IP6_H_ 36 #define CONFIG_IP6_H_ 37 38 /** 39 * @def OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 40 * 41 * The maximum number of supported IPv6 addresses allows to be externally added. 42 * 43 */ 44 #ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 45 #define OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS 4 46 #endif 47 48 /** 49 * @def OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 50 * 51 * The maximum number of supported IPv6 multicast addresses allows to be externally added. 52 * 53 */ 54 #ifndef OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 55 #define OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS 2 56 #endif 57 58 /** 59 * @def OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT 60 * 61 * This setting configures the default hop limit of IPv6. 62 * 63 */ 64 #ifndef OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT 65 #define OPENTHREAD_CONFIG_IP6_HOP_LIMIT_DEFAULT 64 66 #endif 67 68 /** 69 * @def OPENTHREAD_CONFIG_IP6_MAX_DATAGRAM_LENGTH 70 * 71 * This setting configures the max datagram length of IPv6. 72 * 73 */ 74 #ifndef OPENTHREAD_CONFIG_IP6_MAX_DATAGRAM_LENGTH 75 #define OPENTHREAD_CONFIG_IP6_MAX_DATAGRAM_LENGTH 1280 76 #endif 77 78 /** 79 * @def OPENTHREAD_CONFIG_ENABLE_IP6_FRAGMENTATION 80 * 81 * Define as 1 to enable IPv6 Fragmentation support. 82 * 83 */ 84 #ifndef OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE 85 #define OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE 0 86 #endif 87 88 /** 89 * @def OPENTHREAD_CONFIG_IP6_MAX_ASSEMBLED_DATAGRAM 90 * 91 * This setting configures the max datagram length of a unfragmented IPv6 packet. 92 * 93 */ 94 #ifndef OPENTHREAD_CONFIG_IP6_MAX_ASSEMBLED_DATAGRAM 95 #define OPENTHREAD_CONFIG_IP6_MAX_ASSEMBLED_DATAGRAM 2000 96 #endif 97 98 /** 99 * @def OPENTHREAD_CONFIG_IP6_REASSEMBLY_TIMEOUT 100 * 101 * This setting configures the reassembly timeout for IPv6 in seconds. 102 * 103 * RFC 2460 \> 60 seconds 104 * 105 */ 106 #ifndef OPENTHREAD_CONFIG_IP6_REASSEMBLY_TIMEOUT 107 #define OPENTHREAD_CONFIG_IP6_REASSEMBLY_TIMEOUT 60 108 #endif 109 110 /** 111 * @def OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 112 * 113 * Define as 1 to enable support for adding of auto-configured SLAAC addresses by OpenThread. 114 * 115 */ 116 #ifndef OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 117 #define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 0 118 #endif 119 120 /** 121 * @def OPENTHREAD_CONFIG_IP6_SLAAC_NUM_ADDRESSES 122 * 123 * The number of auto-configured SLAAC addresses. Applicable only if OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE is enabled. 124 * 125 */ 126 #ifndef OPENTHREAD_CONFIG_IP6_SLAAC_NUM_ADDRESSES 127 #define OPENTHREAD_CONFIG_IP6_SLAAC_NUM_ADDRESSES 4 128 #endif 129 130 /** 131 * @def OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRIES 132 * 133 * The number of MPL Seed Set entries for duplicate detection. 134 * 135 */ 136 #ifndef OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRIES 137 #define OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRIES 32 138 #endif 139 140 /** 141 * @def OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRY_LIFETIME 142 * 143 * The MPL Seed Set entry lifetime in seconds. 144 * 145 */ 146 #ifndef OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRY_LIFETIME 147 #define OPENTHREAD_CONFIG_MPL_SEED_SET_ENTRY_LIFETIME 5 148 #endif 149 150 /** 151 * @def OPENTHREAD_CONFIG_MPL_DYNAMIC_INTERVAL_ENABLE 152 * 153 * Define as 1 to enable dynamic MPL interval feature. 154 * 155 * If this feature is enabled, the MPL forward interval will be adjusted dynamically according to 156 * the network scale, which helps to reduce multicast latency. 157 * 158 */ 159 #ifndef OPENTHREAD_CONFIG_MPL_DYNAMIC_INTERVAL_ENABLE 160 #define OPENTHREAD_CONFIG_MPL_DYNAMIC_INTERVAL_ENABLE 0 161 #endif 162 163 /** 164 * @def OPENTHREAD_CONFIG_TCP_ENABLE 165 * 166 * Define as 1 to enable TCP. 167 * 168 */ 169 #ifndef OPENTHREAD_CONFIG_TCP_ENABLE 170 #define OPENTHREAD_CONFIG_TCP_ENABLE 1 171 #endif 172 173 /** 174 * @def OPENTHREAD_CONFIG_IP6_ALLOW_LOOP_BACK_HOST_DATAGRAMS 175 * 176 * Define as 1 to allow IPv6 datagrams from Host to be looped back to Host. 177 * 178 */ 179 #ifndef OPENTHREAD_CONFIG_IP6_ALLOW_LOOP_BACK_HOST_DATAGRAMS 180 #define OPENTHREAD_CONFIG_IP6_ALLOW_LOOP_BACK_HOST_DATAGRAMS 1 181 #endif 182 183 #endif // CONFIG_IP6_H_ 184