root/foundation-apps/grosview-maxx/xosview-net.patch

Revision 2, 3.2 KB (checked in by emasson, 3 years ago)

initial import for the community edition

  • xosview-1.8.2/Xdefaults

    diff -ur /tmp/xosview-1.8.2/Xdefaults /home/gwolf/paquetes/xosview/xosview-1.8.2/Xdefaults
    old new  
    137137xosview*netDecay:           True 
    138138xosview*netGraph:           True 
    139139xosview*netUsedFormat:      autoscale 
     140xosview*netIface:           False 
    140141 
    141142! Linux-only resources: 
    142143 
  • xosview-1.8.2/Xdefaults.in

    diff -ur /tmp/xosview-1.8.2/Xdefaults.in /home/gwolf/paquetes/xosview/xosview-1.8.2/Xdefaults.in
    old new  
    137137xosview*netDecay:           True 
    138138xosview*netGraph:           True 
    139139xosview*netUsedFormat:      autoscale 
     140xosview*netIface:           False 
    140141 
    141142! Linux-only resources: 
    142143 
  • xosview-1.8.2/linux/netmeter.cc

    diff -ur /tmp/xosview-1.8.2/linux/netmeter.cc /home/gwolf/paquetes/xosview/xosview-1.8.2/linux/netmeter.cc
    old new  
    119119  useGraph_ = parent_->isResourceTrue( "netGraph" ); 
    120120  dodecay_ = parent_->isResourceTrue( "netDecay" ); 
    121121  SetUsedFormat (parent_->getResource("netUsedFormat")); 
     122  netIface_ = parent_->getResource( "netIface" ); 
    122123 
    123124  _ipsock = socket(AF_INET, SOCK_DGRAM, 0); 
    124125  if (_ipsock == -1) { 
     
    171172        } 
    172173    else 
    173174        { 
     175          std::string ifname; 
    174176          ifs.ignore(1024, '\n'); 
    175177          ifs.ignore(1024, '\n'); 
    176178 
    177179          while (ifs) 
    178180              { 
    179               ifs.ignore(1024, ':'); 
    180               ifs >> str_in; 
     181                if (netIface_ == "False" )  
     182                  { 
     183                    ifs.ignore(1024, ':'); 
     184                  } 
     185                else 
     186                  { 
     187                    ifs.get(buf, 128, ':'); 
     188                    ifname = buf; 
     189                    ifs.ignore(1, ':'); 
     190                    ifname.erase(0, ifname.find_first_not_of(" ") ); 
     191                    if (ifname != netIface_)  
     192                      { 
     193                        ifs.ignore(1024,'\n'); 
     194                        continue; 
     195                      } 
     196                  } 
     197 
     198              ifs >> str_in; 
    181199              if (str_in == "No") 
    182200                continue; 
    183201              else 
  • xosview-1.8.2/linux/netmeter.h

    diff -ur /tmp/xosview-1.8.2/linux/netmeter.h /home/gwolf/paquetes/xosview/xosview-1.8.2/linux/netmeter.h
    old new  
    2525  void checkResources( void ); 
    2626protected: 
    2727  float maxpackets_; 
     28  std::string netIface_; 
    2829 
    2930private: 
    3031  int _ipsock; 
  • xosview-1.8.2/xosview.1

    diff -ur /tmp/xosview-1.8.2/xosview.1 /home/gwolf/paquetes/xosview/xosview-1.8.2/xosview.1
    old new  
    668668relative percentage of network usage (25% incomming, 75% outgoing). 
    669669.RE 
    670670 
     671xosview*netIface: \fIinterface\fP 
     672.RS 
     673If False, xosview will display the data received/transmitted by any of 
     674the network interfaces. Otherwise, xosview will only display the data 
     675received/transmitted by the specified network interface.  
     676 
    671677.\"  net{In,Out}Color: 
    672678.cc net In incoming 
    673679.cc net Out outgoing 
Note: See TracBrowser for help on using the browser.