summaryrefslogtreecommitdiff
path: root/sys/src/9
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-02-11 19:51:23 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-02-11 19:51:23 +0100
commit3d0f4da104a2d9a73e017e121f1f25f5964e494e (patch)
treea556e6957f44610d46878a9a7cf0fb5c79f93918 /sys/src/9
parentd6e0e9c402e215dc5659ad525e3e652501f76810 (diff)
ethersink: provide promisc and multicast functions for v6, set out queue limit to 0 on attach, add to pc64 config
Diffstat (limited to 'sys/src/9')
-rw-r--r--sys/src/9/pc64/pc642
-rw-r--r--sys/src/9/port/ethersink.c25
2 files changed, 20 insertions, 7 deletions
diff --git a/sys/src/9/pc64/pc64 b/sys/src/9/pc64/pc64
index 73dfc4c33..07cd66172 100644
--- a/sys/src/9/pc64/pc64
+++ b/sys/src/9/pc64/pc64
@@ -68,7 +68,7 @@ link
# ethervgbe pci ethermii
# ethervt6102 pci ethermii
# ethervt6105m pci ethermii
-# ethersink
+ ethersink
# ethersmc devi82365 cis
etheryuk pci
# etherwavelan wavelan devi82365 cis pci
diff --git a/sys/src/9/port/ethersink.c b/sys/src/9/port/ethersink.c
index a005af3a8..aa62d3719 100644
--- a/sys/src/9/port/ethersink.c
+++ b/sys/src/9/port/ethersink.c
@@ -33,22 +33,35 @@ ctl(Ether *ether, void *buf, long n)
}
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;
}