860e81b475
instead of "ec0" - does anybody really use 3c503 these days? - as the default interface.
31 lines
1.2 KiB
Text
31 lines
1.2 KiB
Text
$NetBSD: patch-ac,v 1.2 2000/07/31 17:24:22 tron Exp $
|
|
|
|
--- drivers.c.orig Fri May 5 02:34:29 2000
|
|
+++ drivers.c Mon Jul 31 19:22:21 2000
|
|
@@ -445,7 +445,7 @@
|
|
if (((kvmfd = kvm_open(NULL, NULL, NULL, O_RDONLY, buffer)) == NULL) ||
|
|
(kvm_nlist(kvmfd, symbols) < 0) ||
|
|
kvm_read(kvmfd, (unsigned long)symbols[0].n_value, &ifnet_savedaddr, sizeof(unsigned long)) == -1 ) return False;
|
|
- if(device == NULL) device = "ec0";
|
|
+ if(device == NULL) device = "ppp0";
|
|
fprintf(stderr, "wmnet: using kmem driver to monitor %s\n", device);
|
|
return True;
|
|
}
|
|
@@ -457,7 +457,7 @@
|
|
int flag = 0;
|
|
while (ifnet_addr && flag != (ACCOUNT_IN_FOUND|ACCOUNT_OUT_FOUND)) {
|
|
kvm_read(kvmfd, ifnet_addr, buffer, sizeof(struct ifnet));
|
|
-#ifdef __OpenBSD__
|
|
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
|
snprintf(devname, 15, "%s", ifnet->if_xname);
|
|
#else
|
|
kvm_read(kvmfd, (unsigned long)ifnet->if_name, devname, 15);
|
|
@@ -487,7 +487,7 @@
|
|
flag = (ACCOUNT_IN_FOUND|ACCOUNT_OUT_FOUND);
|
|
|
|
} else {
|
|
-#ifdef __OpenBSD__
|
|
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
|
ifnet_addr = (unsigned long)ifnet->if_list.tqe_next;
|
|
#else
|
|
ifnet_addr = (unsigned long)ifnet->if_next;
|