Home
last modified time | relevance | path

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

12345678910>>...14

/system/memory/lmkd/include/
Dlmkd.h72 static inline void lmkd_pack_get_target(LMKD_CTRL_PACKET packet, int target_idx, in lmkd_pack_get_target() argument
74 target->minfree = ntohl(packet[target_idx * 2 + 1]); in lmkd_pack_get_target()
75 target->oom_adj_score = ntohl(packet[target_idx * 2 + 2]); in lmkd_pack_get_target()
82 static inline size_t lmkd_pack_set_target(LMKD_CTRL_PACKET packet, struct lmk_target* targets, in lmkd_pack_set_target() argument
85 packet[idx++] = htonl(LMK_TARGET); in lmkd_pack_set_target()
87 packet[idx++] = htonl(targets->minfree); in lmkd_pack_set_target()
88 packet[idx++] = htonl(targets->oom_adj_score); in lmkd_pack_set_target()
115 static inline void lmkd_pack_get_procprio(LMKD_CTRL_PACKET packet, int field_count, in lmkd_pack_get_procprio() argument
117 params->pid = (pid_t)ntohl(packet[1]); in lmkd_pack_get_procprio()
118 params->uid = (uid_t)ntohl(packet[2]); in lmkd_pack_get_procprio()
[all …]
/system/bt/hci/src/
Dpacket_fragmenter.cc69 static void fragment_and_dispatch_acl(BT_HDR* packet);
70 static void fragment_and_dispatch_iso(BT_HDR* packet);
72 static void fragment_and_dispatch(BT_HDR* packet) { in fragment_and_dispatch() argument
73 CHECK(packet != NULL); in fragment_and_dispatch()
75 uint16_t event = packet->event & MSG_EVT_MASK; in fragment_and_dispatch()
78 fragment_and_dispatch_acl(packet); in fragment_and_dispatch()
80 fragment_and_dispatch_iso(packet); in fragment_and_dispatch()
82 callbacks->fragmented(packet, true); in fragment_and_dispatch()
86 static void fragment_and_dispatch_acl(BT_HDR* packet) { in fragment_and_dispatch_acl() argument
88 SUB_EVENT(packet->event) == LOCAL_BR_EDR_CONTROLLER_ID in fragment_and_dispatch_acl()
[all …]
/system/bt/gd/cert/
Dmatchers.py202 def LoopbackOf(packet): argument
203 return HciMatchers.Exactly(hci_packets.LoopbackCommandBuilder(packet))
206 def Exactly(packet): argument
207 data = bytes(packet.Serialize())
215 return lambda msg: NeighborMatchers._is_matching_inquiry_result(msg.packet, address)
218 def _is_matching_inquiry_result(packet, address): argument
219 hci_event = HciMatchers.ExtractEventWithCode(packet, EventCode.INQUIRY_RESULT)
230 … return lambda msg: NeighborMatchers._is_matching_inquiry_result_with_rssi(msg.packet, address)
233 def _is_matching_inquiry_result_with_rssi(packet, address): argument
234 hci_event = HciMatchers.ExtractEventWithCode(packet, EventCode.INQUIRY_RESULT_WITH_RSSI)
[all …]
Dcaptures.py33 …lambda packet: packet.payload[0:5] == b'\x0e\x0a\x01\x09\x10', lambda packet: hci_packets.ReadBdAd…
35 … hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet.payload))))))
40 …lambda packet: packet.payload[0:2] == b'\x04\x0a', lambda packet: hci_packets.ConnectionRequestVie…
41 hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet.payload)))))
46 …lambda packet: packet.payload[0:3] == b'\x03\x0b\x00', lambda packet: hci_packets.ConnectionComple…
47 hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet.payload)))))
52 …lambda packet: packet.payload[0:2] == b'\x05\x04', lambda packet: hci_packets.DisconnectionComplet…
53 hci_packets.EventView(bt_packets.PacketViewLittleEndian(list(packet.payload)))))
58 …lambda packet: packet.payload[0] == 0x3e and (packet.payload[2] == 0x01 or packet.payload[2] == 0x…
59 lambda packet: hci_packets.LeConnectionCompleteView(
[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/packet/tests/fuzzers/
DAndroid.bp18 "system/bt/packet/include",
19 "system/bt/packet/tests",
20 "system/bt/packet/tests/avrcp",
21 "system/bt/packet/base",
47 "system/bt/packet/include",
48 "system/bt/packet/tests",
49 "system/bt/packet/tests/avrcp",
50 "system/bt/packet/base",
77 "system/bt/packet/include",
78 "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/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/core/debuggerd/tombstoned/
Dtombstoned_client.cpp52 TombstonedCrashPacket packet = {}; in tombstoned_connect() local
53 packet.packet_type = CrashPacketType::kDumpRequest; in tombstoned_connect()
54 packet.packet.dump_request.pid = pid; in tombstoned_connect()
55 packet.packet.dump_request.dump_type = dump_type; in tombstoned_connect()
56 if (TEMP_FAILURE_RETRY(write(sockfd, &packet, sizeof(packet))) != sizeof(packet)) { in tombstoned_connect()
66 rc = ReceiveFileDescriptors(sockfd, &packet, sizeof(packet), &tmp_output_fd, &tmp_proto_fd); in tombstoned_connect()
68 rc = ReceiveFileDescriptors(sockfd, &packet, sizeof(packet), &tmp_output_fd); in tombstoned_connect()
75 } else if (rc != sizeof(packet)) { in tombstoned_connect()
79 sizeof(packet), rc); in tombstoned_connect()
101 TombstonedCrashPacket packet = {}; in tombstoned_notify_completion() local
[all …]
/system/bt/vendor_libs/test_vendor_lib/packets/
Dlink_layer_packets.pdl55 packet LinkLayerPacket {
62 packet Acl : LinkLayerPacket (type = ACL) {
66 packet Disconnect : LinkLayerPacket (type = DISCONNECT) {
70 packet EncryptConnection : LinkLayerPacket (type = ENCRYPT_CONNECTION) {
74 packet EncryptConnectionResponse : LinkLayerPacket (type = ENCRYPT_CONNECTION_RESPONSE) {
89 packet Inquiry : LinkLayerPacket (type = INQUIRY) {
93 packet BasicInquiryResponse : LinkLayerPacket(type = INQUIRY_RESPONSE) {
102 packet InquiryResponse : BasicInquiryResponse (inquiry_type = STANDARD) {
105 packet InquiryResponseWithRssi : BasicInquiryResponse (inquiry_type = RSSI) {
109 packet ExtendedInquiryResponse : BasicInquiryResponse (inquiry_type = EXTENDED) {
[all …]
/system/bt/hci/test/
Dhci_layer_test.cc43 void hci_transmit(BT_HDR* packet) { LOG(INFO) << __func__ << " UNIMPLEMENTED"; } in hci_transmit() argument
46 void hci_log_firmware_debug_packet(int fd, BT_HDR* packet) {} in hci_log_firmware_debug_packet() argument
73 uint8_t* GetPayloadPointer(BT_HDR* packet) const { in GetPayloadPointer()
74 return static_cast<uint8_t*>(packet->data); in GetPayloadPointer()
79 BT_HDR* packet = in AllocatePacket() local
81 packet->offset = 0; in AllocatePacket()
82 packet->len = packet_length; in AllocatePacket()
83 packet->layer_specific = 0; in AllocatePacket()
84 packet->event = MSG_HC_TO_STACK_HCI_EVT; in AllocatePacket()
85 return packet; in AllocatePacket()
[all …]
Dpacket_fragmenter_test.cc90 BT_HDR* packet = (BT_HDR*)osi_malloc(size + sizeof(BT_HDR)); in manufacture_packet_for_fragmentation() local
91 packet->len = size; in manufacture_packet_for_fragmentation()
92 packet->offset = 0; in manufacture_packet_for_fragmentation()
93 packet->event = event; in manufacture_packet_for_fragmentation()
94 packet->layer_specific = 0; in manufacture_packet_for_fragmentation()
95 uint8_t* packet_data = packet->data; in manufacture_packet_for_fragmentation()
102 packet->layer_specific |= BT_ISO_HDR_CONTAINS_TS; in manufacture_packet_for_fragmentation()
115 return packet; in manufacture_packet_for_fragmentation()
119 BT_HDR* packet, const char* expected_data, in expect_packet_fragmented() argument
121 uint8_t* data = packet->data + packet->offset; in expect_packet_fragmented()
[all …]
/system/bt/gd/hci/
Dhci_packets.pdl79 packet Acl {
96 packet Sco {
647 packet Command {
655 packet DiscoveryCommand : Command { _payload_, }
656 packet AclCommand : Command { _payload_, }
657 packet ConnectionManagementCommand : AclCommand { _payload_, }
658 packet SecurityCommand : Command { _payload_, }
659 packet ScoConnectionCommand : AclCommand { _payload_, }
660 packet LeAdvertisingCommand : Command { _payload_, }
661 packet LeScanningCommand : Command { _payload_, }
[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/test/mock/
Dmock_hci_layer.h60 std::function<void(const base::Location& from_here, BT_HDR* packet)> body{
61 [](const base::Location& from_here, BT_HDR* packet) {}};
62 void operator()(const base::Location& from_here, BT_HDR* packet) { in operator()
63 body(from_here, packet); in operator()
71 std::function<void(BT_HDR* packet)> body{[](BT_HDR* packet) {}};
72 void operator()(BT_HDR* packet) { body(packet); }; in operator()
79 std::function<void(BT_HDR* packet)> body{[](BT_HDR* packet) {}};
80 void operator()(BT_HDR* packet) { body(packet); }; in operator()
87 std::function<void(BT_HDR* packet)> body{[](BT_HDR* packet) {}};
88 void operator()(BT_HDR* packet) { body(packet); }; in operator()
/system/bt/vendor_libs/test_vendor_lib/model/devices/
Dlink_layer_socket_device.cc43 bluetooth::packet::PacketView<bluetooth::packet::kLittleEndian> size( in TimerTick()
44 {bluetooth::packet::View(size_bytes_, 0, kSizeBytes)}); in TimerTick()
59 auto packet = model::packets::LinkLayerPacketView::Create( in TimerTick() local
60 bluetooth::packet::PacketView<bluetooth::packet::kLittleEndian>( in TimerTick()
62 ASSERT(packet.IsValid()); in TimerTick()
63 SendLinkLayerPacket(packet, phy_type_); in TimerTick()
67 model::packets::LinkLayerPacketView packet) { in IncomingPacket() argument
68 auto size_packet = bluetooth::packet::RawBuilder(); in IncomingPacket()
69 size_packet.AddOctets4(packet.size()); in IncomingPacket()
71 bluetooth::packet::BitInserter bit_inserter(size_bytes); in IncomingPacket()
[all …]
/system/bt/gd/security/pairing/
Dclassic_pairing_handler.cc166 void ClassicPairingHandler::OnReceive(hci::ChangeConnectionLinkKeyCompleteView packet) { in OnReceive() argument
167 ASSERT(packet.IsValid()); in OnReceive()
168 LOG_INFO("Received unsupported event: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
171 void ClassicPairingHandler::OnReceive(hci::CentralLinkKeyCompleteView packet) { in OnReceive() argument
172 ASSERT(packet.IsValid()); in OnReceive()
173 LOG_INFO("Received unsupported event: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
176 void ClassicPairingHandler::OnReceive(hci::PinCodeRequestView packet) { in OnReceive() argument
177 ASSERT(packet.IsValid()); in OnReceive()
178 LOG_INFO("Received: %s", hci::EventCodeText(packet.GetEventCode()).c_str()); in OnReceive()
179 …ASSERT_LOG(GetRecord()->GetPseudoAddress()->GetAddress() == packet.GetBdAddr(), "Address mismatch"… in OnReceive()
[all …]
Dpairing_handler.h60 virtual void OnReceive(hci::ChangeConnectionLinkKeyCompleteView packet) = 0;
61 virtual void OnReceive(hci::CentralLinkKeyCompleteView packet) = 0;
62 virtual void OnReceive(hci::PinCodeRequestView packet) = 0;
63 virtual void OnReceive(hci::LinkKeyRequestView packet) = 0;
64 virtual void OnReceive(hci::LinkKeyNotificationView packet) = 0;
65 virtual void OnReceive(hci::IoCapabilityRequestView packet) = 0;
66 virtual void OnReceive(hci::IoCapabilityResponseView packet) = 0;
67 virtual void OnReceive(hci::SimplePairingCompleteView packet) = 0;
68 virtual void OnReceive(hci::ReturnLinkKeysView packet) = 0;
69 virtual void OnReceive(hci::EncryptionChangeView packet) = 0;
[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>>...14