• JP Abgrall's avatar
    netd: BandwidthController: support reading out tethering stats · db7da58e
    JP Abgrall authored
    * Add
      ndc bandwidth gettetherstats <ifaceIn> <ifaceOut>
    which returns
      221  ifaceIn ifaceOut rx_bytes rx_packets tx_bytes tx_packets
    If the iface pair is not found it will fail.
    
    221 is the new response code for TetheringStatsResult.
    It gets the stats by looking at the iptables FORWARD chain's counters.
    
    * Fixed return handling after some of the responses.
      - no need for errorno
      - after ResponseCode >= 200, don't return another.
    
    * Correctly initialize the alert values on "bandwidth enable"
    
    Bug: 5244846,5230066
    Change-Id: I81c941441525fa4055ae270d5cad05e6c42b8f72
    db7da58e
ResponseCode.h 2.41 KB