MIB2_STATS: moved netif related mib2 counters into a struct (defined in stats.h), added ifInErrors/ifInUnkownProtos (now handled in etharp.c) and ifOutErrors

This commit is contained in:
goldsimon
2015-09-28 08:50:21 +02:00
parent dbe703cfb0
commit 94625a8fa8
5 changed files with 53 additions and 33 deletions

View File

@@ -1395,6 +1395,7 @@ ethernet_input(struct pbuf *p, struct netif *netif)
/* a packet with only an ethernet header (or less) is not valid for us */
ETHARP_STATS_INC(etharp.proterr);
ETHARP_STATS_INC(etharp.drop);
MIB2_STATS_NETIF_INC(netif, ifinerrors);
goto free_and_return;
}
@@ -1416,6 +1417,7 @@ ethernet_input(struct pbuf *p, struct netif *netif)
/* a packet with only an ethernet/vlan header (or less) is not valid for us */
ETHARP_STATS_INC(etharp.proterr);
ETHARP_STATS_INC(etharp.drop);
MIB2_STATS_NETIF_INC(netif, ifinerrors);
goto free_and_return;
}
#if defined(LWIP_HOOK_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK) || defined(ETHARP_VLAN_CHECK_FN) /* if not, allow all VLANs */
@@ -1514,6 +1516,7 @@ ethernet_input(struct pbuf *p, struct netif *netif)
default:
ETHARP_STATS_INC(etharp.proterr);
ETHARP_STATS_INC(etharp.drop);
MIB2_STATS_NETIF_INC(netif, ifinunknownprotos);
goto free_and_return;
}