blob: b4d9a07c9413781281d6449ffcce27d3126db68a [file] [log] [blame]
Rusty Russell51d9b752000-08-27 07:44:59 +00001/* 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",
16NETFILTER_VERSION);
17}
18
19static struct option opts[] = {
20 { 0 }
21};
22
23/* Initialize the target. */
24static void
25init(struct ipt_entry_target *t, unsigned int *nfcache)
26{
27}
28
29/* Function which parses command options; returns true if it
30 ate an option */
31static int
32parse(int c, char **argv, int invert, unsigned int *flags,
33 const struct ipt_entry *entry,
34 struct ipt_entry_target **target)
35{
36 return 0;
37}
38
39static void
40final_check(unsigned int flags)
41{
42}
43
Rusty Russell51d9b752000-08-27 07:44:59 +000044struct iptables_target mirror
45= { NULL,
46 "MIRROR",
47 NETFILTER_VERSION,
48 IPT_ALIGN(0),
49 IPT_ALIGN(0),
50 &help,
51 &init,
52 &parse,
53 &final_check,
Rusty Russell2d01dca2000-09-01 06:03:12 +000054 NULL, /* print */
55 NULL, /* save */
Rusty Russell51d9b752000-08-27 07:44:59 +000056 opts
57};
58
59void _init(void)
60{
61 register_target(&mirror);
62}