/system/vold/ |
D | CommandListener.cpp | 95 int CommandListener::sendGenericOkFail(SocketClient *cli, int cond) { in sendGenericOkFail() argument 97 return cli->sendMsg(ResponseCode::CommandOkay, "Command succeeded", false); in sendGenericOkFail() 99 return cli->sendMsg(ResponseCode::OperationFailed, "Command failed", false); in sendGenericOkFail() 107 int CommandListener::DumpCmd::runCommand(SocketClient *cli, in runCommand() argument 109 cli->sendMsg(0, "Dumping loop status", false); in runCommand() 110 if (Loop::dumpState(cli)) { in runCommand() 111 cli->sendMsg(ResponseCode::CommandOkay, "Loop dump failed", true); in runCommand() 113 cli->sendMsg(0, "Dumping DM status", false); in runCommand() 114 if (Devmapper::dumpState(cli)) { in runCommand() 115 cli->sendMsg(ResponseCode::CommandOkay, "Devmapper dump failed", true); in runCommand() [all …]
|
D | CryptCommandListener.cpp | 85 int CryptCommandListener::sendGenericOkFail(SocketClient *cli, int cond) { in sendGenericOkFail() argument 87 return cli->sendMsg(ResponseCode::CommandOkay, "Command succeeded", false); in sendGenericOkFail() 89 return cli->sendMsg(ResponseCode::OperationFailed, "Command failed", false); in sendGenericOkFail() 112 int CryptCommandListener::CryptfsCmd::runCommand(SocketClient *cli, in runCommand() argument 114 if ((cli->getUid() != 0) && (cli->getUid() != AID_SYSTEM)) { in runCommand() 115 … cli->sendMsg(ResponseCode::CommandNoPermission, "No permission to run cryptfs commands", false); in runCommand() 120 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing Argument", false); in runCommand() 128 … cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: cryptfs checkpw <passwd>", false); in runCommand() 135 cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: cryptfs restart", false); in runCommand() 142 cli->sendMsg(ResponseCode::CommandSyntaxError, "Usage: cryptfs cryptocomplete", false); in runCommand() [all …]
|
D | CryptCommandListener.h | 31 static int sendGenericOkFail(SocketClient *cli, int cond);
|
D | CommandListener.h | 31 static int sendGenericOkFail(SocketClient *cli, int cond);
|
/system/netd/server/ |
D | CommandListener.cpp | 264 int CommandListener::InterfaceCmd::runCommand(SocketClient *cli, in runCommand() argument 267 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand() 276 cli->sendMsg(ResponseCode::OperationFailed, "Failed to open sysfs dir", true); in runCommand() 283 cli->sendMsg(ResponseCode::InterfaceListResult, de->d_name, false); in runCommand() 286 cli->sendMsg(ResponseCode::CommandOkay, "Interface list completed", false); in runCommand() 293 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand() 307 cli->sendMsg(ResponseCode::OperationFailed, "Interface not found", true); in runCommand() 335 cli->sendMsg(ResponseCode::InterfaceGetCfgResult, msg, false); in runCommand() 346 cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false); in runCommand() 361 cli->sendMsg(ResponseCode::OperationFailed, "Failed to set address", true); in runCommand() [all …]
|
D | MDnsSdListener.cpp | 59 void MDnsSdListener::Handler::discover(SocketClient *cli, in discover() argument 73 cli->sendMsg(ResponseCode::CommandParameterError, in discover() 86 cli->sendMsg(ResponseCode::CommandParameterError, in discover() 92 cli->sendMsg(ResponseCode::CommandOkay, "Discover operation started", false); in discover() 130 void MDnsSdListener::Handler::stop(SocketClient *cli, int argc, char **argv, const char *str) { in stop() argument 134 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in stop() 142 cli->sendMsg(ResponseCode::CommandParameterError, "Unknown requestId", false); in stop() 150 cli->sendMsg(ResponseCode::CommandOkay, msg, false); in stop() 154 void MDnsSdListener::Handler::serviceRegister(SocketClient *cli, int requestId, in serviceRegister() argument 166 cli->sendMsg(ResponseCode::CommandParameterError, in serviceRegister() [all …]
|
D | CommandListener.h | 112 void sendGenericOkFail(SocketClient *cli, int cond); 113 void sendGenericOpFailed(SocketClient *cli, const char *errMsg); 114 void sendGenericSyntaxError(SocketClient *cli, const char *usageMsg); 137 int sendGenericOkFail(SocketClient *cli, int cond); 156 int sendGenericOkFail(SocketClient *cli, int cond); 166 int syntaxError(SocketClient* cli, const char* message); 167 int operationError(SocketClient* cli, const char* message, int ret); 168 int success(SocketClient* cli);
|
D | DnsProxyListener.cpp | 193 int DnsProxyListener::GetAddrInfoCmd::runCommand(SocketClient *cli, in runCommand() argument 204 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in runCommand() 229 uid_t uid = cli->getUid(); in runCommand() 259 cli->incRef(); in runCommand() 261 new DnsProxyListener::GetAddrInfoHandler(cli, name, service, hints, netcontext); in runCommand() 275 int DnsProxyListener::GetHostByNameCmd::runCommand(SocketClient *cli, in runCommand() argument 286 cli->sendMsg(ResponseCode::CommandParameterError, msg, false); in runCommand() 291 uid_t uid = cli->getUid(); in runCommand() 304 cli->incRef(); in runCommand() 306 new DnsProxyListener::GetHostByNameHandler(cli, name, af, netId, mark); in runCommand() [all …]
|
D | MDnsSdListener.h | 111 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,
|
D | BandwidthController.h | 93 int getTetherStats(SocketClient *cli, TetherStats &stats, std::string &extraProcessingInfo); 165 static int parseForwardChainStats(SocketClient *cli, const TetherStats filter, FILE *fp,
|
D | BandwidthController.cpp | 1131 int BandwidthController::parseForwardChainStats(SocketClient *cli, const TetherStats filter, in parseForwardChainStats() argument 1211 cli->sendMsg(ResponseCode::TetheringStatsResult, msg, false); in parseForwardChainStats() 1214 cli->sendMsg(ResponseCode::TetheringStatsListResult, msg, false); in parseForwardChainStats() 1228 cli->sendMsg(ResponseCode::CommandOkay, "Tethering stats list completed", false); in parseForwardChainStats() 1239 int BandwidthController::getTetherStats(SocketClient *cli, TetherStats &stats, std::string &extraPr… in getTetherStats() argument 1260 res = parseForwardChainStats(cli, stats, iptOutput, extraProcessingInfo); in getTetherStats()
|
/system/core/logd/ |
D | CommandListener.cpp | 79 int CommandListener::ClearCmd::runCommand(SocketClient *cli, 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() 99 cli->sendMsg("success"); in runCommand() 108 int CommandListener::GetBufSizeCmd::runCommand(SocketClient *cli, in runCommand() argument 112 cli->sendMsg("Missing Argument"); in runCommand() 118 cli->sendMsg("Range Error"); in runCommand() 125 cli->sendMsg(buf); in runCommand() [all …]
|
D | LogReader.cpp | 39 bool LogReader::onDataAvailable(SocketClient *cli) { in onDataAvailable() argument 48 int len = read(cli->getSocket(), buffer, sizeof(buffer) - 1); in onDataAvailable() 50 doSocketDelete(cli); in onDataAvailable() 151 logbuf().flushTo(cli, sequence, FlushCommand::hasReadLogs(cli), in onDataAvailable() 156 doSocketDelete(cli); in onDataAvailable() 164 command.runSocketCommand(cli); in onDataAvailable() 168 void LogReader::doSocketDelete(SocketClient *cli) { in doSocketDelete() argument 174 if (entry->mClient == cli) { in doSocketDelete()
|
D | LogCommand.cpp | 60 bool clientHasLogCredentials(SocketClient * cli) { in clientHasLogCredentials() argument 61 uid_t uid = cli->getUid(); in clientHasLogCredentials() 66 gid_t gid = cli->getGid(); in clientHasLogCredentials() 75 snprintf(filename, sizeof(filename), "/proc/%d/status", cli->getPid()); in clientHasLogCredentials()
|
D | LogReader.h | 34 virtual bool onDataAvailable(SocketClient *cli); 39 void doSocketDelete(SocketClient *cli);
|
D | LogListener.cpp | 37 bool LogListener::onDataAvailable(SocketClient *cli) { in onDataAvailable() argument 60 int socket = cli->getSocket(); in onDataAvailable()
|
D | LogCommand.h | 29 bool clientHasLogCredentials(SocketClient * cli);
|
D | LogListener.h | 31 virtual bool onDataAvailable(SocketClient *cli);
|
D | LogAudit.h | 34 virtual bool onDataAvailable(SocketClient *cli);
|
D | LogKlog.h | 53 virtual bool onDataAvailable(SocketClient *cli);
|
D | LogAudit.cpp | 52 bool LogAudit::onDataAvailable(SocketClient *cli) { in onDataAvailable() argument 64 if (audit_get_reply(cli->getSocket(), &rep, GET_REPLY_BLOCKING, 0) < 0) { in onDataAvailable()
|
D | LogKlog.cpp | 190 bool LogKlog::onDataAvailable(SocketClient *cli) { in onDataAvailable() argument 203 retval = read(cli->getSocket(), buffer + len, sizeof(buffer) - 1 - len); in onDataAvailable()
|
/system/core/libsysutils/src/ |
D | FrameworkListener.cpp | 85 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()
|
D | NetlinkListener.cpp | 44 bool NetlinkListener::onDataAvailable(SocketClient *cli) in onDataAvailable() argument 46 int socket = cli->getSocket(); in onDataAvailable()
|
/system/core/include/sysutils/ |
D | NetlinkListener.h | 45 virtual bool onDataAvailable(SocketClient *cli);
|