Home
last modified time | relevance | path

Searched refs:packet (Results 1 – 25 of 298) sorted by relevance

12345678910>>...12

/system/memory/lmkd/include/
Dlmkd.h70 static inline void lmkd_pack_get_target(LMKD_CTRL_PACKET packet, int target_idx, in lmkd_pack_get_target() argument
72 target->minfree = ntohl(packet[target_idx * 2 + 1]); in lmkd_pack_get_target()
73 target->oom_adj_score = ntohl(packet[target_idx * 2 + 2]); in lmkd_pack_get_target()
80 static inline size_t lmkd_pack_set_target(LMKD_CTRL_PACKET packet, struct lmk_target* targets, in lmkd_pack_set_target() argument
83 packet[idx++] = htonl(LMK_TARGET); in lmkd_pack_set_target()
85 packet[idx++] = htonl(targets->minfree); in lmkd_pack_set_target()
86 packet[idx++] = htonl(targets->oom_adj_score); in lmkd_pack_set_target()
113 static inline void lmkd_pack_get_procprio(LMKD_CTRL_PACKET packet, int field_count, in lmkd_pack_get_procprio() argument
115 params->pid = (pid_t)ntohl(packet[1]); in lmkd_pack_get_procprio()
116 params->uid = (uid_t)ntohl(packet[2]); in lmkd_pack_get_procprio()
[all …]
/system/bt/gd/cert/
Dcaptures.py32 …lambda packet: packet.payload[0:5] == b'\x0e\x0a\x01\x09\x10', lambda packet: hci_packets.ReadBdAd…
34 … hci_packets.EventPacketView(bt_packets.PacketViewLittleEndian(list(packet.payload))))))
39 …lambda packet: packet.payload[0:2] == b'\x04\x0a', lambda packet: hci_packets.ConnectionRequestVie…
40 … hci_packets.EventPacketView(bt_packets.PacketViewLittleEndian(list(packet.payload)))))
45 …lambda packet: packet.payload[0:3] == b'\x03\x0b\x00', lambda packet: hci_packets.ConnectionComple…
46 … hci_packets.EventPacketView(bt_packets.PacketViewLittleEndian(list(packet.payload)))))
51 …lambda packet: packet.payload[0:2] == b'\x05\x04', lambda packet: hci_packets.DisconnectionComplet…
52 … hci_packets.EventPacketView(bt_packets.PacketViewLittleEndian(list(packet.payload)))))
57 …lambda packet: packet.payload[0] == 0x3e and (packet.payload[2] == 0x01 or packet.payload[2] == 0x…
58 lambda packet: hci_packets.LeConnectionCompleteView(
[all …]
Dmatchers.py101 return lambda msg: NeighborMatchers._is_matching_inquiry_result(msg.packet, address)
104 def _is_matching_inquiry_result(packet, address): argument
105 hci_event = HciMatchers.extract_hci_event_with_code(packet, EventCode.INQUIRY_RESULT)
116 … return lambda msg: NeighborMatchers._is_matching_inquiry_result_with_rssi(msg.packet, address)
119 def _is_matching_inquiry_result_with_rssi(packet, address): argument
120 … hci_event = HciMatchers.extract_hci_event_with_code(packet, EventCode.INQUIRY_RESULT_WITH_RSSI)
131 … return lambda msg: NeighborMatchers._is_matching_extended_inquiry_result(msg.packet, address)
134 def _is_matching_extended_inquiry_result(packet, address): argument
135 … hci_event = HciMatchers.extract_hci_event_with_code(packet, EventCode.EXTENDED_INQUIRY_RESULT)
148 return lambda packet: L2capMatchers._is_matching_connection_request(packet, psm)
[all …]
/system/bt/gd/packet/parser/test/
Dbig_endian_test_packets.pdl3 custom_field SixBytes : 48 "packet/parser/test/"
4 custom_field Variable "packet/parser/test/"
6 packet ParentBe {
13 packet ChildBe : ParentBe {
26 packet ParentTwoBe {
32 packet ChildTwoThreeBe : ParentTwoBe (four_bits = THREE) {
38 packet ChildTwoTwoBe : ParentTwoBe (four_bits = TWO) {
43 packet ChildTwoTwoThreeBe :ChildTwoTwoBe (more_bits = THREE) {
53 packet MiddleFourBitsBe {
61 packet ParentWithSixBytesBe {
[all …]
Dtest_packets.pdl3 custom_field SixBytes : 48 "packet/parser/test/"
4 custom_field Variable "packet/parser/test/"
6 packet Parent {
13 packet Child : Parent {
26 packet ParentTwo {
32 packet ChildTwoThree : ParentTwo (four_bits = THREE) {
38 packet ChildTwoTwo : ParentTwo (four_bits = TWO) {
43 packet ChildTwoTwoThree :ChildTwoTwo (more_bits = THREE) {
53 packet MiddleFourBits {
61 packet ParentWithSixBytes {
[all …]
/system/bt/hci/src/
Dpacket_fragmenter.cc60 static void fragment_and_dispatch(BT_HDR* packet) { in fragment_and_dispatch() argument
61 CHECK(packet != NULL); in fragment_and_dispatch()
63 uint16_t event = packet->event & MSG_EVT_MASK; in fragment_and_dispatch()
64 uint8_t* stream = packet->data + packet->offset; in fragment_and_dispatch()
68 callbacks->fragmented(packet, true); in fragment_and_dispatch()
73 SUB_EVENT(packet->event) == LOCAL_BR_EDR_CONTROLLER_ID in fragment_and_dispatch()
78 uint16_t remaining_length = packet->len; in fragment_and_dispatch()
86 stream = packet->data + packet->offset; in fragment_and_dispatch()
90 packet->len = max_packet_size; in fragment_and_dispatch()
91 callbacks->fragmented(packet, false); in fragment_and_dispatch()
[all …]
Dhci_layer_android.cc53 extern void hci_event_received(const base::Location& from_here, BT_HDR* packet);
54 extern void acl_event_received(BT_HDR* packet);
55 extern void sco_data_received(BT_HDR* packet);
56 extern void iso_data_received(BT_HDR* packet);
80 BT_HDR* packet = in WrapPacketAndCopy() local
82 packet->offset = 0; in WrapPacketAndCopy()
83 packet->len = data.size(); in WrapPacketAndCopy()
84 packet->layer_specific = 0; in WrapPacketAndCopy()
85 packet->event = event; in WrapPacketAndCopy()
88 memcpy(packet->data, data.data(), data.size()); in WrapPacketAndCopy()
[all …]
/system/bt/packet/tests/fuzzers/
DAndroid.bp9 "system/bt/packet/include",
10 "system/bt/packet/tests",
11 "system/bt/packet/tests/avrcp",
12 "system/bt/packet/base",
38 "system/bt/packet/include",
39 "system/bt/packet/tests",
40 "system/bt/packet/tests/avrcp",
41 "system/bt/packet/base",
68 "system/bt/packet/include",
69 "system/bt/packet/tests",
[all …]
/system/bt/packet/tests/base/
Diterator_test.cc51 auto packet = in TEST_F() local
53 ASSERT_DEATH(Iterator(packet, 0), "index_ >= packet->packet_start_index_"); in TEST_F()
54 ASSERT_DEATH(Iterator(packet, test_l2cap_data.size()), in TEST_F()
59 auto packet = TestPacket::Make(test_l2cap_data); in TEST_F() local
60 Iterator general_case = packet->begin(); in TEST_F()
69 auto packet = TestPacket::Make(test_l2cap_data); in TEST_F() local
70 Iterator general_case = packet->begin(); in TEST_F()
79 auto packet = GetTestPacket(); in TEST_P() local
80 ASSERT_EQ(static_cast<size_t>(packet->end() - packet->begin()), in TEST_P()
83 auto it = packet->begin(); in TEST_P()
[all …]
Dpacket_test.cc29 auto packet = TestPacket::Make( in TEST() local
33 auto new_packet = TestPacket::Make(packet); in TEST()
44 auto packet = TestPacket::Make(test_avctp_data); in TEST() local
45 ASSERT_EQ(packet->size(), test_avctp_data.size()); in TEST()
47 packet = TestPacket::Make(test_avctp_data, test_avctp_data_payload_offset, in TEST()
49 ASSERT_EQ(packet->size(), test_avrcp_data.size()); in TEST()
54 auto packet = TestPacket::Make(test_l2cap_data); in TEST() local
56 ASSERT_EQ(test_l2cap_data[i], (*packet)[i]); in TEST()
59 packet = TestPacket::Make(test_avctp_data, test_avctp_data_payload_offset, in TEST()
62 ASSERT_EQ(test_avrcp_data[i], (*packet)[i]); in TEST()
[all …]
Dpacket_builder_test.cc30 auto packet = TestPacket::Make(); in TEST() local
32 builder->Serialize(packet); in TEST()
35 ASSERT_EQ(test_l2cap_data[i], (*packet)[i]); in TEST()
46 auto packet = TestPacket::Make(); in TEST() local
47 ASSERT_EQ(packet->GetData().capacity(), 0u); in TEST()
50 builder->ReserveSpace(packet, test_l2cap_data.size()); in TEST()
52 ASSERT_GE(packet->GetData().capacity(), test_l2cap_data.size()); in TEST()
57 auto packet = TestPacket::Make(); in TEST() local
59 builder->AddPayloadOctets1(packet, 0x01u); in TEST()
60 builder->AddPayloadOctets2(packet, 0x0302u); in TEST()
[all …]
/system/core/debuggerd/tombstoned/
Dtombstoned_client.cpp47 TombstonedCrashPacket packet = {}; in tombstoned_connect() local
48 packet.packet_type = CrashPacketType::kDumpRequest; in tombstoned_connect()
49 packet.packet.dump_request.pid = pid; in tombstoned_connect()
50 packet.packet.dump_request.dump_type = dump_type; in tombstoned_connect()
51 if (TEMP_FAILURE_RETRY(write(sockfd, &packet, sizeof(packet))) != sizeof(packet)) { in tombstoned_connect()
58 ssize_t rc = ReceiveFileDescriptors(sockfd, &packet, sizeof(packet), &tmp_output_fd); in tombstoned_connect()
63 } else if (rc != sizeof(packet)) { in tombstoned_connect()
67 sizeof(packet), rc); in tombstoned_connect()
86 TombstonedCrashPacket packet = {}; in tombstoned_notify_completion() local
87 packet.packet_type = CrashPacketType::kCompletedDump; in tombstoned_notify_completion()
[all …]
/system/connectivity/wificond/net/
Dmlme_event.cpp35 bool GetCommonFields(const NL80211Packet* packet, in GetCommonFields() argument
38 if (!packet->GetAttributeValue(NL80211_ATTR_IFINDEX, if_index)) { in GetCommonFields()
43 if (!packet->GetAttributeValue(NL80211_ATTR_MAC, bssid)) { in GetCommonFields()
52 const NL80211Packet* packet) { in InitFromPacket() argument
53 if (packet->GetCommand() != NL80211_CMD_ASSOCIATE) { in InitFromPacket()
58 if (!GetCommonFields(packet, in InitFromPacket()
68 associate_event->is_timeout_ = packet->HasAttribute(NL80211_ATTR_TIMED_OUT); in InitFromPacket()
74 const NL80211Packet* packet) { in InitFromPacket() argument
75 if (packet->GetCommand() != NL80211_CMD_CONNECT) { in InitFromPacket()
79 if (!GetCommonFields(packet, in InitFromPacket()
[all …]
Dnetlink_manager.cpp54 unique_ptr<const NL80211Packet> packet) { in AppendPacket() argument
55 vec->push_back(std::move(packet)); in AppendPacket()
114 unique_ptr<NL80211Packet> packet( in ReceivePacketAndRunHandler() local
117 if (!packet->IsValid()) { in ReceivePacketAndRunHandler()
124 uint32_t sequence_number = packet->GetMessageSequence(); in ReceivePacketAndRunHandler()
128 BroadcastHandler(std::move(packet)); in ReceivePacketAndRunHandler()
141 uint32_t message_type = packet->GetMessageType(); in ReceivePacketAndRunHandler()
160 bool is_multi = packet->IsMulti(); in ReceivePacketAndRunHandler()
162 itr->second(std::move(packet)); in ReceivePacketAndRunHandler()
170 void NetlinkManager::OnNewFamily(unique_ptr<const NL80211Packet> packet) { in OnNewFamily() argument
[all …]
/system/bt/tools/hci/
Dmain.c33 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()
[all …]
/system/bt/vendor_libs/test_vendor_lib/packets/
Dlink_layer_packets.pdl43 packet LinkLayerPacket {
50 packet AclPacket : LinkLayerPacket (type = ACL) {
54 packet Disconnect : LinkLayerPacket (type = DISCONNECT) {
58 packet EncryptConnection : LinkLayerPacket (type = ENCRYPT_CONNECTION) {
62 packet EncryptConnectionResponse : LinkLayerPacket (type = ENCRYPT_CONNECTION_RESPONSE) {
77 packet Inquiry : LinkLayerPacket (type = INQUIRY) {
81 packet BasicInquiryResponse : LinkLayerPacket(type = INQUIRY_RESPONSE) {
90 packet InquiryResponse : BasicInquiryResponse (inquiry_type = STANDARD) {
93 packet InquiryResponseWithRssi : BasicInquiryResponse (inquiry_type = RSSI) {
97 packet ExtendedInquiryResponse : BasicInquiryResponse (inquiry_type = EXTENDED) {
[all …]
/system/bt/gd/hci/
Dhci_packets.pdl51 packet AclPacket {
68 packet ScoPacket {
611 packet CommandPacket {
619 packet DiscoveryCommand : CommandPacket { _payload_, }
620 packet ConnectionManagementCommand : CommandPacket { _payload_, }
621 packet SecurityCommand : CommandPacket { _payload_, }
622 packet ScoConnectionCommand : CommandPacket { _payload_, }
623 packet LeAdvertisingCommand : CommandPacket { _payload_, }
624 packet LeScanningCommand : CommandPacket { _payload_, }
625 packet LeConnectionManagementCommand : CommandPacket { _payload_, }
[all …]
/system/bt/gd/security/pairing/
Dclassic_pairing_handler.cc98 void ClassicPairingHandler::OnReceive(hci::ChangeConnectionLinkKeyCompleteView packet) { in OnReceive() argument
99 ASSERT(packet.IsValid()); in OnReceive()
100 LOG_INFO("Received unsupported event: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
103 void ClassicPairingHandler::OnReceive(hci::MasterLinkKeyCompleteView packet) { in OnReceive() argument
104 ASSERT(packet.IsValid()); in OnReceive()
105 LOG_INFO("Received unsupported event: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
108 void ClassicPairingHandler::OnReceive(hci::PinCodeRequestView packet) { in OnReceive() argument
109 ASSERT(packet.IsValid()); in OnReceive()
110 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
111 …ASSERT_LOG(GetRecord()->GetPseudoAddress().GetAddress() == packet.GetBdAddr(), "Address mismatch"); in OnReceive()
[all …]
Dpairing_handler.h49 virtual void OnReceive(hci::ChangeConnectionLinkKeyCompleteView packet) = 0;
50 virtual void OnReceive(hci::MasterLinkKeyCompleteView packet) = 0;
51 virtual void OnReceive(hci::PinCodeRequestView packet) = 0;
52 virtual void OnReceive(hci::LinkKeyRequestView packet) = 0;
53 virtual void OnReceive(hci::LinkKeyNotificationView packet) = 0;
54 virtual void OnReceive(hci::IoCapabilityRequestView packet) = 0;
55 virtual void OnReceive(hci::IoCapabilityResponseView packet) = 0;
56 virtual void OnReceive(hci::SimplePairingCompleteView packet) = 0;
57 virtual void OnReceive(hci::ReturnLinkKeysView packet) = 0;
58 virtual void OnReceive(hci::EncryptionChangeView packet) = 0;
[all …]
/system/bt/hci/test/
Dpacket_fragmenter_test.cc70 BT_HDR* packet = (BT_HDR*)osi_malloc(size + sizeof(BT_HDR)); in manufacture_packet_for_fragmentation() local
71 packet->len = size; in manufacture_packet_for_fragmentation()
72 packet->offset = 0; in manufacture_packet_for_fragmentation()
73 packet->event = event; in manufacture_packet_for_fragmentation()
74 packet->layer_specific = 0; in manufacture_packet_for_fragmentation()
75 uint8_t* packet_data = packet->data; in manufacture_packet_for_fragmentation()
83 return packet; in manufacture_packet_for_fragmentation()
87 BT_HDR* packet, const char* expected_data, in expect_packet_fragmented() argument
89 uint8_t* data = packet->data + packet->offset; in expect_packet_fragmented()
105 int packet_data_length = packet->len - HCI_ACL_PREAMBLE_SIZE; in expect_packet_fragmented()
[all …]
/system/bt/gd/l2cap/
Dl2cap_packets.pdl5 packet BasicFrame {
11 packet BasicFrameWithFcs {
25 packet GroupFrame : BasicFrame (channel_id = 0x02) {
54 packet StandardFrame : BasicFrame {
59 packet StandardFrameWithFcs : BasicFrameWithFcs {
80 packet StandardSupervisoryFrame : StandardFrame (frame_type = S_FRAME) {
84 packet StandardSupervisoryFrameWithFcs : StandardFrameWithFcs (frame_type = S_FRAME) {
88 packet StandardInformationFrame : StandardFrame (frame_type = I_FRAME) {
93 packet StandardInformationFrameWithFcs : StandardFrameWithFcs (frame_type = I_FRAME) {
98 packet StandardInformationStartFrame : StandardInformationFrame (sar = START) {
[all …]
/system/core/libnetutils/
Dpacket.c161 } packet; in receive_packet() local
167 nread = read(s, &packet, sizeof(packet)); in receive_packet()
181 } else if (packet.ip.version != IPVERSION || packet.ip.ihl != (sizeof(packet.ip) >> 2)) { in receive_packet()
185 } else if (nread < ntohs(packet.ip.tot_len)) { in receive_packet()
187 ALOGD("Packet was truncated (read %d, needed %d)", nread, ntohs(packet.ip.tot_len)); in receive_packet()
189 } else if (packet.ip.protocol != IPPROTO_UDP) { in receive_packet()
191 ALOGD("IP protocol (%d) is not UDP", packet.ip.protocol); in receive_packet()
193 } else if (packet.udp.dest != htons(PORT_BOOTP_CLIENT)) { in receive_packet()
195 ALOGD("UDP dest port (%d) is not DHCP client", ntohs(packet.udp.dest)); in receive_packet()
207 sum = finish_sum(checksum(&packet.ip, sizeof(packet.ip), 0)); in receive_packet()
[all …]
/system/bt/vendor_libs/test_vendor_lib/model/devices/
Dlink_layer_socket_device.cc41 bluetooth::packet::PacketView<bluetooth::packet::kLittleEndian> size( in TimerTick()
42 {bluetooth::packet::View(packet_size, 0, kSizeBytes)}); in TimerTick()
54 bluetooth::packet::PacketView<bluetooth::packet::kLittleEndian> packet_view( in TimerTick()
56 auto packet = model::packets::LinkLayerPacketView::Create(packet_view); in TimerTick() local
57 ASSERT(packet.IsValid()); in TimerTick()
58 SendLinkLayerPacket(packet, phy_type_); in TimerTick()
65 model::packets::LinkLayerPacketView packet) { in IncomingPacket() argument
66 auto size_packet = bluetooth::packet::RawBuilder(); in IncomingPacket()
67 size_packet.AddOctets4(packet.size()); in IncomingPacket()
69 bluetooth::packet::BitInserter bit_inserter(size_bytes); in IncomingPacket()
[all …]
/system/core/adb/
Dtransport_benchmark.cpp67 … server->SetReadCallback([&received_bytes](Connection*, std::unique_ptr<apacket> packet) -> bool { in BM_Connection_Unidirectional() argument
68 received_bytes += packet->payload.size(); in BM_Connection_Unidirectional()
82 std::unique_ptr<apacket> packet = std::make_unique<apacket>(); in BM_Connection_Unidirectional() local
83 memset(&packet->msg, 0, sizeof(packet->msg)); in BM_Connection_Unidirectional()
84 packet->msg.command = A_WRTE; in BM_Connection_Unidirectional()
85 packet->msg.data_length = data_size; in BM_Connection_Unidirectional()
86 packet->payload.resize(data_size); in BM_Connection_Unidirectional()
88 memset(&packet->payload[0], 0xff, data_size); in BM_Connection_Unidirectional()
91 client->Write(std::move(packet)); in BM_Connection_Unidirectional()
124 … client->SetReadCallback([&received_bytes](Connection*, std::unique_ptr<apacket> packet) -> bool { in BM_Connection_Echo() argument
[all …]
/system/bt/gd/l2cap/internal/
Denhanced_retransmission_mode_channel_data_controller.h43 using UpperEnqueue = packet::PacketView<packet::kLittleEndian>;
44 using UpperDequeue = packet::BasePacketBuilder;
50 void OnSdu(std::unique_ptr<packet::BasePacketBuilder> sdu) override;
51 void OnPdu(packet::PacketView<true> pdu) override;
52 std::unique_ptr<packet::BasePacketBuilder> GetNextPacket() override;
62 std::queue<std::unique_ptr<packet::BasePacketBuilder>> pdu_queue_;
75 class PacketViewForReassembly : public packet::PacketView<kLittleEndian> {
78 void AppendPacketView(packet::PacketView<kLittleEndian> to_append) { in AppendPacketView()
83 class CopyablePacketBuilder : public packet::BasePacketBuilder {
85 …CopyablePacketBuilder(std::shared_ptr<packet::RawBuilder> builder) : builder_(std::move(builder)) … in CopyablePacketBuilder()
[all …]

12345678910>>...12