Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / iptables / extensions / libipt_TARPIT.c
blobdc11d60ce6ff5f4bef4616ca39eb54ca3bb72ced
1 /* Shared library add-on to iptables for TARPIT support */
2 #include <stdio.h>
3 #include <getopt.h>
4 #include <iptables.h>
6 #ifndef XTABLES_VERSION
7 #define XTABLES_VERSION IPTABLES_VERSION
8 #endif
10 #ifdef IPT_LIB_DIR
11 #define xtables_target iptables_target
12 #define xtables_register_target register_target
13 #endif
15 static void
16 help(void)
18 fputs(
19 "TARPIT takes no options\n"
20 "\n", stdout);
23 static struct option opts[] = {
24 { 0 }
28 static int
29 parse(int c, char **argv, int invert, unsigned int *flags,
30 #ifdef _XTABLES_H
31 const void *entry, struct xt_entry_target **target)
32 #else
33 const struct ipt_entry *entry, struct ipt_entry_target **target)
34 #endif
36 return 0;
39 static void final_check(unsigned int flags)
43 static void
44 #ifdef _XTABLES_H
45 print(const void *ip,
46 const struct xt_entry_target *target,
47 #else
48 print(const struct ipt_ip *ip,
49 const struct ipt_entry_target *target,
50 #endif
51 int numeric)
55 static void
56 #ifdef _XTABLES_H
57 save(const void *ip,
58 const struct xt_entry_target *target)
59 #else
60 save(const struct ipt_ip *ip,
61 const struct ipt_entry_target *target)
62 #endif
66 static struct xtables_target tarpit = {
67 .next = NULL,
68 .name = "TARPIT",
69 .version = XTABLES_VERSION,
70 .size = IPT_ALIGN(0),
71 .userspacesize = IPT_ALIGN(0),
72 .help = &help,
73 .parse = &parse,
74 .final_check = &final_check,
75 .print = &print,
76 .save = &save,
77 .extra_opts = opts
80 void _init(void)
82 xtables_register_target(&tarpit);