blob: 720574c1de084c2c7728dbe16909f78f8ce7a13a [file] [log] [blame]
// Copyright 2020 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.bluetooth.sys;
/// The security level required for this pairing - corresponds to the security
/// levels defined in the Security Manager Protocol in Vol 3, Part H, Section 2.3.1
type PairingSecurityLevel = strict enum {
/// Encrypted without MITM protection (unauthenticated)
ENCRYPTED = 1;
/// Encrypted with MITM protection (authenticated), although this level of security does not
/// fully protect against passive eavesdroppers
AUTHENTICATED = 2;
};
/// Whether or not the device should form a bluetooth bond during the pairing prodecure.
/// As described in Core Spec v5.2 | Vol 3, Part C, Sec 4.3
type BondableMode = strict enum {
/// The device will form a bond during pairing with peers
BONDABLE = 1;
/// The device will not form a bond during pairing with peers
NON_BONDABLE = 2;
};
/// Parameters that give a caller more fine-grained control over the pairing process. All of the
/// fields of this table are optional and pairing can still succeed if none of them are set.
type PairingOptions = table {
/// Only relevant for LE. If present, determines the Security Manager security level to pair
/// with. If not present, interpreted as PairingSecurityLevel.AUTHENTICATED.
1: le_security_level PairingSecurityLevel;
/// If transport is LOW_ENERGY or DUAL_MODE, whether the device should form a bond or not during
/// pairing. If not present, interpreted as bondable mode.
///
/// If transport is CLASSIC, this option must be absent or otherwise the value BONDABLE.
/// NON_BONDABLE mode is not currently supported for the CLASSIC transport
// TODO(fxbug.dev/42403): Support NON_BONDABLE for the CLASSIC transport.
2: bondable_mode BondableMode;
/// If transport is LOW_ENERGY, indicate a desire to pair over the LE transport.
/// If transport is CLASSIC, indicate a desire to pair over the Br/Edr transport.
/// If transport is DUAL_MODE, indicate a desire to pair over both transports.
/// If not present, interpreted as TechnologyType.DUAL_MODE
3: transport TechnologyType;
};