Lines Matching refs:chain

434 print_header(unsigned int format, const char *chain, struct xtc_handle *handle)  in print_header()  argument
437 const char *pol = ip6tc_get_policy(chain, &counters, handle); in print_header()
438 printf("Chain %s", chain); in print_header()
451 if (!ip6tc_get_references(&refs, chain, handle)) in print_header()
641 append_entry(const xt_chainlabel chain, in append_entry() argument
663 ret &= ip6tc_append_entry(chain, fw, handle); in append_entry()
671 replace_entry(const xt_chainlabel chain, in replace_entry() argument
686 return ip6tc_replace_entry(chain, fw, rulenum, handle); in replace_entry()
690 insert_entry(const xt_chainlabel chain, in insert_entry() argument
713 ret &= ip6tc_insert_entry(chain, fw, rulenum, handle); in insert_entry()
755 delete_entry(const xt_chainlabel chain, in delete_entry() argument
781 ret &= ip6tc_delete_entry(chain, fw, mask, handle); in delete_entry()
790 check_entry(const xt_chainlabel chain, struct ip6t_entry *fw, in check_entry() argument
811 ret &= ip6tc_check_entry(chain, fw, mask, handle); in check_entry()
824 const char *chain; in for_each_chain6() local
828 chain = ip6tc_first_chain(handle); in for_each_chain6()
829 while (chain) { in for_each_chain6()
831 chain = ip6tc_next_chain(handle); in for_each_chain6()
836 chain = ip6tc_first_chain(handle); in for_each_chain6()
837 while (chain) { in for_each_chain6()
838 strcpy(chains + i*sizeof(xt_chainlabel), chain); in for_each_chain6()
840 chain = ip6tc_next_chain(handle); in for_each_chain6()
856 flush_entries6(const xt_chainlabel chain, int verbose, in flush_entries6() argument
859 if (!chain) in flush_entries6()
863 fprintf(stdout, "Flushing chain `%s'\n", chain); in flush_entries6()
864 return ip6tc_flush_entries(chain, handle); in flush_entries6()
868 zero_entries(const xt_chainlabel chain, int verbose, in zero_entries() argument
871 if (!chain) in zero_entries()
875 fprintf(stdout, "Zeroing chain `%s'\n", chain); in zero_entries()
876 return ip6tc_zero_entries(chain, handle); in zero_entries()
880 delete_chain6(const xt_chainlabel chain, int verbose, in delete_chain6() argument
883 if (!chain) in delete_chain6()
887 fprintf(stdout, "Deleting chain `%s'\n", chain); in delete_chain6()
888 return ip6tc_delete_chain(chain, handle); in delete_chain6()
892 list_entries(const xt_chainlabel chain, int rulenum, int verbose, int numeric, in list_entries() argument
920 if (chain && strcmp(chain, this) != 0) in list_entries()
1046 struct xtc_handle *h, const char *chain, int counters) in print_rule6() argument
1056 printf("-A %s", chain); in print_rule6()
1134 list_rules(const xt_chainlabel chain, int rulenum, int counters, in list_rules() argument
1148 if (chain && strcmp(this, chain) != 0) in list_rules()
1168 if (chain && strcmp(this, chain) != 0) in list_rules()
1300 const char *chain = NULL; in do_command6() local
1344 chain = optarg; in do_command6()
1350 chain = optarg; in do_command6()
1356 chain = optarg; in do_command6()
1367 chain = optarg; in do_command6()
1380 chain = optarg; in do_command6()
1390 if (optarg) chain = optarg; in do_command6()
1393 chain = argv[optind++]; in do_command6()
1402 if (optarg) chain = optarg; in do_command6()
1405 chain = argv[optind++]; in do_command6()
1414 if (optarg) chain = optarg; in do_command6()
1417 chain = argv[optind++]; in do_command6()
1423 if (optarg) chain = optarg; in do_command6()
1426 chain = argv[optind++]; in do_command6()
1445 chain = optarg; in do_command6()
1451 if (optarg) chain = optarg; in do_command6()
1454 chain = argv[optind++]; in do_command6()
1460 chain = optarg; in do_command6()
1474 chain = optarg; in do_command6()
1735 if (chain != NULL && strlen(chain) >= XT_EXTENSION_MAXNAMELEN) in do_command6()
1738 chain, XT_EXTENSION_MAXNAMELEN); in do_command6()
1766 if (strcmp(chain, "PREROUTING") == 0 in do_command6()
1767 || strcmp(chain, "INPUT") == 0) { in do_command6()
1773 chain); in do_command6()
1776 if (strcmp(chain, "POSTROUTING") == 0 in do_command6()
1777 || strcmp(chain, "OUTPUT") == 0) { in do_command6()
1783 chain); in do_command6()
1835 ret = append_entry(chain, e, in do_command6()
1842 ret = delete_entry(chain, e, in do_command6()
1849 ret = ip6tc_delete_num_entry(chain, rulenum - 1, *handle); in do_command6()
1852 ret = check_entry(chain, e, in do_command6()
1859 ret = replace_entry(chain, e, rulenum - 1, in do_command6()
1864 ret = insert_entry(chain, e, rulenum - 1, in do_command6()
1871 ret = flush_entries6(chain, cs.options&OPT_VERBOSE, *handle); in do_command6()
1874 ret = zero_entries(chain, cs.options&OPT_VERBOSE, *handle); in do_command6()
1877 ret = ip6tc_zero_counter(chain, rulenum, *handle); in do_command6()
1882 ret = list_entries(chain, in do_command6()
1890 ret = zero_entries(chain, in do_command6()
1893 ret = ip6tc_zero_counter(chain, rulenum, *handle); in do_command6()
1898 ret = list_rules(chain, in do_command6()
1903 ret = zero_entries(chain, in do_command6()
1906 ret = ip6tc_zero_counter(chain, rulenum, *handle); in do_command6()
1909 ret = ip6tc_create_chain(chain, *handle); in do_command6()
1912 ret = delete_chain6(chain, cs.options&OPT_VERBOSE, *handle); in do_command6()
1915 ret = ip6tc_rename_chain(chain, newname, *handle); in do_command6()
1918 ret = ip6tc_set_policy(chain, policy, cs.options&OPT_COUNTERS ? &cs.fw6.counters : NULL, *handle); in do_command6()