Commit Graph

2859 Commits

Author SHA1 Message Date
Irfan Sheriff
18da1320fe Open network service discovery API
Add support for DNS based network service discovery API. This
allows applications to discover and resolve applications on a
local network such as Wi-Fi

Change-Id: Ie89895edd35d12b7f7a23fb5fed36cb2b2079f7a
2012-04-15 17:09:48 -07:00
Irfan Sheriff
287e63bbb6 Merge "Bonjour fixes" 2012-04-12 17:55:15 -07:00
Jeff Sharkey
8308b9b2af Move TrafficStats iface counters to xt_qtaguid.
Use xt_qtaguid iface_stat_all counters, which are monotonic during
a single boot.

Track all ifaces associated with mobile networks since boot, and
move TrafficStats to using these ifaces.  This will include usage of
networks omitted from config_data_usage_network_types, specifically
on devices that recycle network interfaces across APNs.

Split wildcard template matching, and move NetworkStatsService to
use mobile wildcard when logging stats.

Bug: 5324515
Change-Id: I2211c374c05d1b598cc647f2f873630538955ffe
2012-04-12 14:53:32 -07:00
Irfan Sheriff
e8de246bb4 Bonjour fixes
Change-Id: I1df1dc470bb42c84abc7e1a46bedf9f206910b65
2012-04-12 12:08:51 -07:00
The Android Automerger
7317788f5f merge in jb-release history after reset to master 2012-04-10 07:03:55 -07:00
Jeff Sharkey
1ba1b673f5 Migrate to @Override to remove warnings.
Bug: 6303344
Change-Id: I0d33b2ed448467379d576ccd71fb5ae20c878852
2012-04-09 10:57:21 -07:00
Jeff Sharkey
27421b1665 Splice operations before collapsing ifaces.
Bug: 6241038
Change-Id: Ide9058703f7305df8fb070af149ddce0653a0abf
2012-04-09 10:27:55 -07:00
The Android Automerger
ddbb91a9de merge in jb-release history after reset to master 2012-04-09 07:04:01 -07:00
Jeff Sharkey
920d9046bc INetworkStatsSession with lifecycle for caching.
Users outside system_server now explicitly communicate their
lifecycle, which keeps a strong-reference chain to any fully loaded
NetworkStatsCollection histories.

Bug: 6236498
Change-Id: I8e22739b6e89a626b676967a736d7117fd000778
2012-04-06 13:38:29 -07:00
Jeff Sharkey
3bd888f411 Support metered Wi-Fi NetworkPolicy.
Add networkId field to NetworkIdentity to identify Wi-Fi networks by
SSID.  Add support for policies without usage cycles.

Only apply mobile policies when SIM state is ready, which is cleaner
than just checking for airplane mode.  Also avoids creating no-op
default policies when subscriberId is null.

Bug: 3001465, 3291052
Change-Id: I1f8aaa49a5db306df022c402ea7f3f5d4bc0cfc7
2012-04-05 16:02:25 -07:00
The Android Automerger
8686eb3990 merge in jb-release history after reset to master 2012-04-05 07:03:55 -07:00
Irfan Sheriff
f3f68819df Fix build
Add missing file

Change-Id: I5ed1827e1183c37741675ce4d198d3e200c5fb94
2012-04-04 13:20:20 -07:00
Irfan Sheriff
77ec5581ed Add initial framework for DNS service discovery
Change-Id: I53c0b7ebfd75e520ebb7553612f1aa8413b6b79b
2012-04-04 12:24:56 -07:00
The Android Automerger
c7c3dad5a3 merge in jb-release history after reset to master 2012-03-19 07:03:27 -07:00
Jeff Sharkey
e4474c8bfe Remove network subtype check when building template.
Change-Id: I069d82a77d27dae6bfffe3b7e65d73b63f258ad9
2012-03-16 11:54:01 -07:00
Jeff Sharkey
8e38f3ddde Combine network subtypes by default.
Subtype controls (3G-vs-4G) aren't exposed in the UI, so tracking
data with that granularity creates unnecessary overhead. For example,
some GSM networks can regularly flap between two subtypes.

Bug: 6118868
Change-Id: Id098891dba52336d00d0f96632a7924e228b4713
2012-03-16 11:35:29 -07:00
The Android Automerger
fc661a8b12 merge in jb-release history after reset to master 2012-03-14 07:03:18 -07:00
Robert Greenwalt
69e1f3ae65 Record the trimmed cmd string for logs
The over the wire command includes a \0 that mangles log messages.
bug:6149176

Change-Id: I77d4e443f1966bff060f1b97570851f7549fee8e
2012-03-13 12:30:14 -07:00
The Android Automerger
1c083a4c4a merge in jb-release history after reset to master 2012-03-07 07:01:44 -08:00
Jeff Sharkey
d9e33ce00b Merge "Avoid updating network stats after shutdown." 2012-03-06 20:04:26 -08:00
Jeff Sharkey
0097f85348 Avoid updating network stats after shutdown.
Bug: 6109476
Change-Id: I9a3a8b182c8fa56d83ddc755d204d5b267c9bc5d
2012-03-06 19:59:57 -08:00
Robert Greenwalt
7f03e44443 Make NDC not block forever and handle restart.
Still possible for netd to get wedged but system won't die because of it.
Leads the way to having forking netd - then only individual commands would
wedge, promoting stability.

bug:5864209
bug:6019952
Change-Id: I43e4c5072863b8b812d4fe24d30d92eb1a11651a
2012-02-29 16:53:27 -08:00
The Android Automerger
fb4a0d9ea4 merge in jb-release history after reset to master 2012-02-29 07:02:28 -08:00
Jeff Sharkey
30aab0989d Disable verbose NetworkStats logging.
Bug: 6076584
Change-Id: I4efcda2b474f623f4fe70db8b43b0aa69017d749
2012-02-28 15:13:08 -08:00
The Android Automerger
dc5d59992e merge in jb-release history after reset to master 2012-02-28 07:02:11 -08:00
Jeff Sharkey
be68c7c5c7 Move NetworkStatsFactory to faster ProcFileReader.
Less GC overhead, and about 8x faster parse times.  Verified that
tests pass.

Change-Id: Iff1d374f36103395a193176a88a57eebffa93c56
2012-02-27 18:08:13 -08:00
Jeff Sharkey
00b8bb6e79 Suppress StrictMode when reading /proc/ files.
Bug: 6077051
Change-Id: If4f23e947d8b91f9f124baa0460600a6b9353732
2012-02-27 17:42:34 -08:00
The Android Automerger
78dcae3c33 merge in jb-release history after reset to master 2012-02-08 07:02:16 -08:00
Guang Zhu
8fa213f4c5 Revert "Make NDC not block forever and handle restart."
Reverting because it seems to break `adb reboot`

This reverts commit 5c7de0b4ec.

Change-Id: I75d827664a08799de15369c24c84cc3f49a8f297
2012-02-07 19:25:42 -08:00
Robert Greenwalt
47f17ffe00 Merge "Make NDC not block forever and handle restart." 2012-02-07 16:19:56 -08:00
Robert Greenwalt
5c7de0b4ec Make NDC not block forever and handle restart.
Need changes in core.

Still possible for netd to get wedged but system won't die because of it.
Leads the way to having forking netd - then only individual commands would
wedge, promoting stability.

bug:5864209
Change-Id: Ifcd37511c8239fe3df7e9070869b63a9c5649bd2
2012-02-07 15:59:49 -08:00
Jeff Sharkey
ff81c2eebc Send broadcast when changing restrict background.
When changing global restrict background status, send connectivity
change broadcast, since it radically changes DISCONNECTED/BLOCKED
status system-wide.

Also reduce verbose stats logging.

Bug: 5854466
Change-Id: I3b612c520f50cc3000a3a569b7e0ab5f691cc2bd
2012-02-07 12:08:58 -08:00
Jeff Sharkey
25e3ec70aa List rotated netstats files during --checkin dump.
Also disable verbose logging.

Change-Id: I4c51e05d695eac43f0d9c28f9699f1655c642a99
2012-02-06 17:35:11 -08:00
The Android Automerger
e7c0d8fea8 merge in jb-release history after reset to master 2012-02-06 07:01:57 -08:00
Jeff Sharkey
94a315cec5 Unify shorthand for byte-based units.
Change-Id: If990859dee3f0973e1d4c48f05312c84071b3328
2012-02-03 14:50:13 -08:00
Robert Greenwalt
43dc9a2d93 Add some logging to NDC.
We're getting some lockups of netd and this can help point us
in the right direction.

bug:5864209
Change-Id: Id8bdb0a758c5b161e0143de61b5f39c3a982e329
2012-02-02 16:38:38 -08:00
Jeff Sharkey
9a21249a6c Avoid NDC deadlock when re-arming network alert.
When NDC delivers limitReached() event, NMS re-arms the alert, which
makes another call back to NDC.  If NDC already started processing
another call, this causes deadlock.

Fix this by re-arming on a handler thread.

Bug: 5879848
Change-Id: I46fa78fe1f1122c5f31dd6020483e5ae89a9f39d
2012-02-02 13:09:52 -08:00
The Android Automerger
76684e9b9e merge in jb-release history after reset to master 2012-02-01 07:01:40 -08:00
Jeff Sharkey
2ed12477de Clear identity when updating network stats.
Bug: 5945461
Change-Id: Ie51ea3f107a705c395b65684f21bf4c28c7f4d33
2012-01-31 17:13:09 -08:00
The Android Automerger
4d99fc3a83 merge in ics-release history after reset to master 2012-01-25 07:00:17 -08:00
Jeff Sharkey
0d038b7949 Match WIFI_P2P data usage.
Bug: 5405891
Change-Id: I5b815d6fc25a2f26a86c39a43fde305fcc3fb65c
2012-01-24 15:37:07 -08:00
Jeff Sharkey
bfe82685e7 Move network stats to FileRotator pattern.
Split existing network stats into two separate classes: a recorder
which generates historical data based on periodic counter snapshots,
and a collection of historical data with persistance logic.

Recorder keeps a pending history in memory until outstanding data
crosses a specific threshold.  Persisting is handled through a given
FileRotator.  This pattern significantly reduces disk churn and
memory overhead.  Separate UID data from UID tag data, enabling a
shorter rotation cycle.  Migrate existing stats into new structure.

Remove "xt" stats until iptables hooks are ready.  Avoid consuming
Entry values when recording into NetworkStatsHistory.  Assign
operation counts to default route interface.

Introduce "Rewriter" interface in FileRotator with methods to enable
rewriteAll().  Introduce IndentingPrintWriter to handle indenting in
dump() methods.

Bug: 5386531
Change-Id: Ibe086230a17999a197206ca62d45f266225fdff1
2012-01-24 11:13:14 -08:00
The Android Automerger
0285082e32 merge in ics-release history after reset to master 2012-01-23 07:00:41 -08:00
Jean-Baptiste Queru
e32bcef8e1 am 45470559: (-s ours) am 12b7da69: am 6df477be: Merge "Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)"
* commit '45470559cd4a499fd5d38cf708f0b531dc081fed':
  Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
2012-01-20 16:37:49 -08:00
Robert Greenwalt
e3a7f729ed Log netd traffic nicely.
Create a LocalLog class for logging within a service for dumping in dumps.
Use it in the NativeDaemonConnector so we can get some insight into what
is happening in these lockups.

bug:5864209
Change-Id: I68ddc58847f3c8de613be9528570f8c3157d8274
2012-01-20 10:37:11 -08:00
Steve Block
2c14cae49e Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
2012-01-19 14:45:03 -08:00
The Android Automerger
797058fbcf merge in ics-release history after reset to master 2012-01-11 10:16:05 -08:00
Jeff Sharkey
f6351440e4 Merge "Move non-monotonic reporting to interface." 2012-01-10 17:41:01 -08:00
Jeff Sharkey
ef7bded347 Move non-monotonic reporting to interface.
Report non-monotonic NetworkStats through an observer interface
instead of throwing, since those events are still recoverable.

Change-Id: Ic0749f4634b0ac05dbe90e95ca490957ec8b2f23
2012-01-10 17:24:44 -08:00
The Android Automerger
ffbb970a3c merge in ics-release history after reset to master 2012-01-10 07:00:19 -08:00