1 /*
2  *  Copyright (c) 2016, 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 configuration constants for OpenThread.
32  */
33 
34 #ifndef OPENTHREAD_CORE_CONFIG_H_
35 #define OPENTHREAD_CORE_CONFIG_H_
36 
37 #include <openthread/config.h>
38 
39 #define OT_THREAD_VERSION_INVALID 0
40 
41 #define OT_THREAD_VERSION_1_1 2
42 #define OT_THREAD_VERSION_1_2 3
43 #define OT_THREAD_VERSION_1_3 4
44 // Support projects on legacy "1.3.1" version, which is now "1.4"
45 #define OT_THREAD_VERSION_1_3_1 5
46 #define OT_THREAD_VERSION_1_4 5
47 
48 #define OPENTHREAD_CORE_CONFIG_H_IN
49 
50 /**
51  * Include project and platform specific header files in the following order:
52  *
53  * 1. Project specific header file (`OPENTHREAD_PROJECT_CORE_CONFIG_FILE`)
54  * 2. Platform specific header file (`OPENTHREAD_PLATFORM_CORE_CONFIG_FILE`)
55  * 3. Default config values as specified by `config/{module}.h`
56  *
57  */
58 
59 #ifdef OPENTHREAD_PROJECT_CORE_CONFIG_FILE
60 #include OPENTHREAD_PROJECT_CORE_CONFIG_FILE
61 #elif defined(OPENTHREAD_CONFIG_CORE_USER_CONFIG_HEADER_ENABLE)
62 // This configuration header file should be provided by the user when
63 // OPENTHREAD_CONFIG_CORE_USER_CONFIG_HEADER_ENABLE is defined to 1.
64 #include "openthread-core-user-config.h"
65 #endif
66 
67 #ifdef OPENTHREAD_PLATFORM_CORE_CONFIG_FILE
68 #include OPENTHREAD_PLATFORM_CORE_CONFIG_FILE
69 #endif
70 
71 #ifndef OPENTHREAD_CONFIG_THREAD_VERSION
72 #define OPENTHREAD_CONFIG_THREAD_VERSION OT_THREAD_VERSION_1_3
73 #endif
74 
75 #include "config/announce_sender.h"
76 #include "config/backbone_router.h"
77 #include "config/border_agent.h"
78 #include "config/border_router.h"
79 #include "config/border_routing.h"
80 #include "config/channel_manager.h"
81 #include "config/channel_monitor.h"
82 #include "config/child_supervision.h"
83 #include "config/coap.h"
84 #include "config/commissioner.h"
85 #include "config/crypto.h"
86 #include "config/dataset_updater.h"
87 #include "config/dhcp6_client.h"
88 #include "config/dhcp6_server.h"
89 #include "config/diag.h"
90 #include "config/dns_client.h"
91 #include "config/dns_dso.h"
92 #include "config/dnssd_server.h"
93 #include "config/history_tracker.h"
94 #include "config/ip6.h"
95 #include "config/joiner.h"
96 #include "config/link_metrics_manager.h"
97 #include "config/link_quality.h"
98 #include "config/link_raw.h"
99 #include "config/logging.h"
100 #include "config/mac.h"
101 #include "config/mdns.h"
102 #include "config/mesh_diag.h"
103 #include "config/mesh_forwarder.h"
104 #include "config/misc.h"
105 #include "config/mle.h"
106 #include "config/nat64.h"
107 #include "config/netdata_publisher.h"
108 #include "config/network_diagnostic.h"
109 #include "config/parent_search.h"
110 #include "config/ping_sender.h"
111 #include "config/platform.h"
112 #include "config/power_calibration.h"
113 #include "config/radio_link.h"
114 #include "config/secure_transport.h"
115 #include "config/sntp_client.h"
116 #include "config/srp_client.h"
117 #include "config/srp_server.h"
118 #include "config/time_sync.h"
119 #include "config/tmf.h"
120 #include "config/trel.h"
121 
122 #undef OPENTHREAD_CORE_CONFIG_H_IN
123 
124 #include "config/openthread-core-config-check.h"
125 
126 #ifdef OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE
127 #include OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE
128 #endif
129 
130 #endif // OPENTHREAD_CORE_CONFIG_H_
131