blob: 0b4c9f2039d8c7268973230caa7942659e1d7299 [file] [log] [blame]
// 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 {
-> OnPhyAdded(uint16 phy_id);
-> OnPhyRemoved(uint16 phy_id);
-> OnIfaceAdded(uint16 iface_id);
-> OnIfaceRemoved(uint16 iface_id);
};
[Discoverable]
interface DeviceService {
// Phy methods
ListPhys() -> (ListPhysResponse resp);
QueryPhy(QueryPhyRequest req) -> (int32 status, QueryPhyResponse? resp);
// 3-15: reserved
// Iface methods
ListIfaces() -> (ListIfacesResponse resp);
QueryIface(uint16 iface_id) -> (int32 status, QueryIfaceResponse? resp);
CreateIface(CreateIfaceRequest req) -> (int32 status, CreateIfaceResponse? resp);
// 19: reserved for StartIface
// 20: reserved for StopIface
DestroyIface(DestroyIfaceRequest req) -> (int32 status);
GetClientSme(uint16 iface_id, request<fuchsia.wlan.sme.ClientSme> sme) -> (int32 status);
GetApSme(uint16 iface_id, request<fuchsia.wlan.sme.ApSme> sme) -> (int32 status);
GetMeshSme(uint16 iface_id, request<fuchsia.wlan.sme.MeshSme> sme) -> (int32 status);
GetIfaceStats(uint16 iface_id) -> (int32 status, fuchsia.wlan.stats.IfaceStats? stats);
GetMinstrelList(uint16 iface_id) -> (int32 status, fuchsia.wlan.minstrel.Peers peers);
GetMinstrelStats(uint16 iface_id, array<uint8>:6 peer_addr)
-> (int32 status, fuchsia.wlan.minstrel.Peer? peer);
WatchDevices(request<DeviceWatcher> watcher);
};