OSDN Git Service

BandwidthController: add support for "nice apps" and the "happy box"
authorJP Abgrall <jpa@google.com>
Wed, 3 Jul 2013 03:28:45 +0000 (20:28 -0700)
committerJP Abgrall <jpa@google.com>
Wed, 3 Jul 2013 18:12:48 +0000 (11:12 -0700)
commite478873947f995e44e8c559342462c177a420ae0
treec7d10444bf01341d8f2c266c9348ea2686f24e65
parenta9ba4cba3369e07aae05607f82424cc0075c9c34
BandwidthController: add support for "nice apps" and the "happy box"

* ndc bandwidth happybox (enable | disable)
 - enable
  . creates a an empty happy_box chain which rejects all traffic from all UIDs by default.
  . Uses the penalty_box as a hook. Any costly_interface automatically  gets the happy_box as it has a penalty_box.
  . any app UID not in the happy_box will be treated as if it was in the penalty_box (i.e. addnaughtyapps)
  . penalty_box (addnaughtyapps) still applies.
 - disable
  . removes the happy box.
* ndc bandwidth addniceapps <appUid> ...
 - similar to addnaughtyapps, but for the happy_box
* ndc bandwidth removeniceapps <appUid> ...
 - similar to removenaughtyapps, but for the happy_box

Bug: 6212480
Change-Id: I1f10e8c6fa1b230c7b3bb070d88508e437589705
BandwidthController.cpp
BandwidthController.h
CommandListener.cpp