libipt_MIRROR.c revision 830132ac9c0d270bf9dcfe85c2464e3fe8c73fb9
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. */
11static void
12help(void)
13{
14	printf(
15"MIRROR target v%s takes no options\n",
16IPTABLES_VERSION);
17}
18
19/* Function which parses command options; returns true if it
20   ate an option */
21static int
22parse(int c, char **argv, int invert, unsigned int *flags,
23      const void *entry,
24      struct xt_entry_target **target)
25{
26	return 0;
27}
28
29static struct iptables_target mirror = {
30	.name		= "MIRROR",
31	.version	= IPTABLES_VERSION,
32	.size		= IPT_ALIGN(0),
33	.userspacesize	= IPT_ALIGN(0),
34 	.help		= &help,
35 	.parse		= &parse,
36	.print		= NULL,
37	.save		= NULL,
38};
39
40void _init(void)
41{
42	register_target(&mirror);
43}
44