Home
last modified time | relevance | path

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

123

/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/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.cpp55 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 …]
Dnetlink_manager.h150 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 …]
Dnetlink_utils.cpp167 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 …]
Dmlme_event.h35 const NL80211Packet* packet);
59 const NL80211Packet* packet);
83 const NL80211Packet* packet);
101 const NL80211Packet* packet);
115 const NL80211Packet* packet);
Dnl80211_packet.h56 NL80211Packet(const NL80211Packet& packet);
59 NL80211Packet(NL80211Packet&& packet) = default;
/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/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/memory/lmkd/
Dliblmkd_utils.cpp36 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_unregister_proc() local
51 size = lmkd_pack_set_procremove(packet, params); in lmkd_unregister_proc()
52 ret = TEMP_FAILURE_RETRY(write(sock, packet, size)); in lmkd_unregister_proc()
58 LMKD_CTRL_PACKET packet; in lmkd_update_props() local
61 size = lmkd_pack_set_update_props(packet); in lmkd_update_props()
62 if (TEMP_FAILURE_RETRY(write(sock, packet, size)) < 0) { in lmkd_update_props()
66 size = TEMP_FAILURE_RETRY(read(sock, packet, CTRL_PACKET_MAX_SIZE)); in lmkd_update_props()
[all …]
Dstatslog.cpp252 static inline size_t pack_int32(LMK_KILL_OCCURRED_PACKET packet, in pack_int32() argument
255 int32_t* int_buffer = (int32_t*)(packet + index); in pack_int32()
266 static inline size_t pack_int64(LMK_KILL_OCCURRED_PACKET packet, in pack_int64() argument
269 int64_t* int64_buffer = (int64_t*)(packet + index); in pack_int64()
284 static inline size_t pack_string(LMK_KILL_OCCURRED_PACKET packet, in pack_string() argument
288 int16_t* short_buffer = (int16_t*)(packet + index); in pack_string()
298 size_t lmkd_pack_set_kill_occurred(LMK_KILL_OCCURRED_PACKET packet, in lmkd_pack_set_kill_occurred() argument
308 index = pack_int32(packet, index, LMK_STAT_KILL_OCCURRED); in lmkd_pack_set_kill_occurred()
311 index = pack_int64(packet, index, mem_stat->pgfault); in lmkd_pack_set_kill_occurred()
312 index = pack_int64(packet, index, mem_stat->pgmajfault); in lmkd_pack_set_kill_occurred()
[all …]
Dstatslog.h104 size_t lmkd_pack_set_state_changed(LMKD_CTRL_PACKET packet,
111 size_t lmkd_pack_set_kill_occurred(LMK_KILL_OCCURRED_PACKET packet,
141 lmkd_pack_set_state_changed(LMKD_CTRL_PACKET packet __unused, enum lmk_state state __unused) { in lmkd_pack_set_state_changed()
146 lmkd_pack_set_kill_occurred(LMK_KILL_OCCURRED_PACKET packet __unused, in lmkd_pack_set_kill_occurred()
/system/nfc/src/fuzzers/integration/
Dnfc_integration_fuzzer_impl.cc180 std::vector<uint8_t> packet; in SerializeNfcActivate() local
181 packet.push_back(activate.rf_disc_id); in SerializeNfcActivate()
182 packet.push_back(activate.intf_param.type); in SerializeNfcActivate()
183 packet.push_back(activate.protocol); in SerializeNfcActivate()
184 packet.push_back(activate.rf_tech_param.mode); in SerializeNfcActivate()
185 packet.push_back(buff_size); in SerializeNfcActivate()
186 packet.push_back(num_buff); in SerializeNfcActivate()
195 packet.push_back(tech_parameters.size()); in SerializeNfcActivate()
196 packet.insert(packet.end(), tech_parameters.begin(), tech_parameters.end()); in SerializeNfcActivate()
198 packet.push_back(activate.data_mode); in SerializeNfcActivate()
[all …]
/system/nfc/src/
Dnci_packets.pdl76 packet Nci {
83 packet Command : Nci (mt = COMMAND) {
89 packet Response : Nci (mt = RESPONSE) {
95 packet Notification : Nci (mt = NOTIFICATION) {
101 packet Data {
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/core/fastboot/
DREADME.md14 * Max packet size must be 64 bytes for full-speed, 512 bytes for
28 packet no greater than 64 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
257 fastboot packet. The 8-byte length is intended to provide future-proofing even
282 2. Maximum UDP packet size is negotiated during initialization.
283 3. The host drives all communication; the device may only send a packet as a
284 response to a host packet.
[all …]
/system/chre/util/pigweed/
Drpc_server.cc101 pw::span packet(static_cast<const std::byte *>(hostMessage->message), in handleMessageFromHost()
104 pw::Result<uint32_t> result = pw::rpc::ExtractChannelId(packet); in handleMessageFromHost()
127 pw::Status status = mServer.ProcessPacket(packet); in handleMessageFromHost()
141 pw::span packet(static_cast<const std::byte *>(data->msg), data->msgSize); in handleMessageFromNanoapp()
143 pw::Result<uint32_t> result = pw::rpc::ExtractChannelId(packet); in handleMessageFromNanoapp()
158 pw::Status success = mServer.ProcessPacket(packet); in handleMessageFromNanoapp()
Drpc_client.cc64 pw::span packet(static_cast<const std::byte *>(data->msg), data->msgSize); in handleMessageFromServer()
76 pw::Status status = mRpcClient.ProcessPacket(packet); in handleMessageFromServer()
/system/core/libappfuse/tests/
DFuseBufferTest.cc45 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/logging/liblog/tests/
Dliblog_benchmark.cpp265 struct packet { in BM_pmsg_short_aligned() struct
270 alignas(8) char buf[sizeof(struct packet) + 8] = {}; in BM_pmsg_short_aligned()
271 struct packet* buffer = (struct packet*)(((uintptr_t)buf + 7) & ~7); in BM_pmsg_short_aligned()
339 struct packet { in BM_pmsg_short_unaligned1() struct
344 alignas(8) char buf[sizeof(struct packet) + 8] = {}; in BM_pmsg_short_unaligned1()
345 struct packet* buffer = (struct packet*)((((uintptr_t)buf + 7) & ~7) + 1); in BM_pmsg_short_unaligned1()
413 struct packet { in BM_pmsg_long_aligned() struct
418 alignas(8) char buf[sizeof(struct packet) + 8 + LOGGER_ENTRY_MAX_PAYLOAD] = {}; in BM_pmsg_long_aligned()
419 struct packet* buffer = (struct packet*)(((uintptr_t)buf + 7) & ~7); in BM_pmsg_long_aligned()
485 struct packet { in BM_pmsg_long_unaligned1() struct
[all …]
/system/connectivity/wificond/scanning/
Dscan_utils.cpp101 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()
/system/chre/host/common/include/chre_host/
Dbt_snoop_log_parser.h51 uint8_t packet[]; member
77 void capture(const uint8_t *packet, size_t packetSize,
/system/chre/java/utils/pigweed/src/com/google/android/chre/utils/pigweed/
DChreChannelOutput.java56 public void send(byte[] packet) throws ChannelOutputException { in send() argument
58 PW_RPC_CHRE_MESSAGE_TYPE, packet); in send()
/system/chre/host/common/
Dbt_snoop_log_parser.cc84 capture(message->packet, static_cast<size_t>(message->packetSize), in log()
89 void BtSnoopLogParser::capture(const uint8_t *packet, size_t packetSize, in capture() argument
133 if (!mBtSnoopOstream.write(reinterpret_cast<const char *>(packet), in capture()
/system/chre/chpp/
DREADME.md33packet start delimiter) and 8 bytes of header information. The header is followed by zero or more …
50 …a two-byte preamble as the packet start delimiter. If the receiving side is not actively within a
58 … flag of (0) indicates the last/only packet in a datagram. A fragmentation flag set to (1) indicat…
66 The packet code field consists of two nibbles. The lower nibble is used for optional error reportin…
77 - 0x5: Out of order packet
82 …on of the CHPP protocol. The first packet sent after bootup always has this flag set, and endpoint…
83 A reset packet may optionally populate the Error Reporting entry with the reason behind the reset.
84 A reset packet has an optional configuration payload [TBD].
90 The ack may be sent as part of a packet with or without a payload. In the latter case, the payload …
91 …received (through an ACK of a lower sequence number), the unacknowledged packet(s) shall be retran…
[all …]
/system/nfc/src/adaptation/
Ddebug_nfcsnoop.cc147 void nfcsnoop_capture(const NFC_HDR* packet, bool is_received) { in nfcsnoop_capture() argument
152 uint8_t* p = (uint8_t*)(packet + 1) + packet->offset; in nfcsnoop_capture()
174 } else if (packet->len > 2) { in nfcsnoop_capture()

123