Home | History | Annotate | Download | only in tc

Lines Matching defs:argv

81 	char **argv = *argv_p;
84 fprintf(stderr, "Unknown action \"%s\", hence option \"%s\" is unparsable\n", au->id, *argv);
155 new_cmd(char **argv)
157 if ((matches(*argv, "change") == 0) ||
158 (matches(*argv, "replace") == 0)||
159 (matches(*argv, "delete") == 0)||
160 (matches(*argv, "add") == 0))
171 char **argv = *argv_p;
191 if (strcmp(*argv, "action") == 0 ) {
193 argv++;
201 } else if (strcmp(*argv, "help") == 0) {
203 } else if (new_cmd(argv)) {
207 strncpy(k, *argv, sizeof (k) - 1);
227 ret = a->parse_aopt(a,&argc, &argv, TCA_ACT_OPTIONS, n);
248 *argv_p = argv;
253 fprintf(stderr, "parse_action: bad value (%d:%s)!\n",argc,*argv);
376 char **argv = *argv_p;
402 argv +=1;
409 if (strcmp(*argv, "action") == 0 ) {
411 argv++;
413 } else if (strcmp(*argv, "help") == 0) {
417 strncpy(k, *argv, sizeof (k) - 1);
431 argv +=1;
438 if (matches(*argv, "index") == 0) {
440 if (get_u32(&i, *argv, 10)) {
446 argv +=1;
478 *argv_p = argv;
486 char **argv = *argv_p;
505 argv +=1;
506 if (parse_action(&argc, &argv, TCA_ACT_TAB, &req.n)) {
518 *argv_p = argv;
523 int tc_act_list_or_flush(int argc, char **argv, int event)
545 strncpy(k, *argv, sizeof (k) - 1);
560 strncpy(k, *argv, sizeof (k) - 1);
594 int do_action(int argc, char **argv)
601 if (matches(*argv, "add") == 0) {
602 ret = tc_action_modify(RTM_NEWACTION, NLM_F_EXCL|NLM_F_CREATE, &argc, &argv);
603 } else if (matches(*argv, "change") == 0 ||
604 matches(*argv, "replace") == 0) {
605 ret = tc_action_modify(RTM_NEWACTION, NLM_F_CREATE|NLM_F_REPLACE, &argc, &argv);
606 } else if (matches(*argv, "delete") == 0) {
608 argv +=1;
609 ret = tc_action_gd(RTM_DELACTION, 0, &argc, &argv);
610 } else if (matches(*argv, "get") == 0) {
612 argv +=1;
613 ret = tc_action_gd(RTM_GETACTION, 0, &argc, &argv);
614 } else if (matches(*argv, "list") == 0 || matches(*argv, "show") == 0
615 || matches(*argv, "lst") == 0) {
620 return tc_act_list_or_flush(argc-2, argv+2, RTM_GETACTION);
621 } else if (matches(*argv, "flush") == 0) {
626 return tc_act_list_or_flush(argc-2, argv+2, RTM_DELACTION);
627 } else if (matches(*argv, "help") == 0) {
636 fprintf(stderr, "Command \"%s\" is unknown, try \"tc actions help\".\n", *argv);