diff options
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/libipt_MIRROR.c | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/extensions/libipt_MIRROR.c b/extensions/libipt_MIRROR.c new file mode 100644 index 00000000..fdaa6650 --- /dev/null +++ b/extensions/libipt_MIRROR.c @@ -0,0 +1,76 @@ +/* Shared library add-on to iptables to add MIRROR target support. */ +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <getopt.h> + +#include <iptables.h> +#include <linux/netfilter_ipv4/ip_tables.h> + +/* Function which prints out usage message. */ +static void +help(void) +{ + printf( +"MIRROR target v%s takes no options\n", +NETFILTER_VERSION); +} + +static struct option opts[] = { + { 0 } +}; + +/* Initialize the target. */ +static void +init(struct ipt_entry_target *t, unsigned int *nfcache) +{ +} + +/* Function which parses command options; returns true if it + ate an option */ +static int +parse(int c, char **argv, int invert, unsigned int *flags, + const struct ipt_entry *entry, + struct ipt_entry_target **target) +{ + return 0; +} + +static void +final_check(unsigned int flags) +{ +} + +/* Prints out the targinfo. */ +static void +print(const struct ipt_ip *ip, + const struct ipt_entry_target *target, + int numeric) +{ +} + +/* Saves the union ipt_targinfo in parsable form to stdout. */ +static void +save(const struct ipt_ip *ip, const struct ipt_entry_target *target) +{ +} + +struct iptables_target mirror += { NULL, + "MIRROR", + NETFILTER_VERSION, + IPT_ALIGN(0), + IPT_ALIGN(0), + &help, + &init, + &parse, + &final_check, + &print, + &save, + opts +}; + +void _init(void) +{ + register_target(&mirror); +} |