diff -u -urN xosview-1.8.0/Xdefaults xosview-1.8.0.wireless.sep.if/Xdefaults
--- xosview-1.8.0/Xdefaults	2002-02-25 00:05:15.000000000 +0100
+++ xosview-1.8.0.wireless.sep.if/Xdefaults	2003-09-24 12:40:09.000000000 +0200
@@ -205,6 +205,17 @@
 xosview*batteryPriority:    50
 xosview*batteryUsedFormat:  percent
 
+! Wireless Meter Resources
+
+xosview*wireless:            True
+xosview*PoorQualityColor:    red
+xosview*FairQualityColor:    yellow
+xosview*GoodQualityColor:    green
+xosview*wirelessUsedColor:   blue
+xosview*wirelessPriority:    1
+xosview*wirelessUsedFormat:  autoscale
+xosview*wirelessDecay:       True
+
 ! Disk Meter Resources
 
 xosview*disk:		    True
diff -u -urN xosview-1.8.0/Xdefaults.in xosview-1.8.0.wireless.sep.if/Xdefaults.in
--- xosview-1.8.0/Xdefaults.in	2003-08-21 19:03:28.000000000 +0200
+++ xosview-1.8.0.wireless.sep.if/Xdefaults.in	2003-09-24 12:40:17.000000000 +0200
@@ -176,6 +176,17 @@
 xosview*batteryPriority:    50
 xosview*batteryUsedFormat:  percent
 
+! Wireless Meter Resources
+
+xosview*wireless:            True
+xosview*PoorQualityColor:    red
+xosview*FairQualityColor:    yellow
+xosview*GoodQualityColor:    green
+xosview*wirelessUsedColor:   blue
+xosview*wirelessPriority:    1 
+xosview*wirelessUsedFormat:  autoscale
+xosview*wirelessDecay:       True
+
 ! Disk Meter Resources
 
 xosview*disk:		    False
diff -u -urN xosview-1.8.0/Xrmcommandline.h xosview-1.8.0.wireless.sep.if/Xrmcommandline.h
--- xosview-1.8.0/Xrmcommandline.h	2002-02-24 23:00:47.000000000 +0100
+++ xosview-1.8.0.wireless.sep.if/Xrmcommandline.h	2003-08-23 10:14:50.000000000 +0200
@@ -44,6 +44,9 @@
 // Batterymeter resources
 { "-battery", "*battery", XrmoptionNoArg, "False" },
 { "+battery", "*battery", XrmoptionNoArg, "True" },
+// Wirelessmeter resources
+{ "-wireless", "*wireless", XrmoptionNoArg, "False" },
+{ "+wireless", "*wireless", XrmoptionNoArg, "True" },
 //  GFX resources
 { "-gfx", "*gfx", XrmoptionNoArg, "False" },
 { "+gfx", "*gfx", XrmoptionNoArg, "True" },
diff -u -urN xosview-1.8.0/config/Makefile.linux.in xosview-1.8.0.wireless.sep.if/config/Makefile.linux.in
--- xosview-1.8.0/config/Makefile.linux.in	2003-08-21 19:03:28.000000000 +0200
+++ xosview-1.8.0.wireless.sep.if/config/Makefile.linux.in	2003-08-23 10:13:38.000000000 +0200
@@ -18,6 +18,7 @@
 intmeter.o \
 loadmeter.o \
 btrymeter.o \
+wirelessmeter.o \
 diskmeter.o \
 raidmeter.o \
 lmstemp.o \
diff -u -urN xosview-1.8.0/config/configure.in xosview-1.8.0.wireless.sep.if/config/configure.in
--- xosview-1.8.0/config/configure.in	2002-02-18 03:11:13.000000000 +0100
+++ xosview-1.8.0.wireless.sep.if/config/configure.in	2003-08-23 10:13:38.000000000 +0200
@@ -234,6 +234,14 @@
   else
     AC_MSG_WARN([no /dev/apm -- disabling the battery meter.])
   fi
+  #  Only enable the wireless meter if it appears we support it.
+  if test -e /proc/net/wireless ; then
+    WIRELESSMETER=wirelessmeter.o
+    AC_DEFINE(HAVE_WIRELESS_METER) 
+    AC_MSG_WARN([/proc/net/wireless detected -- enabling the wireless meter!])
+  else
+    AC_MSG_WARN([no /proc/net/wireless -- disabling the wireless meter.])
+  fi
   ;;
 esac
 
diff -u -urN xosview-1.8.0/configure xosview-1.8.0.wireless.sep.if/configure
--- xosview-1.8.0/configure	2002-02-25 00:05:05.000000000 +0100
+++ xosview-1.8.0.wireless.sep.if/configure	2003-08-23 10:16:16.000000000 +0200
@@ -1996,6 +1996,19 @@
   else
     echo "configure: warning: no /dev/apm -- disabling the battery meter." 1>&2
   fi
+
+
+  #  Only enable the wireless meter if it appears we support it.
+  if test -e /proc/net/wireless ; then
+    WIRELESSMETER=wirelessmeter.o
+    cat >> confdefs.h <<\EOF
+#define HAVE_WIRELESS_METER 1
+EOF
+
+    echo "configure: warning: /proc/net/wireless detected -- enabling the wireless meter!" 1>&2
+  else
+    echo "configure: warning: no /dev/net/wireless -- disabling the wireless meter." 1>&2
+  fi
   ;;
 esac
 
@@ -2251,6 +2264,7 @@
 s%@AUTODEPEND@%$AUTODEPEND%g
 s%@LINUX_SMP@%$LINUX_SMP%g
 s%@BTRYMETER@%$BTRYMETER%g
+s%@WIRELESSMETER@%$WIRELESSMETER%g
 s%@EXTRA_CXXFLAGS@%$EXTRA_CXXFLAGS%g
 s%@EXTRALIBS@%$EXTRALIBS%g
 s%@ELF_LINK_FLAGS@%$ELF_LINK_FLAGS%g
diff -u -urN xosview-1.8.0/linux/MeterMaker.cc xosview-1.8.0.wireless.sep.if/linux/MeterMaker.cc
--- xosview-1.8.0/linux/MeterMaker.cc	2003-08-21 19:03:28.000000000 +0200
+++ xosview-1.8.0.wireless.sep.if/linux/MeterMaker.cc	2003-08-23 10:17:04.000000000 +0200
@@ -20,6 +20,8 @@
 #endif
 #include "loadmeter.h"
 #include "btrymeter.h"
+#include "wirelessmeter.h"
+#include <fstream.h>
 #include "diskmeter.h"
 #include "raidmeter.h"
 #include "lmstemp.h"
@@ -52,8 +54,16 @@
     push(new PageMeter(_xos, atof(_xos->getResource("pageBandwidth"))));
 
   // check for the net meter
-  if (_xos->isResourceTrue("net"))
-    push(new NetMeter(_xos, atof(_xos->getResource("netBandwidth"))));
+static const char _netfilename[] = "/proc/net/dev";
+ifstream stat( _netfilename );
+if ( stat ) {
+	if (_xos->isResourceTrue("net")){
+	int ethCount = NetMeter::countdevices();
+	int start = (ethCount == -1) ? -1 : 0;
+	if (ethCount != -1) {
+	for (int i = start ; i <= ethCount ; i++)
+    push(new NetMeter(_xos, atof(_xos->getResource("netBandwidth")), i, NetMeter::ethStr(i)));
+} } }
 
   if (_xos->isResourceTrue("disk"))
       push(new DiskMeter(_xos, atof(_xos->getResource("diskBandwidth"))));
@@ -82,6 +92,18 @@
   if (_xos->isResourceTrue("battery"))
     push(new BtryMeter(_xos));
 
+  // check for the wireless meter
+static const char WLFILENAME[] = "/proc/net/wireless";
+ifstream stats( WLFILENAME );
+if ( stats ) {
+  if (_xos->isResourceTrue("wireless")){
+    int wirelessCount = WirelessMeter::countdevices();
+    int start = (wirelessCount == 0) ? 0 : 1;
+	if (wirelessCount != 0) {
+    for (int i = start ; i <= wirelessCount ; i++)
+      push(new WirelessMeter(_xos, i, WirelessMeter::wirelessStr(i)));
+  } } }
+
   // check for the RAID meter
   if (_xos->isResourceTrue("RAID")){
     int RAIDCount = atoi(_xos->getResource("RAIDdevicecount"));
diff -u -urN xosview-1.8.0/linux/memmeter.cc xosview-1.8.0.wireless.sep.if/linux/memmeter.cc
--- xosview-1.8.0/linux/memmeter.cc	2003-08-21 19:03:57.000000000 +0200
+++ xosview-1.8.0.wireless.sep.if/linux/memmeter.cc	2003-08-21 21:44:36.000000000 +0200
@@ -162,7 +162,8 @@
     unsigned long val;
     line >> ignore >> val;
     /*  All stats are in KB.  */
-    infos[inum].setVal(val*1024);	/*  Multiply by 1024 bytes per K  */
+//    infos[inum].setVal(val*1024);	/*  Multiply by 1024 bytes per K  */
+    infos[inum].setVal(val);
 
     inum++;
     if (inum >= ninfos)
diff -u -urN xosview-1.8.0/linux/netmeter.cc xosview-1.8.0.wireless.sep.if/linux/netmeter.cc
--- xosview-1.8.0/linux/netmeter.cc	2003-08-21 19:03:28.000000000 +0200
+++ xosview-1.8.0.wireless.sep.if/linux/netmeter.cc	2003-08-23 10:05:37.000000000 +0200
@@ -27,7 +27,6 @@
 
 
 #include "netmeter.h"
-#include "xosview.h"
 
 #include <unistd.h>
 #include <iomanip.h>
@@ -45,9 +44,13 @@
 #include <errno.h>
 #include <iostream.h>
 #include <iomanip.h>
+#include <strstream>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
 
-NetMeter::NetMeter( XOSView *parent, float max )
-  : FieldMeterGraph( parent, 3, "NET", "IN/OUT/IDLE" ){
+NetMeter::NetMeter( XOSView *parent, float max, int ID, const char *ethID )
+  : FieldMeterGraph( parent, 3, ethID, "IN/OUT/IDLE" ), _number(ID) {
   _timer.start();
   maxpackets_ = max;
   _lastBytesIn = _lastBytesOut = 0;
@@ -164,34 +167,50 @@
 
 	ifs.ignore(1024, '\n');
         }
-    else
-        {
-	  ifs.ignore(1024, '\n');
-	  ifs.ignore(1024, '\n');
+    else {
+
+  static char ethbuf[32];
+  std::ostrstream eth(ethbuf, 32);
+  eth << "eth";
+    eth << _number;
+  eth << ends;
+
+char newbuf[1024];
+int counter = 0;  
+int reached = 0;
+while (!ifs.eof()) {
+ifs >> newbuf;
+if (strncmp(newbuf, ethbuf, strlen(ethbuf))) {
+if ( reached != 1) {
+counter++; }}else{
+counter++;
+reached = 1; }
+ifs.getline(newbuf, 1024);
+}
+
+ifstream ifs(_netfilename);
+
+for (int i = 2 ; i < counter; i = i+1 ) {
+ifs.getline(buf, 1024); }                
+
+              ifs.getline(buf, 1024);
 
-	  while (ifs)
-	      {
 	      ifs.ignore(1024, ':');
 	      ifs >> in >> ig >> ig >> ig >> ig >> ig >> ig >> ig >> out;
-
 	      if (ifs.eof())
 		  {
 		  ifs.ignore(1024, '\n');
-		  break;
+//		  break;
 		  }
 
 	      if (ifs.fail())
 		  {
 		  ifs.clear();
-		  ifs.ignore(1024, '\n');
-		  continue;
+//		  continue;
 		  }
+			totin = in;
+			totout = out;
 
-	      totin += in;
-	      totout += out;
-
-	      ifs.ignore(1024, '\n');
-	      }
 	}
 
     float t = 1000000.0 / _timer.report_usecs();
@@ -315,3 +334,36 @@
         fields_[2] = total_ - fields_[0] - fields_[1];
         }
     }
+int NetMeter::countdevices(void){
+  ifstream ethinfo( "/proc/net/dev" );
+
+  if ( !ethinfo ){
+    cerr <<"Can not open file : " <<"/proc/net/dev" <<endl;
+    exit( 1 );                                        
+  }
+   
+char buf[1024];
+
+  int ethCount = -1;
+  while (!ethinfo.eof()){
+    ethinfo.getline(buf, 1024);
+        ethinfo >> buf;
+//if (!ethinfo.eof()){ 
+if (!strncmp(buf, "eth", 3))
+          ethCount++;
+  }
+//}
+
+  return ethCount;
+}
+
+const char *NetMeter::ethStr(int num){
+  static char buffer[32];
+  std::ostrstream str(buffer, 32);
+  
+  str << "eth";
+    str << (num);
+  str << ends;
+   
+  return buffer;
+}
diff -u -urN xosview-1.8.0/linux/netmeter.h xosview-1.8.0.wireless.sep.if/linux/netmeter.h
--- xosview-1.8.0/linux/netmeter.h	1999-11-07 21:22:11.000000000 +0100
+++ xosview-1.8.0.wireless.sep.if/linux/netmeter.h	2003-08-21 19:15:35.000000000 +0200
@@ -16,13 +16,17 @@
 
 class NetMeter : public FieldMeterGraph {
 public:
-  NetMeter(XOSView *parent, float max);
+  NetMeter(XOSView *parent, float max, int ID = 0, const char *ethID = "eth");
   ~NetMeter( void );
 
   const char *name( void ) const { return "NetMeter"; }  
   void checkevent( void );
 
   void checkResources( void );
+  static int countdevices(void);
+  static const char *ethStr(int num);
+  char ethID[256];
+
 protected:
   float maxpackets_;
 
@@ -39,6 +43,10 @@
 
   void checkeventOld(void);
   void checkeventNew(void);
+  int _number;
+  int eth;
+  int counter;
+  int reached;
 };
 
 #endif
diff -u -urN xosview-1.8.0/linux/wirelessmeter.cc xosview-1.8.0.wireless.sep.if/linux/wirelessmeter.cc
--- xosview-1.8.0/linux/wirelessmeter.cc	1970-01-01 01:00:00.000000000 +0100
+++ xosview-1.8.0.wireless.sep.if/linux/wirelessmeter.cc	2003-09-24 12:33:19.000000000 +0200
@@ -0,0 +1,151 @@
+//  
+//  Copyright (c) 2001 by Tim Ehlers ( tehlers@gwdg.de )
+//
+//  This file may be distributed under terms of the GPL
+//
+//
+// $Id: wirelessmeter.cc,v 1.3 2001/06/13
+//
+#include "wirelessmeter.h"
+#include "xosview.h"
+#include <fstream.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strstream>
+#include <ctype.h>
+
+static const char WLFILENAME[] = "/proc/net/wireless";
+
+WirelessMeter::WirelessMeter( XOSView *parent, int ID, const char *wlID)
+  : FieldMeterGraph( parent, 2, wlID, "/Link-Quality", 1, 1, 0 ), _number(ID) {
+  lastqualitystate = -1;
+  strcpy(devname, "0");
+}
+
+WirelessMeter::~WirelessMeter( void ){
+}
+
+void WirelessMeter::checkResources( void ){
+  FieldMeterGraph::checkResources();
+
+  poorqualcol_ = parent_->allocColor(parent_->getResource( "PoorQualityColor" ));
+  fairqualcol_ = parent_->allocColor(parent_->getResource( "FairQualityColor" ));
+  goodqualcol_ = parent_->allocColor(parent_->getResource( "GoodQualityColor" ));
+
+  setfieldcolor( 1, parent_->getResource( "wirelessUsedColor" ) );
+
+  priority_ = atoi (parent_->getResource( "wirelessPriority" ) );
+  dodecay_ = parent_->isResourceTrue( "wirelessDecay" );
+  SetUsedFormat(parent_->getResource( "wirelessUsedFormat" ) );
+}
+
+void WirelessMeter::checkevent( void ){
+  getpwrinfo();
+
+  drawfields();
+}
+
+
+void WirelessMeter::getpwrinfo( void ){
+  ifstream loadinfo( WLFILENAME );
+
+  if ( !loadinfo ){
+    cerr <<"Can not open file : " <<WLFILENAME <<endl;
+    parent_->done(1);
+    return;
+  }
+
+  char buff[256];
+
+  for (int i = 1 ; i < 2 ; i++)
+    loadinfo.getline(buff, 256);
+
+  int linkq = 0;
+
+if (strncmp(devname, "0", 1)) {
+
+  while (!loadinfo.eof()){
+    loadinfo.getline(buff, 256);
+    if (!loadinfo.eof()){
+        loadinfo >> buff;
+      if (!strncmp(buff, devname, strlen(devname))) {
+	loadinfo >> buff >> linkq; }
+
+} } }
+
+if (!strncmp(devname, "0", 1)) {
+
+  for (int i = 0 ; i < _number; ) {
+    loadinfo.getline(buff, 256);
+	loadinfo >> devname >> buff >> linkq;
+	if (!loadinfo.eof()){
+          if ( linkq != 0 ) i++; }
+		if ( loadinfo.eof() ) break; }
+
+}
+
+  fields_[0] = linkq;
+
+  if ( fields_[0] <  7 ) qualitystate = 0;
+  if ( fields_[0] >= 7 ) qualitystate = 1;
+  if ( fields_[0] >= 15 ) qualitystate = 2;
+  
+  if ( qualitystate != lastqualitystate ){
+    if ( qualitystate == 0 ) setfieldcolor( 0, poorqualcol_ );
+    if ( qualitystate == 1 ) setfieldcolor( 0, fairqualcol_ );
+    if ( qualitystate == 2 ) setfieldcolor( 0, goodqualcol_ );
+    if ( fields_[0] >= 200 ) { fields_[0] = 0; qualitystate = 0; }
+    lastqualitystate = qualitystate;
+  }
+
+  total_ = 90;
+
+ if ( fields_[0] < 60)
+    total_ = 60;
+
+ if ( fields_[0] < 30)
+    total_ = 30;
+
+  fields_[1] = fields_[0];
+
+  setUsed (fields_[0], total_);
+}
+
+int WirelessMeter::countdevices(void){
+  ifstream stats( WLFILENAME );
+
+  if ( !stats ){
+    cerr <<"Can not open file : " <<WLFILENAME <<endl;
+    exit( 1 );
+  }
+
+char buf[1024];
+
+for (int i = 1 ; i < 2 ; i++)
+    stats.getline(buf, 1024);
+
+  int wirelessCount = 0;
+  int linkq = 0;
+  while (!stats.eof()){
+    stats.getline(buf, 1024);
+	stats >> buf >> buf >> linkq;
+if (!stats.eof()){
+	  if ( linkq != 0 )
+          wirelessCount++;
+  }}
+
+  return wirelessCount;
+}
+
+const char *WirelessMeter::wirelessStr(int num){
+  static char buffer[32];
+  std::ostrstream str(buffer, 32);
+  
+  str << "WL";
+  if (num != 1)
+    str << (num);
+  str << ends;
+
+  return buffer;
+}
+                            
diff -u -urN xosview-1.8.0/linux/wirelessmeter.h xosview-1.8.0.wireless.sep.if/linux/wirelessmeter.h
--- xosview-1.8.0/linux/wirelessmeter.h	1970-01-01 01:00:00.000000000 +0100
+++ xosview-1.8.0.wireless.sep.if/linux/wirelessmeter.h	2003-08-23 10:13:38.000000000 +0200
@@ -0,0 +1,36 @@
+//  
+//  Copyright (c) 1997 by Mike Romberg ( romberg@fsl.noaa.gov )
+//
+//  This file may be distributed under terms of the GPL
+//
+//
+// $Id: btrymeter.h,v 1.1 1997/02/26 23:44:50 mromberg Exp $
+//
+#ifndef _WIRELESSMETER_H_
+#define _WIRELESSMETER_H_
+
+
+#include "fieldmetergraph.h"
+
+
+class WirelessMeter : public FieldMeterGraph {
+public:
+  WirelessMeter( XOSView *parent, int ID = 1, const char *wlID = "WL");
+  ~WirelessMeter( void );
+
+  const char *name( void ) const { return "WirelessMeter"; }  
+  void checkevent( void );
+
+  void checkResources( void );
+  static int countdevices(void);
+  static const char *wirelessStr(int num);
+  char devname[256];
+protected:
+
+  void getpwrinfo( void );
+  unsigned long poorqualcol_, fairqualcol_, goodqualcol_;
+private:
+  int alarmThreshold, qualitystate, lastqualitystate, _number;
+};
+
+#endif
diff -u -urN xosview-1.8.0/xosview.1 xosview-1.8.0.wireless.sep.if/xosview.1
--- xosview-1.8.0/xosview.1	2003-08-21 19:03:28.000000000 +0200
+++ xosview-1.8.0.wireless.sep.if/xosview.1	2003-09-24 12:32:51.000000000 +0200
@@ -194,6 +194,13 @@
     array(s).
     Linux  : Disk0 Disk1 Disk2 .. DiskN | Rebuild Progress
 
+\fBWireless Link\fP
+    Shows the current Linkquality
+    of wireless connections.
+    Linux  : linkquality | of 30,60 or 90
+    *BSD   : < Not Supported >
+    HPUX   : < Not Supported >
+
 .SH OPTIONS
 
 Most of these command line options are just a convenient way to set one or
@@ -280,6 +287,9 @@
 .\"  Handle -/+gfx
 .pm gfx
 
+.\"  Handle -/+wireless
+.pm wireless
+
 .\"  Handle -/+net
 .pm net
 
@@ -806,6 +816,43 @@
 .pp battery
 .uf battery
 
+\fBWireless Meter Resources\fP
+
+
+xosview*wireless: (True or False)
+.RS
+If True then xosview will display the link-Quality of wireless connections.
+Note that the graph will *never* schow up, if you don't have any wireless
+Devices, or no wireless extensions in Kernel (/proc/net/wireless).
+Default is true.
+.RE
+
+xosview*PoorQualityColor: \fIcolor\fP
+.RS
+This is the color for the Link-Graph with Quality between 0 and 6.
+.RE
+
+xosview*FairQualityColor: \fIcolor\fP
+.RS
+This is the color for the Link-Graph with Quality between 7 and 14.
+.RE
+
+xosview*GoodQualityColor: \fIcolor\fP
+.RS
+This is the color for the Link-Graph with Quality higher than 14.
+.RE
+
+xosview*wirelessUsedColor: \fIcolor\fP
+.RS
+This is the background color.
+.RE
+
+.\"  Do the priority resource
+.pp wireless
+.dc wireless
+.uf wireless
+
+
 \fBDisk Meter Resources\fP
 
 .\"  Do the disk: True resource.
@@ -1014,6 +1061,11 @@
 Many cosmetic fixes.
 .RE
 
+Tim Ehlers (tehlers@gwdg.de)
+.RS
+Wireless Link-Meter for Linux.
+.RE
+
 Leopold Toetsch <lt@toetsch.at>
 .RS
 Linux lms temp meter.
