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 /**
30  * @file
31  *   This file includes compile-time configurations for History Tracker module.
32  *
33  */
34 
35 #ifndef CONFIG_HISTORY_TRACKER_H_
36 #define CONFIG_HISTORY_TRACKER_H_
37 
38 /**
39  * @addtogroup config-history-tracker
40  *
41  * @brief
42  *   This module includes configuration variables for History Tracker.
43  *
44  * @{
45  *
46  */
47 
48 /**
49  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE
50  *
51  * Define as 1 to enable History Tracker module.
52  *
53  */
54 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE
55 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE 0
56 #endif
57 
58 /**
59  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_NET_INFO_LIST_SIZE
60  *
61  * Specifies the maximum number of entries in Network Info (role, mode, partition ID, RLOC16) history list.
62  *
63  * Can be set to zero to configure History Tracker module not to collect any entries.
64  *
65  */
66 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_NET_INFO_LIST_SIZE
67 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_NET_INFO_LIST_SIZE 32
68 #endif
69 
70 /**
71  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_UNICAST_ADDRESS_LIST_SIZE
72  *
73  * Specifies the maximum number of entries in unicast IPv6 address history list.
74  *
75  * Can be set to zero to configure History Tracker module not to collect any entries.
76  *
77  */
78 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_UNICAST_ADDRESS_LIST_SIZE
79 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_UNICAST_ADDRESS_LIST_SIZE 20
80 #endif
81 
82 /**
83  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_MULTICAST_ADDRESS_LIST_SIZE
84  *
85  * Specifies the maximum number of entries in multicast IPv6 address history list.
86  *
87  * Can be set to zero to configure History Tracker module not to collect any entries.
88  *
89  */
90 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_MULTICAST_ADDRESS_LIST_SIZE
91 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_MULTICAST_ADDRESS_LIST_SIZE 20
92 #endif
93 
94 /**
95  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_RX_LIST_SIZE
96  *
97  * Specifies the maximum number of entries in RX history list.
98  *
99  * Can be set to zero to configure History Tracker module not to collect any RX history.
100  *
101  */
102 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_RX_LIST_SIZE
103 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_RX_LIST_SIZE 32
104 #endif
105 
106 /**
107  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_TX_LIST_SIZE
108  *
109  * Specifies the maximum number of entries in TX history list.
110  *
111  * Can be set to zero to configure History Tracker module not to collect any TX history.
112  *
113  */
114 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_TX_LIST_SIZE
115 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_TX_LIST_SIZE 32
116 #endif
117 
118 /**
119  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_EXCLUDE_THREAD_CONTROL_MESSAGES
120  *
121  * Define as 1 to exclude Thread Control message (e.g., MLE, TMF) from TX and RX history.
122  *
123  */
124 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_EXCLUDE_THREAD_CONTROL_MESSAGES
125 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_EXCLUDE_THREAD_CONTROL_MESSAGES 1
126 #endif
127 
128 /**
129  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_NEIGHBOR_LIST_SIZE
130  *
131  * Specifies the maximum number of entries in neighbor table history list.
132  *
133  * Can be set to zero to configure History Tracker module not to collect any neighbor table history.
134  *
135  */
136 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_NEIGHBOR_LIST_SIZE
137 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_NEIGHBOR_LIST_SIZE 64
138 #endif
139 
140 /**
141  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_ROUTER_LIST_SIZE
142  *
143  * Specifies the maximum number of entries in router table history list.
144  *
145  * Can be set to zero to configure History Tracker module not to collect any router table history.
146  *
147  */
148 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_ROUTER_LIST_SIZE
149 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_ROUTER_LIST_SIZE 256
150 #endif
151 
152 /**
153  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_ON_MESH_PREFIX_LIST_SIZE
154  *
155  * Specifies the maximum number of entries in Network Data On Mesh Prefix history list.
156  *
157  * Can be set to zero to configure History Tracker module not to collect prefix info.
158  *
159  */
160 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_ON_MESH_PREFIX_LIST_SIZE
161 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_ON_MESH_PREFIX_LIST_SIZE 32
162 #endif
163 
164 /**
165  * @def OPENTHREAD_CONFIG_HISTORY_TRACKER_EXTERNAL_ROUTE_LIST_SIZE
166  *
167  * Specifies the maximum number of entries in Network Data External Route history list.
168  *
169  * Can be set to zero to configure History Tracker module not to collect route info.
170  *
171  */
172 #ifndef OPENTHREAD_CONFIG_HISTORY_TRACKER_EXTERNAL_ROUTE_LIST_SIZE
173 #define OPENTHREAD_CONFIG_HISTORY_TRACKER_EXTERNAL_ROUTE_LIST_SIZE 32
174 #endif
175 
176 /**
177  * @}
178  *
179  */
180 
181 #endif // CONFIG_HISTORY_TRACKER_H_
182