blob: 93d9013e84267480f917344862616213c446d9cd [file] [log] [blame]
Marc Bouchere6869a82000-03-20 06:03:29 +00001/* Shared library add-on to iptables for unclean. */
2#include <stdio.h>
3#include <stdlib.h>
4#include <getopt.h>
Jan Engelhardt5d9678a2008-11-20 10:15:35 +01005#include <xtables.h>
Marc Bouchere6869a82000-03-20 06:03:29 +00006
Jan Engelhardt59d16402007-10-04 16:28:39 +00007static void unclean_help(void)
Marc Bouchere6869a82000-03-20 06:03:29 +00008{
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +02009 printf("unclean match takes no options\n");
Marc Bouchere6869a82000-03-20 06:03:29 +000010}
11
Jan Engelhardt59d16402007-10-04 16:28:39 +000012static int unclean_parse(int c, char **argv, int invert, unsigned int *flags,
13 const void *entry, struct xt_entry_match **match)
Marc Bouchere6869a82000-03-20 06:03:29 +000014{
15 return 0;
16}
17
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020018static struct xtables_match unclean_mt_reg = {
Pablo Neira8caee8b2004-12-28 13:11:59 +000019 .name = "unclean",
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020020 .version = XTABLES_VERSION,
Jan Engelhardt03d99482008-11-18 12:27:54 +010021 .family = NFPROTO_IPV4,
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020022 .size = XT_ALIGN(0),
23 .userspacesize = XT_ALIGN(0),
Jan Engelhardt59d16402007-10-04 16:28:39 +000024 .help = unclean_help,
25 .parse = unclean_parse,
Marc Bouchere6869a82000-03-20 06:03:29 +000026};
27
28void _init(void)
29{
Jan Engelhardt8b7c64d2008-04-15 11:48:25 +020030 xtables_register_match(&unclean_mt_reg);
Marc Bouchere6869a82000-03-20 06:03:29 +000031}