diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-06-25 20:12:12 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2009-06-26 21:13:10 +0200 |
commit | f2a77520693f0a6dd1df1f87be4b81913961c1f5 (patch) | |
tree | 25d11fc7ae9e4269162052915fccd7b33ec712d6 /extensions/libxt_TOS.c | |
parent | 9a8fc4f89ef120d7beda3724994a1544346b947d (diff) |
extensions: collapse data variables to use multi-reg calls
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions/libxt_TOS.c')
-rw-r--r-- | extensions/libxt_TOS.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/extensions/libxt_TOS.c b/extensions/libxt_TOS.c index e6382e14..bf751a4e 100644 --- a/extensions/libxt_TOS.c +++ b/extensions/libxt_TOS.c @@ -205,38 +205,38 @@ static void tos_tg_save(const void *ip, const struct xt_entry_target *target) printf("--set-tos 0x%02x/0x%02x ", info->tos_value, info->tos_mask); } -static struct xtables_target tos_tg_reg_v0 = { - .version = XTABLES_VERSION, - .name = "TOS", - .revision = 0, - .family = NFPROTO_IPV4, - .size = XT_ALIGN(sizeof(struct xt_tos_target_info)), - .userspacesize = XT_ALIGN(sizeof(struct xt_tos_target_info)), - .help = tos_tg_help_v0, - .parse = tos_tg_parse_v0, - .final_check = tos_tg_check, - .print = tos_tg_print_v0, - .save = tos_tg_save_v0, - .extra_opts = tos_tg_opts_v0, -}; - -static struct xtables_target tos_tg_reg = { - .version = XTABLES_VERSION, - .name = "TOS", - .revision = 1, - .family = NFPROTO_UNSPEC, - .size = XT_ALIGN(sizeof(struct xt_tos_target_info)), - .userspacesize = XT_ALIGN(sizeof(struct xt_tos_target_info)), - .help = tos_tg_help, - .parse = tos_tg_parse, - .final_check = tos_tg_check, - .print = tos_tg_print, - .save = tos_tg_save, - .extra_opts = tos_tg_opts, +static struct xtables_target tos_tg_reg[] = { + { + .version = XTABLES_VERSION, + .name = "TOS", + .revision = 0, + .family = NFPROTO_IPV4, + .size = XT_ALIGN(sizeof(struct xt_tos_target_info)), + .userspacesize = XT_ALIGN(sizeof(struct xt_tos_target_info)), + .help = tos_tg_help_v0, + .parse = tos_tg_parse_v0, + .final_check = tos_tg_check, + .print = tos_tg_print_v0, + .save = tos_tg_save_v0, + .extra_opts = tos_tg_opts_v0, + }, + { + .version = XTABLES_VERSION, + .name = "TOS", + .revision = 1, + .family = NFPROTO_UNSPEC, + .size = XT_ALIGN(sizeof(struct xt_tos_target_info)), + .userspacesize = XT_ALIGN(sizeof(struct xt_tos_target_info)), + .help = tos_tg_help, + .parse = tos_tg_parse, + .final_check = tos_tg_check, + .print = tos_tg_print, + .save = tos_tg_save, + .extra_opts = tos_tg_opts, + }, }; void _init(void) { - xtables_register_target(&tos_tg_reg_v0); - xtables_register_target(&tos_tg_reg); + xtables_register_targets(tos_tg_reg, ARRAY_SIZE(tos_tg_reg)); } |