Busybox: Upgrade to 1.21.1 (stable). lsof active.
[tomato.git] / release / src / router / iptables / extensions / libipt_IPV4OPTSSTRIP.c
blobd0305e63687ef12101bbfaf85e0b6f659c4a79fb
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
6 */
8 #include <stdio.h>
9 #include <string.h>
10 #include <stdlib.h>
11 #include <getopt.h>
13 #include <iptables.h>
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",
19 IPTABLES_VERSION);
22 static struct option opts[] = {
23 { 0 }
26 /* Function which parses command options; returns true if it
27 ate an option */
28 static int
29 parse(int c, char **argv, int invert, unsigned int *flags,
30 const struct ipt_entry *entry,
31 struct ipt_entry_target **target)
33 return 0;
36 static void
37 final_check(unsigned int flags)
41 /* Prints out the targinfo. */
42 static void
43 print(const struct ipt_ip *ip,
44 const struct ipt_entry_target *target,
45 int numeric)
47 /* nothing to print, we don't take option... */
50 /* Saves the stuff in parsable form to stdout. */
51 static void
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 = {
58 .next = NULL,
59 .name = "IPV4OPTSSTRIP",
60 .version = IPTABLES_VERSION,
61 .size = IPT_ALIGN(0),
62 .userspacesize = IPT_ALIGN(0),
63 .help = &help,
64 .parse = &parse,
65 .final_check = &final_check,
66 .print = &print,
67 .save = &save,
68 .extra_opts = opts
71 void _init(void)
73 register_target(&IPV4OPTSSTRIP);