diff options
Diffstat (limited to 'comms/xisp/patches/patch-ac')
-rw-r--r-- | comms/xisp/patches/patch-ac | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/comms/xisp/patches/patch-ac b/comms/xisp/patches/patch-ac deleted file mode 100644 index f1e579eaabe..00000000000 --- a/comms/xisp/patches/patch-ac +++ /dev/null @@ -1,71 +0,0 @@ -$NetBSD: patch-ac,v 1.1.1.1 1998/12/03 15:08:53 frueauf Exp $ - ---- network.c.orig Mon Oct 26 05:35:01 1998 -+++ network.c Mon Nov 30 18:25:26 1998 -@@ -26,13 +26,14 @@ - #include <net/if.h> - #include <arpa/inet.h> - #include <string.h> -+#include <sys/param.h> - #include <unistd.h> - - #ifdef SUNOS41x - extern int socket(), ioctl(), sscanf(), printf(), pclose(); - #elif defined(SUNOS5x) - #include <sys/sockio.h> --#else -+#elif !(defined(BSD) && BSD >= 199306) - - /* Returns kernel revision number (10*major+minor). Only used on Linux to - figure out what kind of parsing format to use for /proc/net/dev output */ -@@ -92,6 +93,10 @@ - #define AddrOpen popen("/usr/bin/netstat -nr", "r") - #define AddrScanf sscanf(routeLine, "%*s %*s %*s %*s %*s %s", IF) - #define AddrClose while (fgets(routeLine,128,infofp) != NULL); pclose(infofp) -+#elif (defined(BSD) && BSD >= 199306) -+ #define AddrOpen popen("/usr/bin/netstat -nr", "r") -+ #define AddrScanf sscanf(routeLine, "%*s %*s %*s %*s %*s %*s %s", IF) -+ #define AddrClose while (fgets(routeLine,128,infofp) != NULL); pclose(infofp) - #else - #define AddrOpen fopen("/proc/net/route", "r") - #define AddrScanf sscanf(routeLine,"%s", IF) -@@ -137,6 +142,12 @@ - #define PktsScanf sscanf(line, "%s %*s %*s %*s %u %*s %u", \ - interface, &recv, &trans) - #define PktsClose while (fgets(line,128,infofp) != NULL); pclose(infofp) -+#elif (defined(BSD) && BSD >= 199306) -+ #define PktsOpen popen((sprintf(line,"/usr/bin/netstat -n -I %s",IFName)) ? \ -+ line:line, "r") -+ #define PktsScanf sscanf(line, "%s %*s %s %*s %u %*s %u", \ -+ interface, network, &recv, &trans) -+ #define PktsClose while (fgets(line,128,infofp) != NULL); pclose(infofp) - #else - #define PktsOpen fopen("/proc/net/dev", "r") - #define PktsScanf sscanf(line, ((kernelRevNo()>20) ? \ -@@ -151,16 +162,26 @@ - int IFLen = strlen(IFName); - FILE *infofp; - char line[129], interface[16]; -+#if (defined(BSD) && BSD >= 199306) -+ char network[16]; -+#endif - unsigned recv = 0, trans = 0; - - infofp = PktsOpen; /* open IF stats info stream */ - while (fgets(line, 128, infofp) != NULL) { - PktsScanf; /* read line by line */ - if (!strncmp(interface,IFName,IFLen)) { /* scanning for interface */ -+#if (defined(BSD) && BSD >= 199306) -+ /* Discard non-conforming multicast line. */ -+ if (strncmp(network,"<Link>",strlen(network))) { -+#endif - PktsClose; /* found, close info stream */ - if (pTX) *pTX = trans; /* if return storage avail */ - if (pRX) *pRX = recv; /* save TXed/RXed separately */ - return (recv + trans); /* return total I/O packets */ -+#if (defined(BSD) && BSD >= 199306) -+ } -+#endif - } - } - PktsClose; /* close info stream */ |