The friendly Operating System for the Internet of Things
include/net/netstats.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 INRIA
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
21 #include <stdint.h>
22 
23 #ifndef NETSTATS_H
24 #define NETSTATS_H
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #define NETSTATS_LAYER2 (0x01)
35 #define NETSTATS_IPV6 (0x02)
36 #define NETSTATS_RPL (0x03)
37 #define NETSTATS_ALL (0xFF)
38 
43 typedef struct {
44  uint32_t tx_unicast_count;
45  uint32_t tx_mcast_count;
47  uint32_t tx_success;
50  uint32_t tx_failed;
51  uint32_t tx_bytes;
52  uint32_t rx_count;
53  uint32_t rx_bytes;
54 } netstats_t;
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 #endif /* NETSTATS_H */
61 
uint32_t rx_count
received (data) packets
Global statistics struct.
uint32_t tx_unicast_count
packets sent via unicast
uint32_t rx_bytes
received bytes
uint32_t tx_success
successful sending operations (either acknowledged or unconfirmed sending operation, e.g.
uint32_t tx_bytes
sent bytes
uint32_t tx_failed
failed sending operations
uint32_t tx_mcast_count
packets sent via multicast (including broadcast)