diff options
author | hubertf <hubertf@pkgsrc.org> | 2001-02-28 15:37:25 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 2001-02-28 15:37:25 +0000 |
commit | efa82f9463d8d9f42bcb492eaf2afac867bac622 (patch) | |
tree | dc5196f00a25a0e46540f465f98f48290719f4c7 /net/wminet/patches | |
parent | 6731d24077d54ae90def596a70e3bae40381e9e6 (diff) | |
download | pkgsrc-efa82f9463d8d9f42bcb492eaf2afac867bac622.tar.gz |
[Re-import after typo in previous]
Add wminet-1.2:
Once a second, the network interfaces are queried for the amount of
data that was exchanged. The data from the selected interface is drawn
in the graph. As data is sampled, the scale of the graph will change
and is set to the maximum value seen in the data "window". The value
of the maximum data rate (in bytes per second) is displayed in the
lower left corner. A K or M is appended to the data rate for kilobytes
or megabytes, respectively.
You can cycle through the configured network interfaces by clicking
the mouse on the interface name. There is also a command line option
to specify which interface should be displayed first.
Contributed by Thomas Runge <coto@core.de> on IRC.
Diffstat (limited to 'net/wminet/patches')
-rw-r--r-- | net/wminet/patches/patch-aa | 53 | ||||
-rw-r--r-- | net/wminet/patches/patch-ab | 113 |
2 files changed, 166 insertions, 0 deletions
diff --git a/net/wminet/patches/patch-aa b/net/wminet/patches/patch-aa new file mode 100644 index 00000000000..0a6029bc64e --- /dev/null +++ b/net/wminet/patches/patch-aa @@ -0,0 +1,53 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $ + +--- Makefile.orig Thu Dec 3 16:33:58 1998 ++++ Makefile Sat Feb 24 19:45:15 2001 +@@ -2,22 +2,21 @@ + # Makefile,v 1.8 1998/12/03 15:33:58 rneswold Exp + # + +-PREFIX=/usr/local +-MANDIR=${PREFIX}/man +-BINDIR=${PREFIX}/bin +- +-LIBDIR = -L/usr/X11R6/lib -L/usr/local/lib ++LIBDIR = -L${X11BASE}/lib + LIBS = -lXpm -lXext -lX11 -lkvm + OBJS = main.o if.o wmgeneral.o + INCDIR = -I${X11BASE}/include + + .c.o : +- cc -c -g -O1 -Wall ${INCDIR} $< -o $*.o ++ ${CC} -c ${CFLAGS} ${INCDIR} $< -o $*.o ++ ++all :: wminet + +-all :: wmnet ++wminet : $(OBJS) ++ ${CC} ${LDFLAGS} -o wminet $(OBJS) $(LIBDIR) $(LIBS) ${INCDIR} + +-wmnet : $(OBJS) +- cc -o wmnet $(OBJS) $(LIBDIR) $(LIBS) ${INCDIR} ++wminet.1 : wmnet.1 ++ sed -e 's/wmnet/wminet/g' wmnet.1 > wminet.1 + + main.o : wmnet-mask.xbm wmnet-master.xpm wmnet.h wmgeneral.h + +@@ -26,12 +25,12 @@ + wmgeneral.o : wmgeneral.c wmgeneral.h + + clean : +- rm -f $(OBJS) wmnet ++ rm -f $(OBJS) wminet + +-install.man : wmnet.1 +- install -c -m 644 -o man -g man wmnet.1 ${MANDIR}/man1 ++install.man : wminet.1 ++ install -c -m 644 -o root -g wheel wminet.1 ${PREFIX}/man/man1 + +-install.bin : wmnet +- install -s -c -m 2555 -o bin -g kmem wmnet ${BINDIR} ++install.bin : wminet ++ install -s -c -m 2555 -o bin -g kmem wminet ${PREFIX}/bin + + install : install.bin install.man diff --git a/net/wminet/patches/patch-ab b/net/wminet/patches/patch-ab new file mode 100644 index 00000000000..ff344d0032d --- /dev/null +++ b/net/wminet/patches/patch-ab @@ -0,0 +1,113 @@ +$NetBSD: patch-ab,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $ + +--- if.c.orig Mon Oct 12 04:13:16 1998 ++++ if.c Sat Feb 24 19:48:53 2001 +@@ -12,6 +12,7 @@ + #include <unistd.h> + #include <limits.h> + #include <err.h> ++#include <errno.h> + #include <sys/param.h> + #include <sys/types.h> + #include <sys/ioctl.h> +@@ -89,7 +90,11 @@ + if (!newData) { + size -= IF_STEP; + fprintf(stderr, "wmnet: Warning -- low memory; " ++#ifdef __NetBSD__ ++ "ignoring %s interface\n", theData->if_xname); ++#else + "ignoring %s interface\n", theData->if_name); ++#endif /* NetBSD */ + return 0; + } + +@@ -118,8 +123,12 @@ + ptr->flags = 0; + + #ifndef NDEBUG ++#ifdef __NetBSD__ ++ printf("Added '%.*s' to list.\n", IFNAMSIZ, theData->if_xname); ++#else + printf("Added '%.*s%d' to list.\n", IFNAMSIZ, theData->if_name, + theData->if_unit); ++#endif /* NetBSD */ + #endif + + // Bump the total. +@@ -161,6 +170,7 @@ + return &d; + else if (sizeof(d) == kvm_read(kd, a, &d, sizeof(d))) { + ++#ifndef __NetBSD__ + /* We've read the structure's data, but the 'name' field still + points to kernel memory. We transfer the name to a local + buffer, and then modify the pointer to point to our +@@ -178,6 +188,7 @@ + to look at. While debugging, set these to NULL to trap + any attempts. */ + ++#endif /* !NetBSD */ + d.if_softc = 0; + #if (__FreeBSD_version >= 300003) + d.if_addrhead.tqh_first = 0; +@@ -185,15 +196,24 @@ + d.if_addrlist = 0; + #endif + d.if_bpf = 0; ++#ifdef __NetBSD__ ++ d.if_addrlist.tqh_first = 0; ++#else + d.if_linkmib = 0; + d.if_poll_slowq = 0; ++#endif /* NetBSD */ + #endif + c = a; + return &d; ++#ifndef __NetBSD__ + } else + return 0; ++#endif /* !NetBSD */ + } else ++ { ++ perror("kvm_read"); + return 0; ++ } + } + + /*------------------------------------------------------------------------------ +@@ -233,6 +253,9 @@ + { "" } + }; + ++ if (setgid(getgid()) != 0) { perror("setgid"); return(0); } ++ if (setuid(getuid()) != 0) { perror("seguid"); return(0); } ++ + /* Try to pull the address for the global kernel variable, + ifnet. This variable is the root of the singly-linked list + of network interfaces. */ +@@ -251,8 +274,12 @@ + #if (__FreeBSD_version >= 300003) + current = (unsigned long) dereference(current)->if_link.tqe_next; + #else ++#ifdef __NetBSD__ ++ current = (unsigned long) dereference(current)->if_list.tqe_next; ++#else + current = (unsigned long) dereference(current)->if_next; + #endif ++#endif + } + + /* Try to register our termination function. If it +@@ -309,7 +336,11 @@ + if (ptr) { + static char buffer[IFNAMSIZ + 1]; + ++#ifdef __NetBSD__ ++ sprintf(buffer, "%.*s", IFNAMSIZ - 1, ptr->if_xname); ++#else + sprintf(buffer, "%.*s%d", IFNAMSIZ - 1, ptr->if_name, ptr->if_unit); ++#endif /* NetBSD */ + return buffer; + } + } |