diff options
author | hubertf <hubertf> | 2001-02-28 15:37:25 +0000 |
---|---|---|
committer | hubertf <hubertf> | 2001-02-28 15:37:25 +0000 |
commit | a79597a2446a9b02f431ea5c985726db6c3055f8 (patch) | |
tree | dc5196f00a25a0e46540f465f98f48290719f4c7 /net/wminet | |
parent | a3ae55dd48ee3f4a187d10a4b145894b8416c6da (diff) | |
download | pkgsrc-a79597a2446a9b02f431ea5c985726db6c3055f8.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')
-rw-r--r-- | net/wminet/Makefile | 15 | ||||
-rw-r--r-- | net/wminet/files/md5 | 3 | ||||
-rw-r--r-- | net/wminet/files/patch-sum | 4 | ||||
-rw-r--r-- | net/wminet/patches/patch-aa | 53 | ||||
-rw-r--r-- | net/wminet/patches/patch-ab | 113 | ||||
-rw-r--r-- | net/wminet/pkg/DESCR | 11 | ||||
-rw-r--r-- | net/wminet/pkg/PLIST | 3 |
7 files changed, 202 insertions, 0 deletions
diff --git a/net/wminet/Makefile b/net/wminet/Makefile new file mode 100644 index 00000000000..12102848eb7 --- /dev/null +++ b/net/wminet/Makefile @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $ + +DISTNAME= wmnet-1.2 +PKGNAME= wminet-1.2 +CATEGORIES= net x11 +MASTER_SITES= ftp://ftp.enteract.com/users/rneswold/ + +MAINTAINER= coto@core.de +HOMEPAGE= http://www.enteract.com/~rneswold/ +COMMENT= dockable network monitor + +USE_XPM= YES +USE_X11BASE= YES + +.include "../../mk/bsd.pkg.mk" diff --git a/net/wminet/files/md5 b/net/wminet/files/md5 new file mode 100644 index 00000000000..fbf4ce00ca1 --- /dev/null +++ b/net/wminet/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $ + +MD5 (wmnet-1.2.tar.gz) = a3cd5b50dc773d72d9d987b07b5e23e0 diff --git a/net/wminet/files/patch-sum b/net/wminet/files/patch-sum new file mode 100644 index 00000000000..474f1547abd --- /dev/null +++ b/net/wminet/files/patch-sum @@ -0,0 +1,4 @@ +$NetBSD: patch-sum,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $ + +MD5 (patch-aa) = 1b8e5a4481c770e06665795628b2a14f +MD5 (patch-ab) = 5511dedf9ebd62af9df99a0036ba1153 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; + } + } diff --git a/net/wminet/pkg/DESCR b/net/wminet/pkg/DESCR new file mode 100644 index 00000000000..6632518f79e --- /dev/null +++ b/net/wminet/pkg/DESCR @@ -0,0 +1,11 @@ +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. diff --git a/net/wminet/pkg/PLIST b/net/wminet/pkg/PLIST new file mode 100644 index 00000000000..93ecb8e050d --- /dev/null +++ b/net/wminet/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2001/02/28 15:37:25 hubertf Exp $ +bin/wminet +man/man1/wminet.1 |