Tomato 1.28
[tomato.git] / release / src / router / iptables / extensions / libipt_TARPIT.c
blobb12cbc2ccec8d015facd2f8729f3e11953f63f7c
1 /* Shared library add-on to iptables for TARPIT support */
2 #include <stdio.h>
3 #include <getopt.h>
4 #include <iptables.h>
6 static void
7 help(void)
9 fputs(
10 "TARPIT takes no options\n"
11 "\n", stdout);
14 static struct option opts[] = {
15 { 0 }
18 static int
19 parse(int c, char **argv, int invert, unsigned int *flags,
20 const struct ipt_entry *entry,
21 struct ipt_entry_target **target)
23 return 0;
26 static void final_check(unsigned int flags)
30 static void
31 print(const struct ipt_ip *ip,
32 const struct ipt_entry_target *target,
33 int numeric)
37 static void save(const struct ipt_ip *ip, const struct ipt_entry_target *target)
41 static struct iptables_target tarpit = {
42 .next = NULL,
43 .name = "TARPIT",
44 .version = IPTABLES_VERSION,
45 .size = IPT_ALIGN(0),
46 .userspacesize = IPT_ALIGN(0),
47 .help = &help,
48 .parse = &parse,
49 .final_check = &final_check,
50 .print = &print,
51 .save = &save,
52 .extra_opts = opts
55 void _init(void)
57 register_target(&tarpit);