blob: 81964dd72635028f207dce18c30c2078ea1a1edd [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/* Shared library add-on to iptables to add MIRROR target support. */
2#include <stdio.h>
3#include <string.h>
4#include <stdlib.h>
5#include <getopt.h>
6
7#include <xtables.h>
8
9static void MIRROR_help(void)
10{
11 printf("MIRROR target takes no options\n");
12}
13
14static int MIRROR_parse(int c, char **argv, int invert, unsigned int *flags,
15 const void *entry, struct xt_entry_target **target)
16{
17 return 0;
18}
19
20static struct xtables_target mirror_tg_reg = {
21 .name = "MIRROR",
22 .version = XTABLES_VERSION,
23 .family = NFPROTO_IPV4,
24 .size = XT_ALIGN(0),
25 .userspacesize = XT_ALIGN(0),
26 .help = MIRROR_help,
27 .parse = MIRROR_parse,
28 .print = NULL,
29 .save = NULL,
30};
31
32void _init(void)
33{
34 xtables_register_target(&mirror_tg_reg);
35}