diff -ur /tmp/xosview-1.8.2/Xdefaults /home/gwolf/paquetes/xosview/xosview-1.8.2/Xdefaults
--- /tmp/xosview-1.8.2/Xdefaults 2004-10-16 09:51:16.000000000 -0500
+++ /home/gwolf/paquetes/xosview/xosview-1.8.2/Xdefaults 2004-10-16 09:45:45.000000000 -0500
@@ -137,6 +137,7 @@
xosview*netDecay: True
xosview*netGraph: True
xosview*netUsedFormat: autoscale
+xosview*netIface: False
! Linux-only resources:
diff -ur /tmp/xosview-1.8.2/Xdefaults.in /home/gwolf/paquetes/xosview/xosview-1.8.2/Xdefaults.in
--- /tmp/xosview-1.8.2/Xdefaults.in 2004-10-16 00:16:02.000000000 -0500
+++ /home/gwolf/paquetes/xosview/xosview-1.8.2/Xdefaults.in 2004-10-16 09:21:03.000000000 -0500
@@ -137,6 +137,7 @@
xosview*netDecay: True
xosview*netGraph: True
xosview*netUsedFormat: autoscale
+xosview*netIface: False
! Linux-only resources:
diff -ur /tmp/xosview-1.8.2/linux/netmeter.cc /home/gwolf/paquetes/xosview/xosview-1.8.2/linux/netmeter.cc
--- /tmp/xosview-1.8.2/linux/netmeter.cc 2004-05-21 18:12:40.000000000 -0500
+++ /home/gwolf/paquetes/xosview/xosview-1.8.2/linux/netmeter.cc 2004-10-16 09:36:39.000000000 -0500
@@ -119,6 +119,7 @@
useGraph_ = parent_->isResourceTrue( "netGraph" );
dodecay_ = parent_->isResourceTrue( "netDecay" );
SetUsedFormat (parent_->getResource("netUsedFormat"));
+ netIface_ = parent_->getResource( "netIface" );
_ipsock = socket(AF_INET, SOCK_DGRAM, 0);
if (_ipsock == -1) {
@@ -171,13 +172,30 @@
}
else
{
+ std::string ifname;
ifs.ignore(1024, '\n');
ifs.ignore(1024, '\n');
while (ifs)
{
- ifs.ignore(1024, ':');
- ifs >> str_in;
+ if (netIface_ == "False" )
+ {
+ ifs.ignore(1024, ':');
+ }
+ else
+ {
+ ifs.get(buf, 128, ':');
+ ifname = buf;
+ ifs.ignore(1, ':');
+ ifname.erase(0, ifname.find_first_not_of(" ") );
+ if (ifname != netIface_)
+ {
+ ifs.ignore(1024,'\n');
+ continue;
+ }
+ }
+
+ ifs >> str_in;
if (str_in == "No")
continue;
else
diff -ur /tmp/xosview-1.8.2/linux/netmeter.h /home/gwolf/paquetes/xosview/xosview-1.8.2/linux/netmeter.h
--- /tmp/xosview-1.8.2/linux/netmeter.h 1999-11-07 14:22:11.000000000 -0600
+++ /home/gwolf/paquetes/xosview/xosview-1.8.2/linux/netmeter.h 2004-10-16 09:10:47.000000000 -0500
@@ -25,6 +25,7 @@
void checkResources( void );
protected:
float maxpackets_;
+ std::string netIface_;
private:
int _ipsock;
diff -ur /tmp/xosview-1.8.2/xosview.1 /home/gwolf/paquetes/xosview/xosview-1.8.2/xosview.1
--- /tmp/xosview-1.8.2/xosview.1 2004-10-16 00:16:02.000000000 -0500
+++ /home/gwolf/paquetes/xosview/xosview-1.8.2/xosview.1 2004-10-16 09:42:11.000000000 -0500
@@ -668,6 +668,12 @@
relative percentage of network usage (25% incomming, 75% outgoing).
.RE
+xosview*netIface: \fIinterface\fP
+.RS
+If False, xosview will display the data received/transmitted by any of
+the network interfaces. Otherwise, xosview will only display the data
+received/transmitted by the specified network interface.
+
.\" net{In,Out}Color:
.cc net In incoming
.cc net Out outgoing
syntax highlighted by Code2HTML, v. 0.9.1