From b4c5262ac86a1b67221de78dc3356f28695e7df6 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 19 Sep 2017 23:48:37 +0200 Subject: [PATCH] initialize snmp variables and counters for the uhyve nic --- drivers/net/uhyve-net.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/uhyve-net.c b/drivers/net/uhyve-net.c index 46f8b3db6..265573fae 100755 --- a/drivers/net/uhyve-net.c +++ b/drivers/net/uhyve-net.c @@ -279,6 +279,13 @@ err_t uhyve_netif_init (struct netif* netif) LOG_INFO("uhye_netif uses irq %d\n", UHYVE_IRQ); irq_install_handler(32+UHYVE_IRQ, uhyve_irqhandler); + /* + * 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, 1000); + netif->name[0] = 'e'; netif->name[1] = 'n'; netif->num = num++;