Skip to content

Commit 88b99fa

Browse files
author
Tomasz Bursztyka
committed
net: statistics: Have a dedicated struct for rpl data
This will be useful for net mgmt based API to grab statistics. Change-Id: Id3904c48cfdd6c6fb01b6919948eb13af826ca1e Signed-off-by: Tomasz Bursztyka <[email protected]>
1 parent cbd1609 commit 88b99fa

File tree

1 file changed

+20
-18
lines changed

1 file changed

+20
-18
lines changed

include/net/net_stats.h

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,24 @@ struct net_stats_rpl_dao_ack {
188188
net_stats_t drop;
189189
};
190190

191+
struct net_stats_rpl {
192+
uint16_t mem_overflows;
193+
uint16_t local_repairs;
194+
uint16_t global_repairs;
195+
uint16_t malformed_msgs;
196+
uint16_t resets;
197+
uint16_t parent_switch;
198+
uint16_t forward_errors;
199+
uint16_t loop_errors;
200+
uint16_t loop_warnings;
201+
uint16_t root_repairs;
202+
203+
struct net_stats_rpl_dis dis;
204+
struct net_stats_rpl_dio dio;
205+
struct net_stats_rpl_dao dao;
206+
struct net_stats_rpl_dao_ack dao_ack;
207+
};
208+
191209
struct net_stats {
192210
net_stats_t processing_error;
193211

@@ -218,24 +236,8 @@ struct net_stats {
218236
#endif
219237

220238
#if defined(CONFIG_NET_STATISTICS_RPL)
221-
struct {
222-
uint16_t mem_overflows;
223-
uint16_t local_repairs;
224-
uint16_t global_repairs;
225-
uint16_t malformed_msgs;
226-
uint16_t resets;
227-
uint16_t parent_switch;
228-
uint16_t forward_errors;
229-
uint16_t loop_errors;
230-
uint16_t loop_warnings;
231-
uint16_t root_repairs;
232-
233-
struct net_stats_rpl_dis dis;
234-
struct net_stats_rpl_dio dio;
235-
struct net_stats_rpl_dao dao;
236-
struct net_stats_rpl_dao_ack dao_ack;
237-
} rpl;
238-
#endif /* CONFIG_NET_STATISTICS_RPL */
239+
struct net_stats_rpl rpl;
240+
#endif
239241
};
240242

241243
#ifdef __cplusplus

0 commit comments

Comments
 (0)