Browse Source

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

STABLE-2_1_x
goldsimon 19 years ago
parent
commit
0e9cb48ea1
  1. 4
      CHANGELOG
  2. 4
      src/include/lwip/netif.h
  3. 2
      src/netif/ethernetif.c
  4. 2
      src/netif/loopif.c
  5. 2
      src/netif/slipif.c

4
CHANGELOG

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

4
src/include/lwip/netif.h

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

2
src/netif/ethernetif.c

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

2
src/netif/loopif.c

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

2
src/netif/slipif.c

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

Loading…
Cancel
Save