Small tweak: clarify use of link speed in comments for NETIF_INIT_SNMP.

This commit is contained in:
jifl 2007-10-03 09:10:28 +00:00
parent c52ef1d2b3
commit 5dd1256769
2 changed files with 6 additions and 2 deletions

View File

@ -171,7 +171,7 @@ struct netif {
#define NETIF_INIT_SNMP(netif, type, speed) \ #define NETIF_INIT_SNMP(netif, type, speed) \
/* use "snmp_ifType" enum from snmp.h for "type", snmp_ifType_ethernet_csmacd by example */ \ /* use "snmp_ifType" enum from snmp.h for "type", snmp_ifType_ethernet_csmacd by example */ \
netif->link_type = type; \ netif->link_type = type; \
/* your link speed here */ \ /* your link speed here (units: bits per second) */ \
netif->link_speed = speed; \ netif->link_speed = speed; \
netif->ts = 0; \ netif->ts = 0; \
netif->ifinoctets = 0; \ netif->ifinoctets = 0; \

View File

@ -288,7 +288,11 @@ ethernetif_init(struct netif *netif)
netif->hostname = "lwip"; netif->hostname = "lwip";
#endif /* LWIP_NETIF_HOSTNAME */ #endif /* LWIP_NETIF_HOSTNAME */
/* initialize the snmp variables and counters inside the struct netif */ /*
* Initialize the snmp variables and counters inside the struct netif.
* The last argument should be replaced with your link speed, in units
* of bits per second.
*/
NETIF_INIT_SNMP(netif, snmp_ifType_ethernet_csmacd, ???); NETIF_INIT_SNMP(netif, snmp_ifType_ethernet_csmacd, ???);
netif->state = ethernetif; netif->state = ethernetif;