diff options
author | wiz <wiz> | 2007-12-09 23:41:11 +0000 |
---|---|---|
committer | wiz <wiz> | 2007-12-09 23:41:11 +0000 |
commit | e30f60c18e89a26c7def64180295a02b1ee0a220 (patch) | |
tree | 972125bd2d4be02346dd8c56e0f9037abd8f482a /net | |
parent | f6d67886cf0152d84de57d7179d7f52704b8d636 (diff) | |
download | pkgsrc-e30f60c18e89a26c7def64180295a02b1ee0a220.tar.gz |
Update to 0.9.5, provided by Sergey Svishchev in private mail:
- Fixed stats not being cleared when disconnected
- Added user specified format for labels.
- Added user customizable label for the not connected condition.
- Removed global variables in stats gathering functions.
pkgsrc fix: don't cast 64-bit counters to unsigned long.
Diffstat (limited to 'net')
-rw-r--r-- | net/pload/Makefile | 5 | ||||
-rw-r--r-- | net/pload/distinfo | 12 | ||||
-rw-r--r-- | net/pload/patches/patch-aa | 44 | ||||
-rw-r--r-- | net/pload/patches/patch-ab | 12 |
4 files changed, 33 insertions, 40 deletions
diff --git a/net/pload/Makefile b/net/pload/Makefile index 8d50ec1c551..e6efb4dfa3c 100644 --- a/net/pload/Makefile +++ b/net/pload/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.19 2007/08/16 22:39:14 joerg Exp $ +# $NetBSD: Makefile,v 1.20 2007/12/09 23:41:11 wiz Exp $ # -DISTNAME= pload-0.9.4 -PKGREVISION= 3 +DISTNAME= pload-0.9.5 CATEGORIES= net x11 MASTER_SITES= ${MASTER_SITE_SUNSITE:=system/network/serial/ppp/} diff --git a/net/pload/distinfo b/net/pload/distinfo index 5e60220d615..5f348366632 100644 --- a/net/pload/distinfo +++ b/net/pload/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.6 2005/02/24 12:14:01 agc Exp $ +$NetBSD: distinfo,v 1.7 2007/12/09 23:41:11 wiz Exp $ -SHA1 (pload-0.9.4.tar.gz) = 2e93a7796049d0132629cdd8c85e8ce54a270c60 -RMD160 (pload-0.9.4.tar.gz) = dfc7c84c2a05b82077c1ae6f3125a9c6c0e9fd67 -Size (pload-0.9.4.tar.gz) = 21244 bytes -SHA1 (patch-aa) = c5765141126846da5a71a3a35307ebca2dc3f7cc -SHA1 (patch-ab) = 53a211ff7d0990d649472e69451a144d31603a61 +SHA1 (pload-0.9.5.tar.gz) = 52e8ca31ad534cbc131d0bd19ef5ae45b5b37777 +RMD160 (pload-0.9.5.tar.gz) = 48ff961d760430a3a45533f7023b1fefa252ede8 +Size (pload-0.9.5.tar.gz) = 22423 bytes +SHA1 (patch-aa) = 6a30a15c60e74eeb5312e275b1dac882c86b2420 +SHA1 (patch-ab) = 4bf2639b64d20717716c66be85c4fb5cd3b114d5 SHA1 (patch-ac) = 345ac88bb5d279039ae0169c2b468b22964a0c09 diff --git a/net/pload/patches/patch-aa b/net/pload/patches/patch-aa index dccb394dde9..f83c18dae3b 100644 --- a/net/pload/patches/patch-aa +++ b/net/pload/patches/patch-aa @@ -1,30 +1,25 @@ -$NetBSD: patch-aa,v 1.3 2002/05/24 18:12:36 martin Exp $ +$NetBSD: patch-aa,v 1.4 2007/12/09 23:41:11 wiz Exp $ ---- ioctl_stat.c.orig Thu Mar 4 08:33:03 1999 -+++ ioctl_stat.c Fri May 24 20:03:05 2002 -@@ -68,6 +68,13 @@ - +--- ioctl_stat.c.orig 2000-02-01 07:11:24.000000000 +0000 ++++ ioctl_stat.c +@@ -61,6 +61,10 @@ void getsocket(if_data *ifd) void ioctl_stat(if_data *ifd) { -+#ifdef __NetBSD__ -+ struct ifreq ifr; + struct ifreq ifr; +#ifdef SIOCGIFDATA + struct ifdatareq ifdr; + struct if_data * const ifi = &ifdr.ifdr_data; +#endif -+#endif struct ifpppstatsreq req; - if (s < 0) getsocket(); -@@ -78,8 +85,33 @@ + if (!ifd->s) getsocket(ifd); +@@ -84,6 +88,31 @@ void ioctl_stat(if_data *ifd) #define ifr_name ifr__name - req.stats_ptr = (caddr_t) &req.stats; - #endif -- sprintf(req.ifr_name, ifd->device); - + #endif + +#ifdef __NetBSD__ -+ sprintf(ifr.ifr_name, ifd->device); -+ if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr) < 0 || ++ strncpy(ifr.ifr_name, ifd->device, sizeof(ifr.ifr_name)); ++ if (ioctl(ifd->s, SIOCGIFFLAGS, (caddr_t)&ifr) < 0 || + !(ifr.ifr_flags&IFF_UP)) + { + /* invalid interface, or interface down */ @@ -35,23 +30,22 @@ $NetBSD: patch-aa,v 1.3 2002/05/24 18:12:36 martin Exp $ +#endif + +#if defined(__NetBSD__) && defined(SIOCGIFDATA) -+ /* prefere the generic interface statistics over the PPP specific ones */ ++ /* prefer the generic interface statistics over the PPP specific ones */ + strncpy(ifdr.ifdr_name, ifd->device, sizeof(ifdr.ifdr_name)); -+ if (ioctl(s, SIOCGIFDATA, &ifdr) == -1) ++ if (ioctl(ifd->s, SIOCGIFDATA, &ifdr) == -1) + { -+ /* non-existant device? */ ++ /* non-existent device? */ + ifd->in_bytes = 0UL; + ifd->out_bytes = 0UL; + return; + } -+ ifd->in_bytes = (unsigned long)ifi->ifi_ibytes; -+ ifd->out_bytes = (unsigned long)ifi->ifi_obytes; ++ ifd->in_bytes = ifi->ifi_ibytes; ++ ifd->out_bytes = ifi->ifi_obytes; +#else -+ sprintf(req.ifr_name, ifd->device); - if (ioctl(s, SIOCGPPPSTATS, &req) != 0) + strncpy(req.ifr_name, ifd->device, sizeof(req.ifr_name)); + if (ioctl(ifd->s, SIOCGPPPSTATS, &req) != 0) { - /* non-existant device? */ -@@ -90,6 +122,7 @@ +@@ -95,6 +124,7 @@ void ioctl_stat(if_data *ifd) ifd->in_bytes = (unsigned long)req.stats.p.ppp_ibytes; ifd->out_bytes = (unsigned long)req.stats.p.ppp_obytes; diff --git a/net/pload/patches/patch-ab b/net/pload/patches/patch-ab index a15efcd6d69..ed4238c17a9 100644 --- a/net/pload/patches/patch-ab +++ b/net/pload/patches/patch-ab @@ -1,13 +1,13 @@ -$NetBSD: patch-ab,v 1.1 2002/01/03 09:07:29 hubertf Exp $ +$NetBSD: patch-ab,v 1.2 2007/12/09 23:41:11 wiz Exp $ ---- Imakefile.orig Thu Mar 4 08:33:03 1999 +--- Imakefile.orig 2000-02-01 07:11:24.000000000 +0000 +++ Imakefile -@@ -15,7 +15,7 @@ +@@ -15,7 +15,7 @@ DEFINES = -DVERSION="\"Pload version $(V ComplexProgramTarget(pload) -distclean: clean +distclean:: clean - $(RM) Makefile osdefs.mk core - - tgz: + $(RM) Makefile osdefs.mk core \ + pload-$(VER).tar.gz \ + pload-$(VER)-1.i386.rpm \ |