mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-08 00:23:39 +08:00
Add enum snmp_ifType in snmp.h, and use it in network interfaces for NETIF_INIT_SNMP
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/sys.h"
|
||||
#include <lwip/stats.h>
|
||||
|
||||
#include <lwip/snmp.h>
|
||||
#include "netif/etharp.h"
|
||||
#include "netif/ppp_oe.h"
|
||||
|
||||
@@ -289,8 +289,7 @@ ethernetif_init(struct netif *netif)
|
||||
#endif /* LWIP_NETIF_HOSTNAME */
|
||||
|
||||
/* initialize the snmp variables and counters inside the struct netif */
|
||||
/* ifType ethernetCsmacd(6) @see RFC1213 */
|
||||
NETIF_INIT_SNMP(netif, 6, ???);
|
||||
NETIF_INIT_SNMP(netif, snmp_ifType_ethernet_csmacd, ???);
|
||||
|
||||
netif->state = ethernetif;
|
||||
netif->name[0] = IFNAME0;
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
|
||||
#include "netif/loopif.h"
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/snmp.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -203,10 +204,9 @@ loopif_init(struct netif *netif)
|
||||
#endif /* LWIP_LOOPIF_MULTITHREADING */
|
||||
|
||||
/* initialize the snmp variables and counters inside the struct netif
|
||||
* ifType: softwareLoopback(24) @see RFC1213
|
||||
* ifSpeed: no assumption can be made!
|
||||
*/
|
||||
NETIF_INIT_SNMP(netif, 24, 0);
|
||||
NETIF_INIT_SNMP(netif, snmp_ifType_softwareLoopback, 0);
|
||||
|
||||
netif->name[0] = 'l';
|
||||
netif->name[1] = 'o';
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "lwip/pbuf.h"
|
||||
#include "lwip/sys.h"
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/snmp.h"
|
||||
#include "lwip/sio.h"
|
||||
|
||||
#define SLIP_END 0300
|
||||
@@ -260,11 +261,10 @@ slipif_init(struct netif *netif)
|
||||
}
|
||||
|
||||
/* initialize the snmp variables and counters inside the struct netif
|
||||
* ifType: we're using propPointToPointSerial(22) @see RFC1213
|
||||
* ifSpeed: no assumption can be made without knowing more about the
|
||||
* serial line!
|
||||
*/
|
||||
NETIF_INIT_SNMP(netif, 22, 0);
|
||||
NETIF_INIT_SNMP(netif, snmp_ifType_slip, 0);
|
||||
|
||||
/* Create a thread to poll the serial line. */
|
||||
sys_thread_new(slipif_loop, netif, SLIPIF_THREAD_PRIO);
|
||||
|
||||
Reference in New Issue
Block a user