/system/memory/lmkd/include/ |
D | lmkd.h | 74 static inline void lmkd_pack_get_target(LMKD_CTRL_PACKET packet, int target_idx, in lmkd_pack_get_target() argument 76 target->minfree = ntohl(packet[target_idx * 2 + 1]); in lmkd_pack_get_target() 77 target->oom_adj_score = ntohl(packet[target_idx * 2 + 2]); in lmkd_pack_get_target() 84 static inline size_t lmkd_pack_set_target(LMKD_CTRL_PACKET packet, struct lmk_target* targets, in lmkd_pack_set_target() argument 87 packet[idx++] = htonl(LMK_TARGET); in lmkd_pack_set_target() 89 packet[idx++] = htonl(targets->minfree); in lmkd_pack_set_target() 90 packet[idx++] = htonl(targets->oom_adj_score); in lmkd_pack_set_target() 119 static inline void lmkd_pack_get_procprio(LMKD_CTRL_PACKET packet, int field_count, in lmkd_pack_get_procprio() argument 121 params->pid = (pid_t)ntohl(packet[1]); in lmkd_pack_get_procprio() 122 params->uid = (uid_t)ntohl(packet[2]); in lmkd_pack_get_procprio() [all …]
|
/system/memory/lmkd/ |
D | liblmkd_utils.cpp | 36 LMKD_CTRL_PACKET packet; in lmkd_register_proc() local 40 size = lmkd_pack_set_procprio(packet, params); in lmkd_register_proc() 41 ret = TEMP_FAILURE_RETRY(write(sock, packet, size)); in lmkd_register_proc() 47 LMKD_CTRL_PACKET packet; in lmkd_register_procs() local 51 size = lmkd_pack_set_procs_prio(packet, params, proc_count); in lmkd_register_procs() 52 ret = TEMP_FAILURE_RETRY(write(sock, packet, size)); in lmkd_register_procs() 58 LMKD_CTRL_PACKET packet; in lmkd_unregister_proc() local 62 size = lmkd_pack_set_procremove(packet, params); in lmkd_unregister_proc() 63 ret = TEMP_FAILURE_RETRY(write(sock, packet, size)); in lmkd_unregister_proc() 69 LMKD_CTRL_PACKET packet; in lmkd_update_props() local [all …]
|
D | statslog.cpp | 253 static inline size_t pack_int32(LMK_KILL_OCCURRED_PACKET packet, in pack_int32() argument 256 int32_t* int_buffer = (int32_t*)(packet + index); in pack_int32() 267 static inline size_t pack_int64(LMK_KILL_OCCURRED_PACKET packet, in pack_int64() argument 270 int64_t* int64_buffer = (int64_t*)(packet + index); in pack_int64() 285 static inline size_t pack_string(LMK_KILL_OCCURRED_PACKET packet, in pack_string() argument 289 int16_t* short_buffer = (int16_t*)(packet + index); in pack_string() 299 size_t lmkd_pack_set_kill_occurred(LMK_KILL_OCCURRED_PACKET packet, in lmkd_pack_set_kill_occurred() argument 309 index = pack_int32(packet, index, LMK_STAT_KILL_OCCURRED); in lmkd_pack_set_kill_occurred() 312 index = pack_int64(packet, index, mem_stat->pgfault); in lmkd_pack_set_kill_occurred() 313 index = pack_int64(packet, index, mem_stat->pgmajfault); in lmkd_pack_set_kill_occurred() [all …]
|
/system/connectivity/wificond/net/ |
D | mlme_event.cpp | 35 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 …]
|
D | netlink_manager.cpp | 55 unique_ptr<const NL80211Packet> packet) { in AppendPacket() argument 56 vec->push_back(std::move(packet)); in AppendPacket() 119 unique_ptr<NL80211Packet> packet( in ReceivePacketAndRunHandler() local 122 if (!packet->IsValid()) { in ReceivePacketAndRunHandler() 129 uint32_t sequence_number = packet->GetMessageSequence(); in ReceivePacketAndRunHandler() 133 BroadcastHandler(std::move(packet)); in ReceivePacketAndRunHandler() 147 uint32_t message_type = packet->GetMessageType(); in ReceivePacketAndRunHandler() 166 bool is_multi = packet->IsMulti(); in ReceivePacketAndRunHandler() 168 itr->second(std::move(packet)); in ReceivePacketAndRunHandler() 176 void NetlinkManager::OnNewFamily(unique_ptr<const NL80211Packet> packet) { in OnNewFamily() argument [all …]
|
D | netlink_manager.h | 150 virtual bool RegisterHandlerAndSendMessage(const NL80211Packet& packet, 156 const NL80211Packet& packet, 164 const NL80211Packet& packet, 174 const NL80211Packet& packet, 182 virtual bool SendMessageAndGetAckOrError(const NL80211Packet& packet, 186 virtual bool SendMessageAndGetAck(const NL80211Packet& packet); 283 bool SendMessageInternal(const NL80211Packet& packet, int fd, 285 void BroadcastHandler(std::unique_ptr<const NL80211Packet> packet); 286 void OnRegChangeEvent(std::unique_ptr<const NL80211Packet> packet); 287 void OnMlmeEvent(std::unique_ptr<const NL80211Packet> packet); [all …]
|
D | netlink_utils.cpp | 167 for (auto& packet : response) { in GetWiphyIndex() local 168 if (packet->GetMessageType() == NLMSG_ERROR) { in GetWiphyIndex() 170 << strerror(packet->GetErrorCode()); in GetWiphyIndex() 173 if (packet->GetMessageType() != netlink_manager_->GetFamilyId()) { in GetWiphyIndex() 175 << packet->GetMessageType(); in GetWiphyIndex() 178 if (packet->GetCommand() != NL80211_CMD_NEW_WIPHY) { in GetWiphyIndex() 181 << static_cast<int>(packet->GetCommand()); in GetWiphyIndex() 184 if (!packet->GetAttributeValue(NL80211_ATTR_WIPHY, out_wiphy_index)) { in GetWiphyIndex() 216 for (auto& packet : response) { in GetInterfaces() local 217 if (packet->GetMessageType() == NLMSG_ERROR) { in GetInterfaces() [all …]
|
D | mlme_event.h | 35 const NL80211Packet* packet); 59 const NL80211Packet* packet); 83 const NL80211Packet* packet); 101 const NL80211Packet* packet); 115 const NL80211Packet* packet);
|
/system/core/debuggerd/tombstoned/ |
D | tombstoned_client.cpp | 52 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/core/libnetutils/ |
D | packet.c | 161 } 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/nfc/tools/casimir/scripts/ |
D | t4at.py | 45 packet = rf.RfPacket.parse_all(packet_bytes) 46 packet.show() 47 return packet 49 def _write(self, packet: rf.RfPacket): 50 packet_bytes = packet.serialize() 58 packet = await self._read() 59 match packet: 66 receiver=packet.sender)) 68 await self.active(packet.sender) 78 packet = await asyncio.wait_for(self._read(), timeout=1.0) [all …]
|
/system/nfc/tools/casimir/src/ |
D | nci_packets.pdl | 133 // Generic format for NCI packet headers. 136 packet PacketHeader { 144 // Pre-framed NCI control packet. The framing information is ignored 146 packet ControlPacket { 153 // Pre-framed NCI data packet. The framing information is ignored 155 packet DataPacket { 165 packet CorePacket : ControlPacket (gid = CORE) { 177 packet CoreResetCommand : CorePacket (mt = COMMAND, oid = RESET) { 181 packet CoreResetResponse : CorePacket (mt = RESPONSE, oid = RESET) { 204 packet CoreResetNotification : CorePacket (mt = NOTIFICATION, oid = RESET) { [all …]
|
D | main.rs | 84 async fn write(&mut self, packet: &[u8]) -> Result<()> { in write() 85 let packet_length: u16 = packet.len().try_into()?; in write() 92 self.socket.write_all(packet).await?; in write() 162 let packet = rf::RfPacket::parse(&packet_bytes)?; in rf() localVariable 165 controller_rf_tx.send(packet)?; in rf() 172 let packet = rf_rx in rf() localVariable 176 rf_writer.write(&packet.encode_to_vec()?).await?; in rf() 248 fn send(&self, packet: &rf::RfPacket) -> Result<()> { in send() 251 if packet.get_sender() != device.id in send() 252 && (packet.get_receiver() == u16::MAX || packet.get_receiver() == device.id) in send() [all …]
|
D | packets.rs | 141 pub async fn write(&mut self, mut packet: &[u8]) -> anyhow::Result<()> { in write() 144 let mut header_bytes = [packet[0], packet[1], 0]; in write() 145 packet = &packet[3..]; in write() 149 let chunk_length = std::cmp::min(255, packet.len()); in write() 150 let pbf = if chunk_length < packet.len() { in write() 162 self.socket.write_all(&packet[..chunk_length]).await?; in write() 163 packet = &packet[chunk_length..]; in write() 165 if packet.is_empty() { in write()
|
D | main-grpc.rs | 86 async fn write(&mut self, packet: &[u8]) -> Result<()> { in write() 87 let packet_length: u16 = packet.len().try_into()?; in write() 94 self.socket.write_all(packet).await?; in write() 177 let packet = rf::RfPacket::parse(&packet_bytes)?; in rf() localVariable 180 controller_rf_tx.send(packet)?; in rf() 187 let packet = rf_rx in rf() localVariable 191 rf_writer.write(&packet.to_vec()).await?; in rf() 265 fn send(&self, packet: &rf::RfPacket) -> Result<()> { in send() 269 if packet.get_sender() != device.id in send() 270 && (packet.get_receiver() == u16::MAX || packet.get_receiver() == device.id) in send() [all …]
|
D | rf_packets.pdl | 9 /// or Listen mode. [DIGITAL] provides the format for packet exchanged 46 /// These packet types abstract the frames specified in [DIGITAL] 67 packet RfPacket { 82 packet PollCommand : RfPacket (packet_type = POLL_COMMAND) { 88 packet NfcAPollResponse : RfPacket (technology = NFC_A, packet_type = POLL_RESPONSE) { 117 packet T4ATSelectCommand : RfPacket (technology = NFC_A, protocol = ISO_DEP, packet_type = SELECT_C… 125 packet T4ATSelectResponse : RfPacket (technology = NFC_A, protocol = ISO_DEP, packet_type = SELECT_… 136 packet NfcDepSelectCommand : RfPacket (protocol = NFC_DEP, packet_type = SELECT_COMMAND) { 145 packet NfcDepSelectResponse : RfPacket (protocol = NFC_DEP, packet_type = SELECT_RESPONSE) { 153 /// of the PollResponse packet. [all …]
|
/system/nfc/src/fuzzers/integration/ |
D | nfc_integration_fuzzer_impl.cc | 166 std::vector<uint8_t> packet; in SerializeNfcActivate() local 167 packet.push_back(activate.rf_disc_id); in SerializeNfcActivate() 168 packet.push_back(activate.intf_param.type); in SerializeNfcActivate() 169 packet.push_back(activate.protocol); in SerializeNfcActivate() 170 packet.push_back(activate.rf_tech_param.mode); in SerializeNfcActivate() 171 packet.push_back(buff_size); in SerializeNfcActivate() 172 packet.push_back(num_buff); in SerializeNfcActivate() 181 packet.push_back(tech_parameters.size()); in SerializeNfcActivate() 182 packet.insert(packet.end(), tech_parameters.begin(), tech_parameters.end()); in SerializeNfcActivate() 184 packet.push_back(activate.data_mode); in SerializeNfcActivate() [all …]
|
/system/nfc/src/ |
D | nci_packets.pdl | 76 packet NciPacket { 83 packet Command : NciPacket (mt = COMMAND) { 89 packet Response : NciPacket (mt = RESPONSE) { 95 packet Notification : NciPacket (mt = NOTIFICATION) { 101 packet DataPacket { 115 packet ResetCommand : Command (op = CORE_RESET) { 123 packet ResetResponse : Response (cmd_op = CORE_RESET) { 148 packet ResetNotification : Notification (cmd_op = CORE_RESET) { 232 packet InitCommand : Command (op = CORE_INIT) { 240 packet InitResponse : Response (cmd_op = CORE_INIT) { [all …]
|
/system/secretkeeper/comm/tests/ |
D | data_types.rs | 23 use secretkeeper_comm::data_types::packet::{RequestPacket, ResponsePacket, ResponseType}; 82 let packet = req.serialize_to_packet(); in verify_request_structure() localVariable 83 assert_eq!(packet.opcode().unwrap(), expected_opcode); in verify_request_structure() 84 let packet = packet.to_vec().unwrap(); in verify_request_structure() localVariable 85 let packet = RequestPacket::from_slice(&packet).unwrap(); in verify_request_structure() localVariable 86 let req_other_end = *R::deserialize_from_packet(packet).unwrap(); in verify_request_structure() 94 let packet = response.serialize_to_packet(); in verify_response_structure() localVariable 95 assert_eq!(packet.response_type().unwrap(), expected_response_type); in verify_response_structure() 96 let packet_bytes = packet.to_vec().unwrap(); in verify_response_structure() 97 let packet = ResponsePacket::from_slice(&packet_bytes).unwrap(); in verify_response_structure() localVariable [all …]
|
/system/core/fastboot/ |
D | README.md | 14 * Max packet size must be 64 bytes for full-speed, 512 bytes for 28 packet no greater than 4096 bytes. 30 2. Client response with a single packet no greater than 256 bytes. 53 A DATA response packet will be 12 bytes long, in the form of 63 4. Client responds with a single packet no greater than 256 bytes. 144 a single packet starting with "OKAY". Clients 294 fastboot packet. The 8-byte length is intended to provide future-proofing even 319 2. Maximum UDP packet size is negotiated during initialization. 320 3. The host drives all communication; the device may only send a packet as a 321 response to a host packet. [all …]
|
/system/secretkeeper/comm/src/data_types/ |
D | response.rs | 20 use crate::data_types::packet::ResponsePacket; 69 fn deserialize_from_packet(packet: ResponsePacket) -> Result<Box<Self>, Error> { in deserialize_from_packet() 70 let res = packet.into_inner(); in deserialize_from_packet()
|
D | request.rs | 20 use crate::data_types::packet::RequestPacket; 60 fn deserialize_from_packet(packet: RequestPacket) -> Result<Box<Self>, Error> { in deserialize_from_packet() 61 let mut req = packet.into_inner(); in deserialize_from_packet()
|
/system/chre/util/pigweed/ |
D | rpc_server.cc | 100 pw::span packet(static_cast<const std::byte *>(hostMessage->message), in handleMessageFromHost() 103 pw::Result<uint32_t> result = pw::rpc::ExtractChannelId(packet); in handleMessageFromHost() 126 pw::Status status = mServer.ProcessPacket(packet); in handleMessageFromHost() 140 pw::span packet(reinterpret_cast<const std::byte *>(data->msg), in handleMessageFromNanoapp() 143 pw::Result<uint32_t> result = pw::rpc::ExtractChannelId(packet); in handleMessageFromNanoapp() 158 pw::Status success = mServer.ProcessPacket(packet); in handleMessageFromNanoapp()
|
/system/core/libappfuse/tests/ |
D | FuseBufferTest.cc | 45 FuseRequest* const packet = reinterpret_cast<FuseRequest*>(buffer); in TestReadInvalidLength() local 46 packet->header.len = headerSize; in TestReadInvalidLength() 47 ASSERT_NE(-1, write(fd, packet, write_size)) << strerror(errno); in TestReadInvalidLength() 50 EXPECT_FALSE(packet->Read(fd)); in TestReadInvalidLength() 58 FuseRequest* const packet = reinterpret_cast<FuseRequest*>(buffer); in TestWriteInvalidLength() local 59 packet->header.len = size; in TestWriteInvalidLength() 60 EXPECT_FALSE(packet->Write(fd)); in TestWriteInvalidLength()
|
/system/connectivity/wificond/scanning/ |
D | scan_utils.cpp | 101 for (auto& packet : response) { in GetScanResult() local 102 if (packet->GetMessageType() == NLMSG_ERROR) { in GetScanResult() 104 << strerror(packet->GetErrorCode()); in GetScanResult() 107 if (packet->GetMessageType() != netlink_manager_->GetFamilyId()) { in GetScanResult() 109 << packet->GetMessageType(); in GetScanResult() 113 if (!packet->GetAttributeValue(NL80211_ATTR_IFINDEX, &if_index)) { in GetScanResult() 123 if (!ParseScanResult(std::move(packet), &scan_result)) { in GetScanResult() 132 bool ScanUtils::ParseScanResult(unique_ptr<const NL80211Packet> packet, in ParseScanResult() argument 134 if (packet->GetCommand() != NL80211_CMD_NEW_SCAN_RESULTS) { in ParseScanResult() 139 if (packet->GetAttribute(NL80211_ATTR_BSS, &bss)) { in ParseScanResult()
|