blob: 106e4a2ad125ffb44c0f94644a33374b9ed610c3 [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.
struct SecurityProperties {
bool authenticated;
bool secure_connections;
uint8 encryption_key_size;
// Represents a key that was received from a peer.
struct RemoteKey {
// The security properties of this link under which this key was received.
SecurityProperties security_properties;
// 128 bit key
array<uint8>:16 value;
// Represents a locally assigned key that is reused across bonds.
struct LocalKey {
array<uint8>:16 value;
// Represents a LE Long-Term RemoteKey. The |ediv| and |rand| fields are zero if
// distributed using LE Secure Connections pairing.
struct LTK {
RemoteKey key;
uint8 key_size;
uint16 ediv;
uint64 rand;
// The preferred LE connection parameters of the peer.
struct LEConnectionParameters {
uint16 connection_interval;
uint16 connection_latency;
uint16 supervision_timeout;
enum AddressType : uint8 {
BREDR = 2;
struct LEData {
// The identity address of the peer. If |resolvable| is true, then this is the
// resolved private address (and the |irk| is present).
string address;
AddressType address_type;
// The peer’s preferred connection parameters, if known.
LEConnectionParameters? connection_parameters;
// Known GATT service UUIDs.
vector<string:36> services;
// The LE long-term key. Present if the link was encrypted.
LTK? ltk;
// Identity Resolving RemoteKey used to generate and resolve random addresses.
RemoteKey? irk;
// Connection Signature Resolving RemoteKey used for data signing without encryption.
RemoteKey? csrk;
struct BREDRData {
// The public device address of the peer.
string address;
// True if the peer prefers to lead the piconet. This is determined by role
// switch procedures. Paging and connecting from a peer does not automatically
// set this flag.
bool piconet_leader;
// Known SDP service UUIDs.
vector<string:36> services;
// The semi-permanent BR/EDR key. Present if link was paired with Secure
// Simple Pairing or stronger.
LTK? link_key;
// Represents the bonding data for a single peer.
struct BondingData {
// The identifier that uniquely identifies this device.
string identifier;
// The local Bluetooth identity address that this bond is associated with.
string local_address;
// The name of the device, if any.
string? name;
// Bonding data that is present when this device is paired on the LE transport.
LEData? le;
// Bonding data that is present when this device is paired on the BR/EDR transport.
BREDRData? bredr;