From andy@CRWdog.demon.co.uk  Sun Jun  9 08:45:44 2002
Return-Path: <andy@CRWdog.demon.co.uk>
Received: from CRWdog.demon.co.uk (p69-199.acedsl.com [66.114.69.199])
	by hub.freebsd.org (Postfix) with ESMTP id D11FB37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  9 Jun 2002 08:45:43 -0700 (PDT)
Received: by CRWdog.demon.co.uk (Postfix, from userid 1001)
	id 9FCB83E16; Sun,  9 Jun 2002 11:45:42 -0400 (EDT)
Message-Id: <20020609154542.9FCB83E16@CRWdog.demon.co.uk>
Date: Sun,  9 Jun 2002 11:45:42 -0400 (EDT)
From: Andy Sparrow <spadger@best.com>
Reply-To: Andy Sparrow <spadger@best.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: flag@gufi.org
Subject: 0.4.1 port of wmnd displays no stats for some network if's...
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         39065
>Category:       ports
>Synopsis:       0.4.1 port of wmnd displays no stats for some network if's...
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 09 08:50:03 PDT 2002
>Closed-Date:    Thu Jun 20 00:44:34 PDT 2002
>Last-Modified:  Thu Jun 20 00:44:34 PDT 2002
>Originator:     Andy Sparrow
>Release:        FreeBSD 4.6-RC i386
>Organization:
None.
>Environment:
System: FreeBSD omni.geek4food.org 4.6-RC FreeBSD 4.6-RC #83: Fri Jun 7 08:16:03 EDT 2002 root@omni.geek4food.org:/usr/src/sys/compile/tureg i386


>Description:

	Latest port of wmnd (wmnd-0.4.1) displays no statistics for
	some network interfaces, particularly wi device, loopback.

	The author has implemented a FreeBSD-specific 'sysctl'
	interface that reads the in-kernel MIBs for interface
	statistics, unfortunately it seems that not all network
	drivers implement this datastructure.

>How-To-Repeat:

	portupgrade to latest, plug in a 'wi' card, observe blank
	interface (this used to work with the previous version of
	the port).

	Monitor an 'xl' interface, this works fine, as previously...

>Fix:

	Revert to previous port?

	Also suggested that the author consider using the kernel
	interface that 'netstat -ib' uses (i.e. from
	/usr/src/usr.bin/netstat/if.c), as presumably this will
	continue to work :)

>Release-Note:
>Audit-Trail:

From: Andy Sparrow <spadger@best.com>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports@FreeBSD.org
Cc: Andy Sparrow <spadger@best.com>, flag@gufi.org,
	Wave++ <wavexx@hydra.ubiest.com>
Subject: [PATCH Included] Re: ports/39065: 0.4.1 port of wmnd displays no 
 stats for some network if's...
Date: Thu, 13 Jun 2002 00:39:30 -0400

 --==_Exmh_425459294P
 Content-Type: text/plain; charset=us-ascii
 
 
 Hi,
 
 Please review this patch to fix wmnd-0.4.1, maintainer/author Cc'd (*yo guys*)
 
 Please note that the fix removes one patchfile completely 
 ('patch-src::drivers.c') and adds a new patch file ('patch patch-src::wmnd.h').
 
 Regards,
 
 AS
 
 diff -ruN wmnd.orig wmnd
 diff -ruN wmnd.orig/Makefile wmnd/Makefile
 --- wmnd.orig/Makefile  Mon May 27 18:24:21 2002
 +++ wmnd/Makefile       Thu Jun 13 00:07:47 2002
 @@ -7,6 +7,7 @@
  
  PORTNAME=      wmnd
  PORTVERSION=   0.4.1
 +PORTREVISION=  1
  CATEGORIES=    net
  MASTER_SITES=  http://www.hydra.ubiest.com/wmnd/releases/
  
 diff -ruN wmnd.orig/files/patch-src::drivers.c wmnd/files/patch-src::drivers.c
 --- wmnd.orig/files/patch-src::drivers.c        Mon May 27 18:24:21 2002
 +++ wmnd/files/patch-src::drivers.c     Wed Dec 31 19:00:00 1969
 @@ -1,19 +0,0 @@
 ---- src/drivers.c.orig Sat May 18 11:48:47 2002
 -+++ src/drivers.c      Sat May 18 11:50:28 2002
 -@@ -554,7 +554,6 @@
 -     if(!devname || (devname && !strcmp(devname, tempndata.ifmd_name))) {
 -       ndev = malloc(sizeof(struct Devices));
 -       ndev->devstart = 0;
 --      ndev->if_index = i;
 -       ndev->name = strdup(tempndata.ifmd_name);
 -       ndata = malloc(sizeof(struct ifmibdata));
 -       bcopy (&tempndata, ndata, sizeof(struct ifmibdata));
 -@@ -596,7 +595,7 @@
 -   datamib[4] = 1; /* fill in later */
 -   datamib[5] = IFDATA_GENERAL;
 - 
 --  datamib[4] = dev->if_index;
 -+  datamib[4] = IFMIB_IFCOUNT;
 - 
 -   len = sizeof(struct ifmibdata); 
 - 
 diff -ruN wmnd.orig/files/patch-src::wmnd.h wmnd/files/patch-src::wmnd.h
 --- wmnd.orig/files/patch-src::wmnd.h   Wed Dec 31 19:00:00 1969
 +++ wmnd/files/patch-src::wmnd.h        Thu Jun 13 00:05:34 2002
 @@ -0,0 +1,10 @@
 +--- src/wmnd.h.orig    Thu Jun 13 00:02:20 2002
 ++++ src/wmnd.h Thu Jun 13 00:04:20 2002
 +@@ -58,6 +58,7 @@
 +   void* drvdata;                /* driver data used by the driver */
 +   int drvnum;                   /* driver number */
 +   int online;                   /* 0 for online, 1 for offline */
 ++  int if_index;                 /* index of this device */
 +   time_t devstart;              /* device activity start, 0 for unavaible */
 +   unsigned long int his[59][4];
 +   unsigned long int ib_stat_last;
 
 
 
 
 --==_Exmh_425459294P
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.7 (FreeBSD)
 Comment: Exmh version 2.5 07/13/2001
 
 iD8DBQE9CCICPHh895bDXeQRAntyAJ95P/mHqHmewifskDwRrbTJzxqNOQCghDw1
 dK8ij2wonklUayfK3DnF4Bg=
 =arfV
 -----END PGP SIGNATURE-----
 
 --==_Exmh_425459294P--
State-Changed-From-To: open->closed 
State-Changed-By: pat 
State-Changed-When: Thu Jun 20 00:44:15 PDT 2002 
State-Changed-Why:  
Update to 0.4.2 committed, Thanks :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39065 
>Unformatted:
