]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: remove empty help and parse functions
authorJan Engelhardt <jengelh@medozas.de>
Fri, 12 Jun 2009 18:59:34 +0000 (20:59 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Fri, 26 Jun 2009 19:13:10 +0000 (21:13 +0200)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libip6t_eui64.c
extensions/libipt_MIRROR.c
extensions/libipt_unclean.c
extensions/libxt_NOTRACK.c
extensions/libxt_TRACE.c
extensions/libxt_socket.c
extensions/libxt_standard.c

index c92c86870fa7addc9f172f5f697ee46df66e5432..607bf86f4550980f2be1f9a85a37df97189869c6 100644 (file)
@@ -1,38 +1,12 @@
 /* Shared library add-on to ip6tables to add EUI64 address checking support. */
-#include <stdio.h>
-#include <netdb.h>
-#include <string.h>
-#include <stdlib.h>
-#include <getopt.h>
-#if defined(__GLIBC__) && __GLIBC__ == 2
-#include <net/ethernet.h>
-#else
-#include <linux/if_ether.h>
-#endif
 #include <xtables.h>
 
-static void eui64_help(void)
-{
-       printf(
-"eui64 match options:\n"
-" This module hasn't got any option\n"
-" This module checks for EUI64 IPv6 addresses\n");
-}
-
-static int eui64_parse(int c, char **argv, int invert, unsigned int *flags,
-                       const void *entry, struct xt_entry_match **match)
-{
-       return 0;
-}
-
 static struct xtables_match eui64_mt6_reg = {
        .name           = "eui64",
        .version        = XTABLES_VERSION,
        .family         = NFPROTO_IPV6,
        .size           = XT_ALIGN(sizeof(int)),
        .userspacesize  = XT_ALIGN(sizeof(int)),
-       .help           = eui64_help,
-       .parse          = eui64_parse,
 };
 
 void _init(void)
index 81964dd72635028f207dce18c30c2078ea1a1edd..fb78751d73a4146bdbe05d0967a62afcf6e0e28a 100644 (file)
@@ -1,32 +1,12 @@
 /* Shared library add-on to iptables to add MIRROR target support. */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <getopt.h>
-
 #include <xtables.h>
 
-static void MIRROR_help(void)
-{
-       printf("MIRROR target takes no options\n");
-}
-
-static int MIRROR_parse(int c, char **argv, int invert, unsigned int *flags,
-                        const void *entry, struct xt_entry_target **target)
-{
-       return 0;
-}
-
 static struct xtables_target mirror_tg_reg = {
        .name           = "MIRROR",
        .version        = XTABLES_VERSION,
        .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(0),
        .userspacesize  = XT_ALIGN(0),
-       .help           = MIRROR_help,
-       .parse          = MIRROR_parse,
-       .print          = NULL,
-       .save           = NULL,
 };
 
 void _init(void)
index 93d9013e84267480f917344862616213c446d9cd..bc4a4a085fba2a921faeae5e9c4b0a5e147612b0 100644 (file)
@@ -1,28 +1,12 @@
 /* Shared library add-on to iptables for unclean. */
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
 #include <xtables.h>
 
-static void unclean_help(void)
-{
-       printf("unclean match takes no options\n");
-}
-
-static int unclean_parse(int c, char **argv, int invert, unsigned int *flags,
-                         const void *entry, struct xt_entry_match **match)
-{
-       return 0;
-}
-
 static struct xtables_match unclean_mt_reg = {
        .name           = "unclean",
        .version        = XTABLES_VERSION,
        .family         = NFPROTO_IPV4,
        .size           = XT_ALIGN(0),
        .userspacesize  = XT_ALIGN(0),
-       .help           = unclean_help,
-       .parse          = unclean_parse,
 };
 
 void _init(void)
index d997d84f4e3643dac5a5feccf5e35dde999f4d85..ca5870022bbb31f11c39c652f3b83353b99cc0b5 100644 (file)
@@ -1,23 +1,5 @@
 /* Shared library add-on to iptables to add NOTRACK target support. */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <getopt.h>
-
 #include <xtables.h>
-#include <linux/netfilter/x_tables.h>
-
-static void NOTRACK_help(void)
-{
-       printf("NOTRACK target takes no options\n");
-}
-
-static int
-NOTRACK_parse(int c, char **argv, int invert, unsigned int *flags,
-              const void *entry, struct xt_entry_target **target)
-{
-       return 0;
-}
 
 static struct xtables_target notrack_target = {
        .family         = NFPROTO_UNSPEC,
@@ -25,8 +7,6 @@ static struct xtables_target notrack_target = {
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(0),
        .userspacesize  = XT_ALIGN(0),
-       .help           = NOTRACK_help,
-       .parse          = NOTRACK_parse,
 };
 
 void _init(void)
index 344b80dcb060b26a45540a81482a6888f32870d2..0282e6ff4189f3efad5c91fa5712d37dc725fb9c 100644 (file)
@@ -7,25 +7,12 @@
 #include <xtables.h>
 #include <linux/netfilter/x_tables.h>
 
-static void TRACE_help(void)
-{
-       printf("TRACE target takes no options\n");
-}
-
-static int TRACE_parse(int c, char **argv, int invert, unsigned int *flags,
-                       const void *entry, struct xt_entry_target **target)
-{
-       return 0;
-}
-
 static struct xtables_target trace_target = {
        .family         = NFPROTO_UNSPEC,
        .name           = "TRACE",
        .version        = XTABLES_VERSION,
        .size           = XT_ALIGN(0),
        .userspacesize  = XT_ALIGN(0),
-       .help           = TRACE_help,
-       .parse          = TRACE_parse,
 };
 
 void _init(void)
index eebc7c55b49edecd1498d8d4b81dcb9dc1432530..1490473b4d8a83861fc3c40040bc3c949b3c28ba 100644 (file)
@@ -3,34 +3,14 @@
  *
  * Copyright (C) 2007 BalaBit IT Ltd.
  */
-#include <stdio.h>
-#include <getopt.h>
 #include <xtables.h>
 
-static void socket_mt_help(void)
-{
-       printf("socket v%s has no options\n\n", XTABLES_VERSION);
-}
-
-static int socket_mt_parse(int c, char **argv, int invert, unsigned int *flags,
-                       const void *entry, struct xt_entry_match **match)
-{
-       return 0;
-}
-
-static void socket_mt_check(unsigned int flags)
-{
-}
-
 static struct xtables_match socket_mt_reg = {
        .name          = "socket",
        .version       = XTABLES_VERSION,
        .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(0),
        .userspacesize = XT_ALIGN(0),
-       .parse         = socket_mt_parse,
-       .final_check   = socket_mt_check,
-       .help          = socket_mt_help,
 };
 
 void _init(void)
index 56dc2d291465853d16380177f5f2cffdf2aa0120..c64ba2971b69752321c8a861f2e2a158ff20bbe3 100644 (file)
@@ -1,10 +1,5 @@
 /* Shared library add-on to iptables for standard target support. */
 #include <stdio.h>
-#include <netdb.h>
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <getopt.h>
 #include <xtables.h>
 
 static void standard_help(void)
@@ -14,12 +9,6 @@ static void standard_help(void)
 "(If target is DROP, ACCEPT, RETURN or nothing)\n");
 }
 
-static int standard_parse(int c, char **argv, int invert, unsigned int *flags,
-                          const void *entry, struct xt_entry_target **target)
-{
-       return 0;
-}
-
 static struct xtables_target standard_target = {
        .family         = NFPROTO_UNSPEC,
        .name           = "standard",
@@ -27,7 +16,6 @@ static struct xtables_target standard_target = {
        .size           = XT_ALIGN(sizeof(int)),
        .userspacesize  = XT_ALIGN(sizeof(int)),
        .help           = standard_help,
-       .parse          = standard_parse,
 };
 
 void _init(void)