1 /* Shared library add-on to iptables for IPV4OPTSSTRIP
2 * This modules strip all the IP options.
4 * (C) 2001 by Fabrice MARIE <fabrice@netfilter.org>
5 * This program is distributed under the terms of GNU GPL v2, 1991
14 #include <linux/netfilter_ipv4/ip_tables.h>
16 static void help(void)
18 printf("IPV4OPTSSTRIP v%s target takes no option !! Make sure you use it in the mangle table.\n",
22 static struct option opts[] = {
26 /* Function which parses command options; returns true if it
29 parse(int c, char **argv, int invert, unsigned int *flags,
30 const struct ipt_entry *entry,
31 struct ipt_entry_target **target)
37 final_check(unsigned int flags)
41 /* Prints out the targinfo. */
43 print(const struct ipt_ip *ip,
44 const struct ipt_entry_target *target,
47 /* nothing to print, we don't take option... */
50 /* Saves the stuff in parsable form to stdout. */
52 save(const struct ipt_ip *ip, const struct ipt_entry_target *target)
54 /* nothing to print, we don't take option... */
57 static struct iptables_target IPV4OPTSSTRIP = {
59 .name = "IPV4OPTSSTRIP",
60 .version = IPTABLES_VERSION,
62 .userspacesize = IPT_ALIGN(0),
65 .final_check = &final_check,
73 register_target(&IPV4OPTSSTRIP);