Home
last modified time | relevance | path

Searched refs:req (Results 1 – 25 of 59) sorted by relevance

123

/system/core/trusty/storage/proxy/
Drpmb.c138 static int send_mmc_rpmb_req(int mmc_fd, const struct storage_rpmb_send_req* req) { in send_mmc_rpmb_req() argument
146 const uint8_t* write_buf = req->payload; in send_mmc_rpmb_req()
147 if (req->reliable_write_size) { in send_mmc_rpmb_req()
152 cmd->blocks = req->reliable_write_size / MMC_BLOCK_SIZE; in send_mmc_rpmb_req()
156 print_buf("request: ", write_buf, req->reliable_write_size); in send_mmc_rpmb_req()
158 write_buf += req->reliable_write_size; in send_mmc_rpmb_req()
163 if (req->write_size) { in send_mmc_rpmb_req()
168 cmd->blocks = req->write_size / MMC_BLOCK_SIZE; in send_mmc_rpmb_req()
172 print_buf("request: ", write_buf, req->write_size); in send_mmc_rpmb_req()
174 write_buf += req->write_size; in send_mmc_rpmb_req()
[all …]
Dstorage.c166 const struct storage_file_delete_req *req = r; in storage_file_delete() local
168 if (req_len < sizeof(*req)) { in storage_file_delete()
170 __func__, req_len, sizeof(*req)); in storage_file_delete()
175 size_t fname_len = strlen(req->name); in storage_file_delete()
176 if (fname_len != req_len - sizeof(*req)) { in storage_file_delete()
178 __func__, fname_len, req_len - sizeof(*req)); in storage_file_delete()
183 int rc = asprintf(&path, "%s/%s", ssdir_name, req->name); in storage_file_delete()
219 const struct storage_file_open_req *req = r; in storage_file_open() local
222 if (req_len < sizeof(*req)) { in storage_file_open()
224 __func__, req_len, sizeof(*req)); in storage_file_open()
[all …]
Dstorage.h22 const void *req, size_t req_len);
25 const void *req, size_t req_len);
28 const void *req, size_t req_len);
31 const void *req, size_t req_len);
34 const void *req, size_t req_len);
37 const void *req, size_t req_len);
40 const void *req, size_t req_len);
Dproxy.c112 static int handle_req(struct storage_msg* msg, const void* req, size_t req_len) { in handle_req() argument
135 rc = storage_file_delete(msg, req, req_len); in handle_req()
139 rc = storage_file_open(msg, req, req_len); in handle_req()
143 rc = storage_file_close(msg, req, req_len); in handle_req()
147 rc = storage_file_write(msg, req, req_len); in handle_req()
151 rc = storage_file_read(msg, req, req_len); in handle_req()
155 rc = storage_file_get_size(msg, req, req_len); in handle_req()
159 rc = storage_file_set_size(msg, req, req_len); in handle_req()
163 rc = rpmb_send(msg, req, req_len); in handle_req()
/system/netd/server/
DOffloadUtils.cpp96 static int sendAndProcessNetlinkResponse(const void* req, int len) { in sendAndProcessNetlinkResponse() argument
124 rv = send(fd, req, len, 0); in sendAndProcessNetlinkResponse()
178 } req = { in doTcQdiscClsact() local
181 .nlmsg_len = sizeof(req), in doTcQdiscClsact()
204 return sendAndProcessNetlinkResponse(&req, sizeof(req)); in doTcQdiscClsact()
291 } req = { in tcFilterAddDevBpf() local
294 .nlmsg_len = sizeof(req), in tcFilterAddDevBpf()
311 .nla_len = sizeof(req.kind), in tcFilterAddDevBpf()
320 .nla_len = sizeof(req.options), in tcFilterAddDevBpf()
327 .nla_len = sizeof(req.options.fd), in tcFilterAddDevBpf()
[all …]
/system/core/trusty/storage/lib/
Dstorage.c147 struct storage_file_open_req req = { .flags = flags }; in storage_open_file() local
148 struct iovec tx[3] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}, {(void *)name, strlen(name)}}; in storage_open_file()
169 struct storage_file_close_req req = { .handle = _to_handle(fh)}; in storage_close_file() local
170 struct iovec tx[2] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}}; in storage_close_file()
183 struct storage_file_delete_req req = { .flags = 0, }; in storage_delete_file() local
184 struct iovec tx[3] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}, {(void *)name, strlen(name)}}; in storage_delete_file()
194 struct storage_file_read_req req = { .handle = _to_handle(fh), .size = size, .offset = off }; in _read_chunk() local
195 struct iovec tx[2] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}}; in _read_chunk()
229 struct storage_file_write_req req = { .handle = _to_handle(fh), .offset = off, }; in _write_req() local
230 struct iovec tx[3] = {{&msg, sizeof(msg)}, {&req, sizeof(req)}, {(void *)buf, size}}; in _write_req()
[all …]
/system/core/trusty/libtrusty/
Dtrusty.c57 struct tipc_send_msg_req req; in tipc_send() local
58 req.iov = (__u64)iov; in tipc_send()
59 req.iov_cnt = (__u64)iovcnt; in tipc_send()
60 req.shm = (__u64)shms; in tipc_send()
61 req.shm_cnt = (__u64)shmcnt; in tipc_send()
63 int rc = TEMP_FAILURE_RETRY(ioctl(fd, TIPC_IOC_SEND_MSG, &req)); in tipc_send()
/system/logging/logd/
Dlibaudit.cpp71 struct audit_message req = {}; in audit_send() local
72 req.nlh.nlmsg_type = static_cast<uint16_t>(type); in audit_send()
73 req.nlh.nlmsg_len = NLMSG_SPACE(size); in audit_send()
74 req.nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in audit_send()
91 memcpy(NLMSG_DATA(&req.nlh), data, size); in audit_send()
104 req.nlh.nlmsg_seq = sequence; in audit_send()
107 sendto(fd, &req, req.nlh.nlmsg_len, 0, (struct sockaddr*)&addr, sizeof(addr))); in audit_send()
112 } else if ((uint32_t)rc != req.nlh.nlmsg_len) { in audit_send()
/system/keymaster/tests/
Dandroid_keymaster_messages_test.cpp80 GenerateKeyRequest req(ver); in TEST() local
81 req.key_description.Reinitialize(params, array_length(params)); in TEST()
82 req.attestation_signing_key_blob = in TEST()
84 req.attest_key_params.Reinitialize(params, array_length(params)); in TEST()
85 req.issuer_subject = KeymasterBlob(reinterpret_cast<const uint8_t*>("bar"), 3); in TEST()
87 UniquePtr<GenerateKeyRequest> deserialized(round_trip(ver, req, ver < 4 ? 78 : 170)); in TEST()
88 EXPECT_EQ(deserialized->key_description, req.key_description); in TEST()
93 EXPECT_EQ(0, memcmp(req.attestation_signing_key_blob.key_material, in TEST()
96 EXPECT_EQ(deserialized->attest_key_params, req.attest_key_params); in TEST()
97 EXPECT_EQ(0, memcmp(req.issuer_subject.data, deserialized->issuer_subject.data, in TEST()
[all …]
/system/core/trusty/coverage/
Dcoverage.cpp81 Result<void> CoverageRecord::Rpc(coverage_client_req* req, int req_fd, coverage_client_resp* resp) { in Rpc() argument
85 rc = write(coverage_srv_fd_, req, sizeof(*req)); in Rpc()
88 .iov_base = req, in Rpc()
89 .iov_len = sizeof(*req), in Rpc()
100 if (rc != (int)sizeof(*req)) { in Rpc()
109 if (resp->hdr.cmd != (req->hdr.cmd | COVERAGE_CLIENT_CMD_RESP_BIT)) { in Rpc()
117 coverage_client_req req; in Open() local
132 req.hdr.cmd = COVERAGE_CLIENT_CMD_OPEN; in Open()
133 req.open_args.uuid = uuid_; in Open()
134 auto ret = Rpc(&req, -1, &resp); in Open()
[all …]
/system/extras/simpleperf/runtest/
Drun_and_sleep.cpp25 struct timespec req; in SleepFunction() local
26 req.tv_sec = sleep_time_in_ns / 1000000000; in SleepFunction()
27 req.tv_nsec = sleep_time_in_ns % 1000000000; in SleepFunction()
28 nanosleep(&req, nullptr); in SleepFunction()
Druntest.py195 for req in self.symbol_overhead_requirements:
196 strs.append('\t\t%s' % req)
198 for req in self.symbol_children_overhead_requirements:
199 strs.append('\t\t%s' % req)
201 for req in self.symbol_relation_requirements:
202 strs.append('\t\t%s' % req)
264 req = load_symbol_relation_requirement(symbol_item)
265 symbol_relation_requirements.append(req)
285 req = SymbolRelationRequirement(symbol_name, comm)
288 req.add_child(child_req)
[all …]
/system/bt/gd/rust/facade/src/
Dlib.rs42 req: StartStackRequest, in start_stack()
45 self.rt.block_on(self.manager.start(req)).unwrap(); in start_stack()
62 Start { req: StartStackRequest, done: oneshot::Sender<()> },
77 async fn start(stack: Stack, req: StartStackRequest, grpc_port: u16) -> Self { in start()
79 match req.get_module_under_test() { in start()
127 LifecycleCommand::Start { req, done } => { in create()
131 server = Some(FacadeServer::start(stack, req, grpc_port).await); in create()
148 async fn start(&self, req: StartStackRequest) -> Result<()> { in start()
150 self.lifecycle_tx.send(LifecycleCommand::Start { req, done: tx }).await?; in start()
/system/core/libnetutils/
Difc_utils.c273 } req; in ifc_act_on_address() local
304 memset(&req, 0, sizeof(req)); in ifc_act_on_address()
307 req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.r)); in ifc_act_on_address()
308 req.n.nlmsg_type = action; in ifc_act_on_address()
309 req.n.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in ifc_act_on_address()
310 req.n.nlmsg_pid = getpid(); in ifc_act_on_address()
313 req.r.ifa_family = ss.ss_family; in ifc_act_on_address()
314 req.r.ifa_flags = nodad ? IFA_F_NODAD : 0; in ifc_act_on_address()
315 req.r.ifa_prefixlen = prefixlen; in ifc_act_on_address()
316 req.r.ifa_index = ifindex; in ifc_act_on_address()
[all …]
/system/bt/btif/src/
Dbtif_gatt_server.cc190 const auto& req = p_data->req_data.p_data->write_req; in btapp_gatts_handle_cback() local
191 vector<uint8_t> value(req.value, req.value + req.len); in btapp_gatts_handle_cback()
194 p_data->req_data.remote_bda, req.handle, req.offset, in btapp_gatts_handle_cback()
195 req.need_rsp, req.is_prep, value); in btapp_gatts_handle_cback()
200 const auto& req = p_data->req_data.p_data->write_req; in btapp_gatts_handle_cback() local
201 vector<uint8_t> value(req.value, req.value + req.len); in btapp_gatts_handle_cback()
204 p_data->req_data.remote_bda, req.handle, req.offset, in btapp_gatts_handle_cback()
205 req.need_rsp, req.is_prep, value); in btapp_gatts_handle_cback()
/system/extras/tests/storage/
Dwipe_blkdev.c55 int req; in wipe_block_device() local
60 req = BLKSECDISCARD; in wipe_block_device()
62 req = BLKDISCARD; in wipe_block_device()
65 ret = ioctl(fd, req, &range); in wipe_block_device()
/system/core/libusbhost/
Dusbhost.c710 struct usb_request *req = calloc(1, sizeof(struct usb_request)); in usb_request_new() local
711 if (!req) { in usb_request_new()
716 req->dev = dev; in usb_request_new()
717 req->max_packet_size = __le16_to_cpu(ep_desc->wMaxPacketSize); in usb_request_new()
718 req->private_data = urb; in usb_request_new()
719 req->endpoint = urb->endpoint; in usb_request_new()
720 urb->usercontext = req; in usb_request_new()
722 return req; in usb_request_new()
725 void usb_request_free(struct usb_request *req) in usb_request_free() argument
727 free(req->private_data); in usb_request_free()
[all …]
/system/extras/simpleperf/demo/SimpleperfExampleWithNative/app/src/main/cpp/
Dnative-lib.cpp80 struct timespec req; in SleepFunction() local
81 req.tv_sec = sleep_time_in_ns / 1000000000; in SleepFunction()
82 req.tv_nsec = sleep_time_in_ns % 1000000000; in SleepFunction()
83 nanosleep(&req, nullptr); in SleepFunction()
/system/core/trusty/apploader/fuzz/
Dapp_fuzzer.cpp54 apploader_load_app_req req = { in SendLoadMsg() local
63 .iov_base = &req, in SendLoadMsg()
64 .iov_len = sizeof(req), in SendLoadMsg()
73 if (rc != static_cast<int>(sizeof(hdr) + sizeof(req))) { in SendLoadMsg()
/system/core/fastboot/
Dusb_osx.cpp346 IOUSBDevRequest req; in try_device() local
349 req.bmRequestType = USBmakebmRequestType(kUSBIn, kUSBStandard, kUSBDevice); in try_device()
350 req.bRequest = kUSBRqGetDescriptor; in try_device()
351 req.wValue = (kUSBStringDesc << 8) | serialIndex; in try_device()
353 req.wIndex = 0x0409; in try_device()
354 req.pData = buffer; in try_device()
355 req.wLength = sizeof(buffer); in try_device()
356 kr = (*dev)->DeviceRequest(dev, &req); in try_device()
358 if (kr == kIOReturnSuccess && req.wLenDone > 0) { in try_device()
362 count = (req.wLenDone - 1) / 2; in try_device()
/system/core/trusty/metrics/
Dmetrics.cpp92 auto req = reinterpret_cast<metrics_req*>(msg); in HandleEvent() local
96 switch (req->cmd) { in HandleEvent()
124 .cmd = req->cmd | METRICS_CMD_RESP_BIT, in HandleEvent()
/system/bt/gd/rust/hci/src/
Dcontroller_facade.rs50 fn write_local_name(&mut self, ctx: RpcContext<'_>, req: NameMsg, sink: UnarySink<Empty>) { in write_local_name()
53 builder.local_name[0..req.get_name().len()].copy_from_slice(req.get_name()); in write_local_name()
/system/core/trusty/keymaster/set_attestation_key/
Dset_attestation_key.cpp122 SetAttestationKeyRequest req; in set_attestation_key_or_cert_bin() local
123 req.algorithm = algorithm; in set_attestation_key_or_cert_bin()
124 req.key_data.Reinitialize(key_data, key_data_size); in set_attestation_key_or_cert_bin()
127 ret = trusty_keymaster_send(cmd, req, &rsp); in set_attestation_key_or_cert_bin()
249 ClearAttestationCertChainRequest req; in clear_cert_chain() local
252 ret = str_to_algorithm(&req.algorithm, algorithm_str); in clear_cert_chain()
257 ret = trusty_keymaster_send(KM_CLEAR_ATTESTATION_CERT_CHAIN, req, &rsp); in clear_cert_chain()
/system/core/trusty/keymaster/
DTrustyKeymaster.cpp70 ConfigureRequest req(message_version()); in Initialize() local
71 req.os_version = GetOsVersion(); in Initialize()
72 req.os_patchlevel = GetOsPatchlevel(); in Initialize()
75 Configure(req, &rsp); in Initialize()
101 static void ForwardCommand(enum keymaster_command command, const KeymasterMessage& req, in ForwardCommand() argument
104 err = trusty_keymaster_send(command, req, rsp); in ForwardCommand()
/system/chre/core/
Dwifi_request_manager.cc91 PendingRangingRequest &req = mPendingRangingRequests.back(); in requestRanging() local
92 req.nanoappInstanceId = nanoapp->getInstanceId(); in requestRanging()
93 req.cookie = cookie; in requestRanging()
118 req.targetList.copy_array(params->targetList, params->targetListLen); in requestRanging()
555 const PendingRangingRequest &req = mPendingRangingRequests.front(); in postRangingAsyncResult() local
561 event->cookie = req.cookie; in postRangingAsyncResult()
565 req.nanoappInstanceId); in postRangingAsyncResult()
574 const PendingRangingRequest &req = mPendingRangingRequests.front(); in dispatchQueuedRangingRequest() local
576 params.targetListLen = static_cast<uint8_t>(req.targetList.size()); in dispatchQueuedRangingRequest()
577 params.targetList = req.targetList.data(); in dispatchQueuedRangingRequest()

123