Lines Matching full:iface

72 static inline void stats(struct net_if *iface)  in stats()  argument
80 if (iface) { in stats()
81 NET_INFO("Interface %p [%d]", iface, in stats()
82 net_if_get_by_iface(iface)); in stats()
89 GET_STAT(iface, ipv6.recv), in stats()
90 GET_STAT(iface, ipv6.sent), in stats()
91 GET_STAT(iface, ipv6.drop), in stats()
92 GET_STAT(iface, ipv6.forwarded)); in stats()
95 GET_STAT(iface, ipv6_nd.recv), in stats()
96 GET_STAT(iface, ipv6_nd.sent), in stats()
97 GET_STAT(iface, ipv6_nd.drop)); in stats()
101 GET_STAT(iface, ipv6_pmtu.recv), in stats()
102 GET_STAT(iface, ipv6_pmtu.sent), in stats()
103 GET_STAT(iface, ipv6_pmtu.drop)); in stats()
107 GET_STAT(iface, ipv6_mld.recv), in stats()
108 GET_STAT(iface, ipv6_mld.sent), in stats()
109 GET_STAT(iface, ipv6_mld.drop)); in stats()
115 GET_STAT(iface, ipv4.recv), in stats()
116 GET_STAT(iface, ipv4.sent), in stats()
117 GET_STAT(iface, ipv4.drop), in stats()
118 GET_STAT(iface, ipv4.forwarded)); in stats()
122 GET_STAT(iface, ip_errors.vhlerr), in stats()
123 GET_STAT(iface, ip_errors.hblenerr), in stats()
124 GET_STAT(iface, ip_errors.lblenerr)); in stats()
126 GET_STAT(iface, ip_errors.fragerr), in stats()
127 GET_STAT(iface, ip_errors.chkerr), in stats()
128 GET_STAT(iface, ip_errors.protoerr)); in stats()
132 GET_STAT(iface, ipv4_pmtu.recv), in stats()
133 GET_STAT(iface, ipv4_pmtu.sent), in stats()
134 GET_STAT(iface, ipv4_pmtu.drop)); in stats()
138 GET_STAT(iface, icmp.recv), in stats()
139 GET_STAT(iface, icmp.sent), in stats()
140 GET_STAT(iface, icmp.drop)); in stats()
142 GET_STAT(iface, icmp.typeerr), in stats()
143 GET_STAT(iface, icmp.chkerr)); in stats()
147 GET_STAT(iface, udp.recv), in stats()
148 GET_STAT(iface, udp.sent), in stats()
149 GET_STAT(iface, udp.drop)); in stats()
151 GET_STAT(iface, udp.chkerr)); in stats()
156 GET_STAT(iface, tcp.bytes.received), in stats()
157 GET_STAT(iface, tcp.bytes.sent)); in stats()
159 GET_STAT(iface, tcp.recv), in stats()
160 GET_STAT(iface, tcp.sent), in stats()
161 GET_STAT(iface, tcp.drop)); in stats()
163 GET_STAT(iface, tcp.resent), in stats()
164 GET_STAT(iface, tcp.chkerr), in stats()
165 GET_STAT(iface, tcp.ackerr)); in stats()
167 GET_STAT(iface, tcp.rsterr), in stats()
168 GET_STAT(iface, tcp.rst), in stats()
169 GET_STAT(iface, tcp.rexmit)); in stats()
171 GET_STAT(iface, tcp.conndrop), in stats()
172 GET_STAT(iface, tcp.connrst)); in stats()
175 NET_INFO("Bytes received %u", GET_STAT(iface, bytes.received)); in stats()
176 NET_INFO("Bytes sent %u", GET_STAT(iface, bytes.sent)); in stats()
178 GET_STAT(iface, processing_error)); in stats()
187 priority2str(GET_STAT(iface, in stats()
189 GET_STAT(iface, tc.sent[i].priority), in stats()
190 GET_STAT(iface, tc.sent[i].pkts), in stats()
191 GET_STAT(iface, tc.sent[i].bytes)); in stats()
201 priority2str(GET_STAT(iface, in stats()
203 GET_STAT(iface, tc.recv[i].priority), in stats()
204 GET_STAT(iface, tc.recv[i].pkts), in stats()
205 GET_STAT(iface, tc.recv[i].bytes)); in stats()
215 GET_STAT(iface, pm.last_suspend_time)); in stats()
217 GET_STAT(iface, pm.suspend_count)); in stats()
219 (uint32_t)(GET_STAT(iface, pm.overall_suspend_time) / in stats()
220 GET_STAT(iface, pm.suspend_count))); in stats()
222 GET_STAT(iface, pm.overall_suspend_time)); in stats()
228 void net_print_statistics_iface(struct net_if *iface) in net_print_statistics_iface() argument
233 stats(iface); in net_print_statistics_iface()
236 static void iface_cb(struct net_if *iface, void *user_data) in iface_cb() argument
238 net_print_statistics_iface(iface); in iface_cb()
255 static int net_stats_get(uint32_t mgmt_request, struct net_if *iface, in net_stats_get() argument
265 src = iface ? &iface->stats : &net_stats; in net_stats_get()
272 src = GET_STAT_ADDR(iface, processing_error); in net_stats_get()
276 src = GET_STAT_ADDR(iface, bytes); in net_stats_get()
280 src = GET_STAT_ADDR(iface, ip_errors); in net_stats_get()
285 src = GET_STAT_ADDR(iface, ipv4); in net_stats_get()
291 src = GET_STAT_ADDR(iface, ipv6); in net_stats_get()
297 src = GET_STAT_ADDR(iface, ipv6_nd); in net_stats_get()
303 src = GET_STAT_ADDR(iface, ipv6_pmtu); in net_stats_get()
309 src = GET_STAT_ADDR(iface, ipv4_pmtu); in net_stats_get()
315 src = GET_STAT_ADDR(iface, icmp); in net_stats_get()
321 src = GET_STAT_ADDR(iface, udp); in net_stats_get()
327 src = GET_STAT_ADDR(iface, tcp); in net_stats_get()
333 src = GET_STAT_ADDR(iface, pm); in net_stats_get()
406 void net_stats_reset(struct net_if *iface) in net_stats_reset() argument
408 if (iface) { in net_stats_reset()
409 net_if_stats_reset(iface); in net_stats_reset()
418 static void register_prometheus_metrics(struct net_if *iface) in register_prometheus_metrics() argument
424 if (entry->user_data == (void *)iface) { in register_prometheus_metrics()
425 iface->collector = entry; in register_prometheus_metrics()
430 if (iface->collector == NULL) { in register_prometheus_metrics()
432 net_if_get_by_iface(iface)); in register_prometheus_metrics()
437 if (entry->base.collector != iface->collector) { in register_prometheus_metrics()
441 prometheus_collector_register_metric(iface->collector, in register_prometheus_metrics()
447 if (entry->base.collector != iface->collector) { in register_prometheus_metrics()
451 prometheus_collector_register_metric(iface->collector, in register_prometheus_metrics()
457 if (entry->base.collector != iface->collector) { in register_prometheus_metrics()
461 prometheus_collector_register_metric(iface->collector, in register_prometheus_metrics()
467 if (entry->base.collector != iface->collector) { in register_prometheus_metrics()
471 prometheus_collector_register_metric(iface->collector, in register_prometheus_metrics()
477 net_if_get_by_iface(iface)); in register_prometheus_metrics()
489 struct net_if *iface = user_data; in net_stats_prometheus_scrape() local
492 if (!iface) { in net_stats_prometheus_scrape()
496 if (iface->collector != collector) { in net_stats_prometheus_scrape()
569 void net_stats_prometheus_init(struct net_if *iface) in net_stats_prometheus_init() argument
571 register_prometheus_metrics(iface); in net_stats_prometheus_init()