Added define NETIF_INIT_SNMP(type, speed) to initialize per-netif snmp variables, added initialization of those to slipif and loopif.

This commit is contained in:
goldsimon
2007-06-08 17:17:41 +00:00
parent b7e4d2a8ff
commit 945460c67e
5 changed files with 39 additions and 14 deletions

View File

@@ -150,6 +150,26 @@ struct netif {
#endif /* LWIP_IGMP */
};
#if LWIP_SNMP
#define NETIF_INIT_SNMP(type, speed) \
/* ifType ethernetCsmacd(6) @see RFC1213 */ \
netif->link_type = type; \
/* your link speed here */ \
netif->link_speed = speed; \
netif->ts = 0; \
netif->ifinoctets = 0; \
netif->ifinucastpkts = 0; \
netif->ifinnucastpkts = 0; \
netif->ifindiscards = 0; \
netif->ifoutoctets = 0; \
netif->ifoutucastpkts = 0; \
netif->ifoutnucastpkts = 0; \
netif->ifoutdiscards = 0
#else /* LWIP_SNMP */
#define NETIF_INIT_SNMP(type, speed)
#endif /* LWIP_SNMP */
/** The list of network interfaces. */
extern struct netif *netif_list;
/** The default network interface. */