summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrusty <rusty>2000-08-27 07:44:59 +0000
committerrusty <rusty>2000-08-27 07:44:59 +0000
commit84f5aa114639ae935ee0ade24aad301d0ce9551d (patch)
treef4187e0ccd930250be10df8755198dae5ebdf042
parentbe7c54f39f011625d483e127fd9e797daafa9948 (diff)
Required blank MIRROR target for Harald Welte's dlopen force patch.
-rw-r--r--extensions/libipt_MIRROR.c76
1 files changed, 76 insertions, 0 deletions
diff --git a/extensions/libipt_MIRROR.c b/extensions/libipt_MIRROR.c
new file mode 100644
index 0000000..fdaa665
--- /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);
+}