Lines Matching refs:packet

33 static bool write_hci_command(hci_packet_t type, const void* packet,
81 uint8_t packet[] = {0x1A, 0x0C, 0x01, 0x00}; in set_discoverable() local
82 if (argv[0][0] == 't') packet[ARRAY_SIZE(packet) - 1] = 0x03; in set_discoverable()
84 return !write_hci_command(HCI_PACKET_COMMAND, packet, ARRAY_SIZE(packet)); in set_discoverable()
99 uint8_t packet[251] = {0x13, 0x0C, 248}; in set_name() local
100 memcpy(&packet[3], argv[0], len + 1); in set_name()
102 if (!write_hci_command(HCI_PACKET_COMMAND, packet, sizeof(packet))) return 1; in set_name()
104 memset(&packet[0], 0, sizeof(packet)); in set_name()
105 packet[0] = 0x52; in set_name()
106 packet[1] = 0x0C; in set_name()
107 packet[2] = 0xF1; // HCI command packet length. in set_name()
108 packet[3] = 0x01; // FEC required. in set_name()
109 packet[4] = len + 1; in set_name()
110 packet[5] = 0x09; // Device name field tag. in set_name()
111 memcpy(&packet[6], argv[0], len); in set_name()
112 return !write_hci_command(HCI_PACKET_COMMAND, packet, 0xF4); in set_name()
126 uint8_t packet[] = {0x24, 0xFC, 0x01, 0x00}; in set_pcm_loopback() local
127 if (argv[0][0] == 't') packet[ARRAY_SIZE(packet) - 1] = 0x01; in set_pcm_loopback()
129 return !write_hci_command(HCI_PACKET_COMMAND, packet, ARRAY_SIZE(packet)); in set_pcm_loopback()
151 uint8_t packet[] = {0x1C, 0xFC, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00}; in set_sco_route() local
152 packet[3] = route; in set_sco_route()
154 return !write_hci_command(HCI_PACKET_COMMAND, packet, ARRAY_SIZE(packet)); in set_sco_route()
177 static bool write_hci_command(hci_packet_t type, const void* packet, in write_hci_command() argument
194 if (send(sock, packet, length, 0) != (ssize_t)length) goto error; in write_hci_command()