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