Changed define NETIF_INIT_SNMP(type, speed) to include the name of the struct netif to change...

This commit is contained in:
goldsimon 2007-06-08 19:59:20 +00:00
parent 090aaefb39
commit 0e9cb48ea1
5 changed files with 7 additions and 7 deletions

View File

@ -21,8 +21,8 @@ HISTORY
2007-05-18 Simon Goldschmidt
* netif.h, ethernetif.c, slipif.c, loopif.c: Added define
NETIF_INIT_SNMP(type, speed) to initialize per-netif snmp variables, added
initialization of those to slipif and loopif.
NETIF_INIT_SNMP(netif, type, speed) to initialize per-netif snmp variables,
added initialization of those to ethernetif, slipif and loopif.
2007-05-18 Simon Goldschmidt
* opt.h, ip_frag.c, ip_frag.h, ip.c: Added option IP_FRAG_USES_STATIC_BUF

View File

@ -151,7 +151,7 @@ struct netif {
};
#if LWIP_SNMP
#define NETIF_INIT_SNMP(type, speed) \
#define NETIF_INIT_SNMP(netif, type, speed) \
/* ifType ethernetCsmacd(6) @see RFC1213 */ \
netif->link_type = type; \
/* your link speed here */ \
@ -166,7 +166,7 @@ struct netif {
netif->ifoutnucastpkts = 0; \
netif->ifoutdiscards = 0
#else /* LWIP_SNMP */
#define NETIF_INIT_SNMP(type, speed)
#define NETIF_INIT_SNMP(netif, type, speed)
#endif /* LWIP_SNMP */

View File

@ -343,7 +343,7 @@ ethernetif_init(struct netif *netif)
/* initialize the snmp variables and counters inside the struct netif */
/* ifType ethernetCsmacd(6) @see RFC1213 */
NETIF_INIT_SNMP(6, ???);
NETIF_INIT_SNMP(netif, 6, ???);
netif->state = ethernetif;
netif->name[0] = IFNAME0;

View File

@ -197,7 +197,7 @@ loopif_init(struct netif *netif)
* ifType: softwareLoopback(24) @see RFC1213
* ifSpeed: no assumption can be made!
*/
NETIF_INIT_SNMP(24, 0);
NETIF_INIT_SNMP(netif, 24, 0);
netif->name[0] = 'l';
netif->name[1] = 'o';

View File

@ -258,7 +258,7 @@ slipif_init(struct netif *netif)
* ifSpeed: no assumption can be made without knowing more about the
* serial line!
*/
NETIF_INIT_SNMP(22, 0);
NETIF_INIT_SNMP(netif, 22, 0);
/* Create a thread to poll the serial line. */
sys_thread_new(slipif_loop, netif, SLIPIF_THREAD_PRIO);