X-Git-Url: http://git.archive.openwrt.org/?p=project%2Ffirewall3.git;a=blobdiff_plain;f=xtables-5.h;h=352250025b57784ce05a08f659ac4be04abf4ec1;hp=1ae833453d50ced889d9ce800f0811a26a9f84b4;hb=e7b6234df3d34d82b909f1e7367a89d322f87814;hpb=182abe47ae4686944482580b42a972827a0e4b51 diff --git a/xtables-5.h b/xtables-5.h index 1ae8334..3522500 100644 --- a/xtables-5.h +++ b/xtables-5.h @@ -88,6 +88,36 @@ fw3_xt_merge_target_options(struct xtables_globals *g, struct xtables_target *t) g->opts = xtables_merge_options(g->opts, t->extra_opts, &t->option_offset); } +static inline void +fw3_xt_print_matches(void *ip, struct xtables_match **matches) +{ + struct xtables_rule_match *rm; + struct xtables_match *m; + + printf(" "); + + for (rm = matches; rm; rm = rm->next) + { + m = rm->match; + printf("-m %s ", fw3_xt_get_match_name(m)); + + if (m->save) + m->save(ip, m->m); + } +} + +static inline void +fw3_xt_print_target(void *ip, struct xtables_target *target) +{ + if (target) + { + printf("-j %s ", fw3_xt_get_target_name(target)); + + if (target->save) + target->save(ip, target->t); + } +} + /* xtables api addons */