Home
last modified time | relevance | path

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

/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.h113 void stop(SocketClient *cli, int argc, char **argv, const char *str);
115 void discover(SocketClient *cli, const char *iface, const char *regType,
119 void serviceRegister(SocketClient *cli, int requestId, const char *interfaceName,
123 void resolveService(SocketClient *cli, int requestId,
127 void setHostname(SocketClient *cli, int requestId, const char *hostname);
129 void getAddrInfo(SocketClient *cli, int requestId, const char *interfaceName,
/system/core/logd/
DCommandListener.cpp79 int CommandListener::ClearCmd::runCommand(SocketClient* cli, int argc, in runCommand() argument
82 uid_t uid = cli->getUid(); in runCommand()
83 if (clientHasLogCredentials(cli)) { in runCommand()
88 cli->sendMsg("Missing Argument"); in runCommand()
94 cli->sendMsg("Range Error"); in runCommand()
98 cli->sendMsg(mBuf.clear((log_id_t)id, uid) ? "busy" : "success"); in runCommand()
106 int CommandListener::GetBufSizeCmd::runCommand(SocketClient* cli, int argc, in runCommand() argument
110 cli->sendMsg("Missing Argument"); in runCommand()
116 cli->sendMsg("Range Error"); in runCommand()
123 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.h41 virtual bool onDataAvailable(SocketClient* cli);
DLogListener.cpp39 bool LogListener::onDataAvailable(SocketClient* cli) { in onDataAvailable() argument
56 int socket = cli->getSocket(); in onDataAvailable()
DLogAudit.h44 virtual bool onDataAvailable(SocketClient* cli);
DLogKlog.h61 virtual bool onDataAvailable(SocketClient* cli);
DLogUtils.h71 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()
DLogKlog.cpp221 bool LogKlog::onDataAvailable(SocketClient* cli) { in onDataAvailable() argument
235 read(cli->getSocket(), buffer + len, sizeof(buffer) - 1 - len); 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/netd/resolv/
DDnsProxyListener.cpp90 void tryThreadOrError(SocketClient* cli, T* handler) { in tryThreadOrError() argument
91 cli->incRef(); in tryThreadOrError()
101 cli->sendMsg(ResponseCode::OperationFailed, msg, false); in tryThreadOrError()
105 cli->decRef(); in tryThreadOrError()
708 int DnsProxyListener::GetAddrInfoCmd::runCommand(SocketClient *cli, in runCommand() argument
716 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in runCommand()
742 const uid_t uid = cli->getUid(); in runCommand()
761 new DnsProxyListener::GetAddrInfoHandler(cli, name, service, hints, netcontext); in runCommand()
762 tryThreadOrError(cli, handler); in runCommand()
771 int DnsProxyListener::ResNSendCommand::runCommand(SocketClient* cli, int argc, char** argv) { in runCommand() argument
[all …]
/system/tools/xsdc/
DAndroid.bp5 "commons-cli-1.2",
/system/core/libsysutils/include/sysutils/
DNetlinkListener.h45 virtual bool onDataAvailable(SocketClient *cli);
/system/bt/service/
DAndroid.bp167 name: "bluetooth-cli",