| // Copyright 2018 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.wlan.device.service; |
| |
| using fuchsia.wlan.device; |
| using fuchsia.wlan.minstrel; |
| using fuchsia.wlan.sme; |
| using fuchsia.wlan.stats; |
| |
| struct PhyListItem { |
| uint16 phy_id; |
| string path; |
| }; |
| |
| struct ListPhysResponse { |
| vector<PhyListItem> phys; |
| }; |
| |
| struct QueryPhyRequest { |
| uint16 phy_id; |
| }; |
| |
| struct QueryPhyResponse { |
| fuchsia.wlan.device.PhyInfo info; |
| }; |
| |
| struct IfaceListItem { |
| uint16 iface_id; |
| string path; |
| }; |
| |
| struct QueryIfaceResponse { |
| fuchsia.wlan.device.MacRole role; |
| uint16 id; |
| string dev_path; |
| array<uint8>:6 mac_addr; |
| }; |
| |
| struct ListIfacesResponse { |
| vector<IfaceListItem> ifaces; |
| }; |
| |
| struct CreateIfaceRequest { |
| uint16 phy_id; |
| fuchsia.wlan.device.MacRole role; |
| }; |
| |
| struct CreateIfaceResponse { |
| uint16 iface_id; |
| }; |
| |
| struct DestroyIfaceRequest { |
| uint16 phy_id; |
| uint16 iface_id; |
| }; |
| |
| interface DeviceWatcher { |
| 1: -> OnPhyAdded(uint16 phy_id); |
| 2: -> OnPhyRemoved(uint16 phy_id); |
| 3: -> OnIfaceAdded(uint16 iface_id); |
| 4: -> OnIfaceRemoved(uint16 iface_id); |
| }; |
| |
| [Discoverable] |
| interface DeviceService { |
| // Phy methods |
| 1: ListPhys() -> (ListPhysResponse resp); |
| 2: QueryPhy(QueryPhyRequest req) -> (int32 status, QueryPhyResponse? resp); |
| // 3-15: reserved |
| |
| // Iface methods |
| 16: ListIfaces() -> (ListIfacesResponse resp); |
| 17: QueryIface(uint16 iface_id) -> (int32 status, QueryIfaceResponse? resp); |
| 18: CreateIface(CreateIfaceRequest req) -> (int32 status, CreateIfaceResponse? resp); |
| // 19: reserved for StartIface |
| // 20: reserved for StopIface |
| 21: DestroyIface(DestroyIfaceRequest req) -> (int32 status); |
| 22: GetClientSme(uint16 iface_id, request<fuchsia.wlan.sme.ClientSme> sme) -> (int32 status); |
| 23: GetApSme(uint16 iface_id, request<fuchsia.wlan.sme.ApSme> sme) -> (int32 status); |
| 24: GetMeshSme(uint16 iface_id, request<fuchsia.wlan.sme.MeshSme> sme) -> (int32 status); |
| 30: GetIfaceStats(uint16 iface_id) -> (int32 status, fuchsia.wlan.stats.IfaceStats? stats); |
| 31: GetMinstrelList(uint16 iface_id) -> (int32 status, fuchsia.wlan.minstrel.Peers peers); |
| 32: GetMinstrelStats(uint16 iface_id, array<uint8>:6 peer_addr) |
| -> (int32 status, fuchsia.wlan.minstrel.Peer? peer); |
| |
| 100: WatchDevices(request<DeviceWatcher> watcher); |
| }; |