Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 May 1999 23:10:52 -0600 (MDT)
From:      handy@montana.edu
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/11620: XOSview fix:  net stats now work
Message-ID:  <199905100510.XAA22259@lambic.physics.montana.edu>

next in thread | raw e-mail | index | archive | help

>Number:         11620
>Category:       ports
>Synopsis:       XOSview:  fix network stats
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun May  9 22:20:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Brian Handy
>Release:        FreeBSD 2.2.8-STABLE i386
>Organization:
>Environment:
Patch tested on a 3.x-STABLE machine.

>Description:
Network stats fixed, and turned on by default.
Relieved myself as MAINTAINER.  (I thought someone else relieved me???)

Submitted-by:  Tom Pavel <pavel@SLAC.Stanford.EDU>

>How-To-Repeat:
>Fix:

diff -urN xosview.orig/Makefile xosview/Makefile
--- xosview.orig/Makefile	Sun May  9 19:16:51 1999
+++ xosview/Makefile	Sun May  9 23:05:07 1999
@@ -1,5 +1,5 @@
 # New ports collection makefile for:	xosview
-# Version required:	1.7.0
+# Version required:	1.7.1
 # Date created:		19 Nov 1997
 # Whom:			Brian Handy <handy@physics.montana.edu>
 #
@@ -12,7 +12,7 @@
 		${MASTER_SITE_SUNSITE}
 MASTER_SITE_SUBDIR=	system/status/xstatus
 
-MAINTAINER=	handy@physics.montana.edu
+MAINTAINER=	ports@freebsd.org
 
 FETCH_BEFORE_ARGS=	-b
 USE_X_PREFIX=	yes
diff -urN xosview.orig/patches/patch-ad xosview/patches/patch-ad
--- xosview.orig/patches/patch-ad	Wed Dec 31 17:00:00 1969
+++ xosview/patches/patch-ad	Sun May  9 22:52:02 1999
@@ -0,0 +1,49 @@
+--- bsd/kernel.cc.orig	Mon Jan 25 12:34:24 1999
++++ bsd/kernel.cc	Sun May  9 22:51:33 1999
+@@ -306,15 +306,24 @@
+ void
+ BSDGetNetInOut (long long * inbytes, long long * outbytes) {
+ 
+-#if (__FreeBSD_version < 300000) //werner May/29/98 quick hack for current
+ 
+   struct ifnet * ifnetp;
+   struct ifnet ifnet;
+   //char ifname[256];
+ 
++#if (__FreeBSD_version < 300000) //werner May/29/98 quick hack for current
++
+   //  The "ifnet" symbol in the kernel points to a 'struct ifnet' pointer.
+   safe_kvm_read (nlst[IFNET_SYM_INDEX].n_value, &ifnetp, sizeof(ifnetp));
+ 
++#else // FreeBSD > 3.0
++
++  struct ifnethead ifnethd;
++  safe_kvm_read (nlst[IFNET_SYM_INDEX].n_value, &ifnethd, sizeof(ifnethd));
++  ifnetp = ifnethd.tqh_first;
++
++#endif
++
+   *inbytes = 0;
+   *outbytes = 0;
+ 
+@@ -334,7 +343,7 @@
+     //  Linked-list step taken from if.c in netstat source, line 120.
+ #ifdef XOSVIEW_FREEBSD
+ #if (__FreeBSD_version >= 300000) 
+-    ifnetp = (struct ifnet*) ifnet.if_link.tqe_next; 
++    ifnetp = ifnet.if_link.tqe_next; 
+ #else 
+     ifnetp = (struct ifnet*) ifnet.if_next;
+ #endif
+@@ -342,11 +351,6 @@
+     ifnetp = (struct ifnet*) ifnet.if_list.tqe_next;
+ #endif
+   }
+-
+-#else
+-  (void) inbytes;
+-  (void) outbytes;
+-#endif	//werner
+ 
+ }
+ 
diff -urN xosview.orig/patches/patch-ae xosview/patches/patch-ae
--- xosview.orig/patches/patch-ae	Wed Dec 31 17:00:00 1969
+++ xosview/patches/patch-ae	Sun May  9 23:01:59 1999
@@ -0,0 +1,11 @@
+--- Xdefaults.orig	Sun May  9 23:01:45 1999
++++ Xdefaults	Sun May  9 23:01:10 1999
+@@ -94,7 +94,7 @@
+ 
+ ! Network Meter Resources
+ 
+-xosview*net:		False
++xosview*net:		True
+ !  Suitable for people with 28.8Kbaud with no compression, or 14.4
+ !    with compression:
+ !xosview*netBandwidth: 2000

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905100510.XAA22259>