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