Home
last modified time | relevance | path

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

1234567891011

/system/netd/server/
DFwmarkServer.cpp85 FwmarkCommand command; in processClient() local
89 { &command, sizeof(command) }, in processClient()
111 if (!((command.cmdId != FwmarkCommand::ON_CONNECT_COMPLETE && messageLength == sizeof(command)) in processClient()
112 || (command.cmdId == FwmarkCommand::ON_CONNECT_COMPLETE in processClient()
113 && messageLength == sizeof(command) + sizeof(connectInfo)))) { in processClient()
119 if (command.cmdId == FwmarkCommand::QUERY_USER_ACCESS) { in processClient()
123 return mNetworkController->checkUserNetworkAccess(command.uid, command.netId); in processClient()
126 if (command.cmdId == FwmarkCommand::SET_COUNTERSET) { in processClient()
127 return mTrafficCtrl->setCounterSet(command.trafficCtrlInfo, command.uid, client->getUid()); in processClient()
130 if (command.cmdId == FwmarkCommand::DELETE_TAGDATA) { in processClient()
[all …]
DFirewallController.cpp116 std::string command = in setFirewallType() local
122 res = execIptablesRestore(V4V6, command.c_str()); in setFirewallType()
136 std::string command = in resetFirewall() local
143 return (execIptablesRestore(V4V6, command.c_str()) == 0) ? 0 : -EREMOTEIO; in resetFirewall()
167 std::string command = "*filter\n"; in enableChildChains() local
169 StringAppendF(&command, "%s %s -j %s\n", (enable ? "-A" : "-D"), parent, name); in enableChildChains()
171 StringAppendF(&command, "COMMIT\n"); in enableChildChains()
173 return execIptablesRestore(V4V6, command); in enableChildChains()
206 std::string command = Join(std::vector<std::string> { in setInterfaceRule() local
212 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
267 command.c_str(), process->errBuf.c_str()); in maybeLogStderr()
273 const std::string& command, in drainAndWaitForAck() argument
343 maybeLogStderr(process, command); in drainAndWaitForAck()
348 int IptablesRestoreController::execute(const IptablesTarget target, const std::string& command, in execute() argument
361 res |= sendCommand(IPTABLES_PROCESS, command, output); in execute()
364 res |= sendCommand(IP6TABLES_PROCESS, command, output); in execute()
DControllers.cpp131 std::string command = StringPrintf("*%s\n-S %s\nCOMMIT\n", table, parentChain); in findExistingChildChains() local
133 if (Controllers::execIptablesRestoreWithOutput(target, command, &output) == -1) { in findExistingChildChains()
157 std::string command = StringPrintf("*%s\n", table); in createChildChains() local
175 StringAppendF(&command, ":%s -\n", parentChain); in createChildChains()
176 StringAppendF(&command, "-F %s\n", parentChain); in createChildChains()
183 StringAppendF(&command, ":%s -\n", childChain); in createChildChains()
186 StringAppendF(&command, CHILD_CHAIN_TEMPLATE, parentChain, childChain); in createChildChains()
189 command += "COMMIT\n"; in createChildChains()
190 execIptablesRestore(target, command); in createChildChains()
/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/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/bt/hci/src/
Dhci_layer.cc73 BT_HDR* command; member
290 static void transmit_command(BT_HDR* command, in transmit_command() argument
296 uint8_t* stream = command->data + command->offset; in transmit_command()
300 wait_entry->command = command; in transmit_command()
305 command->event = MSG_STACK_TO_HC_HCI_CMD; in transmit_command()
310 static future_t* transmit_command_futured(BT_HDR* command) { in transmit_command_futured() argument
315 uint8_t* stream = command->data + command->offset; in transmit_command_futured()
318 wait_entry->command = command; in transmit_command_futured()
322 command->event = MSG_STACK_TO_HC_HCI_CMD; in transmit_command_futured()
369 buffer_allocator->free(wait_entry->command); in enqueue_command()
[all …]
/system/netd/client/
DNetdClient.cpp111 FwmarkCommand command = {FwmarkCommand::ON_ACCEPT, 0, 0, 0}; in netdClientAccept4() local
112 if (int error = FwmarkClient().send(&command, acceptedSocket, nullptr)) { in netdClientAccept4()
122 FwmarkCommand command = {FwmarkCommand::ON_CONNECT, 0, 0, 0}; in netdClientConnect() local
123 if (int error = FwmarkClient().send(&command, sockfd, nullptr)) { in netdClientConnect()
138 FwmarkCommand command = {FwmarkCommand::ON_CONNECT_COMPLETE, /* netId (ignored) */ 0, in netdClientConnect() local
141 FwmarkClient().send(&command, sockfd, &connectInfo); in netdClientConnect()
368 FwmarkCommand command = {FwmarkCommand::SELECT_NETWORK, netId, 0, 0}; in setNetworkForSocket() local
369 return FwmarkClient().send(&command, socketFd, nullptr); in setNetworkForSocket()
384 FwmarkCommand command = {FwmarkCommand::PROTECT_FROM_VPN, 0, 0, 0}; in protectFromVpn() local
385 return FwmarkClient().send(&command, socketFd, nullptr); in protectFromVpn()
[all …]
/system/core/adb/daemon/
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 …]
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_, std::string(command))) { in sendCommand()
89 unique_fd execute_abb_command(std::string_view command) { in execute_abb_command() argument
90 return abbp->sendCommand(command); in execute_abb_command()
/system/tools/hidl/c2hal/test/
Dbuild_all.py55 command = ["c2hal",
60 command += ["-g"]
62 command += [path_join(path, header)]
64 res = call(command)
/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/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/core/fastboot/device/
Dfastboot_device.cpp126 char command[FB_RESPONSE_SZ + 1]; in ExecuteCommands() local
128 auto bytes_read = transport_->Read(command, FB_RESPONSE_SZ); in ExecuteCommands()
133 command[bytes_read] = '\0'; in ExecuteCommands()
135 LOG(INFO) << "Fastboot command: " << command; in ExecuteCommands()
139 if (android::base::StartsWith(command, "oem ")) { in ExecuteCommands()
140 args = {command}; in ExecuteCommands()
143 args = android::base::Split(command, ":"); in ExecuteCommands()
/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/bt/tools/hci/
Dmain.c59 const command_t* command = find_command(argv[0]); in help() local
60 if (!command) { in help()
65 printf("%s %s\n", argv[0], command->help); in help()
162 const command_t* command = find_command(argv[1]); in main() local
163 if (!command) { in main()
168 if (!command->handler) { in main()
173 return command->handler(argc - 2, &argv[2]); in main()
/system/bt/build/toolchain/gcc/
DBUILD.gn22command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}…
32command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{sourc…
42 command = "rm -f {{output}} && ar rcs {{output}} @$rspfile"
57 command =
80command = "$cxx {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group {{l…
89 command = "touch {{output}}"
94 command = "cp -af {{source}} {{output}}"
/system/core/adb/
Dsockets.cpp433 p->msg.command = A_WRTE; in remote_socket_enqueue()
452 p->msg.command = A_OKAY; in remote_socket_ready()
462 p->msg.command = A_CLSE; in remote_socket_shutdown()
507 p->msg.command = A_OPEN; in connect_to_remote()
601 std::string_view command = full_service; in parse_host_service() local
603 auto consume = [&full_service, &serial, &command](size_t count) { in parse_host_service()
604 CHECK_LE(count, command.size()); in parse_host_service()
606 CHECK_EQ(serial.data() + serial.size(), command.data()); in parse_host_service()
610 command.remove_prefix(count); in parse_host_service()
614 auto finish = [out_serial, out_command, &serial, &command] { in parse_host_service()
[all …]
/system/bt/build/toolchain/clang/
DBUILD.gn41command = "$clang -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{sour…
51command = "$clangxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{s…
61 command = "rm -f {{output}} && ar rcs {{output}} @$rspfile"
76 command =
99command = "$clangxx {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group…
108 command = "touch {{output}}"
113 command = "cp -af {{source}} {{output}}"
/system/bt/hci/include/
Dhci_layer.h67 typedef void (*command_status_cb)(uint8_t status, BT_HDR* command,
76 void (*transmit_command)(BT_HDR* command,
80 future_t* (*transmit_command_futured)(BT_HDR* command);
/system/hardware/interfaces/net/netd/testutils/
DVtsHalNetNetdTestUtils.cpp47 static std::vector<std::string> runCommand(const std::string& command) { in runCommand() argument
51 if ((f = popen(command.c_str(), "r")) == nullptr) { in runCommand()
69 std::string command = StringPrintf("%s %s rule list", IP_PATH, ipVersion); in listIpRules() local
70 return runCommand(command); in listIpRules()
/system/core/adb/client/
Dconsole.cpp49 std::string command = "auth "; in adb_construct_auth_command() local
50 command += token; in adb_construct_auth_command()
51 command += '\n'; in adb_construct_auth_command()
52 return command; in adb_construct_auth_command()
/system/vold/
DAppFuseUtil.cpp73 static android::status_t RunCommand(const std::string& command, uid_t uid, const std::string& path, in RunCommand() argument
76 LOG(DEBUG) << "Run app fuse command " << command << " for the path " << path << " and uid " in RunCommand()
80 if (command == "mount") { in RunCommand()
82 } else if (command == "unmount") { in RunCommand()
96 LOG(ERROR) << "Unknown appfuse command " << command; in RunCommand()

1234567891011