14#ifndef ZEPHYR_INCLUDE_NET_NET_STATS_H_
15#define ZEPHYR_INCLUDE_NET_NET_STATS_H_
302#if NET_TC_TX_COUNT == 0
303#define NET_TC_TX_STATS_COUNT 1
305#define NET_TC_TX_STATS_COUNT NET_TC_TX_COUNT
308#if NET_TC_RX_COUNT == 0
309#define NET_TC_RX_STATS_COUNT 1
311#define NET_TC_RX_STATS_COUNT NET_TC_RX_COUNT
324#if defined(CONFIG_NET_PKT_TXTIME_STATS_DETAIL)
327 tx_time_detail[NET_PKT_DETAIL_STATS_COUNT];
341#if defined(CONFIG_NET_PKT_RXTIME_STATS_DETAIL)
344 rx_time_detail[NET_PKT_DETAIL_STATS_COUNT];
387#if defined(CONFIG_NET_STATISTICS_IPV6)
392#if defined(CONFIG_NET_STATISTICS_IPV4)
397#if defined(CONFIG_NET_STATISTICS_ICMP)
402#if defined(CONFIG_NET_STATISTICS_TCP)
407#if defined(CONFIG_NET_STATISTICS_UDP)
412#if defined(CONFIG_NET_STATISTICS_IPV6_ND)
417#if defined(CONFIG_NET_STATISTICS_IPV6_PMTU)
422#if defined(CONFIG_NET_STATISTICS_IPV4_PMTU)
427#if defined(CONFIG_NET_STATISTICS_MLD)
432#if defined(CONFIG_NET_STATISTICS_IGMP)
437#if defined(CONFIG_NET_STATISTICS_DNS)
447#if defined(CONFIG_NET_PKT_TXTIME_STATS)
452#if defined(CONFIG_NET_PKT_RXTIME_STATS)
457#if defined(CONFIG_NET_PKT_TXTIME_STATS_DETAIL)
461#if defined(CONFIG_NET_PKT_RXTIME_STATS_DETAIL)
466#if defined(CONFIG_NET_STATISTICS_POWER_MANAGEMENT)
576#ifdef CONFIG_NET_STATISTICS_ETHERNET_VENDOR
580struct net_stats_eth_vendor {
581 const char *
const key;
632#ifdef CONFIG_NET_STATISTICS_ETHERNET_VENDOR
634 struct net_stats_eth_vendor *vendor;
695#if defined(CONFIG_NET_STATISTICS_USER_API)
700#define _NET_STATS_LAYER NET_MGMT_LAYER_L3
701#define _NET_STATS_CODE 0x101
702#define _NET_STATS_BASE (NET_MGMT_LAYER(_NET_STATS_LAYER) | \
703 NET_MGMT_LAYER_CODE(_NET_STATS_CODE))
705enum net_request_stats_cmd {
706 NET_REQUEST_STATS_CMD_GET_ALL = 1,
707 NET_REQUEST_STATS_CMD_GET_PROCESSING_ERROR,
708 NET_REQUEST_STATS_CMD_GET_BYTES,
709 NET_REQUEST_STATS_CMD_GET_IP_ERRORS,
710 NET_REQUEST_STATS_CMD_GET_IPV4,
711 NET_REQUEST_STATS_CMD_GET_IPV6,
712 NET_REQUEST_STATS_CMD_GET_IPV6_ND,
713 NET_REQUEST_STATS_CMD_GET_IPV6_PMTU,
714 NET_REQUEST_STATS_CMD_GET_IPV4_PMTU,
715 NET_REQUEST_STATS_CMD_GET_ICMP,
716 NET_REQUEST_STATS_CMD_GET_UDP,
717 NET_REQUEST_STATS_CMD_GET_TCP,
718 NET_REQUEST_STATS_CMD_GET_ETHERNET,
719 NET_REQUEST_STATS_CMD_GET_PPP,
720 NET_REQUEST_STATS_CMD_GET_PM,
721 NET_REQUEST_STATS_CMD_GET_WIFI,
722 NET_REQUEST_STATS_CMD_RESET_WIFI,
728#define NET_REQUEST_STATS_GET_ALL \
729 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_ALL)
732#define NET_REQUEST_STATS_GET_PROCESSING_ERROR \
733 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_PROCESSING_ERROR)
736#define NET_REQUEST_STATS_GET_BYTES \
737 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_BYTES)
740#define NET_REQUEST_STATS_GET_IP_ERRORS \
741 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_IP_ERRORS)
752#if defined(CONFIG_NET_STATISTICS_IPV4)
754#define NET_REQUEST_STATS_GET_IPV4 \
755 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_IPV4)
762#if defined(CONFIG_NET_STATISTICS_IPV6)
764#define NET_REQUEST_STATS_GET_IPV6 \
765 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_IPV6)
772#if defined(CONFIG_NET_STATISTICS_IPV6_ND)
774#define NET_REQUEST_STATS_GET_IPV6_ND \
775 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_IPV6_ND)
782#if defined(CONFIG_NET_STATISTICS_IPV6_PMTU)
784#define NET_REQUEST_STATS_GET_IPV6_PMTU \
785 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_IPV6_PMTU)
792#if defined(CONFIG_NET_STATISTICS_IPV4_PMTU)
794#define NET_REQUEST_STATS_GET_IPV4_PMTU \
795 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_IPV4_PMTU)
802#if defined(CONFIG_NET_STATISTICS_ICMP)
804#define NET_REQUEST_STATS_GET_ICMP \
805 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_ICMP)
812#if defined(CONFIG_NET_STATISTICS_UDP)
814#define NET_REQUEST_STATS_GET_UDP \
815 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_UDP)
822#if defined(CONFIG_NET_STATISTICS_TCP)
824#define NET_REQUEST_STATS_GET_TCP \
825 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_TCP)
832#if defined(CONFIG_NET_STATISTICS_ETHERNET)
834#define NET_REQUEST_STATS_GET_ETHERNET \
835 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_ETHERNET)
842#if defined(CONFIG_NET_STATISTICS_PPP)
844#define NET_REQUEST_STATS_GET_PPP \
845 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_PPP)
854#if defined(CONFIG_NET_STATISTICS_POWER_MANAGEMENT)
856#define NET_REQUEST_STATS_GET_PM \
857 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_PM)
864#if defined(CONFIG_NET_STATISTICS_WIFI)
866#define NET_REQUEST_STATS_GET_WIFI \
867 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_GET_WIFI)
874#define NET_REQUEST_STATS_RESET_WIFI \
875 (_NET_STATS_BASE | NET_REQUEST_STATS_CMD_RESET_WIFI)
882#define NET_STATS_GET_METRIC_NAME(_name) _name
883#define NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx) net_stats_##dev_id##_##sfx##_collector
884#define NET_STATS_GET_VAR(dev_id, sfx, var) zephyr_net_##var
885#define NET_STATS_GET_INSTANCE(dev_id, sfx, _not_used) STRINGIFY(_##dev_id##_##sfx)
892#define NET_STATS_PROMETHEUS_COUNTER_DEFINE(_desc, _labelval, _not_used, \
893 _collector, _name, _stat_var_ptr) \
894 static PROMETHEUS_COUNTER_DEFINE( \
895 NET_STATS_GET_METRIC_NAME(_name), \
896 _desc, ({ .key = "nic", .value = &_labelval[1] }), \
897 &(_collector), _stat_var_ptr)
899#define NET_STATS_PROMETHEUS_GAUGE_DEFINE(_desc, _labelval, _not_used, \
900 _collector, _name, _stat_var_ptr) \
901 static PROMETHEUS_GAUGE_DEFINE( \
902 NET_STATS_GET_METRIC_NAME(_name), \
903 _desc, ({ .key = "nic", .value = &_labelval[1] }), \
904 &(_collector), _stat_var_ptr)
906#define NET_STATS_PROMETHEUS_SUMMARY_DEFINE(_desc, _labelval, _not_used, \
907 _collector, _name, _stat_var_ptr) \
908 static PROMETHEUS_SUMMARY_DEFINE( \
909 NET_STATS_GET_METRIC_NAME(_name), \
910 _desc, ({ .key = "nic", .value = &_labelval[1] }), \
911 &(_collector), _stat_var_ptr)
913#define NET_STATS_PROMETHEUS_HISTOGRAM_DEFINE(_desc, _labelval, _not_used, \
914 _collector, _name, _stat_var_ptr) \
915 static PROMETHEUS_HISTOGRAM_DEFINE( \
916 NET_STATS_GET_METRIC_NAME(_name), \
917 _desc, ({ .key = "nic", .value = &_labelval[1] }), \
918 &(_collector), _stat_var_ptr)
921#if defined(CONFIG_NET_STATISTICS_IPV6)
922#define NET_STATS_PROMETHEUS_IPV6(iface, dev_id, sfx) \
923 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
924 "IPv6 packets sent", \
925 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_sent), \
927 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
928 NET_STATS_GET_VAR(dev_id, sfx, ipv6_sent), \
929 &(iface)->stats.ipv6.sent); \
930 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
931 "IPv6 packets received", \
932 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_recv), \
934 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
935 NET_STATS_GET_VAR(dev_id, sfx, ipv6_recv), \
936 &(iface)->stats.ipv6.recv); \
937 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
938 "IPv6 packets dropped", \
939 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_drop), \
941 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
942 NET_STATS_GET_VAR(dev_id, sfx, ipv6_drop), \
943 &(iface)->stats.ipv6.drop); \
944 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
945 "IPv6 packets forwarded", \
946 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_forward), \
948 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
949 NET_STATS_GET_VAR(dev_id, sfx, ipv6_forwarded), \
950 &(iface)->stats.ipv6.forwarded)
952#define NET_STATS_PROMETHEUS_IPV6(iface, dev_id, sfx)
956#if defined(CONFIG_NET_STATISTICS_IPV4)
957#define NET_STATS_PROMETHEUS_IPV4(iface, dev_id, sfx) \
958 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
959 "IPv4 packets sent", \
960 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_sent), \
962 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
963 NET_STATS_GET_VAR(dev_id, sfx, ipv4_sent), \
964 &(iface)->stats.ipv4.sent); \
965 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
966 "IPv4 packets received", \
967 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_recv), \
969 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
970 NET_STATS_GET_VAR(dev_id, sfx, ipv4_recv), \
971 &(iface)->stats.ipv4.recv); \
972 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
973 "IPv4 packets dropped", \
974 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_drop), \
976 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
977 NET_STATS_GET_VAR(dev_id, sfx, ipv4_drop), \
978 &(iface)->stats.ipv4.drop); \
979 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
980 "IPv4 packets forwarded", \
981 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_forwarded), \
983 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
984 NET_STATS_GET_VAR(dev_id, sfx, ipv4_forwarded), \
985 &(iface)->stats.ipv4.forwarded)
987#define NET_STATS_PROMETHEUS_IPV4(iface, dev_id, sfx)
991#if defined(CONFIG_NET_STATISTICS_ICMP)
992#define NET_STATS_PROMETHEUS_ICMP(iface, dev_id, sfx) \
993 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
994 "ICMP packets sent", \
995 NET_STATS_GET_INSTANCE(dev_id, sfx, icmp_sent), \
997 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
998 NET_STATS_GET_VAR(dev_id, sfx, icmp_sent), \
999 &(iface)->stats.icmp.sent); \
1000 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1001 "ICMP packets received", \
1002 NET_STATS_GET_INSTANCE(dev_id, sfx, icmp_recv), \
1004 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1005 NET_STATS_GET_VAR(dev_id, sfx, icmp_recv), \
1006 &(iface)->stats.icmp.recv); \
1007 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1008 "ICMP packets dropped", \
1009 NET_STATS_GET_INSTANCE(dev_id, sfx, icmp_drop), \
1011 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1012 NET_STATS_GET_VAR(dev_id, sfx, icmp_drop), \
1013 &(iface)->stats.icmp.drop); \
1014 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1015 "ICMP packets checksum error", \
1016 NET_STATS_GET_INSTANCE(dev_id, sfx, icmp_chkerr), \
1018 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1019 NET_STATS_GET_VAR(dev_id, sfx, icmp_chkerr), \
1020 &(iface)->stats.icmp.chkerr); \
1021 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1022 "ICMP packets type error", \
1023 NET_STATS_GET_INSTANCE(dev_id, sfx, icmp_typeerr), \
1025 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1026 NET_STATS_GET_VAR(dev_id, sfx, icmp_typeerr), \
1027 &(iface)->stats.icmp.typeerr)
1029#define NET_STATS_PROMETHEUS_ICMP(iface, dev_id, sfx)
1033#if defined(CONFIG_NET_STATISTICS_UDP)
1034#define NET_STATS_PROMETHEUS_UDP(iface, dev_id, sfx) \
1035 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1036 "UDP packets sent", \
1037 NET_STATS_GET_INSTANCE(dev_id, sfx, udp_sent), \
1039 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1040 NET_STATS_GET_VAR(dev_id, sfx, udp_sent), \
1041 &(iface)->stats.udp.sent); \
1042 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1043 "UDP packets received", \
1044 NET_STATS_GET_INSTANCE(dev_id, sfx, udp_recv), \
1046 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1047 NET_STATS_GET_VAR(dev_id, sfx, udp_recv), \
1048 &(iface)->stats.udp.recv); \
1049 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1050 "UDP packets dropped", \
1051 NET_STATS_GET_INSTANCE(dev_id, sfx, udp_drop), \
1053 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1054 NET_STATS_GET_VAR(dev_id, sfx, udp_drop), \
1055 &(iface)->stats.udp.drop); \
1056 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1057 "UDP packets checksum error", \
1058 NET_STATS_GET_INSTANCE(dev_id, sfx, udp_chkerr), \
1060 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1061 NET_STATS_GET_VAR(dev_id, sfx, udp_chkerr), \
1062 &(iface)->stats.udp.chkerr)
1064#define NET_STATS_PROMETHEUS_UDP(iface, dev_id, sfx)
1068#if defined(CONFIG_NET_STATISTICS_TCP)
1069#define NET_STATS_PROMETHEUS_TCP(iface, dev_id, sfx) \
1070 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1072 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_bytes_sent), \
1074 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1075 NET_STATS_GET_VAR(dev_id, sfx, tcp_bytes_sent), \
1076 &(iface)->stats.tcp.bytes.sent); \
1077 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1078 "TCP bytes received", \
1079 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_bytes_recv), \
1081 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1082 NET_STATS_GET_VAR(dev_id, sfx, tcp_bytes_recv), \
1083 &(iface)->stats.tcp.bytes.received); \
1084 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1085 "TCP bytes resent", \
1086 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_bytes_resent), \
1088 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1089 NET_STATS_GET_VAR(dev_id, sfx, tcp_bytes_resent), \
1090 &(iface)->stats.tcp.resent); \
1091 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1092 "TCP packets sent", \
1093 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_sent), \
1095 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1096 NET_STATS_GET_VAR(dev_id, sfx, tcp_sent), \
1097 &(iface)->stats.tcp.sent); \
1098 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1099 "TCP packets received", \
1100 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_recv), \
1102 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1103 NET_STATS_GET_VAR(dev_id, sfx, tcp_recv), \
1104 &(iface)->stats.tcp.recv); \
1105 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1106 "TCP packets dropped", \
1107 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_drop), \
1109 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1110 NET_STATS_GET_VAR(dev_id, sfx, tcp_drop), \
1111 &(iface)->stats.tcp.drop); \
1112 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1113 "TCP packets checksum error", \
1114 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_chkerr), \
1116 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1117 NET_STATS_GET_VAR(dev_id, sfx, tcp_chkerr), \
1118 &(iface)->stats.tcp.chkerr); \
1119 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1120 "TCP packets ack error", \
1121 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_ackerr), \
1123 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1124 NET_STATS_GET_VAR(dev_id, sfx, tcp_ackerr), \
1125 &(iface)->stats.tcp.ackerr); \
1126 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1127 "TCP packets reset error", \
1128 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_rsterr), \
1130 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1131 NET_STATS_GET_VAR(dev_id, sfx, tcp_rsterr), \
1132 &(iface)->stats.tcp.rsterr); \
1133 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1134 "TCP packets retransmitted", \
1135 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_rexmit), \
1137 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1138 NET_STATS_GET_VAR(dev_id, sfx, tcp_rexmit), \
1139 &(iface)->stats.tcp.rexmit); \
1140 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1141 "TCP reset received", \
1142 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_rst_recv), \
1144 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1145 NET_STATS_GET_VAR(dev_id, sfx, tcp_rst), \
1146 &(iface)->stats.tcp.rst); \
1147 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1148 "TCP connection drop", \
1149 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_conndrop), \
1151 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1152 NET_STATS_GET_VAR(dev_id, sfx, tcp_conndrop), \
1153 &(iface)->stats.tcp.conndrop); \
1154 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1155 "TCP connection reset", \
1156 NET_STATS_GET_INSTANCE(dev_id, sfx, tcp_connrst), \
1158 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1159 NET_STATS_GET_VAR(dev_id, sfx, tcp_connrst), \
1160 &(iface)->stats.tcp.connrst)
1162#define NET_STATS_PROMETHEUS_TCP(iface, dev_id, sfx)
1166#if defined(CONFIG_NET_STATISTICS_IPV6_ND)
1167#define NET_STATS_PROMETHEUS_IPV6_ND(iface, dev_id, sfx) \
1168 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1169 "IPv6 ND packets sent", \
1170 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_nd_sent), \
1172 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1173 NET_STATS_GET_VAR(dev_id, sfx, ipv6_nd_sent), \
1174 &(iface)->stats.ipv6_nd.sent); \
1175 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1176 "IPv6 ND packets received", \
1177 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_nd_recv), \
1179 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1180 NET_STATS_GET_VAR(dev_id, sfx, ipv6_nd_recv), \
1181 &(iface)->stats.ipv6_nd.recv); \
1182 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1183 "IPv6 ND packets dropped", \
1184 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_nd_drop), \
1186 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1187 NET_STATS_GET_VAR(dev_id, sfx, ipv6_nd_drop), \
1188 &(iface)->stats.ipv6_nd.drop)
1190#define NET_STATS_PROMETHEUS_IPV6_ND(iface, dev_id, sfx)
1194#if defined(CONFIG_NET_STATISTICS_IPV6_PMTU)
1195#define NET_STATS_PROMETHEUS_IPV6_PMTU(iface, dev_id, sfx) \
1196 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1197 "IPv6 PMTU packets sent", \
1198 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_pmtu_sent), \
1200 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1201 NET_STATS_GET_VAR(dev_id, sfx, ipv6_pmtu_sent), \
1202 &(iface)->stats.ipv6_pmtu.sent); \
1203 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1204 "IPv6 PMTU packets received", \
1205 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_pmtu_recv), \
1207 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1208 NET_STATS_GET_VAR(dev_id, sfx, ipv6_pmtu_recv), \
1209 &(iface)->stats.ipv6_pmtu.recv); \
1210 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1211 "IPv6 PMTU packets dropped", \
1212 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_pmtu_drop), \
1214 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1215 NET_STATS_GET_VAR(dev_id, sfx, ipv6_pmtu_drop), \
1216 &(iface)->stats.ipv6_pmtu.drop)
1218#define NET_STATS_PROMETHEUS_IPV6_PMTU(iface, dev_id, sfx)
1222#if defined(CONFIG_NET_STATISTICS_IPV4_PMTU)
1223#define NET_STATS_PROMETHEUS_IPV4_PMTU(iface, dev_id, sfx) \
1224 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1225 "IPv4 PMTU packets sent", \
1226 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_pmtu_sent), \
1228 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1229 NET_STATS_GET_VAR(dev_id, sfx, ipv4_pmtu_sent), \
1230 &(iface)->stats.ipv4_pmtu.sent); \
1231 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1232 "IPv4 PMTU packets received", \
1233 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_pmtu_recv), \
1235 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1236 NET_STATS_GET_VAR(dev_id, sfx, ipv4_pmtu_recv), \
1237 &(iface)->stats.ipv4_pmtu.recv); \
1238 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1239 "IPv4 PMTU packets dropped", \
1240 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_pmtu_drop), \
1242 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1243 NET_STATS_GET_VAR(dev_id, sfx, ipv4_pmtu_drop), \
1244 &(iface)->stats.ipv4_pmtu.drop)
1246#define NET_STATS_PROMETHEUS_IPV4_PMTU(iface, dev_id, sfx)
1250#if defined(CONFIG_NET_STATISTICS_MLD)
1251#define NET_STATS_PROMETHEUS_MLD(iface, dev_id, sfx) \
1252 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1253 "IPv6 MLD packets sent", \
1254 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_mld_sent), \
1256 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1257 NET_STATS_GET_VAR(dev_id, sfx, ipv6_mld_sent), \
1258 &(iface)->stats.ipv6_mld.sent); \
1259 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1260 "IPv6 MLD packets received", \
1261 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_mld_recv), \
1263 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1264 NET_STATS_GET_VAR(dev_id, sfx, ipv6_mld_recv), \
1265 &(iface)->stats.ipv6_mld.recv); \
1266 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1267 "IPv6 MLD packets dropped", \
1268 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv6_mld_drop), \
1270 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1271 NET_STATS_GET_VAR(dev_id, sfx, ipv6_mld_drop), \
1272 &(iface)->stats.ipv6_mld.drop)
1274#define NET_STATS_PROMETHEUS_MLD(iface, dev_id, sfx)
1278#if defined(CONFIG_NET_STATISTICS_IGMP)
1279#define NET_STATS_PROMETHEUS_IGMP(iface, dev_id, sfx) \
1280 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1281 "IPv4 IGMP packets sent", \
1282 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_igmp_sent), \
1284 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1285 NET_STATS_GET_VAR(dev_id, sfx, ipv4_igmp_sent), \
1286 &(iface)->stats.ipv4_igmp.sent); \
1287 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1288 "IPv4 IGMP packets received", \
1289 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_igmp_recv), \
1291 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1292 NET_STATS_GET_VAR(dev_id, sfx, ipv4_igmp_recv), \
1293 &(iface)->stats.ipv4_igmp.recv); \
1294 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1295 "IPv4 IGMP packets dropped", \
1296 NET_STATS_GET_INSTANCE(dev_id, sfx, ipv4_igmp_drop), \
1298 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1299 NET_STATS_GET_VAR(dev_id, sfx, ipv4_igmp_drop), \
1300 &(iface)->stats.ipv4_igmp.drop)
1302#define NET_STATS_PROMETHEUS_IGMP(iface, dev_id, sfx)
1306#if defined(CONFIG_NET_STATISTICS_DNS)
1307#define NET_STATS_PROMETHEUS_DNS(iface, dev_id, sfx) \
1308 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1309 "DNS packets sent", \
1310 NET_STATS_GET_INSTANCE(dev_id, sfx, dns_sent), \
1312 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1313 NET_STATS_GET_VAR(dev_id, sfx, dns_sent), \
1314 &(iface)->stats.dns.sent); \
1315 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1316 "DNS packets received", \
1317 NET_STATS_GET_INSTANCE(dev_id, sfx, dns_recv), \
1319 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1320 NET_STATS_GET_VAR(dev_id, sfx, dns_recv), \
1321 &(iface)->stats.dns.recv); \
1322 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1323 "DNS packets dropped", \
1324 NET_STATS_GET_INSTANCE(dev_id, sfx, dns_drop), \
1326 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1327 NET_STATS_GET_VAR(dev_id, sfx, dns_drop), \
1328 &(iface)->stats.dns.drop)
1330#define NET_STATS_PROMETHEUS_DNS(iface, dev_id, sfx)
1334#if defined(CONFIG_NET_PKT_TXTIME_STATS)
1335#define NET_STATS_PROMETHEUS_TX_TIME(iface, dev_id, sfx) \
1336 NET_STATS_PROMETHEUS_SUMMARY_DEFINE( \
1337 "TX time in microseconds", \
1338 NET_STATS_GET_INSTANCE(dev_id, sfx, tx_time), \
1340 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1341 NET_STATS_GET_VAR(dev_id, sfx, tx_time), \
1342 &(iface)->stats.tx_time)
1344#define NET_STATS_PROMETHEUS_TX_TIME(iface, dev_id, sfx)
1348#if defined(CONFIG_NET_PKT_RXTIME_STATS)
1349#define NET_STATS_PROMETHEUS_RX_TIME(iface, dev_id, sfx) \
1350 NET_STATS_PROMETHEUS_SUMMARY_DEFINE( \
1351 "RX time in microseconds", \
1352 NET_STATS_GET_INSTANCE(dev_id, sfx, rx_time), \
1354 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1355 NET_STATS_GET_VAR(dev_id, sfx, rx_time), \
1356 &(iface)->stats.rx_time)
1358#define NET_STATS_PROMETHEUS_RX_TIME(iface, dev_id, sfx)
1362#define NET_STATS_PROMETHEUS(iface, dev_id, sfx) \
1363 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1364 "Processing error", \
1365 NET_STATS_GET_INSTANCE(dev_id, sfx, process_error), \
1367 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1368 NET_STATS_GET_VAR(dev_id, sfx, processing_error), \
1369 &(iface)->stats.processing_error); \
1371 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1373 NET_STATS_GET_INSTANCE(dev_id, sfx, ip_proto_error), \
1375 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1376 NET_STATS_GET_VAR(dev_id, sfx, ip_errors_protoerr), \
1377 &(iface)->stats.ip_errors.protoerr); \
1378 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1379 "IP version/header len error", \
1380 NET_STATS_GET_INSTANCE(dev_id, sfx, ip_vhl_error), \
1382 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1383 NET_STATS_GET_VAR(dev_id, sfx, ip_errors_vhlerr), \
1384 &(iface)->stats.ip_errors.vhlerr); \
1385 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1386 "IP header len error (high byte)", \
1387 NET_STATS_GET_INSTANCE(dev_id, sfx, ip_hblen_error), \
1389 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1390 NET_STATS_GET_VAR(dev_id, sfx, ip_errors_hblenerr), \
1391 &(iface)->stats.ip_errors.hblenerr); \
1392 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1393 "IP header len error (low byte)", \
1394 NET_STATS_GET_INSTANCE(dev_id, sfx, ip_lblen_error), \
1396 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1397 NET_STATS_GET_VAR(dev_id, sfx, ip_errors_lblenerr), \
1398 &(iface)->stats.ip_errors.lblenerr); \
1399 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1400 "IP fragment error", \
1401 NET_STATS_GET_INSTANCE(dev_id, sfx, ip_frag_error), \
1403 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1404 NET_STATS_GET_VAR(dev_id, sfx, ip_errors_fragerr), \
1405 &(iface)->stats.ip_errors.fragerr); \
1406 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1407 "IP checksum error", \
1408 NET_STATS_GET_INSTANCE(dev_id, sfx, ip_chk_error), \
1410 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1411 NET_STATS_GET_VAR(dev_id, sfx, ip_errors_chkerr), \
1412 &(iface)->stats.ip_errors.chkerr); \
1414 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1416 NET_STATS_GET_INSTANCE(dev_id, sfx, bytes_recv), \
1418 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1419 NET_STATS_GET_VAR(dev_id, sfx, bytes_recv), \
1420 &(iface)->stats.bytes.received); \
1421 NET_STATS_PROMETHEUS_COUNTER_DEFINE( \
1423 NET_STATS_GET_INSTANCE(dev_id, sfx, bytes_sent), \
1425 NET_STATS_GET_COLLECTOR_NAME(dev_id, sfx), \
1426 NET_STATS_GET_VAR(dev_id, sfx, bytes_sent), \
1427 &(iface)->stats.bytes.sent); \
1428 NET_STATS_PROMETHEUS_IPV6(iface, dev_id, sfx); \
1429 NET_STATS_PROMETHEUS_IPV4(iface, dev_id, sfx); \
1430 NET_STATS_PROMETHEUS_ICMP(iface, dev_id, sfx); \
1431 NET_STATS_PROMETHEUS_UDP(iface, dev_id, sfx); \
1432 NET_STATS_PROMETHEUS_TCP(iface, dev_id, sfx); \
1433 NET_STATS_PROMETHEUS_IPV6_ND(iface, dev_id, sfx); \
1434 NET_STATS_PROMETHEUS_IPV6_PMTU(iface, dev_id, sfx); \
1435 NET_STATS_PROMETHEUS_IPV4_PMTU(iface, dev_id, sfx); \
1436 NET_STATS_PROMETHEUS_MLD(iface, dev_id, sfx); \
1437 NET_STATS_PROMETHEUS_IGMP(iface, dev_id, sfx); \
1438 NET_STATS_PROMETHEUS_DNS(iface, dev_id, sfx); \
1439 NET_STATS_PROMETHEUS_TX_TIME(iface, dev_id, sfx); \
1440 NET_STATS_PROMETHEUS_RX_TIME(iface, dev_id, sfx)
Prometheus collector APIs.
#define NET_MGMT_DEFINE_REQUEST_HANDLER(_mgmt_request)
Declare a request handler function for the given network event.
Definition net_mgmt.h:111
uint32_t net_stats_t
Network statistics counter.
Definition net_stats.h:45
Prometheus histogram APIs.
Prometheus metric interface.
Network core definitions.
Network Management API public header.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Number of bytes sent and received.
Definition net_stats.h:50
net_stats_t sent
Number of bytes sent.
Definition net_stats.h:52
net_stats_t received
Number of bytes received.
Definition net_stats.h:54
DNS statistics.
Definition net_stats.h:267
net_stats_t drop
Number of dropped DNS packets.
Definition net_stats.h:275
net_stats_t recv
Number of received DNS queries.
Definition net_stats.h:269
net_stats_t sent
Number of sent DNS responses.
Definition net_stats.h:272
Ethernet checksum statistics.
Definition net_stats.h:554
net_stats_t rx_csum_offload_good
Number of good RX checksum offloading.
Definition net_stats.h:556
net_stats_t rx_csum_offload_errors
Number of failed RX checksum offloading.
Definition net_stats.h:559
Ethernet error statistics.
Definition net_stats.h:475
net_stats_t tx_carrier_errors
Number of TX carrier errors.
Definition net_stats.h:513
net_stats_t uncorr_ecc_errors
Number of uncorrected ECC errors.
Definition net_stats.h:528
net_stats_t rx_long_length_errors
Number of RX long length errors.
Definition net_stats.h:495
net_stats_t tx_window_errors
Number of TX window errors.
Definition net_stats.h:522
net_stats_t corr_ecc_errors
Number of corrected ECC errors.
Definition net_stats.h:531
net_stats_t rx_missed_errors
Number of RX missed errors.
Definition net_stats.h:492
net_stats_t rx_crc_errors
Number of RX CRC errors.
Definition net_stats.h:483
net_stats_t rx_short_length_errors
Number of RX short length errors.
Definition net_stats.h:498
net_stats_t rx_align_errors
Number of RX buffer align errors.
Definition net_stats.h:501
net_stats_t rx_dma_failed
Number of RX DMA failed errors.
Definition net_stats.h:504
net_stats_t rx_no_buffer_count
Number of RX net_pkt allocation errors.
Definition net_stats.h:489
net_stats_t tx_fifo_errors
Number of TX FIFO errors.
Definition net_stats.h:516
net_stats_t rx_frame_errors
Number of RX frame errors.
Definition net_stats.h:486
net_stats_t rx_over_errors
Number of RX overrun errors.
Definition net_stats.h:480
net_stats_t tx_dma_failed
Number of TX DMA failed errors.
Definition net_stats.h:525
net_stats_t rx_length_errors
Number of RX length errors.
Definition net_stats.h:477
net_stats_t rx_buf_alloc_failed
Number of RX net_buf allocation errors.
Definition net_stats.h:507
net_stats_t tx_heartbeat_errors
Number of TX heartbeat errors.
Definition net_stats.h:519
net_stats_t tx_aborted_errors
Number of TX aborted errors.
Definition net_stats.h:510
Ethernet flow control statistics.
Definition net_stats.h:537
net_stats_t rx_flow_control_xon
Number of RX XON flow control.
Definition net_stats.h:539
net_stats_t tx_flow_control_xon
Number of TX XON flow control.
Definition net_stats.h:545
net_stats_t rx_flow_control_xoff
Number of RX XOFF flow control.
Definition net_stats.h:542
net_stats_t tx_flow_control_xoff
Number of TX XOFF flow control.
Definition net_stats.h:548
Ethernet hardware timestamp statistics.
Definition net_stats.h:565
net_stats_t tx_hwtstamp_timeouts
Number of RX hardware timestamp timeout.
Definition net_stats.h:570
net_stats_t rx_hwtstamp_cleared
Number of RX hardware timestamp cleared.
Definition net_stats.h:567
net_stats_t tx_hwtstamp_skipped
Number of RX hardware timestamp skipped.
Definition net_stats.h:573
All Ethernet specific statistics.
Definition net_stats.h:589
struct net_stats_pkts broadcast
Total number of broadcast packets received and sent.
Definition net_stats.h:597
struct net_stats_eth_csum csum
Total number of checksum errors in RX and TX.
Definition net_stats.h:612
net_stats_t tx_dropped
Total number of dropped TX packets.
Definition net_stats.h:621
struct net_stats_eth_hw_timestamp hw_timestamp
Total number of hardware timestamp errors in RX and TX.
Definition net_stats.h:615
struct net_stats_pkts multicast
Total number of multicast packets received and sent.
Definition net_stats.h:600
struct net_stats_eth_flow flow_control
Total number of flow control errors in RX and TX.
Definition net_stats.h:609
net_stats_t tx_restart_queue
Total number of TX queue restarts.
Definition net_stats.h:627
net_stats_t collisions
Total number of collisions.
Definition net_stats.h:618
struct net_stats_bytes bytes
Total number of bytes received and sent.
Definition net_stats.h:591
struct net_stats_eth_errors error_details
Total number of errors in RX and TX.
Definition net_stats.h:606
struct net_stats_pkts pkts
Total number of packets received and sent.
Definition net_stats.h:594
struct net_stats_pkts errors
Total number of errors in RX and TX.
Definition net_stats.h:603
net_stats_t tx_timeout_count
Total number of TX timeout errors.
Definition net_stats.h:624
net_stats_t unknown_protocol
Total number of RX unknown protocol packets.
Definition net_stats.h:630
ICMP statistics.
Definition net_stats.h:114
net_stats_t sent
Number of sent ICMP packets.
Definition net_stats.h:119
net_stats_t chkerr
Number of ICMP packets with a bad checksum.
Definition net_stats.h:128
net_stats_t drop
Number of dropped ICMP packets.
Definition net_stats.h:122
net_stats_t typeerr
Number of ICMP packets with a wrong type.
Definition net_stats.h:125
net_stats_t recv
Number of received ICMP packets.
Definition net_stats.h:116
IP layer error statistics.
Definition net_stats.h:87
net_stats_t hblenerr
Number of packets dropped due to wrong IP length, high byte.
Definition net_stats.h:94
net_stats_t vhlerr
Number of packets dropped due to wrong IP version or header length.
Definition net_stats.h:91
net_stats_t chkerr
Number of packets dropped due to IP checksum errors.
Definition net_stats.h:103
net_stats_t protoerr
Number of packets dropped because they were neither ICMP, UDP nor TCP.
Definition net_stats.h:108
net_stats_t lblenerr
Number of packets dropped due to wrong IP length, low byte.
Definition net_stats.h:97
net_stats_t fragerr
Number of packets dropped because they were IP fragments.
Definition net_stats.h:100
IP layer statistics.
Definition net_stats.h:70
net_stats_t forwarded
Number of forwarded packets at the IP layer.
Definition net_stats.h:78
net_stats_t recv
Number of received packets at the IP layer.
Definition net_stats.h:72
net_stats_t sent
Number of sent packets at the IP layer.
Definition net_stats.h:75
net_stats_t drop
Number of dropped packets at the IP layer.
Definition net_stats.h:81
IPv4 IGMP daemon statistics.
Definition net_stats.h:253
net_stats_t drop
Number of dropped IPv4 IGMP packets.
Definition net_stats.h:261
net_stats_t recv
Number of received IPv4 IGMP queries.
Definition net_stats.h:255
net_stats_t sent
Number of sent IPv4 IGMP reports.
Definition net_stats.h:258
IPv4 Path MTU Discovery statistics.
Definition net_stats.h:225
net_stats_t sent
Number of sent IPv4 PMTU packets.
Definition net_stats.h:233
net_stats_t recv
Number of received IPv4 PMTU packets.
Definition net_stats.h:230
net_stats_t drop
Number of dropped IPv4 PMTU packets.
Definition net_stats.h:227
IPv6 multicast listener daemon statistics.
Definition net_stats.h:239
net_stats_t recv
Number of received IPv6 MLD queries.
Definition net_stats.h:241
net_stats_t sent
Number of sent IPv6 MLD reports.
Definition net_stats.h:244
net_stats_t drop
Number of dropped IPv6 MLD packets.
Definition net_stats.h:247
IPv6 neighbor discovery statistics.
Definition net_stats.h:197
net_stats_t sent
Number of sent IPv6 neighbor discovery packets.
Definition net_stats.h:205
net_stats_t recv
Number of received IPv6 neighbor discovery packets.
Definition net_stats.h:202
net_stats_t drop
Number of dropped IPv6 neighbor discovery packets.
Definition net_stats.h:199
IPv6 Path MTU Discovery statistics.
Definition net_stats.h:211
net_stats_t recv
Number of received IPv6 PMTU packets.
Definition net_stats.h:216
net_stats_t drop
Number of dropped IPv6 PMTU packets.
Definition net_stats.h:213
net_stats_t sent
Number of sent IPv6 PMTU packets.
Definition net_stats.h:219
Number of network packets sent and received.
Definition net_stats.h:60
net_stats_t rx
Number of packets received.
Definition net_stats.h:64
net_stats_t tx
Number of packets sent.
Definition net_stats.h:62
Power management statistics.
Definition net_stats.h:359
uint32_t last_suspend_time
How long the last suspend took.
Definition net_stats.h:365
uint32_t start_time
Network interface last suspend start time.
Definition net_stats.h:367
uint64_t overall_suspend_time
Total suspend time.
Definition net_stats.h:361
net_stats_t suspend_count
How many times we were suspended.
Definition net_stats.h:363
All PPP specific statistics.
Definition net_stats.h:641
net_stats_t chkerr
Number of received PPP frames with a bad checksum.
Definition net_stats.h:652
struct net_stats_pkts pkts
Total number of packets received and sent.
Definition net_stats.h:646
struct net_stats_bytes bytes
Total number of bytes received and sent.
Definition net_stats.h:643
net_stats_t drop
Number of received and dropped PPP frames.
Definition net_stats.h:649
Network packet receive times for calculating average RX time.
Definition net_stats.h:292
uint64_t sum
Sum of network packet receive times.
Definition net_stats.h:294
net_stats_t count
Number of network packets received.
Definition net_stats.h:297
All Wi-Fi management statistics.
Definition net_stats.h:658
net_stats_t beacons_miss
Number of missed beacons.
Definition net_stats.h:663
net_stats_t beacons_rx
Number of received beacons.
Definition net_stats.h:660
Traffic class statistics.
Definition net_stats.h:319
net_stats_t bytes
Number of bytes sent for this traffic class.
Definition net_stats.h:332
struct net_stats_tx_time tx_time
Helper for calculating average TX time statistics.
Definition net_stats.h:323
net_stats_t pkts
Number of packets sent for this traffic class.
Definition net_stats.h:330
uint8_t priority
Priority of this traffic class.
Definition net_stats.h:334
struct net_stats_tc::@406 sent[NET_TC_TX_STATS_COUNT]
TX statistics for each traffic class.
struct net_stats_tc::@407 recv[NET_TC_RX_STATS_COUNT]
RX statistics for each traffic class.
TCP statistics.
Definition net_stats.h:134
net_stats_t ackerr
Number of received TCP segments with a bad ACK number.
Definition net_stats.h:157
net_stats_t rsterr
Number of received bad TCP RST (reset) segments.
Definition net_stats.h:160
net_stats_t rexmit
Number of retransmitted TCP segments.
Definition net_stats.h:166
net_stats_t chkerr
Number of TCP segments with a bad checksum.
Definition net_stats.h:154
net_stats_t seg_drop
Number of dropped TCP segments.
Definition net_stats.h:151
net_stats_t connrst
Number of connection attempts for closed ports, triggering a RST.
Definition net_stats.h:174
net_stats_t drop
Number of dropped packets at the TCP layer.
Definition net_stats.h:142
net_stats_t rst
Number of received TCP RST (reset) segments.
Definition net_stats.h:163
net_stats_t sent
Number of sent TCP segments.
Definition net_stats.h:148
net_stats_t resent
Amount of retransmitted data.
Definition net_stats.h:139
net_stats_t conndrop
Number of dropped connection attempts because too few connections were available.
Definition net_stats.h:171
net_stats_t recv
Number of received TCP segments.
Definition net_stats.h:145
struct net_stats_bytes bytes
Amount of received and sent TCP application data.
Definition net_stats.h:136
Network packet transfer times for calculating average TX time.
Definition net_stats.h:281
net_stats_t count
Number of network packets transferred.
Definition net_stats.h:286
uint64_t sum
Sum of network packet transfer times.
Definition net_stats.h:283
UDP statistics.
Definition net_stats.h:180
net_stats_t recv
Number of received UDP segments.
Definition net_stats.h:185
net_stats_t drop
Number of dropped UDP segments.
Definition net_stats.h:182
net_stats_t chkerr
Number of UDP segments with a bad checksum.
Definition net_stats.h:191
net_stats_t sent
Number of sent UDP segments.
Definition net_stats.h:188
All Wi-Fi specific statistics.
Definition net_stats.h:669
struct net_stats_pkts broadcast
Total number of broadcast packets received and sent.
Definition net_stats.h:680
struct net_stats_pkts multicast
Total number of multicast packets received and sent.
Definition net_stats.h:683
struct net_stats_sta_mgmt sta_mgmt
Total number of beacon errors.
Definition net_stats.h:671
struct net_stats_bytes bytes
Total number of bytes received and sent.
Definition net_stats.h:674
net_stats_t overrun_count
Total number of dropped packets at received and sent.
Definition net_stats.h:692
struct net_stats_pkts pkts
Total number of packets received and sent.
Definition net_stats.h:677
struct net_stats_pkts errors
Total number of errors in RX and TX.
Definition net_stats.h:686
struct net_stats_pkts unicast
Total number of unicast packets received and sent.
Definition net_stats.h:689
All network statistics in one struct.
Definition net_stats.h:374
net_stats_t processing_error
Count of malformed packets or packets we do not have handler for.
Definition net_stats.h:376
struct net_stats_bytes bytes
This calculates amount of data transferred through all the network interfaces.
Definition net_stats.h:382
struct net_stats_ip_errors ip_errors
IP layer errors.
Definition net_stats.h:385