• Home
  • Raw
  • Download

Lines Matching refs:fw

491 print_firewall(const struct ipt_entry *fw,  in print_firewall()  argument
508 t = ipt_get_target((struct ipt_entry *)fw); in print_firewall()
509 flags = fw->ip.flags; in print_firewall()
515 xtables_print_num(fw->counters.pcnt, format); in print_firewall()
516 xtables_print_num(fw->counters.bcnt, format); in print_firewall()
522 fputc(fw->ip.invflags & XT_INV_PROTO ? '!' : ' ', stdout); in print_firewall()
524 const char *pname = proto_to_name(fw->ip.proto, format&FMT_NUMERIC); in print_firewall()
528 printf(FMT("%-5hu", "%hu "), fw->ip.proto); in print_firewall()
534 fputc(fw->ip.invflags & IPT_INV_FRAG ? '!' : '-', stdout); in print_firewall()
542 if (fw->ip.invflags & IPT_INV_VIA_IN) { in print_firewall()
548 if (fw->ip.iniface[0] != '\0') { in print_firewall()
549 strcat(iface, fw->ip.iniface); in print_firewall()
555 if (fw->ip.invflags & IPT_INV_VIA_OUT) { in print_firewall()
561 if (fw->ip.outiface[0] != '\0') { in print_firewall()
562 strcat(iface, fw->ip.outiface); in print_firewall()
569 fputc(fw->ip.invflags & IPT_INV_SRCIP ? '!' : ' ', stdout); in print_firewall()
570 if (fw->ip.smsk.s_addr == 0L && !(format & FMT_NUMERIC)) in print_firewall()
574 strcpy(buf, xtables_ipaddr_to_numeric(&fw->ip.src)); in print_firewall()
576 strcpy(buf, xtables_ipaddr_to_anyname(&fw->ip.src)); in print_firewall()
577 strcat(buf, xtables_ipmask_to_numeric(&fw->ip.smsk)); in print_firewall()
581 fputc(fw->ip.invflags & IPT_INV_DSTIP ? '!' : ' ', stdout); in print_firewall()
582 if (fw->ip.dmsk.s_addr == 0L && !(format & FMT_NUMERIC)) in print_firewall()
586 strcpy(buf, xtables_ipaddr_to_numeric(&fw->ip.dst)); in print_firewall()
588 strcpy(buf, xtables_ipaddr_to_anyname(&fw->ip.dst)); in print_firewall()
589 strcat(buf, xtables_ipmask_to_numeric(&fw->ip.dmsk)); in print_firewall()
597 if(fw->ip.flags & IPT_F_GOTO) in print_firewall()
601 IPT_MATCH_ITERATE(fw, print_match, &fw->ip, format & FMT_NUMERIC); in print_firewall()
606 target->print(&fw->ip, t, format & FMT_NUMERIC); in print_firewall()
616 print_firewall_line(const struct ipt_entry *fw, in print_firewall_line() argument
621 t = ipt_get_target((struct ipt_entry *)fw); in print_firewall_line()
622 print_firewall(fw, t->u.user.name, 0, FMT_PRINT_RULE, h); in print_firewall_line()
627 struct ipt_entry *fw, in append_entry() argument
641 fw->ip.src.s_addr = saddrs[i].s_addr; in append_entry()
642 fw->ip.smsk.s_addr = smasks[i].s_addr; in append_entry()
644 fw->ip.dst.s_addr = daddrs[j].s_addr; in append_entry()
645 fw->ip.dmsk.s_addr = dmasks[j].s_addr; in append_entry()
647 print_firewall_line(fw, handle); in append_entry()
648 ret &= iptc_append_entry(chain, fw, handle); in append_entry()
657 struct ipt_entry *fw, in replace_entry() argument
664 fw->ip.src.s_addr = saddr->s_addr; in replace_entry()
665 fw->ip.dst.s_addr = daddr->s_addr; in replace_entry()
666 fw->ip.smsk.s_addr = smask->s_addr; in replace_entry()
667 fw->ip.dmsk.s_addr = dmask->s_addr; in replace_entry()
670 print_firewall_line(fw, handle); in replace_entry()
671 return iptc_replace_entry(chain, fw, rulenum, handle); in replace_entry()
676 struct ipt_entry *fw, in insert_entry() argument
691 fw->ip.src.s_addr = saddrs[i].s_addr; in insert_entry()
692 fw->ip.smsk.s_addr = smasks[i].s_addr; in insert_entry()
694 fw->ip.dst.s_addr = daddrs[j].s_addr; in insert_entry()
695 fw->ip.dmsk.s_addr = dmasks[j].s_addr; in insert_entry()
697 print_firewall_line(fw, handle); in insert_entry()
698 ret &= iptc_insert_entry(chain, fw, rulenum, handle); in insert_entry()
741 struct ipt_entry *fw, in delete_entry() argument
759 fw->ip.src.s_addr = saddrs[i].s_addr; in delete_entry()
760 fw->ip.smsk.s_addr = smasks[i].s_addr; in delete_entry()
762 fw->ip.dst.s_addr = daddrs[j].s_addr; in delete_entry()
763 fw->ip.dmsk.s_addr = dmasks[j].s_addr; in delete_entry()
765 print_firewall_line(fw, handle); in delete_entry()
766 ret &= iptc_delete_entry(chain, fw, mask, handle); in delete_entry()
775 check_entry(const xt_chainlabel chain, struct ipt_entry *fw, in check_entry() argument
789 fw->ip.src.s_addr = saddrs[i].s_addr; in check_entry()
790 fw->ip.smsk.s_addr = smasks[i].s_addr; in check_entry()
792 fw->ip.dst.s_addr = daddrs[j].s_addr; in check_entry()
793 fw->ip.dmsk.s_addr = dmasks[j].s_addr; in check_entry()
795 print_firewall_line(fw, handle); in check_entry()
796 ret &= iptc_check_entry(chain, fw, mask, handle); in check_entry()
1178 generate_entry(const struct ipt_entry *fw, in generate_entry() argument
1191 *e = *fw; in generate_entry()
1209 set_option(&cs->options, OPT_JUMP, &cs->fw.ip.invflags, cs->invert); in command_jump()
1495 set_option(&cs.options, OPT_PROTOCOL, &cs.fw.ip.invflags, in do_command4()
1503 cs.fw.ip.proto = xtables_parse_protocol(cs.protocol); in do_command4()
1505 if (cs.fw.ip.proto == 0 in do_command4()
1506 && (cs.fw.ip.invflags & XT_INV_PROTO)) in do_command4()
1512 set_option(&cs.options, OPT_SOURCE, &cs.fw.ip.invflags, in do_command4()
1518 set_option(&cs.options, OPT_DESTINATION, &cs.fw.ip.invflags, in do_command4()
1525 set_option(&cs.options, OPT_JUMP, &cs.fw.ip.invflags, in do_command4()
1527 cs.fw.ip.flags |= IPT_F_GOTO; in do_command4()
1542 set_option(&cs.options, OPT_VIANAMEIN, &cs.fw.ip.invflags, in do_command4()
1545 cs.fw.ip.iniface, in do_command4()
1546 cs.fw.ip.iniface_mask); in do_command4()
1554 set_option(&cs.options, OPT_VIANAMEOUT, &cs.fw.ip.invflags, in do_command4()
1557 cs.fw.ip.outiface, in do_command4()
1558 cs.fw.ip.outiface_mask); in do_command4()
1562 set_option(&cs.options, OPT_FRAGMENT, &cs.fw.ip.invflags, in do_command4()
1564 cs.fw.ip.flags |= IPT_F_FRAG; in do_command4()
1570 &cs.fw.ip.invflags, cs.invert); in do_command4()
1588 set_option(&cs.options, OPT_NUMERIC, &cs.fw.ip.invflags, in do_command4()
1600 set_option(&cs.options, OPT_EXPANDED, &cs.fw.ip.invflags, in do_command4()
1613 set_option(&cs.options, OPT_LINENUMBERS, &cs.fw.ip.invflags, in do_command4()
1623 set_option(&cs.options, OPT_COUNTERS, &cs.fw.ip.invflags, in do_command4()
1641 cs.fw.counters.pcnt = cnt; in do_command4()
1647 cs.fw.counters.bcnt = cnt; in do_command4()
1722 (cs.fw.ip.invflags & (IPT_INV_SRCIP | IPT_INV_DSTIP))) in do_command4()
1820 if (cs.fw.ip.flags & IPT_F_GOTO) in do_command4()
1827 e = generate_entry(&cs.fw, cs.matches, cs.target->t); in do_command4()
1917 ret = iptc_set_policy(chain, policy, cs.options&OPT_COUNTERS ? &cs.fw.counters : NULL, *handle); in do_command4()