--- drivers.c.orig Thu May 4 20:34:29 2000 +++ drivers.c Mon Feb 18 12:54:45 2002 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -24,6 +25,8 @@ /* For FreeBSD */ #ifdef USE_KVM #include +#include +#include #include #include @@ -455,6 +458,8 @@ unsigned long ifnet_addr = ifnet_savedaddr; char devname[16]; int flag = 0; + rx = False; + tx = False; while (ifnet_addr && flag != (ACCOUNT_IN_FOUND|ACCOUNT_OUT_FOUND)) { kvm_read(kvmfd, ifnet_addr, buffer, sizeof(struct ifnet)); #ifdef __OpenBSD__ @@ -490,7 +495,7 @@ #ifdef __OpenBSD__ ifnet_addr = (unsigned long)ifnet->if_list.tqe_next; #else - ifnet_addr = (unsigned long)ifnet->if_next; + ifnet_addr = (unsigned long) TAILQ_NEXT(ifnet,if_link); #endif } }