blob: 6f32c31dc1f4b30a0c2b95e63c5e7b51f328e7b5 [file] [log] [blame]
// Copyright 2019 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.policy;
// Basic definitions for wlan APIs.
/// High level protection type for the network. This does not convey all details needed
/// for the mechanism of the connection, but is primarily used to map the target network
/// to proper scan results.
enum SecurityType {
NONE = 1;
WEP = 2;
WPA = 3;
WPA2 = 4;
WPA3 = 5;
};
/// Primary means of distinguishing between available networks - the combination of
/// the (mostly) human recognizable name and the security type. The security type is used
/// to distinguish between different network protection (or lack thereof) types.
struct NetworkIdentifier {
/// Network name, often used by users to choose between networks in the UI.
bytes:32 ssid;
/// Protection type (or not) for the network.
SecurityType type;
};
/// Network information used to establish a connection.
table NetworkConfig {
/// Identifier used to represent a specific network. No guarantee for uniqueness.
1: NetworkIdentifier id;
/// Information needed to join a network.
2: Credential credential;
};
/// Information used to verify access to a target network.
flexible union Credential {
/// The network does not use credentials (open networks).
1: Empty none;
/// Plaintext password (handled as binary data).
2: bytes password;
/// Hash representation of the network passphrase (handled as binary data).
3: bytes psk;
};
/// Operating band for wlan control request and status updates.
enum OperatingBand {
/// Allows for band switching depending on device operating mode and environment.
ANY = 1;
/// Restricted to 2.4 GHz bands only.
ONLY_2_4GHZ = 2;
/// Restricted to 5 GHz bands only.
ONLY_5GHZ = 3;
};
/// Empty struct used in place of optional values.
// TODO: FIDL-589
struct Empty {
};