/system/connectivity/wificond/net/ |
H A D | mlme_event.cpp | 35 bool GetCommonFields(const NL80211Packet* packet, argument 38 if (!packet->GetAttributeValue(NL80211_ATTR_IFINDEX, if_index)) { 43 if (!packet->GetAttributeValue(NL80211_ATTR_MAC, bssid)) { 52 const NL80211Packet* packet) { 53 if (packet->GetCommand() != NL80211_CMD_ASSOCIATE) { 58 if (!GetCommonFields(packet, 68 associate_event->is_timeout_ = packet->HasAttribute(NL80211_ATTR_TIMED_OUT); 74 const NL80211Packet* packet) { 75 if (packet->GetCommand() != NL80211_CMD_CONNECT) { 79 if (!GetCommonFields(packet, 51 InitFromPacket( const NL80211Packet* packet) argument 73 InitFromPacket( const NL80211Packet* packet) argument 95 InitFromPacket( const NL80211Packet* packet) argument 116 InitFromPacket( const NL80211Packet* packet) argument 130 InitFromPacket( const NL80211Packet* packet) argument [all...] |
H A D | netlink_utils.cpp | 68 for (auto& packet : response) { 69 if (packet->GetMessageType() == NLMSG_ERROR) { 71 << strerror(packet->GetErrorCode()); 74 if (packet->GetMessageType() != netlink_manager_->GetFamilyId()) { 76 << packet->GetMessageType(); 79 if (packet->GetCommand() != NL80211_CMD_NEW_WIPHY) { 82 << static_cast<int>(packet->GetCommand()); 85 if (!packet->GetAttributeValue(NL80211_ATTR_WIPHY, out_wiphy_index)) { 113 for (auto& packet : response) { 114 if (packet 231 ParseScanCapabilities( const NL80211Packet* const packet, ScanCapabilities* out_scan_capabilities) argument 276 ParseBandInfo(const NL80211Packet* const packet, BandInfo* out_band_info) argument [all...] |
H A D | nl80211_packet.cpp | 31 NL80211Packet::NL80211Packet(const NL80211Packet& packet) { argument 32 data_ = packet.data_; 60 // Verify the size of packet. 175 // We don't need to worry about padding for a nl80211 packet.
|
/system/bt/hci/src/ |
H A D | btsnoop_mem.cc | 27 void btsnoop_mem_capture(const BT_HDR* packet, uint64_t timestamp_us) { argument 30 CHECK(packet); 32 const uint8_t* data = &packet->data[packet->offset]; 33 const uint16_t type = packet->event & BT_EVT_MASK; 38 if (packet->len > 2) length = data[2] + 3; 42 if (packet->len > 1) length = data[1] + 2; 47 if (packet->len > 3) length = (data[2] | (data[3] << 8)) + 4; 52 if (packet->len > 2) length = data[2] + 3;
|
H A D | hci_layer_android.cc | 51 BT_HDR* packet); 52 extern void acl_event_received(BT_HDR* packet); 53 extern void sco_data_received(BT_HDR* packet); 65 BT_HDR* packet = local 67 packet->offset = 0; 68 packet->len = data.size(); 69 packet->layer_specific = 0; 70 packet->event = event; 73 memcpy(packet->data, data.data(), data.size()); 74 return packet; 84 BT_HDR* packet = WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_EVT, event); local 90 BT_HDR* packet = WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_ACL, data); local 96 BT_HDR* packet = WrapPacketAndCopy(MSG_HC_TO_STACK_HCI_SCO, data); local 125 hci_transmit(BT_HDR* packet) argument 168 hci_log_firmware_debug_packet(int fd, BT_HDR* packet) argument [all...] |
H A D | hci_inject.cc | 52 static int hci_packet_to_event(hci_packet_t packet); 113 static int hci_packet_to_event(hci_packet_t packet) { argument 114 switch (packet) { 122 LOG_ERROR(LOG_TAG, "%s unsupported packet type: %d", __func__, packet); 172 // the 2-byte size field since it will be contained in the packet. 183 LOG_ERROR(LOG_TAG, "%s dropping injected packet of length %zu", __func__,
|
H A D | btsnoop.cc | 83 static void btsnoop_write_packet(packet_type_t type, uint8_t* packet, 237 static void btsnoop_write_packet(packet_type_t type, uint8_t* packet, argument 244 length_he = packet[2] + 4; 248 length_he = (packet[3] << 8) + packet[2] + 5; 252 length_he = packet[2] + 4; 256 length_he = packet[1] + 3; 270 btsnoop_net_write(packet, length_he - 1); 279 {reinterpret_cast<void*>(packet), length_he - 1}};
|
H A D | hci_packet_factory.cc | 49 BT_HDR* packet = make_command(HCI_HOST_BUFFER_SIZE, parameter_size, &stream); local 55 return packet; 73 BT_HDR* packet = local 77 return packet; 83 BT_HDR* packet = local 87 return packet; 93 BT_HDR* packet = local 97 return packet; 103 BT_HDR* packet = make_command(HCI_SET_EVENT_MASK, parameter_size, &stream); local 106 return packet; 113 BT_HDR* packet = local 161 BT_HDR* packet = local 176 BT_HDR* packet = make_packet(HCI_COMMAND_PREAMBLE_SIZE + parameter_size); local [all...] |
H A D | packet_fragmenter.cc | 58 static void fragment_and_dispatch(BT_HDR* packet) { argument 59 CHECK(packet != NULL); 61 uint16_t event = packet->event & MSG_EVT_MASK; 62 uint8_t* stream = packet->data + packet->offset; 66 callbacks->fragmented(packet, true); 71 SUB_EVENT(packet->event) == LOCAL_BR_EDR_CONTROLLER_ID 76 uint16_t remaining_length = packet->len; 83 // Make sure we use the right ACL packet size 84 stream = packet 120 reassemble_and_dispatch(UNUSED_ATTR BT_HDR* packet) argument [all...] |
H A D | hci_layer_linux.cc | 97 BT_HDR* packet); 98 extern void acl_event_received(BT_HDR* packet); 99 extern void sco_data_received(BT_HDR* packet); 118 LOG(FATAL) << "This packet filled buffer, if it have continuation we " 124 BT_HDR* packet = local 126 packet->offset = 0; 127 packet->layer_specific = 0; 128 packet->len = len - 1; 129 memcpy(packet->data, buf + 1, len - 1); 133 packet 248 hci_transmit(BT_HDR* packet) argument 400 hci_log_firmware_debug_packet(int fd, BT_HDR* packet) argument [all...] |
/system/core/debuggerd/tombstoned/ |
H A D | tombstoned_client.cpp | 45 TombstonedCrashPacket packet = {}; local 46 packet.packet_type = CrashPacketType::kDumpRequest; 47 packet.packet.dump_request.pid = pid; 48 packet.packet.dump_request.dump_type = dump_type; 49 if (TEMP_FAILURE_RETRY(write(sockfd, &packet, sizeof(packet))) != sizeof(packet)) { 50 async_safe_format_log(ANDROID_LOG_ERROR, "libc", "failed to write DumpRequest packet 84 TombstonedCrashPacket packet = {}; local [all...] |
/system/core/libappfuse/tests/ |
H A D | FuseBufferTest.cc | 45 FuseRequest* const packet = reinterpret_cast<FuseRequest*>(buffer); local 46 packet->header.len = headerSize; 47 ASSERT_NE(-1, write(fd, packet, write_size)) << strerror(errno); 50 EXPECT_FALSE(packet->Read(fd)); 58 FuseRequest* const packet = reinterpret_cast<FuseRequest*>(buffer); local 59 packet->header.len = size; 60 EXPECT_FALSE(packet->Write(fd));
|
/system/bt/test/rootcanal/ |
H A D | bluetooth_hci.cc | 132 Return<void> BluetoothHci::sendHciCommand(const hidl_vec<uint8_t>& packet) { argument 133 async_manager_.ExecAsync(std::chrono::milliseconds(0), [this, packet]() { 134 uint16_t opcode = packet[0] | (packet[1] << 8); 137 for (size_t i = 3; i < packet.size(); i++) 138 command->AddPayloadOctets1(packet[i]); 145 Return<void> BluetoothHci::sendAclData(const hidl_vec<uint8_t>& /* packet */) { 150 Return<void> BluetoothHci::sendScoData(const hidl_vec<uint8_t>& /* packet */) {
|
/system/bt/vendor_libs/test_vendor_lib/test/ |
H A D | packet_stream_unittest.cc | 20 #include "packet.h" 58 vector<uint8_t> packet; local 60 packet.push_back(DATA_TYPE_COMMAND); 61 packet.push_back(opcode); 62 packet.push_back(opcode >> 8); 63 packet.push_back(payload_size); 65 // Set the packet's payload. 66 for (int i = 0; i < payload_size; ++i) packet.push_back(payload[i]); 68 // Send the packet to |packet_stream_|. 69 write(socketpair_fds_[1], &packet[ [all...] |
/system/core/debuggerd/ |
H A D | protocol.h | 49 // The full packet must always be written, regardless of whether the union is used. 54 } packet; member in struct:TombstonedCrashPacket 58 // This packet should be sent before an actual dump happens.
|
/system/bt/hci/test/ |
H A D | packet_fragmenter_test.cc | 70 BT_HDR* packet = (BT_HDR*)osi_malloc(size + sizeof(BT_HDR)); local 71 packet->len = size; 72 packet->offset = 0; 73 packet->event = event; 74 packet->layer_specific = 0; 75 uint8_t* packet_data = packet->data; 83 return packet; 87 BT_HDR* packet, const char* expected_data, 89 uint8_t* data = packet->data + packet 86 expect_packet_fragmented(uint16_t event, int max_acl_data_size, BT_HDR* packet, const char* expected_data, bool send_complete) argument 146 BT_HDR* packet = (BT_HDR*)osi_malloc(length_to_send + 4 + sizeof(BT_HDR)); local 168 BT_HDR* packet = (BT_HDR*)osi_malloc(data_length + sizeof(BT_HDR)); local 179 expect_packet_reassembled(uint16_t event, BT_HDR* packet, const char* expected_data) argument [all...] |
/system/bt/tools/hci/ |
H A D | main.c | 32 static bool write_hci_command(hci_packet_t type, const void* packet, 48 "(pcm|i2s|uart) - sets the SCO packet route to one of the specified " 80 uint8_t packet[] = {0x1A, 0x0C, 0x01, 0x00}; local 81 if (argv[0][0] == 't') packet[ARRAY_SIZE(packet) - 1] = 0x03; 83 return !write_hci_command(HCI_PACKET_COMMAND, packet, ARRAY_SIZE(packet)); 98 uint8_t packet[251] = {0x13, 0x0C, 248}; local 99 memcpy(&packet[3], argv[0], len + 1); 101 if (!write_hci_command(HCI_PACKET_COMMAND, packet, sizeo 125 uint8_t packet[] = {0x24, 0xFC, 0x01, 0x00}; local 150 uint8_t packet[] = {0x1C, 0xFC, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00}; local 176 write_hci_command(hci_packet_t type, const void* packet, size_t length) argument [all...] |
/system/core/libnetutils/ |
H A D | packet.c | 164 } packet; local 170 nread = read(s, &packet, sizeof(packet)); 175 * The raw packet interface gives us all packets received by the 184 } else if (packet.ip.version != IPVERSION || packet.ip.ihl != (sizeof(packet.ip) >> 2)) { 186 ALOGD("Not a valid IP packet"); 188 } else if (nread < ntohs(packet.ip.tot_len)) { 190 ALOGD("Packet was truncated (read %d, needed %d)", nread, ntohs(packet [all...] |
/system/nfc/src/adaptation/ |
H A D | debug_nfcsnoop.cc | 112 void nfcsnoop_capture(const NFC_HDR* packet, bool is_received) { argument 117 uint8_t* p = (uint8_t*)(packet + 1) + packet->offset; 122 } else if (packet->len > 2) {
|
/system/bt/stack/l2cap/ |
H A D | l2cap_client.cc | 55 static void read_ready_cb(uint16_t local_channel_id, BT_HDR* packet); 59 static void fragment_packet(l2cap_client_t* client, buffer_t* packet); 175 bool l2cap_client_write(l2cap_client_t* client, buffer_t* packet) { argument 177 CHECK(packet != NULL); 182 fragment_packet(client, packet); 362 static void read_ready_cb(uint16_t local_channel_id, BT_HDR* packet) { argument 373 buffer_t* buffer = buffer_new(packet->len); 374 memcpy(buffer_ptr(buffer), packet->data + packet->offset, packet 388 fragment_packet(l2cap_client_t* client, buffer_t* packet) argument 428 BT_HDR* packet = (BT_HDR*)list_front(client->outbound_fragments); local [all...] |
/system/connectivity/wificond/scanning/ |
H A D | scan_utils.cpp | 95 for (auto& packet : response) { 96 if (packet->GetMessageType() == NLMSG_ERROR) { 98 << strerror(packet->GetErrorCode()); 101 if (packet->GetMessageType() != netlink_manager_->GetFamilyId()) { 103 << packet->GetMessageType(); 107 if (!packet->GetAttributeValue(NL80211_ATTR_IFINDEX, &if_index)) { 117 if (!ParseScanResult(std::move(packet), &scan_result)) { 126 bool ScanUtils::ParseScanResult(unique_ptr<const NL80211Packet> packet, argument 128 if (packet->GetCommand() != NL80211_CMD_NEW_SCAN_RESULTS) { 133 if (packet [all...] |
/system/connectivity/wificond/tests/ |
H A D | netlink_utils_unittest.cpp | 86 void AppendScanCapabilitiesAttributes(NL80211Packet* packet, argument 88 packet->AddAttribute(NL80211Attr<uint8_t>(NL80211_ATTR_MAX_NUM_SCAN_SSIDS, 90 packet->AddAttribute(NL80211Attr<uint8_t>( 93 packet->AddAttribute(NL80211Attr<uint8_t>(NL80211_ATTR_MAX_MATCH_SETS, 96 packet->AddAttribute(NL80211Attr<uint32_t>( 99 packet->AddAttribute(NL80211Attr<uint32_t>( 102 packet->AddAttribute(NL80211Attr<uint32_t>( 108 void AppendBandInfoAttributes(NL80211Packet* packet) { argument 150 packet->AddAttribute(band_attr); 153 void AppendWiphyFeaturesAttributes(NL80211Packet* packet) { argument [all...] |
/system/core/liblog/tests/ |
H A D | liblog_benchmark.cpp | 222 struct packet { struct 227 alignas(8) char buf[sizeof(struct packet) + 8]; 229 struct packet* buffer = (struct packet*)(((uintptr_t)buf + 7) & ~7); 296 struct packet { struct 301 alignas(8) char buf[sizeof(struct packet) + 8]; 303 struct packet* buffer = (struct packet*)((((uintptr_t)buf + 7) & ~7) + 1); 370 struct packet { struct 375 alignas(8) char buf[sizeof(struct packet) 442 struct packet { struct [all...] |
/system/bt/btif/src/ |
H A D | btif_pan.cc | 417 char packet[TAP_MAX_PKT_WRITE_LEN + sizeof(tETH_HDR)]; local 418 memcpy(packet, ð_hdr, sizeof(tETH_HDR)); 420 LOG_ERROR(LOG_TAG, "btpan_tap_send eth packet size:%d is exceeded limit!", 424 memcpy(packet + sizeof(tETH_HDR), buf, len); 428 OSI_NO_INTR(ret = write(tap_fd, packet, len + sizeof(tETH_HDR))); 680 uint8_t* packet = (uint8_t*)buffer + sizeof(BT_HDR) + buffer->offset; local 682 // If we don't have an undelivered packet left over, pull one from the TAP 711 memcpy(packet, btpan_cb.congest_packet, 715 if (buffer->len > sizeof(tETH_HDR) && should_forward((tETH_HDR*)packet)) { 721 memcpy(&hdr, packet, sizeo [all...] |
H A D | btif_sock_l2cap.cc | 56 struct packet { struct 57 struct packet *next, *prev; 76 struct packet* first_packet; // fist packet to be delivered to app 77 struct packet* last_packet; // last packet to be delivered to app 116 struct packet* p = sock->first_packet; 135 static struct packet* packet_alloc(const uint8_t* data, uint32_t len) { 136 struct packet* p = (struct packet*)osi_callo [all...] |