- print_chain(rule);
- fw3_format_ipset(rule->_ipset, rule->ipset.invert);
- fw3_format_protocol(proto, family);
- fw3_format_src_dest(sip, dip);
- fw3_format_sport_dport(sport, dport);
- fw3_format_icmptype(icmptype, family);
- fw3_format_mac(mac);
- fw3_format_limit(&rule->limit);
- fw3_format_time(&rule->time);
- fw3_format_mark(&rule->mark);
- fw3_format_extra(rule->extra);
- fw3_format_comment(rule->name);
- print_target(rule);
+ r = fw3_ipt_rule_create(handle, proto, NULL, NULL, sip, dip);
+ fw3_ipt_rule_sport_dport(r, sport, dport);
+ fw3_ipt_rule_icmptype(r, icmptype);
+ fw3_ipt_rule_mac(r, mac);
+ fw3_ipt_rule_ipset(r, &rule->ipset);
+ fw3_ipt_rule_limit(r, &rule->limit);
+ fw3_ipt_rule_time(r, &rule->time);
+ fw3_ipt_rule_mark(r, &rule->mark);
+ set_target(r, rule);
+ fw3_ipt_rule_extra(r, rule->extra);
+ set_comment(r, rule->name, num);
+ append_chain(r, rule);