summaryrefslogtreecommitdiffstats
path: root/server.cpp
diff options
context:
space:
mode:
authorNingyuan Wang <nywang@google.com>2017-04-07 16:03:33 -0700
committerNingyuan Wang <nywang@google.com>2017-04-19 17:25:45 -0700
commit8ec7696f5111abb46d12a6bd1f2e27d8b8291b34 (patch)
treee308f25b167104b29c59b56d83933646a3af778a /server.cpp
parent099ee0c764bd579899ef5fc65a4cc669c55a87c9 (diff)
downloadplatform_system_connectivity_wificond-8ec7696f5111abb46d12a6bd1f2e27d8b8291b34.tar.gz
platform_system_connectivity_wificond-8ec7696f5111abb46d12a6bd1f2e27d8b8291b34.tar.bz2
platform_system_connectivity_wificond-8ec7696f5111abb46d12a6bd1f2e27d8b8291b34.zip
Add dump state for wificond interface classes
This allows wificond's ClientInterfaceImpl and ApInterfaceImpl to dump state. The dump state includes scan capabilities, wiphy features, and number of current associated stations for AP mode. This also adds the missing const keyword for IsAssociated(). Bug: 31336376 Test: compile, manual test Sample dump output: Current wiphy index: 0 Cached interfaces list from kernel message: Interface index: 23, name: p2p0, mac address: 66:bc:0c:47:df:00 Interface index: 22, name: wlan0, mac address: 64:bc:0c:47:df:00 ------- Dump of client interface with index: 22 and name: wlan0------- Max number of ssids for single shot scan: 10 Max number of ssids for scheduled scan: 16 Max number of match sets for scheduled scan: 16 Device supports random MAC for single shot scan: 1 Device supports random MAC for scheduled scan: 1 ------- Dump End ------- --------- 0.004s was the duration of dumpsys wificond Change-Id: I862974af743ca6ca303dfc1a4f6c773dd5b7a03e
Diffstat (limited to 'server.cpp')
-rw-r--r--server.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/server.cpp b/server.cpp
index 808f3bc..595fd8a 100644
--- a/server.cpp
+++ b/server.cpp
@@ -207,6 +207,14 @@ status_t Server::dump(int fd, const Vector<String16>& /*args*/) {
<< LoggingUtils::GetMacString(iface.mac_address) << endl;
}
+ for (const auto& iface : client_interfaces_) {
+ iface->Dump(&ss);
+ }
+
+ for (const auto& iface : ap_interfaces_) {
+ iface->Dump(&ss);
+ }
+
if (!WriteStringToFd(ss.str(), fd)) {
PLOG(ERROR) << "Failed to dump state to fd " << fd;
return FAILED_TRANSACTION;