/system/netd/ |
D | ThrottleController.cpp | 43 int ThrottleController::runTcCmd(const char *cmd) { in runTcCmd() argument 45 size_t len = strnlen(cmd, 255); in runTcCmd() 54 asprintf(&buffer, "%s %s", TC_PATH, cmd); in runTcCmd() 61 char cmd[512]; in setInterfaceThrottle() local 82 sprintf(cmd, "qdisc add dev %s root handle 1: htb default 1 r2q 1000", ifn); in setInterfaceThrottle() 83 if (runTcCmd(cmd)) { in setInterfaceThrottle() 91 sprintf(cmd, "class add dev %s parent 1: classid 1:1 htb rate %dkbit", ifn, txKbps); in setInterfaceThrottle() 92 if (runTcCmd(cmd)) { in setInterfaceThrottle() 109 sprintf(cmd, "qdisc add dev ifb0 root handle 1: htb default 1 r2q 1000"); in setInterfaceThrottle() 110 if (runTcCmd(cmd)) { in setInterfaceThrottle() [all …]
|
D | NatController.cpp | 45 int NatController::runCmd(const char *path, const char *cmd) { in runCmd() argument 47 size_t len = strnlen(cmd, 255); in runCmd() 56 asprintf(&buffer, "%s %s", path, cmd); in runCmd() 119 char cmd[255]; in enableNat() local 164 snprintf(cmd, sizeof(cmd), "-D natctrl_FORWARD -j DROP"); in enableNat() 165 runCmd(IPTABLES_PATH, cmd); in enableNat() 166 snprintf(cmd, sizeof(cmd), "-A natctrl_FORWARD -j DROP"); in enableNat() 167 runCmd(IPTABLES_PATH, cmd); in enableNat() 173 … snprintf(cmd, sizeof(cmd), "-t nat -A natctrl_nat_POSTROUTING -o %s -j MASQUERADE", extIface); in enableNat() 174 if (runCmd(IPTABLES_PATH, cmd)) { in enableNat() [all …]
|
D | SecondaryTableController.cpp | 84 char *cmd; in modifyRoute() local 88 asprintf(&cmd, "%s route %s %s/%d dev %s table %d", in modifyRoute() 91 asprintf(&cmd, "%s route %s %s/%d via %s dev %s table %d", in modifyRoute() 95 if (runAndFree(cli, cmd)) { in modifyRoute() 160 char *cmd; in modifyFromRule() local 165 asprintf(&cmd, "%s %s rule %s from %s table %d", IP_PATH, getVersion(addr), in modifyFromRule() 167 if (runAndFree(NULL, cmd)) { in modifyFromRule() 177 char *cmd; in modifyLocalRoute() local 185 asprintf(&cmd, "%s route %s %s dev %s table %d", IP_PATH, action, addr, iface, in modifyLocalRoute() 187 return runAndFree(NULL, cmd); in modifyLocalRoute() [all …]
|
D | BandwidthController.cpp | 174 int BandwidthController::runIpxtablesCmd(const char *cmd, IptRejectOp rejectHandling, in runIpxtablesCmd() argument 178 ALOGV("runIpxtablesCmd(cmd=%s)", cmd); in runIpxtablesCmd() 179 res |= runIptablesCmd(cmd, rejectHandling, IptIpV4, failureHandling); in runIpxtablesCmd() 180 res |= runIptablesCmd(cmd, rejectHandling, IptIpV6, failureHandling); in runIpxtablesCmd() 191 int BandwidthController::runIptablesCmd(const char *cmd, IptRejectOp rejectHandling, in runIptablesCmd() argument 200 std::string fullCmd = cmd; in runIptablesCmd() 341 char cmd[MAX_CMD_LEN]; in maninpulateNaughtyApps() local 438 char cmd[MAX_CMD_LEN]; in prepCostlyIface() local 455 snprintf(cmd, sizeof(cmd), "-F %s", costCString); in prepCostlyIface() 456 res1 = runIpxtablesCmd(cmd, IptRejectNoAdd, IptFailHide); in prepCostlyIface() [all …]
|
D | NetdCommand.cpp | 19 NetdCommand::NetdCommand(const char *cmd) : in NetdCommand() argument 20 FrameworkCommand(cmd) { in NetdCommand()
|
D | oem_iptables_hook.cpp | 32 static int runIptablesCmd(const char *cmd) { in runIptablesCmd() argument 34 size_t len = strnlen(cmd, 255); in runIptablesCmd() 42 asprintf(&buffer, "%s %s", IPTABLES_PATH, cmd); in runIptablesCmd()
|
D | SoftapController.cpp | 67 int cmd = 0, sub_cmd = 0; in setCommand() 81 cmd = priv_ptr[i].cmd; in setCommand() 91 if (cmd < SIOCDEVPRIVATE) { in setCommand() 102 sub_cmd = cmd; in setCommand() 103 cmd = priv_ptr[j].cmd; in setCommand() 113 ret = ioctl(mSock, cmd, &wrq); in setCommand() 245 int SoftapController::addParam(int pos, const char *cmd, const char *arg) in addParam() argument 249 if ((unsigned)(pos + strlen(cmd) + strlen(arg) + 1) >= sizeof(mBuf)) { in addParam() 253 pos += sprintf(&mBuf[pos], "%s=%s,", cmd, arg); in addParam()
|
D | IdletimerController.cpp | 99 int IdletimerController::runIpxtablesCmd(const char *cmd) { in runIpxtablesCmd() argument 101 size_t len = strnlen(cmd, 255); in runIpxtablesCmd() 109 asprintf(&buffer, "%s %s", IPTABLES_PATH, cmd); in runIpxtablesCmd()
|
D | MDnsSdListener.cpp | 403 char* cmd = argv[1]; in runCommand() local 405 if (strcmp(cmd, "discover") == 0) { in runCommand() 415 } else if (strcmp(cmd, "stop-discover") == 0) { in runCommand() 417 } else if (strcmp(cmd, "register") == 0) { in runCommand() 435 } else if (strcmp(cmd, "stop-register") == 0) { in runCommand() 437 } else if (strcmp(cmd, "resolve") == 0) { in runCommand() 449 } else if (strcmp(cmd, "stop-resolve") == 0) { in runCommand() 451 } else if (strcmp(cmd, "start-service") == 0) { in runCommand() 457 } else if (strcmp(cmd, "stop-service") == 0) { in runCommand() 463 } else if (strcmp(cmd, "sethostname") == 0) { in runCommand() [all …]
|
/system/core/toolbox/ |
D | syren.c | 64 int cmd = -1; in syren_main() local 76 cmd = SYREN_RD; in syren_main() 79 cmd = SYREN_WR; in syren_main() 82 cmd = SYREN_OLD_RD; in syren_main() 85 cmd = SYREN_OLD_WR; in syren_main() 91 if (cmd == SYREN_WR || cmd == SYREN_OLD_WR) { in syren_main() 105 if (cmd != SYREN_RD && cmd != SYREN_OLD_RD) { in syren_main() 113 if (ioctl(fd, cmd, &sio) < 0) { in syren_main() 139 if (ioctl(fd, cmd, &sio) < 0) { in syren_main() 140 fprintf(stderr, "ioctl(%d) failed\n", cmd); in syren_main() [all …]
|
D | renice.c | 81 char *cmd = argv[0]; in renice_main() local 88 usage(cmd); in renice_main() 99 usage(cmd); in renice_main() 105 usage(cmd); in renice_main() 112 usage(cmd); in renice_main()
|
D | toolbox.c | 44 char *cmd = strrchr(argv[0], '/'); in main() local 45 if (cmd) in main() 46 name = cmd + 1; in main()
|
/system/core/fastboot/ |
D | protocol.c | 103 static int _command_send(usb_handle *usb, const char *cmd, in _command_send() argument 107 int cmdsize = strlen(cmd); in _command_send() 119 if(usb_write(usb, cmd, cmdsize) != cmdsize) { in _command_send() 157 int fb_command(usb_handle *usb, const char *cmd) in fb_command() argument 159 return _command_send(usb, cmd, 0, 0, 0); in fb_command() 162 int fb_command_response(usb_handle *usb, const char *cmd, char *response) in fb_command_response() argument 164 return _command_send(usb, cmd, 0, 0, response); in fb_command_response() 169 char cmd[64]; in fb_download_data() local 172 sprintf(cmd, "download:%08x", size); in fb_download_data() 173 r = _command_send(usb, cmd, data, size, 0); in fb_download_data()
|
D | usbtest.c | 128 const char *cmd; member 145 for(i = 0; tests[i].cmd; i++) { in usage() 146 fprintf(stderr," %-8s %s\n", tests[i].cmd, tests[i].help); in usage() 191 for(i = 0; tests[i].cmd; i++) { in main() 192 if(!strcmp(argv[1], tests[i].cmd)) { in main() 197 tests[i].cmd); in main() 201 fprintf(stderr,"usbtest: %s: FAIL\n", tests[i].cmd); in main() 204 fprintf(stderr,"usbtest: %s: OKAY\n", tests[i].cmd); in main()
|
D | engine.c | 90 char cmd[CMD_SIZE]; member 155 cmdsize = vsnprintf(a->cmd, sizeof(a->cmd), fmt, ap); in queue_action() 158 if (cmdsize >= sizeof(a->cmd)) { in queue_action() 160 die("Command length (%d) exceeds maximum size (%d)", cmdsize, sizeof(a->cmd)); in queue_action() 272 const char *partition = a->cmd; in fb_format() 279 char cmd[CMD_SIZE]; in fb_format() local 282 snprintf(cmd, sizeof(cmd), "getvar:partition-type:%s", partition); in fb_format() 283 status = fb_command_response(usb, cmd, response); in fb_format() 316 snprintf(cmd, sizeof(cmd), "getvar:partition-size:%s", partition); in fb_format() 317 status = fb_command_response(usb, cmd, response); in fb_format() [all …]
|
D | fastboot.h | 35 int fb_command(usb_handle *usb, const char *cmd); 36 int fb_command_response(usb_handle *usb, const char *cmd, char *response); 52 void fb_queue_command(const char *cmd, const char *msg);
|
/system/extras/tests/wifi/stress/ |
D | wifiLoadScanAssoc.c | 132 char cmd[MAXCMD]; in main() local 304 rv = snprintf(cmd, sizeof(cmd), "%s", CMD_STATUS); in main() 305 if (rv >= (signed) sizeof(cmd) - 1) { in main() 309 testExecCmd(cmd); in main() 350 rv = snprintf(cmd, sizeof(cmd), "%s", CMD_STATUS); in main() 351 if (rv >= (signed) sizeof(cmd) - 1) { in main() 355 testExecCmd(cmd); in main() 359 rv = snprintf(cmd, sizeof(cmd), "%s", CMD_START_FRAMEWORK); in main() 360 if (rv >= (signed) sizeof(cmd) - 1) { in main() 364 testExecCmd(cmd); in main() [all …]
|
/system/vold/ |
D | VoldCommand.cpp | 19 VoldCommand::VoldCommand(const char *cmd) : in VoldCommand() argument 20 FrameworkCommand(cmd) { in VoldCommand()
|
/system/core/init/ |
D | signal_handler.c | 52 struct command *cmd; in wait_for_one_process() local 112 cmd = node_to_item(node, struct command, clist); in wait_for_one_process() 113 cmd->func(cmd->nargs, cmd->args); in wait_for_one_process()
|
D | parser.c | 15 struct command *cmd; in DUMP() 39 cmd = node_to_item(node2, struct command, clist); in DUMP() 40 RAW(" %p", cmd->func); in DUMP() 41 for (n = 0; n < cmd->nargs; n++) { in DUMP() 42 RAW(" %s", cmd->args[n]); in DUMP()
|
D | init_parser.c | 569 struct command *cmd; in queue_builtin_action() local 575 cmd = calloc(1, sizeof(*cmd)); in queue_builtin_action() 576 cmd->func = func; in queue_builtin_action() 577 cmd->args[0] = name; in queue_builtin_action() 578 list_add_tail(&act->commands, &cmd->clist); in queue_builtin_action() 644 struct command *cmd; in parse_line_service() local 741 cmd = malloc(sizeof(*cmd) + sizeof(char*) * nargs); in parse_line_service() 742 cmd->func = kw_func(kw); in parse_line_service() 743 cmd->nargs = nargs; in parse_line_service() 744 memcpy(cmd->args, args, sizeof(char*) * nargs); in parse_line_service() [all …]
|
/system/core/libsysutils/src/ |
D | FrameworkCommand.cpp | 24 FrameworkCommand::FrameworkCommand(const char *cmd) { in FrameworkCommand() argument 25 mCommand = cmd; in FrameworkCommand()
|
/system/core/libcutils/ |
D | qtaguid.c | 60 static int write_ctrl(const char *cmd) { in write_ctrl() argument 63 ALOGV("write_ctrl(%s)", cmd); in write_ctrl() 70 res = TEMP_FAILURE_RETRY(write(fd, cmd, strlen(cmd))); in write_ctrl() 77 ALOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno); in write_ctrl()
|
D | android_reboot.c | 104 int android_reboot(int cmd, int flags, char *arg) in android_reboot() argument 114 switch (cmd) { in android_reboot()
|
/system/core/libnl_2/genl/ |
D | genl.c | 47 int hdrlen, int flags, uint8_t cmd, uint8_t version) in genlmsg_put() argument 74 gmh->cmd = (__u8) cmd; in genlmsg_put() 116 gmhhdr.cmd = CTRL_CMD_GETFAMILY; in genl_ctrl_alloc_cache()
|