OSDN Git Service

Revert "Use new netlink attribute for scan result timestamp" am: ecb6bb205f
[android-x86/system-connectivity-wificond.git] / server.h
index 5ceca25..8fc3d77 100644 (file)
--- a/server.h
+++ b/server.h
@@ -40,6 +40,8 @@ class NL80211Packet;
 class NetlinkUtils;
 class ScanUtils;
 
+struct InterfaceInfo;
+
 class Server : public android::net::wifi::BnWificond {
  public:
   Server(std::unique_ptr<wifi_system::InterfaceTool> if_tool,
@@ -79,6 +81,7 @@ class Server : public android::net::wifi::BnWificond {
       std::vector<android::sp<android::IBinder>>* out_client_ifs) override;
   android::binder::Status GetApInterfaces(
       std::vector<android::sp<android::IBinder>>* out_ap_ifs) override;
+  status_t dump(int fd, const Vector<String16>& args) override;
 
   // Call this once on startup.  It ignores all the invariants held
   // in wificond and tries to restore ourselves to a blank state by
@@ -91,9 +94,7 @@ class Server : public android::net::wifi::BnWificond {
   // interface on behalf of createApInterace(), it is Hostapd that configure
   // the interface to Ap mode later.
   // Returns true on success, false otherwise.
-  bool SetupInterface(std::string* interface_name,
-                      uint32_t* interface_index,
-                      std::vector<uint8_t>* interface_mac_addr);
+  bool SetupInterface(InterfaceInfo* interface);
   bool RefreshWiphyIndex();
   void LogSupportedBands();
   void OnRegDomainChanged(std::string& country_code);
@@ -105,6 +106,7 @@ class Server : public android::net::wifi::BnWificond {
       android::sp<android::net::wifi::IClientInterface> network_interface);
   void BroadcastApInterfaceTornDown(
       android::sp<android::net::wifi::IApInterface> network_interface);
+  void MarkDownAllInterfaces();
 
   const std::unique_ptr<wifi_system::InterfaceTool> if_tool_;
   const std::unique_ptr<wifi_system::SupplicantManager> supplicant_manager_;
@@ -120,6 +122,9 @@ class Server : public android::net::wifi::BnWificond {
 
   std::unique_ptr<RttControllerImpl> rtt_controller_;
 
+  // Cached interface list from kernel.
+  std::vector<InterfaceInfo> interfaces_;
+
   DISALLOW_COPY_AND_ASSIGN(Server);
 };