Home
last modified time | relevance | path

Searched refs:command (Results 1 – 25 of 362) sorted by relevance

12345678910>>...15

/system/netd/server/
DFwmarkServer.cpp102 FwmarkCommand command; in processClient() local
105 char buf[sizeof(command) + sizeof(connectInfo)]; in processClient()
116 memcpy(&command, buf, sizeof(command)); in processClient()
117 memcpy(&connectInfo, buf + sizeof(command), sizeof(connectInfo)); in processClient()
119 size_t expectedLen = sizeof(command); in processClient()
120 if (hasDestinationAddress(command.cmdId, mRedirectSocketCalls)) { in processClient()
130 if (command.cmdId == FwmarkCommand::QUERY_USER_ACCESS) { in processClient()
134 return mNetworkController->checkUserNetworkAccess(command.uid, command.netId); in processClient()
137 if (command.cmdId == FwmarkCommand::SET_COUNTERSET) { in processClient()
138 return mTrafficCtrl->setCounterSet(command.trafficCtrlInfo, command.uid, client->getUid()); in processClient()
[all …]
DFirewallController.cpp115 std::string command = in setFirewallType() local
121 res = execIptablesRestore(V4V6, command.c_str()); in setFirewallType()
135 std::string command = in resetFirewall() local
142 return (execIptablesRestore(V4V6, command.c_str()) == 0) ? 0 : -EREMOTEIO; in resetFirewall()
166 std::string command = "*filter\n"; in enableChildChains() local
168 StringAppendF(&command, "%s %s -j %s\n", (enable ? "-A" : "-D"), parent, name); in enableChildChains()
170 StringAppendF(&command, "COMMIT\n"); in enableChildChains()
172 return execIptablesRestore(V4V6, command); in enableChildChains()
205 std::string command = Join(std::vector<std::string> { in setInterfaceRule() local
211 return (execIptablesRestore(V4V6, command) == 0) ? 0 : -EREMOTEIO; in setInterfaceRule()
[all …]
DIptablesRestoreController.cpp207 const std::string& command, in sendCommand() argument
237 if (!android::base::WriteFully((*process)->stdIn, command.data(), command.length())) { in sendCommand()
247 if (!drainAndWaitForAck(*process, command, output)) { in sendCommand()
256 const std::string& command) { in maybeLogStderr() argument
263 ALOGE("%s\n", command.c_str()); in maybeLogStderr()
272 const std::string& command, in drainAndWaitForAck() argument
342 maybeLogStderr(process, command); in drainAndWaitForAck()
347 int IptablesRestoreController::execute(const IptablesTarget target, const std::string& command, in execute() argument
360 res |= sendCommand(IPTABLES_PROCESS, command, output); in execute()
363 res |= sendCommand(IP6TABLES_PROCESS, command, output); in execute()
/system/bt/vendor_libs/test_vendor_lib/model/controller/
Ddual_mode_controller.cc240 void DualModeController::SniffSubrating(CommandPacketView command) { in SniffSubrating() argument
242 gd_hci::ConnectionManagementCommandView::Create(command)); in SniffSubrating()
375 void DualModeController::Reset(CommandPacketView command) { in Reset() argument
376 auto command_view = gd_hci::ResetView::Create(command); in Reset()
387 void DualModeController::ReadBufferSize(CommandPacketView command) { in ReadBufferSize() argument
388 auto command_view = gd_hci::ReadBufferSizeView::Create(command); in ReadBufferSize()
400 void DualModeController::ReadEncryptionKeySize(CommandPacketView command) { in ReadEncryptionKeySize() argument
402 gd_hci::SecurityCommandView::Create(command)); in ReadEncryptionKeySize()
411 void DualModeController::HostBufferSize(CommandPacketView command) { in HostBufferSize() argument
412 auto command_view = gd_hci::HostBufferSizeView::Create(command); in HostBufferSize()
[all …]
/system/extras/simpleperf/
Dcommand_test.cpp31 TEST(command, CreateCommandInstance) { in TEST() argument
39 TEST(command, GetAllCommands) { in TEST() argument
47 TEST(command, GetValueForOption) { in TEST() argument
48 MockCommand command; in TEST() local
53 ASSERT_TRUE(command.GetUintOption({"-s", "156"}, &i, &value, 0, in TEST()
59 ASSERT_TRUE(command.GetUintOption({"-s", "156k"}, &i, &value, 0, in TEST()
63 ASSERT_FALSE(command.GetUintOption({"-s"}, &i, &value)); in TEST()
65 ASSERT_FALSE(command.GetUintOption({"-s", "0"}, &i, &value, 1)); in TEST()
67 ASSERT_FALSE(command.GetUintOption({"-s", "156"}, &i, &value, 0, 155)); in TEST()
70 ASSERT_TRUE(command.GetDoubleOption({"-s", "3.2"}, &i, &double_value, 0, 4)); in TEST()
/system/core/logcat/tests/
Dlogcat_test.cpp127 std::string command = android::base::StringPrintf( in TEST() local
131 ASSERT_TRUE(NULL != (fp = popen(command.c_str(), "r"))); in TEST()
781 static testing::AssertionResult IsFalse(int ret, const char* command) { in IsFalse() argument
783 << "ret=" << ret << " command=\"" << command << "\"") in IsFalse()
795 char command[sizeof(buf) + sizeof(comm)]; in TEST() local
796 snprintf(command, sizeof(command), comm, buf); in TEST()
799 EXPECT_FALSE(IsFalse(ret = system(command), command)); in TEST()
801 snprintf(command, sizeof(command), "ls -s %s 2>/dev/null", buf); in TEST()
804 EXPECT_TRUE(NULL != (fp = popen(command, "r"))); in TEST()
828 snprintf(command, sizeof(command), "rm -rf %s", buf); in TEST()
[all …]
/system/libufdt/utils/src/
Dmkdtimg.c34 const char *command; member
47 static const struct command_info *search_command(const char *command) { in search_command() argument
49 for (info = command_infos; info->command != NULL; info++) { in search_command()
50 if (strcmp(command, info->command) == 0) { in search_command()
54 if (info->command == NULL) { in search_command()
55 fprintf(stderr, "Unknown command: %s\n", command); in search_command()
63 for (info = command_infos; info->command != NULL; info++) { in print_all_commands()
67 fprintf(out_fp, "%s", info->command); in print_all_commands()
79 for (info = command_infos; info->command != NULL; info++) { in output_all_usage()
122 const char *command = argv[1]; in main() local
[all …]
/system/iorap/src/prefetcher/
Dprefetcher_daemon.cc118 std::ostream& operator<<(std::ostream& os, const Command& command) { in operator <<() argument
120 os << "choice=" << command.choice << ","; in operator <<()
124 switch (command.choice) { in operator <<()
140 os << "sid=" << command.session_id << ","; in operator <<()
144 os << "id=" << command.id << ","; in operator <<()
147 switch (command.choice) { in operator <<()
151 if (command.file_path) { in operator <<()
152 os << *(command.file_path); in operator <<()
160 os << "read_ahead_kind=" << command.read_ahead_kind << ","; in operator <<()
161 os << "length=" << command.length << ","; in operator <<()
[all …]
/system/netd/tests/
Dtest_utils.cpp40 std::vector<std::string> runCommand(const std::string& command) { in runCommand() argument
42 FILE* f = popen(command.c_str(), "r"); // NOLINT(cert-env33-c) in runCommand()
62 std::string command = StringPrintf("%s %s rule list", IP_PATH, ipVersion); in listIpRules() local
63 return runCommand(command); in listIpRules()
67 std::string command = StringPrintf("%s -w -n -L %s", binary, chainName); in listIptablesRule() local
68 return runCommand(command); in listIptablesRule()
87 std::string command = StringPrintf("%s %s route ls table %s", IP_PATH, ipVersion, table); in listIpRoutes() local
88 return runCommand(command); in listIpRoutes()
/system/tools/aidl/tests/
Dintegration-test.py70 def run(self, command, background=False, ignore_status=False): argument
85 command = '( %s ) </dev/null >/dev/null 2>&1 &' % command
86 return self.adb('shell %s' % pipes.quote(command),
102 def adb(self, command, ignore_status=False): argument
115 command = 'adb %s' % command
117 print(command)
118 p = subprocess.Popen(command, shell=True, close_fds=True,
123 raise subprocess.CalledProcessError(p.returncode, command)
/system/netd/client/
DNetdClient.cpp141 FwmarkCommand command = {FwmarkCommand::ON_ACCEPT, 0, 0, 0}; in netdClientAccept4() local
142 if (int error = FwmarkClient().send(&command, acceptedSocket, nullptr)) { in netdClientAccept4()
152 FwmarkCommand command = {FwmarkCommand::ON_CONNECT, 0, 0, 0}; in netdClientConnect() local
156 error = FwmarkClient().send(&command, sockfd, &connectInfo); in netdClientConnect()
158 error = FwmarkClient().send(&command, sockfd, nullptr); in netdClientConnect()
176 FwmarkCommand command = {FwmarkCommand::ON_CONNECT_COMPLETE, /* netId (ignored) */ 0, in netdClientConnect() local
179 FwmarkClient().send(&command, sockfd, &connectInfo); in netdClientConnect()
211 FwmarkCommand command = {FwmarkCommand::ON_SENDMMSG, 0, 0, 0}; in netdClientSendmmsg() local
212 FwmarkClient().send(&command, sockfd, &sendmmsgInfo); in netdClientSendmmsg()
226 FwmarkCommand command = {FwmarkCommand::ON_SENDMSG, 0, 0, 0}; in netdClientSendmsg() local
[all …]
/system/bt/vendor_libs/test_vendor_lib/test/
Dpacket_stream_unittest.cc72 std::unique_ptr<CommandPacket> command = packet_stream_.ReceiveCommand(socketpair_fds_[0]); in CheckedReceiveCommand() local
74 const vector<uint8_t> received_payload = command->GetPayload(); in CheckedReceiveCommand()
78 EXPECT_EQ(packet.size(), command->GetPacketSize()); in CheckedReceiveCommand()
79 EXPECT_EQ(DATA_TYPE_COMMAND, command->GetType()); in CheckedReceiveCommand()
80 EXPECT_EQ(opcode, command->GetOpcode()); in CheckedReceiveCommand()
81 EXPECT_EQ(static_cast<size_t>(payload_size + 1), command->GetPayloadSize()); in CheckedReceiveCommand()
/system/bt/hci/src/
Dhci_layer.cc77 BT_HDR* command; member
314 static void transmit_command(BT_HDR* command, in transmit_command() argument
320 uint8_t* stream = command->data + command->offset; in transmit_command()
324 wait_entry->command = command; in transmit_command()
329 command->event = MSG_STACK_TO_HC_HCI_CMD; in transmit_command()
334 static future_t* transmit_command_futured(BT_HDR* command) { in transmit_command_futured() argument
339 uint8_t* stream = command->data + command->offset; in transmit_command_futured()
342 wait_entry->command = command; in transmit_command_futured()
346 command->event = MSG_STACK_TO_HC_HCI_CMD; in transmit_command_futured()
400 buffer_allocator->free(wait_entry->command); in enqueue_command()
[all …]
/system/core/adb/daemon/
Dabb_service.cpp31 unique_fd sendCommand(std::string_view command);
43 unique_fd AbbProcess::sendCommand(std::string_view command) { in sendCommand() argument
56 if (!SendProtocolString(socket_fd_, command)) { in sendCommand()
88 unique_fd execute_abb_command(std::string_view command) { in execute_abb_command() argument
89 return abbp->sendCommand(command); in execute_abb_command()
Dshell_service_test.cpp47 void StartTestSubprocess(const char* command, SubprocessType type,
51 void StartTestCommandInProcess(std::string name, Command command, SubprocessProtocol protocol);
63 const char* command, SubprocessType type, SubprocessProtocol protocol) { in StartTestSubprocess() argument
64 command_fd_ = StartSubprocess(command, nullptr, type, protocol); in StartTestSubprocess()
71 void ShellServiceTest::StartTestCommandInProcess(std::string name, Command command, in StartTestCommandInProcess() argument
73 command_fd_ = StartCommandInProcess(std::move(name), std::move(command), protocol); in StartTestCommandInProcess()
212 for (std::string command : commands) { in TEST_F() local
214 command.push_back('\n'); in TEST_F()
215 memcpy(protocol->data(), command.data(), command.length()); in TEST_F()
216 ASSERT_TRUE(protocol->Write(ShellProtocol::kIdStdin, command.length())); in TEST_F()
[all …]
/system/bt/gd/hci/
Dhci_layer.cc61 …: command(std::move(command_packet)), waiting_for_status_(false), on_complete(std::move(on_complet… in CommandQueueEntry()
66 …: command(std::move(command_packet)), waiting_for_status_(true), on_status(std::move(on_status_fun… in CommandQueueEntry()
69 std::unique_ptr<CommandPacketBuilder> command; member in __anon89211d040111::CommandQueueEntry
105 virtual void EnqueueCommand(std::unique_ptr<SecurityCommandBuilder> command, in EnqueueCommand() argument
108 hci_.EnqueueCommand(std::move(command), std::move(on_complete), handler); in EnqueueCommand()
111 virtual void EnqueueCommand(std::unique_ptr<SecurityCommandBuilder> command, in EnqueueCommand() argument
113 hci_.EnqueueCommand(std::move(command), std::move(on_status), handler); in EnqueueCommand()
123 virtual void EnqueueCommand(std::unique_ptr<LeSecurityCommandBuilder> command, in EnqueueCommand() argument
126 hci_.EnqueueCommand(std::move(command), std::move(on_complete), handler); in EnqueueCommand()
129 virtual void EnqueueCommand(std::unique_ptr<LeSecurityCommandBuilder> command, in EnqueueCommand() argument
[all …]
Dcontroller_test.cc59 void EnqueueCommand(std::unique_ptr<CommandPacketBuilder> command, in EnqueueCommand() argument
61 …->Post(common::BindOnce(&TestHciLayer::HandleCommand, common::Unretained(this), std::move(command), in EnqueueCommand()
65 void EnqueueCommand(std::unique_ptr<CommandPacketBuilder> command, in EnqueueCommand() argument
73 CommandPacketView command = CommandPacketView::Create(packet_view); in HandleCommand() local
74 ASSERT(command.IsValid()); in HandleCommand()
78 switch (command.GetOpCode()) { in HandleCommand()
110 ReadLocalExtendedFeaturesView read_command = ReadLocalExtendedFeaturesView::Create(command); in HandleCommand()
177 auto view = SetEventMaskView::Create(command); in HandleCommand()
186 command_queue_.push(command); in HandleCommand()
241 CommandPacketView command = command_queue_.front(); in GetCommand() local
[all …]
/system/tools/hidl/c2hal/test/
Dbuild_all.py55 command = ["c2hal",
60 command += ["-g"]
62 command += [path_join(path, header)]
64 res = call(command)
/system/core/init/
Daction.cpp136 for (const auto& command : commands_) { in CheckAllCommands() local
137 if (auto result = command.CheckCommand(); !result.ok()) { in CheckAllCommands()
138 LOG(ERROR) << "Command '" << command.BuildCommandString() << "' (" << filename_ << ":" in CheckAllCommands()
139 << command.line() << ") failed: " << result.error(); in CheckAllCommands()
146 void Action::ExecuteOneCommand(std::size_t command) const { in ExecuteOneCommand()
149 Command cmd = commands_[command]; in ExecuteOneCommand()
159 void Action::ExecuteCommand(const Command& command) const { in ExecuteCommand()
161 auto result = command.InvokeFunc(subcontext_); in ExecuteCommand()
168 std::string cmd_str = command.BuildCommandString(); in ExecuteCommand()
171 << ":" << command.line() << ") took " << duration.count() << "ms and " in ExecuteCommand()
/system/connectivity/wificond/net/
Dnetlink_manager.cpp492 uint32_t command = packet->GetCommand(); in BroadcastHandler() local
494 if (command == NL80211_CMD_NEW_SCAN_RESULTS || in BroadcastHandler()
497 command == NL80211_CMD_SCAN_ABORTED) { in BroadcastHandler()
502 if (command == NL80211_CMD_SCHED_SCAN_RESULTS || in BroadcastHandler()
503 command == NL80211_CMD_SCHED_SCAN_STOPPED) { in BroadcastHandler()
516 if (command == NL80211_CMD_CONNECT || in BroadcastHandler()
517 command == NL80211_CMD_ASSOCIATE || in BroadcastHandler()
518 command == NL80211_CMD_ROAM || in BroadcastHandler()
519 command == NL80211_CMD_DISCONNECT || in BroadcastHandler()
520 command == NL80211_CMD_DISASSOCIATE) { in BroadcastHandler()
[all …]
/system/bt/gd/security/test/
Dfake_hci_layer.h49 …: command(std::move(command_packet)), waiting_for_status_(false), on_complete(std::move(on_complet… in CommandQueueEntry()
54 …: command(std::move(command_packet)), waiting_for_status_(true), on_status(std::move(on_status_fun… in CommandQueueEntry()
57 std::unique_ptr<CommandPacketBuilder> command; variable
68 …void EnqueueCommand(std::unique_ptr<CommandPacketBuilder> command, OnceCallback<void(CommandStatus… in EnqueueCommand() argument
70 …auto command_queue_entry = std::make_unique<CommandQueueEntry>(std::move(command), std::move(on_st… in EnqueueCommand()
74 void EnqueueCommand(std::unique_ptr<CommandPacketBuilder> command, in EnqueueCommand() argument
76 …auto command_queue_entry = std::make_unique<CommandQueueEntry>(std::move(command), std::move(on_co… in EnqueueCommand()
/system/update_engine/
Dfake_p2p_manager_configuration.h61 void SetInitctlStartCommand(const std::vector<std::string>& command) { in SetInitctlStartCommand() argument
62 initctl_start_args_ = command; in SetInitctlStartCommand()
67 void SetInitctlStopCommand(const std::vector<std::string>& command) { in SetInitctlStopCommand() argument
68 initctl_stop_args_ = command; in SetInitctlStopCommand()
/system/core/libziparchive/cli-tests/
Dzipinfo.test10 command: zipinfo -1 $FILES/example.zip | sort
22 command: zipinfo $FILES/example.zip | head -2
29 command: zipinfo $FILES/example.zip | tail -1
36 command: zipinfo $FILES/example.zip d1/ | sed s/17-Jun-/2017-06-/
43 command: zipinfo $FILES/example.zip d1/d2/empty.txt | sed s/17-Jun-/2017-06-/
50 command: zipinfo $FILES/example.zip d1/d2/x.txt | sed s/17-Jun-/2017-06-/
Dunzip.test10 command: unzip -l $FILES/example.zip d1/d2/x.txt
22 command: unzip -lq $FILES/example.zip d1/d2/x.txt
33 command: unzip -lv $FILES/example.zip d1/d2/x.txt
45 command: unzip -v $FILES/example.zip d1/d2/x.txt
57 command: unzip -q $FILES/example.zip d1/d2/a.txt && cat d1/d2/a.txt
64 command: unzip -q $FILES/example.zip
77 command: unzip -q -o $FILES/example.zip d1/d2/a.txt && cat d1/d2/a.txt
85 command: unzip -q -n $FILES/example.zip d1/d2/a.txt && cat d1/d2/a.txt
93 command: unzip -q -d will-be-created $FILES/example.zip d1/d2/a.txt
101 command: unzip -q -d oh-no/will-not-be-created $FILES/example.zip d1/d2/a.txt 2> stderr ; echo $? >…
[all …]
/system/bt/tools/hci/
Dmain.c60 const command_t* command = find_command(argv[0]); in help() local
61 if (!command) { in help()
66 printf("%s %s\n", argv[0], command->help); in help()
163 const command_t* command = find_command(argv[1]); in main() local
164 if (!command) { in main()
169 if (!command->handler) { in main()
174 return command->handler(argc - 2, &argv[2]); in main()

12345678910>>...15