Home
last modified time | relevance | path

Searched refs:cli (Results 1 – 25 of 27) sorted by relevance

12

/system/netd/server/
DNdcDispatcher.cpp53 #define PARSE_INT_RETURN_IF_FAIL(cli, label, intLabel, errMsg, addErrno) \ argument
57 (cli)->sendMsg(ResponseCode::OperationFailed, (errMsg), (addErrno)); \
62 #define PARSE_UINT_RETURN_IF_FAIL(cli, label, intLabel, errMsg, addErrno) \ argument
66 (cli)->sendMsg(ResponseCode::OperationFailed, (errMsg), (addErrno)); \
167 int NdcDispatcher::InterfaceCmd::runCommand(NdcClient* cli, int argc, char** argv) const { in runCommand() argument
169 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand()
179 cli->sendMsg(ResponseCode::OperationFailed, "Failed to get interface list", true); in runCommand()
183 cli->sendMsg(ResponseCode::InterfaceListResult, iface.c_str(), false); in runCommand()
186 cli->sendMsg(ResponseCode::CommandOkay, "Interface list completed", false); in runCommand()
193 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand()
[all …]
DNdcDispatcher.h84 int runCommand(NdcClient* cli, int argc, char** argv) const;
91 int runCommand(NdcClient* cli, int argc, char** argv) const;
98 int runCommand(NdcClient* cli, int argc, char** argv) const;
105 int runCommand(NdcClient* cli, int argc, char** argv) const;
112 int runCommand(NdcClient* cli, int argc, char** argv) const;
115 void sendGenericOkFail(NdcClient* cli, int cond) const;
116 void sendGenericOpFailed(NdcClient* cli, const char* errMsg) const;
117 void sendGenericSyntaxError(NdcClient* cli, const char* usageMsg) const;
124 int runCommand(NdcClient* cli, int argc, char** argv) const;
131 int runCommand(NdcClient* cli, int argc, char** argv) const;
[all …]
DMDnsSdListener.cpp66 void MDnsSdListener::Handler::discover(SocketClient *cli, in discover() argument
80 cli->sendMsg(ResponseCode::CommandParameterError, in discover()
93 cli->sendMsg(ResponseCode::CommandParameterError, in discover()
99 cli->sendMsg(ResponseCode::CommandOkay, "Discover operation started", false); in discover()
137 void MDnsSdListener::Handler::stop(SocketClient *cli, int argc, char **argv, const char *str) { in stop() argument
141 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in stop()
149 cli->sendMsg(ResponseCode::CommandParameterError, "Unknown requestId", false); in stop()
157 cli->sendMsg(ResponseCode::CommandOkay, msg, false); in stop()
161 void MDnsSdListener::Handler::serviceRegister(SocketClient *cli, int requestId, in serviceRegister() argument
173 cli->sendMsg(ResponseCode::CommandParameterError, in serviceRegister()
[all …]
DMDnsSdListener.h115 void stop(SocketClient *cli, int argc, char **argv, const char *str);
117 void discover(SocketClient *cli, const char *iface, const char *regType,
121 void serviceRegister(SocketClient *cli, int requestId, const char *interfaceName,
125 void resolveService(SocketClient *cli, int requestId,
129 void setHostname(SocketClient *cli, int requestId, const char *hostname);
131 void getAddrInfo(SocketClient *cli, int requestId, const char *interfaceName,
/system/core/logd/
DCommandListener.cpp80 int CommandListener::ClearCmd::runCommand(SocketClient* cli, int argc, in runCommand() argument
83 uid_t uid = cli->getUid(); in runCommand()
84 if (clientHasLogCredentials(cli)) { in runCommand()
89 cli->sendMsg("Missing Argument"); in runCommand()
95 cli->sendMsg("Range Error"); in runCommand()
99 cli->sendMsg(mBuf.clear((log_id_t)id, uid) ? "busy" : "success"); in runCommand()
107 int CommandListener::GetBufSizeCmd::runCommand(SocketClient* cli, int argc, in runCommand() argument
111 cli->sendMsg("Missing Argument"); in runCommand()
117 cli->sendMsg("Range Error"); in runCommand()
124 cli->sendMsg(buf); in runCommand()
[all …]
DLogReader.cpp45 bool LogReader::onDataAvailable(SocketClient* cli) { in onDataAvailable() argument
54 int len = read(cli->getSocket(), buffer, sizeof(buffer) - 1); in onDataAvailable()
56 doSocketDelete(cli); in onDataAvailable()
65 if (entry->mClient == cli) { in onDataAvailable()
199 logbuf().flushTo(cli, sequence, nullptr, FlushCommand::hasReadLogs(cli), in onDataAvailable()
200 FlushCommand::hasSecurityLogs(cli), in onDataAvailable()
204 doSocketDelete(cli); in onDataAvailable()
212 cli->getUid(), cli->getGid(), cli->getPid(), nonBlock ? 'n' : 'b', tail, in onDataAvailable()
221 *this, cli, nonBlock, tail, logMask, pid, sequence, timeout); in onDataAvailable()
228 cli->incRef(); in onDataAvailable()
[all …]
DLogCommand.cpp143 bool clientHasLogCredentials(SocketClient* cli) { in clientHasLogCredentials() argument
144 return clientHasLogCredentials(cli->getUid(), cli->getGid(), cli->getPid()); in clientHasLogCredentials()
DLogReader.h40 virtual bool onDataAvailable(SocketClient* cli);
45 void doSocketDelete(SocketClient* cli);
DLogListener.cpp36 bool LogListener::onDataAvailable(SocketClient* cli) { in onDataAvailable() argument
52 int socket = cli->getSocket(); in onDataAvailable()
DLogListener.h31 virtual bool onDataAvailable(SocketClient* cli);
DLogAudit.h44 virtual bool onDataAvailable(SocketClient* cli);
DLogKlog.h61 virtual bool onDataAvailable(SocketClient* cli);
DLogUtils.h69 bool clientHasLogCredentials(SocketClient* cli);
DLogAudit.cpp81 bool LogAudit::onDataAvailable(SocketClient* cli) { in onDataAvailable() argument
93 if (audit_get_reply(cli->getSocket(), &rep, GET_REPLY_BLOCKING, 0) < 0) { in onDataAvailable()
/system/security/keystore/tests/
Dlist_auth_bound_keys_test.sh30 function cli { function
39 cli $USER1_ID "delete --name=no_auth_key" || true
40 cli $USER1_ID "generate --name=no_auth_key"
41 cli $USER2_ID "delete --name=auth_key" || true
42 if ! cli $USER2_ID "generate --name=auth_key --auth_bound"; then
49 if cli $USER2_ID list-apps-with-keys; then
55 if cli $ROOT_ID "list-apps-with-keys"; then
71 done <<< $(cli $SYSTEM_ID "list-apps-with-keys")
/system/core/libsysutils/src/
DFrameworkListener.cpp94 void FrameworkListener::dispatchCommand(SocketClient *cli, char *data) { in dispatchCommand() argument
128 cli->sendMsg(500, "Unsupported escape sequence", false); in dispatchCommand()
154 cli->sendMsg(500, "Invalid sequence number", false); in dispatchCommand()
157 cli->setCmdNum(cmdNum); in dispatchCommand()
182 cli->sendMsg(500, "Unclosed quotes error", false); in dispatchCommand()
194 if (c->runCommand(cli, argc, argv)) { in dispatchCommand()
200 cli->sendMsg(500, "Command not recognized", false); in dispatchCommand()
208 cli->sendMsg(500, "Command too long", false); in dispatchCommand()
DNetlinkListener.cpp46 bool NetlinkListener::onDataAvailable(SocketClient *cli) in onDataAvailable() argument
48 int socket = cli->getSocket(); in onDataAvailable()
DSocketListener_test.cpp105 int runCommand(SocketClient* cli, int argc, char** argv) { in runCommand() argument
108 cli->sendMsg(42, reply.c_str(), /*addErrno=*/false, /*useCmdNum=*/false); in runCommand()
/system/tools/xsdc/src/com/android/xsdc/
DMain.java28 import org.apache.commons.cli.CommandLine;
29 import org.apache.commons.cli.CommandLineParser;
30 import org.apache.commons.cli.GnuParser;
31 import org.apache.commons.cli.HelpFormatter;
32 import org.apache.commons.cli.OptionBuilder;
33 import org.apache.commons.cli.Options;
34 import org.apache.commons.cli.ParseException;
/system/core/libziparchive/
Drun-ziptool-tests-on-android.sh6 adb push cli-tests/ /data/local/tmp/ziptool-tests/
15 exec adb shell $dash_t cli-test /data/local/tmp/ziptool-tests/cli-tests/*.test
DAndroid.bp216 data: ["cli-tests/**/*"],
217 target_required: ["cli-test", "ziptool"],
/system/core/cli-test/
DAndroid.bp2 name: "cli-test",
4 srcs: ["cli-test.cpp"],
DREADME.md1 # cli-test
5 `cli-test` makes integration testing of command-line tools easier.
/system/tools/xsdc/
DAndroid.bp5 "commons-cli-1.2",
/system/core/libsysutils/include/sysutils/
DNetlinkListener.h45 virtual bool onDataAvailable(SocketClient *cli);

12