changing trunk/trunk to trunk
[iptables.git] / extensions / libipt_MIRROR.c
1 /* 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 <iptables.h>
8 #include <linux/netfilter_ipv4/ip_tables.h>
9
10 /* Function which prints out usage message. */
11 static void MIRROR_help(void)
12 {
13         printf("MIRROR target takes no options\n");
14 }
15
16 /* Function which parses command options; returns true if it
17    ate an option */
18 static int MIRROR_parse(int c, char **argv, int invert, unsigned int *flags,
19                         const void *entry, struct xt_entry_target **target)
20 {
21         return 0;
22 }
23
24 static struct xtables_target mirror_tg_reg = {
25         .name           = "MIRROR",
26         .version        = XTABLES_VERSION,
27         .family         = PF_INET,
28         .size           = XT_ALIGN(0),
29         .userspacesize  = XT_ALIGN(0),
30         .help           = MIRROR_help,
31         .parse          = MIRROR_parse,
32         .print          = NULL,
33         .save           = NULL,
34 };
35
36 void _init(void)
37 {
38         xtables_register_target(&mirror_tg_reg);
39 }