diff --git a/CHANGELOG b/CHANGELOG index ce690d23..f7cd7fa9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 9cacb13a..184515fa 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -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 */ diff --git a/src/netif/ethernetif.c b/src/netif/ethernetif.c index ad1900c3..4ba84e1e 100644 --- a/src/netif/ethernetif.c +++ b/src/netif/ethernetif.c @@ -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; diff --git a/src/netif/loopif.c b/src/netif/loopif.c index 4d5ae72c..24a52197 100644 --- a/src/netif/loopif.c +++ b/src/netif/loopif.c @@ -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'; diff --git a/src/netif/slipif.c b/src/netif/slipif.c index 9b3c43c3..28c3e4f3 100644 --- a/src/netif/slipif.c +++ b/src/netif/slipif.c @@ -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);