Lines Matching defs:argv
222 ((cmd->name && !strcasecmp(cmd->name, arg->argv[arg->argn])) ||
223 (cmd->alias && !strcasecmp(cmd->alias, arg->argv[arg->argn])))) {
265 arg->argc - arg->argn, arg->argv + arg->argn);
291 strncpy(namelist, arg->argv[f], sizeof namelist - 1);
320 if (bundle_RenameDatalink(arg->bundle, arg->cx, arg->argv[arg->argn]))
324 arg->cx->name, arg->argv[arg->argn]);
338 if ((err = system_IsValid(arg->argv[n], arg->prompt, mode)) != NULL) {
339 log_Printf(LogWARN, "%s: %s\n", arg->argv[n], err);
344 bundle_SetLabel(arg->bundle, arg->argv[arg->argc - 1]);
345 system_Select(arg->bundle, arg->argv[n], CONFFILE, arg->prompt, arg->cx);
347 bundle_SetLabel(arg->bundle, arg->argv[arg->argc - 1]);
366 char *argv[MAXARGS];
369 if (argc >= (int)(sizeof argv / sizeof argv[0])) {
370 argc = sizeof argv / sizeof argv[0] - 1;
373 command_Expand(argv, argc, arg->argv + arg->argn, arg->bundle, 1, getpid());
374 Concatinate(buf, sizeof buf, argc, (const char *const *)argv);
376 command_Free(argc, argv);
608 command_Free(int argc, char **argv)
611 free(*argv);
613 argv++;
674 char *argv[MAXARGS];
677 if (argc >= (int)(sizeof argv / sizeof argv[0])) {
678 argc = sizeof argv / sizeof argv[0] - 1;
681 command_Expand(argv, argc, arg->argv + arg->argn, arg->bundle, 0, pid);
691 printf("ppp: Pausing until %s finishes\n", arg->argv[arg->argn]);
692 execvp(argv[0], argv);
701 arg->argc > arg->argn ? arg->argv[arg->argn] : shell,
737 if (!strcasecmp(arg->argv[arg->argn], "reload"))
739 else if (!strcasecmp(arg->argv[arg->argn], "restore"))
741 else if (!strcasecmp(arg->argv[arg->argn], "rewrite"))
743 else if (!strcasecmp(arg->argv[arg->argn], "readonly"))
745 else if (!strcasecmp(arg->argv[arg->argn], "writable"))
1061 mkPrefix(int argc, char const *const *argv, char *tgt, int sz)
1069 len = strlen(argv[f]);
1072 strncpy(tgt+tlen, argv[f], len);
1081 char const *const *argv, struct prompt *prompt, struct datalink *cx)
1089 cmd = FindCommand(cmds, argv[argn], &nmatch);
1092 mkPrefix(argn+1, argv, prefix, sizeof prefix));
1100 mkPrefix(argn+1, argv, prefix, sizeof prefix));
1104 mkPrefix(argn+1, argv, prefix, sizeof prefix), cx->name);
1111 arg.argv = argv;
1119 mkPrefix(argn+1, argv, prefix, sizeof prefix));
1125 mkPrefix(argn+1, argv, prefix, sizeof prefix), val);
1131 command_Expand_Interpret(char *buff, int nb, char *argv[MAXARGS], int offset)
1139 return command_Interpret(buff, nb, argv);
1143 command_Interpret(char *buff, int nb, char *argv[MAXARGS])
1151 return MakeArgs(buff, argv, MAXARGS, PARSE_REDUCE);
1157 arghidden(char const *const *argv, int n)
1163 if (n == 2 && !strncasecmp(argv[0], "se", 2) &&
1164 (!strncasecmp(argv[1], "authk", 5) || !strncasecmp(argv[1], "ke", 2)))
1168 if (n == 1 && !strncasecmp(argv[0], "p", 1))
1172 if (n == 3 && !strncasecmp(argv[0], "se", 2) &&
1173 !strncasecmp(argv[1], "se", 2))
1180 command_Run(struct bundle *bundle, int argc, char const *const *argv,
1203 if (arghidden(argv, f))
1206 strncpy(buf+n, argv[f], sizeof buf - n - 1);
1211 FindExec(bundle, Commands, argc, 0, argv, prompt, cx);
1220 char *argv[MAXARGS];
1222 if ((argc = command_Expand_Interpret(buff, nb, argv, 0)) < 0)
1225 command_Run(bundle, argc, (char const *const *)argv, prompt, label, NULL);
1235 FindExec(arg->bundle, ShowCommands, arg->argc, arg->argn, arg->argv,
1266 (arg->argc > arg->argn && !strcasecmp(arg->argv[arg->argn], "all") &&
1281 if (!strcasecmp(arg->argv[arg->argn], "lcp")) {
1291 } else if (!strcasecmp(arg->argv[arg->argn], "ccp")) {
1309 } else if (!strcasecmp(arg->argv[arg->argn], "ipcp")) {
1330 if (!strcasecmp(arg->argv[arg->argn], "lcp"))
1332 else if (!strcasecmp(arg->argv[arg->argn], "ccp") ||
1333 !strcasecmp(arg->argv[arg->argn], "ccp!")) {
1339 if (arg->argv[arg->argn][3] == '!')
1361 if (!strcasecmp(arg->argv[arg->argn], "lcp")) {
1366 } else if (!strcasecmp(arg->argv[arg->argn], "ccp")) {
1384 if (arg->argc > arg->argn && *arg->argv[arg->argn]) {
1389 if (strcasecmp(arg->argv[arg->argn], "sync") == 0) {
1394 speed = strtol(arg->argv[arg->argn], &end, 10);
1397 arg->argv[arg->argn]);
1402 log_Printf(LogWARN, "%s: Invalid speed\n", arg->argv[arg->argn]);
1418 l->lcp.fsm.StoppedTimer.load = atoi(arg->argv[arg->argn]) * SECTICKS;
1420 l->ccp.fsm.StoppedTimer.load = atoi(arg->argv[arg->argn+1]) * SECTICKS;
1437 port = arg->argv[arg->argn];
1439 passwd = arg->argv[arg->argn+1];
1442 passwd = arg->argv[arg->argn+1];
1443 mask = arg->argv[arg->argn+2];
1448 arg->argv[arg->argn - 2], arg->argv[arg->argn - 1], mask);
1538 char const *const *argv = arg->argv + arg->argn;
1544 sscanf(*argv++, "%x", &code);
1570 if (!ncprange_aton(&ncp->ipcp.cfg.my_range, ncp, arg->argv[arg->argn]))
1573 hisaddr = arg->argv[arg->argn+1];
1576 GetIpAddr(arg->argv[arg->argn+2]);
1578 ncp->ipcp.cfg.TriggerAddress = GetIpAddr(arg->argv[arg->argn+3]);
1600 SetRetry(int argc, char const *const *argv, u_int *timeout, u_int *maxreq,
1609 long l = atol(argv[0]);
1619 l = atol(argv[1]);
1627 l = atol(argv[2]);
1653 argp = arg->argv[arg->argn];
1696 v1 = strtol(arg->argv[arg->argn], &end, 0);
1699 arg->argv[arg->argn]);
1704 v2 = strtol(arg->argv[arg->argn + 1], &end, 0);
1707 arg->argv[arg->argn + 1]);
1717 v3 = strtol(arg->argv[arg->argn + 2], &end, 0);
1720 arg->argv[arg->argn + 2]);
1747 l->ccp.cfg.deflate.out.winsize = atoi(arg->argv[arg->argn]);
1755 l->ccp.cfg.deflate.in.winsize = atoi(arg->argv[arg->argn+1]);
1796 if (!strcmp(arg->argv[arg->argn + 1], "*"))
1798 else if (!strcasecmp(arg->argv[arg->argn + 1], "stateless"))
1800 else if (!strcasecmp(arg->argv[arg->argn + 1], "stateful"))
1804 arg->argv[arg->argn + 1]);
1817 arg->argv + arg->argn);
1898 long_val = atol(arg->argv[arg->argn + 1]);
1955 long_val = atol(arg->argv[arg->argn + 1]);
1989 atoi(arg->argv[arg->argn+1]) : 1;
2032 min = strtoul(arg->argv[arg->argn + 1], NULL, 10);
2071 res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn,
2078 res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn,
2084 res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn,
2090 res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn,
2096 res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn,
2104 res = SetRetry(arg->argc - arg->argn, arg->argv + arg->argn,
2122 ncpaddr_aton(ncpaddr, &arg->bundle->ncp, arg->argv[arg->argn]);
2126 ncpaddr_aton(ncpaddr + 1, &arg->bundle->ncp, arg->argv[arg->argn + 1]);
2145 if (!strcasecmp(arg->argv[dummyint], "auth"))
2147 else if (!strcasecmp(arg->argv[dummyint], "cbcp"))
2149 else if (!strcasecmp(arg->argv[dummyint], "e.164")) {
2154 strncpy(cx->cfg.callback.msg, arg->argv[++dummyint],
2158 } else if (!strcasecmp(arg->argv[dummyint], "none"))
2174 strncpy(cx->cfg.cbcp.phone, arg->argv[arg->argn],
2178 cx->cfg.cbcp.delay = atoi(arg->argv[arg->argn + 1]);
2180 long_val = atol(arg->argv[arg->argn + 2]);
2266 } else if (!strcasecmp(arg->argv[arg->argn], "udp")) {
2271 if (*arg->argv[f] == '+')
2272 ncp_AddUrgentUdpPort(&arg->bundle->ncp, atoi(arg->argv[f] + 1));
2273 else if (*arg->argv[f] == '-')
2274 ncp_RemoveUrgentUdpPort(&arg->bundle->ncp, atoi(arg->argv[f] + 1));
2278 ncp_AddUrgentUdpPort(&arg->bundle->ncp, atoi(arg->argv[f]));
2281 !strcasecmp(arg->argv[arg->argn], "none")) {
2288 if (!strcasecmp(arg->argv[first], "tcp") && ++first == arg->argc)
2292 if (*arg->argv[f] == '+')
2293 ncp_AddUrgentTcpPort(&arg->bundle->ncp, atoi(arg->argv[f] + 1));
2294 else if (*arg->argv[f] == '-')
2295 ncp_RemoveUrgentTcpPort(&arg->bundle->ncp, atoi(arg->argv[f] + 1));
2299 ncp_AddUrgentTcpPort(&arg->bundle->ncp, atoi(arg->argv[f]));
2479 FindExec(arg->bundle, SetCommands, arg->argc, arg->argn, arg->argv,
2507 if (!strcasecmp(arg->argv[arg->argn], "default"))
2510 if (!ncprange_aton(&dest, &arg->bundle->ncp, arg->argv[arg->argn]))
2512 if (!strncasecmp(arg->argv[arg->argn], "MYADDR", 6))
2514 else if (!strncasecmp(arg->argv[arg->argn], "MYADDR6", 7))
2516 else if (!strncasecmp(arg->argv[arg->argn], "HISADDR", 7))
2518 else if (!strncasecmp(arg->argv[arg->argn], "HISADDR6", 8))
2520 else if (!strncasecmp(arg->argv[arg->argn], "DNS0", 4))
2522 else if (!strncasecmp(arg->argv[arg->argn], "DNS1", 4))
2527 if (strcasecmp(arg->argv[arg->argn], "MYADDR") == 0) {
2530 } else if (strcasecmp(arg->argv[arg->argn], "HISADDR") == 0) {
2533 } else if (strcasecmp(arg->argv[arg->argn], "DNS0") == 0) {
2536 } else if (strcasecmp(arg->argv[arg->argn], "DNS1") == 0) {
2540 host = GetIpAddr(arg->argv[arg->argn]);
2543 arg->argv[arg->argn]);
2547 ncprange_setip4(&dest, host, GetIpAddr(arg->argv[arg->argn + 1]));
2551 if (strcasecmp(arg->argv[arg->argn + gw_arg], "HISADDR") == 0) {
2555 } else if (strcasecmp(arg->argv[arg->argn + gw_arg], "HISADDR6") == 0) {
2562 if (!ncpaddr_aton(&gw, &arg->bundle->ncp, arg->argv[arg->argn + gw_arg])) {
2564 arg->argv[arg->argn + gw_arg]);
2587 if(strcasecmp(arg->argv[arg->argn], "all") == 0) {
2592 if (strcasecmp(arg->argv[arg->argn], "MYADDR") == 0) {
2596 } else if (strcasecmp(arg->argv[arg->argn], "MYADDR6") == 0) {
2600 } else if (strcasecmp(arg->argv[arg->argn], "HISADDR") == 0) {
2604 } else if (strcasecmp(arg->argv[arg->argn], "HISADDR6") == 0) {
2608 argv[arg->argn], "DNS0") == 0) {
2611 } else if (strcasecmp(arg->argv[arg->argn], "DNS1") == 0) {
2615 ncprange_aton(&dest, &arg->bundle->ncp, arg->argv[arg->argn]);
2632 if (strcasecmp(arg->argv[arg->argn], "yes") == 0) {
2639 } else if (strcasecmp(arg->argv[arg->argn], "no") == 0) {
2657 if (strcasecmp(arg->argv[arg->argn], "yes") == 0) {
2663 } else if (strcmp(arg->argv[arg->argn], "no") == 0) {
2684 if (!strcmp(arg->argv[arg->argn], "*")) {
2691 FindExec(arg->bundle, Commands, arg->argc, arg->argn+1, arg->argv,
2698 strncpy(namelist, arg->argv[arg->argn], sizeof namelist - 1);
2706 strncpy(namelist, arg->argv[arg->argn], sizeof namelist - 1);
2711 FindExec(arg->bundle, Commands, arg->argc, arg->argn+1, arg->argv,
2790 if (ident_cmd(arg->argv[arg->argn - 2], &keep, &add) == NULL)
2842 if ((cmd = ident_cmd(arg->argv[arg->argn-2], &keep, &add)) == NULL)
3069 char const *argv[3];
3073 if ((argv[0] = ident_cmd(arg->argv[arg->argn-1], &keep, &add)) == NULL)
3075 argv[2] = NULL;
3078 argv[1] = arg->argv[n];
3080 0 : NEG_OPT_MAX), 2, 1, argv, arg->prompt, arg->cx);
3084 arg->argv[arg->argn-1]);
3087 arg->argv[arg->argn] );
3113 if (strcasecmp(arg->argv[arg->argn], "physical") == 0) {
3122 } else if (strcasecmp(arg->argv[arg->argn], "ipcp") == 0)
3125 else if (strcasecmp(arg->argv[arg->argn], "ipv6cp") == 0)
3134 if (strcasecmp(arg->argv[i], "overall") == 0)
3136 else if (strcasecmp(arg->argv[i], "current") == 0)
3138 else if (strcasecmp(arg->argv[i], "peak") == 0)
3152 const char *cmd = arg->argc ? arg->argv[arg->argc - 1] : "???";
3156 tolower(*arg->argv[arg->argn - 1]) == 'a') {
3165 FindExec(arg->bundle, arg->cmd->args, arg->argc, arg->argn, arg->argv,
3185 if (!ncprange_aton(&ifa, NULL, arg->argv[arg->argn]))
3190 if (!ncprange_aton(&ifa, NULL, arg->argv[arg->argn]))
3194 if (!ncpaddr_aton(&addr, NULL, arg->argv[arg->argn]))
3199 if (!ncpaddr_aton(&addr, NULL, arg->argv[arg->argn + 1]))
3209 if (!ncpaddr_aton(&peer, NULL, arg->argv[arg->argn + n]))
3236 if (!ncpaddr_aton(&ifa, NULL, arg->argv[arg->argn]))
3269 if (strcasecmp(arg->argv[arg->argn], "inet") == 0)
3272 else if (strcasecmp(arg->argv[arg->argn], "inet6") == 0)
3292 char *argv[MAXARGS];
3300 if ((unsigned)argc >= sizeof argv / sizeof argv[0]) {
3301 argc = sizeof argv / sizeof argv[0] - 1;
3304 command_Expand(argv, argc, arg->argv + arg->argn, arg->bundle, 1, getpid());
3305 Concatinate(title, sizeof title, argc, (const char *const *)argv);
3307 command_Free(argc, argv);