ref: 802e925fbafe61186ba4e690ec40b7ce9ca3919a
parent: fc6c8d5986c7804a5ce6b029f47c32bf0db788f8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 11 14:51:23 EST 2018
ethersink: provide promisc and multicast functions for v6, set out queue limit to 0 on attach, add to pc64 config
--- a/sys/src/9/pc64/pc64
+++ b/sys/src/9/pc64/pc64
@@ -68,7 +68,7 @@
# ethervgbe pci ethermii
# ethervt6102 pci ethermii
# ethervt6105m pci ethermii
-# ethersink
+ ethersink
# ethersmc devi82365 cis
etheryuk pci
# etherwavelan wavelan devi82365 cis pci
--- a/sys/src/9/port/ethersink.c
+++ b/sys/src/9/port/ethersink.c
@@ -33,22 +33,35 @@
}
static void
-nop(Ether*)
+attach(Ether *ether)
{+ /* silently discard output */
+ qnoblock(ether->oq, 1);
+ qsetlimit(ether->oq, 0);
}
+static void
+multicast(void *, uchar*, int)
+{+}
+
+static void
+promiscuous(void *, int)
+{+}
+
static int
reset(Ether* ether)
{+ static uchar zeros[Eaddrlen];
+
if(ether->type==nil)
return -1;
ether->mbps = 1000;
- ether->attach = nop;
- ether->transmit = nop;
- ether->ifstat = nil;
+ ether->attach = attach;
+ ether->multicast = multicast;
+ ether->promiscuous = promiscuous;
ether->ctl = ctl;
- ether->promiscuous = nil;
- ether->multicast = nil;
ether->arg = ether;
return 0;
}
--
⑨