commit | b061f89e7088c7fba50b49ee5ac876619c9e8a7e | [log] [tgz] |
---|---|---|
author | Ben Chan <benchan@chromium.org> | Wed Feb 27 17:46:55 2013 -0800 |
committer | ChromeBot <chrome-bot@google.com> | Mon Mar 04 16:05:26 2013 -0800 |
tree | 994a186bab2ac5b13a725cb963bfa1511f63d3d4 | |
parent | 21f4096b66e7d16f211942fb2c27bd3a7ad0859e [diff] |
Add a traffic monitor to detect abnormal scenarios. This CL implements a traffic monitor to detect abnormal scenarios on an network connection. The traffic monitor can be conditionally enabled on a device. It starts periodically sampling the receive and transmit byte counts on a enabled device after the device establishes a connection. When it sees that there is outgoing traffic but no incoming traffic for some sampling periods, it invokes a callback to notify such a scenario. BUG=chromium-os:39433 TEST=Built and ran unit tests. Change-Id: I22b43fae53365544f595a630bff1b8d90b478e95 Reviewed-on: https://gerrit.chromium.org/gerrit/44403 Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org>