xref: /aosp_15_r20/tools/netsim/proto/netsim/hci_packet.proto (revision cf78ab8cffb8fc9207af348f23af247fb04370a6)
1// Copyright (C) 2021 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14syntax = "proto3";
15
16package netsim.packet;
17
18option java_multiple_files = true;
19option java_package = "com.android.emulation.bluetooth";
20option csharp_namespace = "Android.Emulation.Bluetooth";
21option objc_class_prefix = "AEB";
22option cc_enable_arenas = true;
23
24// A packet that is exchanged between the bluetooth chip and higher layers.
25message HCIPacket {
26  enum PacketType {
27    // The packet is unspecified, and contains raw bytes.
28    // This is mainly here to protect against compatibility issues that can
29    // arise if new enum fields are ever introduced.
30    // See: https://developers.google.com/protocol-buffers/docs/style#enums
31    HCI_PACKET_UNSPECIFIED = 0;
32
33    // HCI Command Packets: commands are issued by the HCI Driver to the
34    // Host Controller:
35    COMMAND = 1;
36
37    // ACL (asynchronous connectionless) packet.
38    ACL = 2;
39
40    // SCO (synchronous connection orientated) packet.
41    SCO = 3;
42
43    // HCI Event Packets.
44    EVENT = 4;
45
46    // Isochronous Channel, a data transmissions that are time-sensitive
47    // and synchronized rendering of these data streams across multiple
48    // receivers. See
49    // https://www.novelbits.io/bluetooth-version-5-2-le-audio/ for an
50    // overview of ISO channels.
51    ISO = 5;
52  }
53
54  // Indicates the type of packet contained in the packet bytes.
55  PacketType packet_type = 1;
56
57  // The actual data that was transferred.
58  bytes packet = 2;
59}