| // Copyright (C) 2021 The Android Open Source Project |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| syntax = "proto3"; |
| |
| package netsim.packet; |
| |
| option java_multiple_files = true; |
| option java_package = "com.android.emulation.bluetooth"; |
| option csharp_namespace = "Android.Emulation.Bluetooth"; |
| option objc_class_prefix = "AEB"; |
| option cc_enable_arenas = true; |
| |
| // A packet that is exchanged between the bluetooth chip and higher layers. |
| message HCIPacket { |
| enum PacketType { |
| // The packet is unspecified, and contains raw bytes. |
| // This is mainly here to protect against compatibility issues that can |
| // arise if new enum fields are ever introduced. |
| // See: https://developers.google.com/protocol-buffers/docs/style#enums |
| HCI_PACKET_UNSPECIFIED = 0; |
| |
| // HCI Command Packets: commands are issued by the HCI Driver to the |
| // Host Controller: |
| COMMAND = 1; |
| |
| // ACL (asynchronous connectionless) packet. |
| ACL = 2; |
| |
| // SCO (synchronous connection orientated) packet. |
| SCO = 3; |
| |
| // HCI Event Packets. |
| EVENT = 4; |
| |
| // Isochronous Channel, a data transmissions that are time-sensitive |
| // and synchronized rendering of these data streams across multiple |
| // receivers. See |
| // https://www.novelbits.io/bluetooth-version-5-2-le-audio/ for an |
| // overview of ISO channels. |
| ISO = 5; |
| } |
| |
| // Indicates the type of packet contained in the packet bytes. |
| PacketType packet_type = 1; |
| |
| // The actual data that was transferred. |
| bytes packet = 2; |
| } |