Lines Matching refs:argv
200 char **argv = *argv_p;
201 char *p = *argv;
210 } else if (matches(*argv, "nexthdr+") == 0) {
213 p = *argv;
218 argc--; argv++;
221 *argv_p = argv;
231 char **argv = *argv_p;
238 if (get_u32(&key, *argv, 0))
240 argc--; argv++;
242 if (get_u32(&mask, *argv, 16))
244 argc--; argv++;
246 if (argc > 0 && strcmp(argv[0], "at") == 0) {
248 if (parse_at(&argc, &argv, &off, &offmask))
254 *argv_p = argv;
263 char **argv = *argv_p;
270 if (get_u32(&key, *argv, 0))
272 argc--; argv++;
274 if (get_u32(&mask, *argv, 16))
276 argc--; argv++;
278 if (argc > 0 && strcmp(argv[0], "at") == 0) {
280 if (parse_at(&argc, &argv, &off, &offmask))
285 *argv_p = argv;
294 char **argv = *argv_p;
301 if (get_u32(&key, *argv, 0))
303 argc--; argv++;
305 if (get_u32(&mask, *argv, 16))
307 argc--; argv++;
312 if (argc > 0 && strcmp(argv[0], "at") == 0) {
314 if (parse_at(&argc, &argv, &off, &offmask))
320 *argv_p = argv;
329 char **argv = *argv_p;
337 if (get_prefix_1(&addr, *argv, AF_INET))
339 argc--; argv++;
341 if (argc > 0 && strcmp(argv[0], "at") == 0) {
343 if (parse_at(&argc, &argv, &off, &offmask))
355 *argv_p = argv;
364 char **argv = *argv_p;
373 if (get_prefix_1(&addr, *argv, AF_INET6))
375 argc--; argv++;
377 if (argc > 0 && strcmp(argv[0], "at") == 0) {
379 if (parse_at(&argc, &argv, &off, &offmask))
402 *argv_p = argv;
410 char **argv = *argv_p;
419 if (get_u32(&key, *argv, 0))
421 argc--; argv++;
423 if (get_u32(&mask, *argv, 16))
425 argc--; argv++;
440 *argv_p = argv;
449 char **argv = *argv_p;
457 if (sscanf(*argv, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
461 *argv);
465 argc--; argv++;
466 if (argc > 0 && strcmp(argv[0], "at") == 0) {
468 if (parse_at(&argc, &argv, &off, &offmask))
479 *argv_p = argv;
487 char **argv = *argv_p;
492 if (strcmp(*argv, "src") == 0) {
494 res = parse_ip_addr(&argc, &argv, sel, 12);
495 } else if (strcmp(*argv, "dst") == 0) {
497 res = parse_ip_addr(&argc, &argv, sel, 16);
498 } else if (strcmp(*argv, "tos") == 0 ||
499 matches(*argv, "dsfield") == 0) {
501 res = parse_u8(&argc, &argv, sel, 1, 0);
502 } else if (strcmp(*argv, "ihl") == 0) {
504 res = parse_u8(&argc, &argv, sel, 0, 0);
505 } else if (strcmp(*argv, "protocol") == 0) {
507 res = parse_u8(&argc, &argv, sel, 9, 0);
508 } else if (matches(*argv, "precedence") == 0) {
510 res = parse_u8(&argc, &argv, sel, 1, 0);
511 } else if (strcmp(*argv, "nofrag") == 0) {
512 argc--; argv++;
514 } else if (strcmp(*argv, "firstfrag") == 0) {
515 argc--; argv++;
517 } else if (strcmp(*argv, "df") == 0) {
518 argc--; argv++;
520 } else if (strcmp(*argv, "mf") == 0) {
521 argc--; argv++;
523 } else if (strcmp(*argv, "dport") == 0) {
525 res = parse_u16(&argc, &argv, sel, 22, 0);
526 } else if (strcmp(*argv, "sport") == 0) {
528 res = parse_u16(&argc, &argv, sel, 20, 0);
529 } else if (strcmp(*argv, "icmp_type") == 0) {
531 res = parse_u8(&argc, &argv, sel, 20, 0);
532 } else if (strcmp(*argv, "icmp_code") == 0) {
534 res = parse_u8(&argc, &argv, sel, 20, 1);
539 *argv_p = argv;
547 char **argv = *argv_p;
552 if (strcmp(*argv, "src") == 0) {
554 res = parse_ip6_addr(&argc, &argv, sel, 8);
555 } else if (strcmp(*argv, "dst") == 0) {
557 res = parse_ip6_addr(&argc, &argv, sel, 24);
558 } else if (strcmp(*argv, "priority") == 0) {
560 res = parse_ip6_class(&argc, &argv, sel);
561 } else if (strcmp(*argv, "protocol") == 0) {
563 res = parse_u8(&argc, &argv, sel, 6, 0);
564 } else if (strcmp(*argv, "flowlabel") == 0) {
566 res = parse_u32(&argc, &argv, sel, 0, 0);
567 } else if (strcmp(*argv, "dport") == 0) {
569 res = parse_u16(&argc, &argv, sel, 42, 0);
570 } else if (strcmp(*argv, "sport") == 0) {
572 res = parse_u16(&argc, &argv, sel, 40, 0);
573 } else if (strcmp(*argv, "icmp_type") == 0) {
575 res = parse_u8(&argc, &argv, sel, 40, 0);
576 } else if (strcmp(*argv, "icmp_code") == 0) {
578 res = parse_u8(&argc, &argv, sel, 41, 1);
583 *argv_p = argv;
591 char **argv = *argv_p;
596 if (strcmp(*argv, "src") == 0) {
598 res = parse_ether_addr(&argc, &argv, sel, -8);
599 } else if (strcmp(*argv, "dst") == 0) {
601 res = parse_ether_addr(&argc, &argv, sel, -14);
603 fprintf(stderr, "Unknown match: ether %s\n", *argv);
608 *argv_p = argv;
617 char **argv = *argv_p;
622 if (strcmp(*argv, "src") == 0) {
624 res = parse_u16(&argc, &argv, sel, 0, -1);
625 } else if (strcmp(*argv, "dst") == 0) {
627 res = parse_u16(&argc, &argv, sel, 2, -1);
632 *argv_p = argv;
641 char **argv = *argv_p;
646 if (strcmp(*argv, "type") == 0) {
648 res = parse_u8(&argc, &argv, sel, 0, -1);
649 } else if (strcmp(*argv, "code") == 0) {
651 res = parse_u8(&argc, &argv, sel, 1, -1);
656 *argv_p = argv;
664 char **argv = *argv_p;
670 if (get_u32(&mark.val, *argv, 0)) {
676 if (get_u32(&mark.mask, *argv, 0)) {
691 *argv_p = argv;
699 char **argv = *argv_p;
705 if (matches(*argv, "u32") == 0) {
707 res = parse_u32(&argc, &argv, sel, 0, 0);
708 } else if (matches(*argv, "u16") == 0) {
710 res = parse_u16(&argc, &argv, sel, 0, 0);
711 } else if (matches(*argv, "u8") == 0) {
713 res = parse_u8(&argc, &argv, sel, 0, 0);
714 } else if (matches(*argv, "ip") == 0) {
716 res = parse_ip(&argc, &argv, sel);
717 } else if (matches(*argv, "ip6") == 0) {
719 res = parse_ip6(&argc, &argv, sel);
720 } else if (matches(*argv, "udp") == 0) {
722 res = parse_udp(&argc, &argv, sel);
723 } else if (matches(*argv, "tcp") == 0) {
725 res = parse_tcp(&argc, &argv, sel);
726 } else if (matches(*argv, "icmp") == 0) {
728 res = parse_icmp(&argc, &argv, sel);
729 } else if (matches(*argv, "mark") == 0) {
731 res = parse_mark(&argc, &argv, n);
732 } else if (matches(*argv, "ether") == 0) {
734 res = parse_ether(&argc, &argv, sel);
739 *argv_p = argv;
746 char **argv = *argv_p;
749 if (matches(*argv, "plus") == 0) {
752 if (get_integer(&off, *argv, 0))
756 } else if (matches(*argv, "at") == 0) {
759 if (get_integer(&off, *argv, 0))
767 } else if (matches(*argv, "mask") == 0) {
770 if (get_u16(&mask, *argv, 16))
774 } else if (matches(*argv, "shift") == 0) {
777 if (get_integer(&shift, *argv, 0))
781 } else if (matches(*argv, "eat") == 0) {
786 argc--; argv++;
790 *argv_p = argv;
797 char **argv = *argv_p;
800 if (matches(*argv, "mask") == 0) {
803 if (get_u32(&mask, *argv, 16))
806 } else if (matches(*argv, "at") == 0) {
809 if (get_integer(&num, *argv, 0))
817 argc--; argv++;
821 *argv_p = argv;
976 int argc, char **argv, struct nlmsghdr *n)
1003 if (matches(*argv, "match") == 0) {
1005 if (parse_selector(&argc, &argv, &sel.sel, n)) {
1011 } else if (matches(*argv, "offset") == 0) {
1013 if (parse_offset(&argc, &argv, &sel.sel)) {
1018 } else if (matches(*argv, "hashkey") == 0) {
1020 if (parse_hashkey(&argc, &argv, &sel.sel)) {
1025 } else if (matches(*argv, "classid") == 0 ||
1026 strcmp(*argv, "flowid") == 0) {
1029 if (get_tc_classid(&handle, *argv)) {
1035 } else if (matches(*argv, "divisor") == 0) {
1038 if (get_unsigned(&divisor, *argv, 0) ||
1045 } else if (matches(*argv, "order") == 0) {
1047 if (get_u32(&order, *argv, 0)) {
1051 } else if (strcmp(*argv, "link") == 0) {
1054 if (get_u32_handle(&handle, *argv)) {
1063 } else if (strcmp(*argv, "ht") == 0) {
1066 if (get_u32_handle(&handle, *argv)) {
1078 } else if (strcmp(*argv, "sample") == 0) {
1088 if (parse_selector(&argc, &argv, &sel2.sel, n)) {
1097 if (*argv != 0 && strcmp(*argv, "divisor") == 0) {
1099 if (get_unsigned(&divisor, *argv, 0) || divisor == 0 ||
1112 } else if (strcmp(*argv, "indev") == 0) {
1116 argv++;
1121 strncpy(ind, *argv, sizeof (ind) - 1);
1124 } else if (matches(*argv, "action") == 0) {
1126 if (parse_action(&argc, &argv, TCA_U32_ACT, n)) {
1133 } else if (matches(*argv, "police") == 0) {
1135 if (parse_police(&argc, &argv, TCA_U32_POLICE, n)) {
1141 } else if (strcmp(*argv, "help") == 0) {
1145 fprintf(stderr, "What is \"%s\"?\n", *argv);
1149 argc--; argv++;