diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-12-29 19:19:49 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-12-29 19:22:35 +0100 |
| commit | f02201ce9abdc8b21dee6870bf978ef0ba988a2f (patch) | |
| tree | cacac16769464f72959e4577fb02b42c7ac2a792 /sys/linux/socket_bluetooth.txt | |
| parent | 79059de1772b74a9068e3b6a907a692e3414a369 (diff) | |
sys/linux: describe /dev/vhci interface
Diffstat (limited to 'sys/linux/socket_bluetooth.txt')
| -rw-r--r-- | sys/linux/socket_bluetooth.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/linux/socket_bluetooth.txt b/sys/linux/socket_bluetooth.txt index e88d5bdf9..6b75fd4cf 100644 --- a/sys/linux/socket_bluetooth.txt +++ b/sys/linux/socket_bluetooth.txt @@ -13,6 +13,7 @@ include <net/bluetooth/cmtp/cmtp.h> include <net/bluetooth/bnep/bnep.h> include <net/bluetooth/hidp/hidp.h> include <net/bluetooth/sco.h> +include <net/bluetooth/hci.h> include <net/bluetooth/rfcomm.h> include <asm/ioctls.h> @@ -28,6 +29,33 @@ setsockopt$bt_hci_HCI_TIME_STAMP(fd sock_bt_hci, level const[0], opt const[HCI_T setsockopt$bt_hci_HCI_FILTER(fd sock_bt_hci, level const[0], opt const[HCI_FILTER], arg ptr[in, hci_ufilter], arglen len[arg]) getsockopt$bt_hci(fd sock, level const[0], opt flags[bt_hci_sockopt], arg buffer[out], arglen ptr[inout, len[arg, int32]]) +resource fd_vhci[fd] +openat$vhci(fd const[AT_FDCWD], file ptr[in, string["/dev/vhci"]], flags flags[open_flags]) fd_vhci +write$vhci(fd fd_vhci, data ptr[in, vhci_command], size bytesize[data]) + +vhci_command [ + HCI_EVENT_PKT vhci_command_generic[HCI_EVENT_PKT] + HCI_ACLDATA_PKT vhci_command_generic[HCI_ACLDATA_PKT] + HCI_SCODATA_PKT vhci_command_generic[HCI_SCODATA_PKT] + HCI_VENDOR_PKT vhci_command_vendor_pkt +] [varlen] + +type vhci_command_generic[CMD] { + cmd const[CMD, int8] +# TODO: what's the format of these packets? Is there anything interesting? + data array[int8] +} + +vhci_command_vendor_pkt { + cmd const[HCI_VENDOR_PKT, int8] + opcode flags[vhci_vendor_pkt_opcode, int8] +} + +vhci_vendor_pkt_opcode = HCI_PRIMARY, HCI_AMP, HCI_EXTERNAL_CONFIG, HCI_RAW_DEVICE + +define HCI_EXTERNAL_CONFIG 0x40 +define HCI_RAW_DEVICE 0x80 + resource sock_bt_sco[sock_bt] syz_init_net_socket$bt_sco(fam const[AF_BLUETOOTH], type const[SOCK_SEQPACKET], proto const[BTPROTO_SCO]) sock_bt_sco |
