Bug 39065 - 0.4.1 port of wmnd displays no stats for some network if's...
Summary: 0.4.1 port of wmnd displays no stats for some network if's...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-09 16:50 UTC by spadger
Modified: 2002-06-20 08:44 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spadger 2002-06-09 16:50:03 UTC
	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.

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 :)
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...
Comment 1 spadger 2002-06-13 05:39:30 UTC
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;


Comment 2 Patrick Li freebsd_committer freebsd_triage 2002-06-20 08:44:15 UTC
State Changed
From-To: open->closed

Update to 0.4.2 committed, Thanks :)