printf(
"nth v%s options:\n"
" --every Nth Match every Nth packet\n"
-" [--counter] num Use counter 0-%u (default:0)\n"
-" [--start] num Initialize the counter at the number 'num'\n"
+" [--counter num ] Use counter 0-%u (default:0)\n"
+" [--start num ] Initialize the counter at the number 'num'\n"
" instead of 0. Must be between 0 and Nth-1\n"
-" [--packet] num Match on 'num' packet. Must be between 0\n"
+" [--packet num ] Match on 'num' packet. Must be between 0\n"
" and Nth-1.\n\n"
" If --packet is used for a counter than\n"
" there must be Nth number of --packet\n"
{ 0 }
};
-/* Initialize the target. */
-static void
-init(struct ipt_entry_match *m, unsigned int *nfcache)
-{
- *nfcache |= NFC_UNKNOWN;
-}
-
#define IPT_NTH_OPT_EVERY 0x01
#define IPT_NTH_OPT_NOT_EVERY 0x02
#define IPT_NTH_OPT_START 0x04
printf("--packet %u ", nthinfo->packet );
}
-struct iptables_match nth
-= { NULL,
- "nth",
- IPTABLES_VERSION,
- IPT_ALIGN(sizeof(struct ipt_nth_info)),
- IPT_ALIGN(sizeof(struct ipt_nth_info)),
- &help,
- &init,
- &parse,
- &final_check,
- &print,
- &save,
- opts
+static struct iptables_match nth = {
+ .next = NULL,
+ .name = "nth",
+ .version = IPTABLES_VERSION,
+ .size = IPT_ALIGN(sizeof(struct ipt_nth_info)),
+ .userspacesize = IPT_ALIGN(sizeof(struct ipt_nth_info)),
+ .help = &help,
+ .parse = &parse,
+ .final_check = &final_check,
+ .print = &print,
+ .save = &save,
+ .extra_opts = opts
};
void _init(void)