Home
last modified time | relevance | path

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

12

/system/vold/
DCryptCommandListener.cpp93 int CryptCommandListener::sendGenericOkFailOnBool(SocketClient *cli, bool success) { in sendGenericOkFailOnBool() argument
95 return cli->sendMsg(ResponseCode::CommandOkay, "Command succeeded", false); in sendGenericOkFailOnBool()
97 return cli->sendMsg(ResponseCode::OperationFailed, "Command failed", false); in sendGenericOkFailOnBool()
128 static bool check_argc(SocketClient *cli, const std::string &subcommand, int argc, in check_argc() argument
144 cli->sendMsg(ResponseCode::CommandSyntaxError, message.c_str(), false); in check_argc()
172 int CryptCommandListener::CryptfsCmd::runCommand(SocketClient *cli, in runCommand() argument
174 if ((cli->getUid() != 0) && (cli->getUid() != AID_SYSTEM)) { in runCommand()
175cli->sendMsg(ResponseCode::CommandNoPermission, "No permission to run cryptfs commands", false); in runCommand()
180 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing subcommand", false); in runCommand()
188 if (!check_argc(cli, subcommand, argc, 3, "<passwd>")) return 0; in runCommand()
[all …]
DCommandListener.cpp100 int CommandListener::sendGenericOkFail(SocketClient *cli, int cond) { in sendGenericOkFail() argument
102 return cli->sendMsg(ResponseCode::CommandOkay, "Command succeeded", false); in sendGenericOkFail()
104 return cli->sendMsg(ResponseCode::OperationFailed, "Command failed", false); in sendGenericOkFail()
112 int CommandListener::DumpCmd::runCommand(SocketClient *cli, in runCommand() argument
114 cli->sendMsg(0, "Dumping loop status", false); in runCommand()
115 if (Loop::dumpState(cli)) { in runCommand()
116 cli->sendMsg(ResponseCode::CommandOkay, "Loop dump failed", true); in runCommand()
118 cli->sendMsg(0, "Dumping DM status", false); in runCommand()
119 if (Devmapper::dumpState(cli)) { in runCommand()
120 cli->sendMsg(ResponseCode::CommandOkay, "Devmapper dump failed", true); in runCommand()
[all …]
DCryptCommandListener.h31 static int sendGenericOkFailOnBool(SocketClient *cli, bool success);
DCommandListener.h31 static int sendGenericOkFail(SocketClient *cli, int cond);
DVolumeManager.h170 int listMountedObbs(SocketClient* cli);
/system/netd/server/
DCommandListener.cpp252 int CommandListener::InterfaceCmd::runCommand(SocketClient *cli, in runCommand() argument
255 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand()
264 cli->sendMsg(ResponseCode::OperationFailed, "Failed to open sysfs dir", true); in runCommand()
271 cli->sendMsg(ResponseCode::InterfaceListResult, de->d_name, false); in runCommand()
274 cli->sendMsg(ResponseCode::CommandOkay, "Interface list completed", false); in runCommand()
281 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand()
295 cli->sendMsg(ResponseCode::OperationFailed, "Interface not found", true); in runCommand()
323 cli->sendMsg(ResponseCode::InterfaceGetCfgResult, msg, false); in runCommand()
334 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand()
349 cli->sendMsg(ResponseCode::OperationFailed, "Failed to clear address", true); in runCommand()
[all …]
DMDnsSdListener.cpp62 void MDnsSdListener::Handler::discover(SocketClient *cli, in discover() argument
76 cli->sendMsg(ResponseCode::CommandParameterError, in discover()
89 cli->sendMsg(ResponseCode::CommandParameterError, in discover()
95 cli->sendMsg(ResponseCode::CommandOkay, "Discover operation started", false); in discover()
133 void MDnsSdListener::Handler::stop(SocketClient *cli, int argc, char **argv, const char *str) { in stop() argument
137 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in stop()
145 cli->sendMsg(ResponseCode::CommandParameterError, "Unknown requestId", false); in stop()
153 cli->sendMsg(ResponseCode::CommandOkay, msg, false); in stop()
157 void MDnsSdListener::Handler::serviceRegister(SocketClient *cli, int requestId, in serviceRegister() argument
169 cli->sendMsg(ResponseCode::CommandParameterError, in serviceRegister()
[all …]
DCommandListener.h104 void sendGenericOkFail(SocketClient *cli, int cond);
105 void sendGenericOpFailed(SocketClient *cli, const char *errMsg);
106 void sendGenericSyntaxError(SocketClient *cli, const char *usageMsg);
132 int sendGenericOkFail(SocketClient *cli, int cond);
151 int sendGenericOkFail(SocketClient *cli, int cond);
161 int syntaxError(SocketClient* cli, const char* message);
162 int operationError(SocketClient* cli, const char* message, int ret);
163 int success(SocketClient* cli);
DDnsProxyListener.cpp231 int DnsProxyListener::GetAddrInfoCmd::runCommand(SocketClient *cli, in runCommand() argument
242 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in runCommand()
267 uid_t uid = cli->getUid(); in runCommand()
290 cli->incRef(); in runCommand()
292 new DnsProxyListener::GetAddrInfoHandler(cli, name, service, hints, netcontext, in runCommand()
307 int DnsProxyListener::GetHostByNameCmd::runCommand(SocketClient *cli, in runCommand() argument
318 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in runCommand()
323 uid_t uid = cli->getUid(); in runCommand()
336 cli->incRef(); in runCommand()
338 new DnsProxyListener::GetHostByNameHandler(cli, name, af, netId, mark, in runCommand()
[all …]
DMDnsSdListener.h111 void stop(SocketClient *cli, int argc, char **argv, const char *str);
113 void discover(SocketClient *cli, const char *iface, const char *regType,
117 void serviceRegister(SocketClient *cli, int requestId, const char *interfaceName,
121 void resolveService(SocketClient *cli, int requestId,
125 void setHostname(SocketClient *cli, int requestId, const char *hostname);
127 void getAddrInfo(SocketClient *cli, int requestId, const char *interfaceName,
DBandwidthController.h97 int getTetherStats(SocketClient *cli, TetherStats &stats, std::string &extraProcessingInfo);
168 static int parseForwardChainStats(SocketClient *cli, const TetherStats filter, FILE *fp,
DBandwidthController.cpp1096 int BandwidthController::parseForwardChainStats(SocketClient *cli, const TetherStats filter, in parseForwardChainStats() argument
1176 cli->sendMsg(ResponseCode::TetheringStatsResult, msg, false); in parseForwardChainStats()
1179 cli->sendMsg(ResponseCode::TetheringStatsListResult, msg, false); in parseForwardChainStats()
1193 cli->sendMsg(ResponseCode::CommandOkay, "Tethering stats list completed", false); in parseForwardChainStats()
1204 int BandwidthController::getTetherStats(SocketClient *cli, TetherStats &stats, std::string &extraPr… in getTetherStats() argument
1225 res = parseForwardChainStats(cli, stats, iptOutput, extraProcessingInfo); in getTetherStats()
/system/core/logd/
DCommandListener.cpp81 int CommandListener::ClearCmd::runCommand(SocketClient *cli, in runCommand() argument
84 uid_t uid = cli->getUid(); in runCommand()
85 if (clientHasLogCredentials(cli)) { in runCommand()
90 cli->sendMsg("Missing Argument"); in runCommand()
96 cli->sendMsg("Range Error"); in runCommand()
100 cli->sendMsg(mBuf.clear((log_id_t) id, uid) ? "busy" : "success"); in runCommand()
109 int CommandListener::GetBufSizeCmd::runCommand(SocketClient *cli, in runCommand() argument
113 cli->sendMsg("Missing Argument"); in runCommand()
119 cli->sendMsg("Range Error"); in runCommand()
126 cli->sendMsg(buf); in runCommand()
[all …]
DLogReader.cpp43 bool LogReader::onDataAvailable(SocketClient *cli) { in onDataAvailable() argument
52 int len = read(cli->getSocket(), buffer, sizeof(buffer) - 1); in onDataAvailable()
54 doSocketDelete(cli); in onDataAvailable()
169 logbuf().flushTo(cli, sequence, FlushCommand::hasReadLogs(cli), in onDataAvailable()
170 FlushCommand::hasSecurityLogs(cli), in onDataAvailable()
175 doSocketDelete(cli); in onDataAvailable()
186 setsockopt(cli->getSocket(), SOL_SOCKET, SO_SNDTIMEO, (const char *)&t, sizeof(t)); in onDataAvailable()
188 command.runSocketCommand(cli); in onDataAvailable()
192 void LogReader::doSocketDelete(SocketClient *cli) { in doSocketDelete() argument
198 if (entry->mClient == cli) { in doSocketDelete()
DLogCommand.cpp148 bool clientHasLogCredentials(SocketClient *cli) { in clientHasLogCredentials() argument
149 return clientHasLogCredentials(cli->getUid(), cli->getGid(), cli->getPid()); in clientHasLogCredentials()
DLogReader.h36 virtual bool onDataAvailable(SocketClient *cli);
41 void doSocketDelete(SocketClient *cli);
DLogListener.cpp40 bool LogListener::onDataAvailable(SocketClient *cli) { in onDataAvailable() argument
62 int socket = cli->getSocket(); in onDataAvailable()
DLogListener.h31 virtual bool onDataAvailable(SocketClient *cli);
DLogAudit.h38 virtual bool onDataAvailable(SocketClient *cli);
DLogKlog.h57 virtual bool onDataAvailable(SocketClient *cli);
DLogUtils.h44 bool clientHasLogCredentials(SocketClient *cli);
DLogAudit.cpp56 bool LogAudit::onDataAvailable(SocketClient *cli) { in onDataAvailable() argument
68 if (audit_get_reply(cli->getSocket(), &rep, GET_REPLY_BLOCKING, 0) < 0) { in onDataAvailable()
/system/core/libsysutils/src/
DFrameworkListener.cpp85 void FrameworkListener::dispatchCommand(SocketClient *cli, char *data) { in dispatchCommand() argument
120 cli->sendMsg(500, "Unsupported escape sequence", false); in dispatchCommand()
146 cli->sendMsg(500, "Invalid sequence number", false); in dispatchCommand()
149 cli->setCmdNum(cmdNum); in dispatchCommand()
174 cli->sendMsg(500, "Unclosed quotes error", false); in dispatchCommand()
188 if (c->runCommand(cli, argc, argv)) { in dispatchCommand()
194 cli->sendMsg(500, "Command not recognized", false); in dispatchCommand()
202 LOG_EVENT_INT(78001, cli->getUid()); in dispatchCommand()
203 cli->sendMsg(500, "Command too long", false); in dispatchCommand()
DNetlinkListener.cpp44 bool NetlinkListener::onDataAvailable(SocketClient *cli) in onDataAvailable() argument
46 int socket = cli->getSocket(); in onDataAvailable()
/system/core/include/sysutils/
DNetlinkListener.h45 virtual bool onDataAvailable(SocketClient *cli);

12